libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
Defined Constants and Types for the NRF52xx 2.4GHz radio More...
Modules | |
Radio event -> task shortcuts | |
Radio interrupts | |
Enumerations | |
enum | radio_txpower { RADIO_TXPOWER_POS_4DBM = 0x4 , RADIO_TXPOWER_0DBM = 0 , RADIO_TXPOWER_NEG_4DBM = 0xFC , RADIO_TXPOWER_NEG_8DBM = 0xF8 , RADIO_TXPOWER_NEG_12DBM = 0xF4 , RADIO_TXPOWER_NEG_16DBM = 0xF0 , RADIO_TXPOWER_NEG_20DBM = 0xEC , RADIO_TXPOWER_NEG_30DBM = 0xD8 } |
enum | radio_state { RADIO_STATE_DISABLED , RADIO_STATE_RXRU , RADIO_STATE_RXIDLE , RADIO_STATE_RX , RADIO_STATE_RXDISABLE , RADIO_STATE_TXRU = 9 , RADIO_STATE_TXIDLE , RADIO_STATE_TX , RADIO_STATE_TXDISABLE } |
Defined Constants and Types for the NRF52xx 2.4GHz radio
LGPL License Terms libopencm3 License
#define RADIO_BASE0 MMIO32(RADIO_BASE + 0x51C) |
Definition at line 75 of file common/radio.h.
#define RADIO_BASE1 MMIO32(RADIO_BASE + 0x520) |
Definition at line 76 of file common/radio.h.
#define RADIO_BCC MMIO32(RADIO_BASE + 0x560) |
Definition at line 89 of file common/radio.h.
#define RADIO_BLE_CRCINIT (0x555555) |
Definition at line 268 of file common/radio.h.
#define RADIO_BLE_CRCLEN (3) |
Definition at line 266 of file common/radio.h.
#define RADIO_BLE_CRCPOLY (0x65B) |
Definition at line 267 of file common/radio.h.
#define RADIO_BLE_TIFS (150) |
Definition at line 265 of file common/radio.h.
#define RADIO_CRCCNF MMIO32(RADIO_BASE + 0x534) |
Definition at line 81 of file common/radio.h.
#define RADIO_CRCCNF_LEN_MASK (3 << RADIO_CRCCNF_LEN_SHIFT) |
Definition at line 228 of file common/radio.h.
#define RADIO_CRCCNF_LEN_MASKED | ( | V | ) |
Definition at line 229 of file common/radio.h.
#define RADIO_CRCCNF_LEN_SHIFT (0) |
Definition at line 227 of file common/radio.h.
#define RADIO_CRCCNF_SKIPADDR (1 << 8) |
Definition at line 232 of file common/radio.h.
#define RADIO_CRCINIT MMIO32(RADIO_BASE + 0x53C) |
Definition at line 83 of file common/radio.h.
#define RADIO_CRCPOLY MMIO32(RADIO_BASE + 0x538) |
Definition at line 82 of file common/radio.h.
#define RADIO_CRCSTATUS MMIO32(RADIO_BASE + 0x400) |
Definition at line 65 of file common/radio.h.
#define RADIO_DAB | ( | n | ) | MMIO32(RADIO_BASE + 0x600 + 0x4 * (n)) |
Definition at line 92 of file common/radio.h.
#define RADIO_DACNF MMIO32(RADIO_BASE + 0x640) |
Definition at line 95 of file common/radio.h.
#define RADIO_DACNF_ENA | ( | n | ) | (1 << (n)) |
Definition at line 237 of file common/radio.h.
#define RADIO_DACNF_ENA0 RADIO_DACNF_ENA(0) |
Definition at line 238 of file common/radio.h.
#define RADIO_DACNF_ENA1 RADIO_DACNF_ENA(1) |
Definition at line 239 of file common/radio.h.
#define RADIO_DACNF_ENA2 RADIO_DACNF_ENA(2) |
Definition at line 240 of file common/radio.h.
#define RADIO_DACNF_ENA3 RADIO_DACNF_ENA(3) |
Definition at line 241 of file common/radio.h.
#define RADIO_DACNF_ENA4 RADIO_DACNF_ENA(4) |
Definition at line 242 of file common/radio.h.
#define RADIO_DACNF_ENA5 RADIO_DACNF_ENA(5) |
Definition at line 243 of file common/radio.h.
#define RADIO_DACNF_ENA6 RADIO_DACNF_ENA(6) |
Definition at line 244 of file common/radio.h.
#define RADIO_DACNF_ENA7 RADIO_DACNF_ENA(7) |
Definition at line 245 of file common/radio.h.
#define RADIO_DACNF_TXADD | ( | n | ) | (1 << ((n) + 8)) |
Definition at line 247 of file common/radio.h.
#define RADIO_DACNF_TXADD0 RADIO_DACNF_TXADD(0) |
Definition at line 248 of file common/radio.h.
#define RADIO_DACNF_TXADD1 RADIO_DACNF_TXADD(1) |
Definition at line 249 of file common/radio.h.
#define RADIO_DACNF_TXADD2 RADIO_DACNF_TXADD(2) |
Definition at line 250 of file common/radio.h.
#define RADIO_DACNF_TXADD3 RADIO_DACNF_TXADD(3) |
Definition at line 251 of file common/radio.h.
#define RADIO_DACNF_TXADD4 RADIO_DACNF_TXADD(4) |
Definition at line 252 of file common/radio.h.
#define RADIO_DACNF_TXADD5 RADIO_DACNF_TXADD(5) |
Definition at line 253 of file common/radio.h.
#define RADIO_DACNF_TXADD6 RADIO_DACNF_TXADD(6) |
Definition at line 254 of file common/radio.h.
#define RADIO_DACNF_TXADD7 RADIO_DACNF_TXADD(7) |
Definition at line 255 of file common/radio.h.
#define RADIO_DAI MMIO32(RADIO_BASE + 0x410) |
Definition at line 68 of file common/radio.h.
#define RADIO_DAP | ( | n | ) | MMIO32(RADIO_BASE + 0x620 + 0x4 * (n)) |
Definition at line 94 of file common/radio.h.
#define RADIO_DATAWHITEIV MMIO32(RADIO_BASE + 0x554) |
Definition at line 88 of file common/radio.h.
#define RADIO_EVENT_ADDRESS MMIO32(RADIO_BASE + 0x104) |
Definition at line 52 of file common/radio.h.
#define RADIO_EVENT_DEVMATCH MMIO32(RADIO_BASE + 0x114) |
Definition at line 56 of file common/radio.h.
#define RADIO_EVENT_DEVMISS MMIO32(RADIO_BASE + 0x118) |
Definition at line 57 of file common/radio.h.
#define RADIO_EVENT_DISABLED MMIO32(RADIO_BASE + 0x110) |
Definition at line 55 of file common/radio.h.
#define RADIO_EVENT_END MMIO32(RADIO_BASE + 0x10C) |
Definition at line 54 of file common/radio.h.
#define RADIO_EVENT_PAYLOAD MMIO32(RADIO_BASE + 0x108) |
Definition at line 53 of file common/radio.h.
#define RADIO_EVENT_READY MMIO32(RADIO_BASE + 0x100) |
Definition at line 51 of file common/radio.h.
#define RADIO_EVENT_RSSIEND MMIO32(RADIO_BASE + 0x11C) |
Definition at line 58 of file common/radio.h.
#define RADIO_FREQUENCY MMIO32(RADIO_BASE + 0x508) |
Definition at line 70 of file common/radio.h.
#define RADIO_INTENCLR _PERIPH_INTENCLR(RADIO_BASE) |
Definition at line 64 of file common/radio.h.
#define RADIO_INTENSET _PERIPH_INTENSET(RADIO_BASE) |
Definition at line 63 of file common/radio.h.
#define RADIO_MODE MMIO32(RADIO_BASE + 0x510) |
Definition at line 72 of file common/radio.h.
#define RADIO_OVERRIDE | ( | n | ) | MMIO32(RADIO_BASE + 0x724 + 0x4 * (n)) |
Definition at line 98 of file common/radio.h.
#define RADIO_OVERRIDE4_ENABLE (1 << 31) |
Definition at line 258 of file common/radio.h.
#define RADIO_OVERRIDE4_OVERRIDE_MASK (0x0fffffff) |
Definition at line 259 of file common/radio.h.
#define RADIO_PACKETPTR MMIO32(RADIO_BASE + 0x504) |
Definition at line 69 of file common/radio.h.
#define RADIO_PCNF0 MMIO32(RADIO_BASE + 0x514) |
Definition at line 73 of file common/radio.h.
#define RADIO_PCNF0_LFLEN_MASK (0xf << RADIO_PCNF0_LFLEN_SHIFT) |
Definition at line 133 of file common/radio.h.
#define RADIO_PCNF0_LFLEN_MASKED | ( | V | ) |
Definition at line 134 of file common/radio.h.
#define RADIO_PCNF0_LFLEN_SHIFT (0) |
Definition at line 132 of file common/radio.h.
#define RADIO_PCNF0_S0LEN_MASK (1 << RADIO_PCNF0_S0LEN_SHIFT) |
Definition at line 138 of file common/radio.h.
#define RADIO_PCNF0_S0LEN_MASKED | ( | V | ) |
Definition at line 139 of file common/radio.h.
#define RADIO_PCNF0_S0LEN_SHIFT (8) |
Definition at line 137 of file common/radio.h.
#define RADIO_PCNF0_S1LEN_MASK (0xf << RADIO_PCNF0_S1LEN_SHIFT) |
Definition at line 143 of file common/radio.h.
#define RADIO_PCNF0_S1LEN_MASKED | ( | V | ) |
Definition at line 144 of file common/radio.h.
#define RADIO_PCNF0_S1LEN_SHIFT (16) |
Definition at line 142 of file common/radio.h.
#define RADIO_PCNF1 MMIO32(RADIO_BASE + 0x518) |
Definition at line 74 of file common/radio.h.
#define RADIO_PCNF1_BALEN_MASK (7 << RADIO_PCNF1_BALEN_SHIFT) |
Definition at line 158 of file common/radio.h.
#define RADIO_PCNF1_BALEN_MASKED | ( | V | ) |
Definition at line 159 of file common/radio.h.
#define RADIO_PCNF1_BALEN_SHIFT (16) |
Definition at line 157 of file common/radio.h.
#define RADIO_PCNF1_ENDIAN_BIG (1 << 24) |
Definition at line 162 of file common/radio.h.
#define RADIO_PCNF1_MAXLEN_MASK (0xff << RADIO_PCNF1_MAXLEN_SHIFT) |
Definition at line 148 of file common/radio.h.
#define RADIO_PCNF1_MAXLEN_MASKED | ( | V | ) |
Definition at line 149 of file common/radio.h.
#define RADIO_PCNF1_MAXLEN_SHIFT (0) |
Definition at line 147 of file common/radio.h.
#define RADIO_PCNF1_STATLEN_MASK (0xff << RADIO_PCNF1_STATLEN_SHIFT) |
Definition at line 153 of file common/radio.h.
#define RADIO_PCNF1_STATLEN_MASKED | ( | V | ) |
Definition at line 154 of file common/radio.h.
#define RADIO_PCNF1_STATLEN_SHIFT (8) |
Definition at line 152 of file common/radio.h.
#define RADIO_PCNF1_WHITEEN (1 << 25) |
Definition at line 163 of file common/radio.h.
#define RADIO_POWER MMIO32(RADIO_BASE + 0xFFC) |
Definition at line 99 of file common/radio.h.
#define RADIO_POWER_DISABLED (0) |
Definition at line 262 of file common/radio.h.
#define RADIO_POWER_ENABLED (1) |
Definition at line 261 of file common/radio.h.
#define RADIO_PREFIX0 MMIO32(RADIO_BASE + 0x524) |
Definition at line 77 of file common/radio.h.
#define RADIO_PREFIX0_AP0_MASK (0xff << RADIO_PREFIX0_AP0_SHIFT) |
Definition at line 166 of file common/radio.h.
#define RADIO_PREFIX0_AP0_MASKED | ( | V | ) |
Definition at line 167 of file common/radio.h.
#define RADIO_PREFIX0_AP0_SHIFT (0) |
Definition at line 165 of file common/radio.h.
#define RADIO_PREFIX0_AP1_MASK (0xff << RADIO_PREFIX0_AP1_SHIFT) |
Definition at line 171 of file common/radio.h.
#define RADIO_PREFIX0_AP1_MASKED | ( | V | ) |
Definition at line 172 of file common/radio.h.
#define RADIO_PREFIX0_AP1_SHIFT (8) |
Definition at line 170 of file common/radio.h.
#define RADIO_PREFIX0_AP2_MASK (0xff << RADIO_PREFIX0_AP2_SHIFT) |
Definition at line 176 of file common/radio.h.
#define RADIO_PREFIX0_AP2_MASKED | ( | V | ) |
Definition at line 177 of file common/radio.h.
#define RADIO_PREFIX0_AP2_SHIFT (16) |
Definition at line 175 of file common/radio.h.
#define RADIO_PREFIX0_AP3_MASK (0xff << RADIO_PREFIX0_AP3_SHIFT) |
Definition at line 181 of file common/radio.h.
#define RADIO_PREFIX0_AP3_MASKED | ( | V | ) |
Definition at line 182 of file common/radio.h.
#define RADIO_PREFIX0_AP3_SHIFT (24) |
Definition at line 180 of file common/radio.h.
#define RADIO_PREFIX1 MMIO32(RADIO_BASE + 0x528) |
Definition at line 78 of file common/radio.h.
#define RADIO_PREFIX1_AP4_MASK (0xff << RADIO_PREFIX1_AP4_SHIFT) |
Definition at line 186 of file common/radio.h.
#define RADIO_PREFIX1_AP4_MASKED | ( | V | ) |
Definition at line 187 of file common/radio.h.
#define RADIO_PREFIX1_AP4_SHIFT (0) |
Definition at line 185 of file common/radio.h.
#define RADIO_PREFIX1_AP5_MASK (0xff << RADIO_PREFIX1_AP5_SHIFT) |
Definition at line 191 of file common/radio.h.
#define RADIO_PREFIX1_AP5_MASKED | ( | V | ) |
Definition at line 192 of file common/radio.h.
#define RADIO_PREFIX1_AP5_SHIFT (8) |
Definition at line 190 of file common/radio.h.
#define RADIO_PREFIX1_AP6_MASK (0xff << RADIO_PREFIX1_AP6_SHIFT) |
Definition at line 196 of file common/radio.h.
#define RADIO_PREFIX1_AP6_MASKED | ( | V | ) |
Definition at line 197 of file common/radio.h.
#define RADIO_PREFIX1_AP6_SHIFT (16) |
Definition at line 195 of file common/radio.h.
#define RADIO_PREFIX1_AP7_MASK (0xff << RADIO_PREFIX1_AP7_SHIFT) |
Definition at line 201 of file common/radio.h.
#define RADIO_PREFIX1_AP7_MASKED | ( | V | ) |
Definition at line 202 of file common/radio.h.
#define RADIO_PREFIX1_AP7_SHIFT (24) |
Definition at line 200 of file common/radio.h.
#define RADIO_PREFIX_AP | ( | n | ) | ((n) < 4 ? RADIO_PREFIX0 : RADIO_PREFIX1) |
Definition at line 205 of file common/radio.h.
#define RADIO_PREFIX_AP_MASK | ( | n | ) | (0xff << RADIO_PREFIX_AP_SHIFT(n)) |
Definition at line 207 of file common/radio.h.
#define RADIO_PREFIX_AP_MASKED | ( | n, | |
V | |||
) |
Definition at line 208 of file common/radio.h.
#define RADIO_PREFIX_AP_SET | ( | n, | |
V | |||
) |
Definition at line 212 of file common/radio.h.
#define RADIO_PREFIX_AP_SHIFT | ( | n | ) | (8 * (n & 3)) |
Definition at line 206 of file common/radio.h.
#define RADIO_RSSISAMPLE MMIO32(RADIO_BASE + 0x548) |
Definition at line 86 of file common/radio.h.
#define RADIO_RXADDRESSES MMIO32(RADIO_BASE + 0x530) |
Definition at line 80 of file common/radio.h.
#define RADIO_RXCRC MMIO32(RADIO_BASE + 0x40C) |
Definition at line 67 of file common/radio.h.
#define RADIO_RXMATCH MMIO32(RADIO_BASE + 0x408) |
Definition at line 66 of file common/radio.h.
#define RADIO_SHORTS _PERIPH_SHORTS(RADIO_BASE) |
Definition at line 62 of file common/radio.h.
#define RADIO_STATE MMIO32(RADIO_BASE + 0x550) |
Definition at line 87 of file common/radio.h.
#define RADIO_TASK_BCSTART MMIO32(RADIO_BASE + 0x01C) |
Definition at line 46 of file common/radio.h.
#define RADIO_TASK_BCSTOP MMIO32(RADIO_BASE + 0x020) |
Definition at line 47 of file common/radio.h.
#define RADIO_TASK_DISABLE MMIO32(RADIO_BASE + 0x010) |
Definition at line 43 of file common/radio.h.
#define RADIO_TASK_RSSISTART MMIO32(RADIO_BASE + 0x014) |
Definition at line 44 of file common/radio.h.
#define RADIO_TASK_RSSISTOP MMIO32(RADIO_BASE + 0x018) |
Definition at line 45 of file common/radio.h.
#define RADIO_TASK_RXEN MMIO32(RADIO_BASE + 0x004) |
Definition at line 40 of file common/radio.h.
#define RADIO_TASK_START MMIO32(RADIO_BASE + 0x008) |
Definition at line 41 of file common/radio.h.
#define RADIO_TASK_STOP MMIO32(RADIO_BASE + 0x00C) |
Definition at line 42 of file common/radio.h.
#define RADIO_TASK_TXEN MMIO32(RADIO_BASE + 0x000) |
Definition at line 39 of file common/radio.h.
#define RADIO_TEST MMIO32(RADIO_BASE + 0x540) |
Definition at line 84 of file common/radio.h.
#define RADIO_TEST_CONSTCARRIER (1 << 0) |
Definition at line 234 of file common/radio.h.
#define RADIO_TEST_PLLLOCK (1 << 1) |
Definition at line 235 of file common/radio.h.
#define RADIO_TIFS MMIO32(RADIO_BASE + 0x544) |
Definition at line 85 of file common/radio.h.
#define RADIO_TXADDRESS MMIO32(RADIO_BASE + 0x52C) |
Definition at line 79 of file common/radio.h.
#define RADIO_TXADDRESSES_ADDR | ( | n | ) | (1 << (n)) |
Definition at line 225 of file common/radio.h.
#define RADIO_TXADDRESSES_ADDR0 (1 << 0) |
Definition at line 217 of file common/radio.h.
#define RADIO_TXADDRESSES_ADDR1 (1 << 1) |
Definition at line 218 of file common/radio.h.
#define RADIO_TXADDRESSES_ADDR2 (1 << 2) |
Definition at line 219 of file common/radio.h.
#define RADIO_TXADDRESSES_ADDR3 (1 << 3) |
Definition at line 220 of file common/radio.h.
#define RADIO_TXADDRESSES_ADDR4 (1 << 4) |
Definition at line 221 of file common/radio.h.
#define RADIO_TXADDRESSES_ADDR5 (1 << 5) |
Definition at line 222 of file common/radio.h.
#define RADIO_TXADDRESSES_ADDR6 (1 << 6) |
Definition at line 223 of file common/radio.h.
#define RADIO_TXADDRESSES_ADDR7 (1 << 7) |
Definition at line 224 of file common/radio.h.
#define RADIO_TXPOWER MMIO32(RADIO_BASE + 0x50C) |
Definition at line 71 of file common/radio.h.
enum radio_state |
Enumerator | |
---|---|
RADIO_STATE_DISABLED | |
RADIO_STATE_RXRU | |
RADIO_STATE_RXIDLE | |
RADIO_STATE_RX | |
RADIO_STATE_RXDISABLE | |
RADIO_STATE_TXRU | |
RADIO_STATE_TXIDLE | |
RADIO_STATE_TX | |
RADIO_STATE_TXDISABLE |
Definition at line 281 of file common/radio.h.
enum radio_txpower |
Enumerator | |
---|---|
RADIO_TXPOWER_POS_4DBM | |
RADIO_TXPOWER_0DBM | |
RADIO_TXPOWER_NEG_4DBM | |
RADIO_TXPOWER_NEG_8DBM | |
RADIO_TXPOWER_NEG_12DBM | |
RADIO_TXPOWER_NEG_16DBM | |
RADIO_TXPOWER_NEG_20DBM | |
RADIO_TXPOWER_NEG_30DBM |
Definition at line 270 of file common/radio.h.