Wouter van Kleunen
/
nrf52_esb
NRF52_esb
Diff: main.cpp
- Revision:
- 1:66f95e364222
- Parent:
- 0:a01a54c0dc90
--- a/main.cpp Mon Mar 23 04:09:41 2015 +0000 +++ b/main.cpp Thu Feb 04 10:36:44 2021 +0000 @@ -11,6 +11,8 @@ #include "nrf_delay.h" //#include "nrf_gpio.h" + + static uesb_payload_t tx_payload, rx_payload; void uesb_event_handler() @@ -26,7 +28,7 @@ if(rf_interrupts & UESB_INT_TX_FAILED_MSK) { - uesb_flush_tx(); + uesb_flush_tx(); } if(rf_interrupts & UESB_INT_RX_DR_MSK) @@ -36,7 +38,7 @@ NRF_GPIO->OUTSET = (uint32_t)((rx_payload.data[2] & 0x0F) << 8); } - uesb_get_tx_attempts(&tx_attempts); + uesb_get_tx_attempts(&tx_attempts); NRF_GPIO->OUTCLR = 0xFUL << 12; NRF_GPIO->OUTSET = (tx_attempts & 0x0F) << 12; } @@ -65,9 +67,9 @@ uesb_init(&uesb_config); - uesb_set_address(UESB_ADDRESS_PIPE0, rx_addr_p0); - uesb_set_address(UESB_ADDRESS_PIPE1, rx_addr_p1); - uesb_set_address(UESB_ADDRESS_PIPE2, &rx_addr_p2); + nrf_esb_set_base_address_0(rx_addr_p0); + nrf_esb_set_base_address_1(rx_addr_p1); + //nrf_esb_set_base_address_2(&rx_addr_p2); tx_payload.length = 8; tx_payload.pipe = 0;