====== comFlush ====== ''void comFlush (u8 comCh) '' |comCh : 통신채널번호 (0 ~ 2) | ==== 설명 ==== 수신버퍼를 깨끗이 청소해주는 함수입니다. ==== 사용예 ==== // // 수신된 데이터중 ‘대문자 A’가 있다면, 수신버퍼를 클리어해줍니다. // #include "moacon500.h" void cmain(void) { short chari; openCom(0, 115200, C8N1); while (1) { while (comLen(0) < 5); chari = comGet(0); if (chari == 0x41) comFlush(0); else comPut(0,chari); } } [[moacon:index#모아콘_라이브러리|라이브러리 목록으로 가기]]