22 #ifndef __NRF_RADIO_H__
23 #define __NRF_RADIO_H__
25 #if !defined(ARDUINO_ARCH_NRF5)
26 #error "NRF5 Radio is not supported for this platform."
35 #define NRF5_RADIO_TIMER NRF_TIMER0
36 #define NRF5_RADIO_TIMER_IRQ_HANDLER TIMER0_IRQHandler
37 #define NRF5_RADIO_TIMER_IRQN TIMER0_IRQn
40 #if defined(MY_DEBUG_VERBOSE_NRF5_ESB)
41 #define NRF5_RADIO_DEBUG(x, ...) DEBUG_OUTPUT(x, ##__VA_ARGS__)
43 #define NRF5_RADIO_DEBUG(x, ...)
49 NRF5_PA_MIN = RADIO_TXPOWER_TXPOWER_Neg30dBm,
51 NRF5_PA_MIN = RADIO_TXPOWER_TXPOWER_Neg40dBm,
53 NRF5_PA_LOW = RADIO_TXPOWER_TXPOWER_Neg16dBm,
54 NRF5_PA_HIGH = RADIO_TXPOWER_TXPOWER_0dBm,
55 #ifdef RADIO_TXPOWER_TXPOWER_Pos9dBm
57 NRF5_PA_MAX = RADIO_TXPOWER_TXPOWER_Pos9dBm,
60 NRF5_PA_MAX = RADIO_TXPOWER_TXPOWER_Pos4dBm,
66 NRF5_1MBPS = RADIO_MODE_MODE_Nrf_1Mbit,
67 NRF5_2MBPS = RADIO_MODE_MODE_Nrf_2Mbit,
68 #ifdef RADIO_MODE_MODE_Nrf_250Kbit
69 NRF5_250KBPS = RADIO_MODE_MODE_Nrf_250Kbit,
71 NRF5_BLE_1MBPS = RADIO_MODE_MODE_Ble_1Mbit,
74 int16_t NRF5_getTxPowerPercent(
void);
75 int16_t NRF5_getTxPowerLevel(
void);
76 bool NRF5_setTxPowerPercent(
const uint8_t powerPercent);
79 #endif // __NRF_RADIO_H__