uint32_t rx_in =0;uint32_t rx_out =0;uint32_t rx_len =512;uint8_t rx_buf[512]; uint32_t cdcAvailable(void){ uint32_t ret; ret= (rx_in - rx_out) % rx_len; return ret;} rx_len 나머지 연산으로 오버플로우 예방 ( MAX 512까지만 나오도록) uint32_t cdcWrite(uint8_t * p_data, uint32_t length){ uint32_t pre_time; uint8_t ret; pre_time = millis(); while(1) { ret= CDC_Transmit_FS(p_data, length); if(ret == USBD_OK) { retu..