send string data
This commit is contained in:
@@ -81,8 +81,8 @@ void main(void) {
|
|||||||
|
|
||||||
|
|
||||||
tos_sem_create(&sem_led, 1);
|
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(&led_handle, "led", task_led, NULL, 6, 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(&lcd_handle, "lcd", task_lcd, NULL, 6, lcd_stk, LCD_TASK_SIZE, 0);
|
||||||
|
|
||||||
tos_knl_start();
|
tos_knl_start();
|
||||||
|
|
||||||
|
@@ -244,15 +244,16 @@ void test_nrf24l01_tx() {
|
|||||||
while(1) {
|
while(1) {
|
||||||
nrf_flush_rx();
|
nrf_flush_rx();
|
||||||
nrf_flush_tx();
|
nrf_flush_tx();
|
||||||
uint8_t buf[] = {0x0A, 0x0C, 0x0E, cnt++ };
|
uint8_t buf[32];
|
||||||
nrf_write_payload(buf, sizeof(buf));
|
snprintf(buf, sizeof(buf), "Ace nRF24L01+ %u", cnt++);
|
||||||
|
nrf_write_payload(buf, strlen(buf)+1);
|
||||||
tos_sem_post(&sem_led);
|
tos_sem_post(&sem_led);
|
||||||
nrf_delay(100);
|
nrf_delay(100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void task_nrf24() {
|
void task_nrf24() {
|
||||||
test_nrf24l01_irq_rx();
|
//test_nrf24l01_irq_rx();
|
||||||
//test_nrf24l01_rx();
|
//test_nrf24l01_rx();
|
||||||
//test_nrf24l01_tx();
|
test_nrf24l01_tx();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user