电赛备战贴,无线串口的配置与解算
太好用了8051u实现无线串口的接发uint32 wireless_uart_send_byte (const uint8 dat)
{
uint16 time_count = WIRELESS_UART_TIMEOUT_COUNT;
while(time_count)
{
if(!gpio_get_level(WIRELESS_UART_RTS_PIN))
{
uart_write_byte(WIRELESS_UART_INDEX, dat); // 发送数据
break;
}
time_count --;
system_delay_ms(1);
}
return (0 == time_count);
}
页:
[1]