OSAL-AT指令

static uint8 str_cmp(uint8 *p1,uint8 *p2,uint8 len)
{
    uint8 i = 0;
    while(i=read_max_bytes || (new_time-old_time)>20)
            {
                uint8 send_bytes=0;
                uint8 *buffer = osal_mem_alloc(num_bytes);
                if (num_bytes > read_max_bytes)
                {
                    send_bytes = read_max_bytes;
                } else
                {
                    send_bytes = num_bytes;
                }
                if (buffer)
                {
                   //读取读取串口缓冲区数据,释放串口数据   
                    NPI_ReadTransport(buffer,num_bytes);   
                    simple_ble_at_cmd_handle(buffer,send_bytes);
                    osal_mem_free(buffer);
                }
                old_time = new_time;
                old_time_data_len = num_bytes - send_bytes;
            }
        }
    }
}

测试效果;


image.png

你可能感兴趣的:(OSAL-AT指令)