forked from TencentOS/TencentOS-tiny
send string data
This commit is contained in:
parent
ca2743c09d
commit
b3f83445ff
|
|
@ -81,8 +81,8 @@ void main(void) {
|
|||
|
||||
|
||||
tos_sem_create(&sem_led, 1);
|
||||
tos_task_create(&led_handle, "led", task_led, NULL, 3, led_stk, LED_TASK_SIZE, 0);
|
||||
tos_task_create(&lcd_handle, "lcd", task_lcd, NULL, 3, lcd_stk, LCD_TASK_SIZE, 0);
|
||||
tos_task_create(&led_handle, "led", task_led, NULL, 6, led_stk, LED_TASK_SIZE, 0);
|
||||
tos_task_create(&lcd_handle, "lcd", task_lcd, NULL, 6, lcd_stk, LCD_TASK_SIZE, 0);
|
||||
|
||||
tos_knl_start();
|
||||
|
||||
|
|
|
|||
|
|
@ -244,15 +244,16 @@ void test_nrf24l01_tx() {
|
|||
while(1) {
|
||||
nrf_flush_rx();
|
||||
nrf_flush_tx();
|
||||
uint8_t buf[] = {0x0A, 0x0C, 0x0E, cnt++ };
|
||||
nrf_write_payload(buf, sizeof(buf));
|
||||
uint8_t buf[32];
|
||||
snprintf(buf, sizeof(buf), "Ace nRF24L01+ %u", cnt++);
|
||||
nrf_write_payload(buf, strlen(buf)+1);
|
||||
tos_sem_post(&sem_led);
|
||||
nrf_delay(100);
|
||||
}
|
||||
}
|
||||
|
||||
void task_nrf24() {
|
||||
test_nrf24l01_irq_rx();
|
||||
//test_nrf24l01_irq_rx();
|
||||
//test_nrf24l01_rx();
|
||||
//test_nrf24l01_tx();
|
||||
test_nrf24l01_tx();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue