当数据长度正好为mps大小时,将数据拆分为32+32两包数据发送
Code: Select all
void network_lte_send(const void* src, size_t size)
{
static const char *TAG = "USB输出";
switch (LTE_trans_mode_default)
{
case LTE_trans_usb:
if(size == 64)
{
uint8_t *src1 = src;
uint8_t *src2 = src + 32;
ESP_LOGI(TAG,"处理64字节包");
usbh_cdc_write_bytes(src1,32);
usbh_cdc_write_bytes(src2,32);
}
else
{
usbh_cdc_write_bytes(src,size);
}
break;
case LTE_trans_uart:
uart_write_bytes(UART_NUM_0,src,size);
default: