Lines Matching refs:p_reg

56 #define _NRF_SPIM_PRESCALER_MAX_GET(periph_name, prefix, idx, p_reg)           \  argument
57 (p_reg == NRFX_CONCAT(NRF_, periph_name, prefix, idx)) ? \
64 #define _NRF_SPIM_PRESCALER_MIN_GET(periph_name, prefix, idx, p_reg) \ argument
65 (p_reg == NRFX_CONCAT(NRF_, periph_name, prefix, idx)) ? \
259 #define NRF_SPIM_IS_320MHZ_SPIM(p_reg) \ argument
260 (NRFX_COND_CODE_1(NRFX_INSTANCE_PRESENT(SPIM120), (p_reg == NRF_SPIM120), (false)) || \
261 NRFX_COND_CODE_1(NRFX_INSTANCE_PRESENT(SPIM121), (p_reg == NRF_SPIM121), (false)))
266 #define NRF_SPIM_IS_192MHZ_SPIM(p_reg) false argument
271 #define NRF_SPIM_IS_128MHZ_SPIM(p_reg) \ argument
273 (NRFX_COND_CODE_1(NRFX_INSTANCE_PRESENT(SPIM00), (p_reg == NRF_SPIM00), (false))), \
279 #define NRF_SPIM_IS_64MHZ_SPIM(p_reg) \ argument
281 (NRFX_COND_CODE_1(NRFX_INSTANCE_PRESENT(SPIM00), (p_reg == NRF_SPIM00), (false))), \
287 #define NRF_SPIM_IS_32MHZ_SPIM(p_reg) false argument
291 #define NRF_SPIM_BASE_FREQUENCY_GET(p_reg) \ argument
292 ((NRF_SPIM_IS_320MHZ_SPIM(p_reg)) ? (NRF_SPIM_BASE_FREQUENCY_320MHZ) : \
293 ((NRF_SPIM_IS_192MHZ_SPIM(p_reg)) ? (NRF_SPIM_BASE_FREQUENCY_192MHZ) : \
294 ((NRF_SPIM_IS_128MHZ_SPIM(p_reg)) ? (NRF_SPIM_BASE_FREQUENCY_128MHZ) : \
295 ((NRF_SPIM_IS_64MHZ_SPIM(p_reg)) ? (NRF_SPIM_BASE_FREQUENCY_64MHZ) : \
296 ((NRF_SPIM_IS_32MHZ_SPIM(p_reg)) ? (NRF_SPIM_BASE_FREQUENCY_32MHZ) : \
305 #define NRF_SPIM_PRESCALER_MAX_GET(p_reg) \ argument
306 (NRFX_FOREACH_ENABLED(SPIM, _NRF_SPIM_PRESCALER_MAX_GET, (), (), p_reg) \
314 #define NRF_SPIM_PRESCALER_MIN_GET(p_reg) \ argument
315 (NRFX_FOREACH_ENABLED(SPIM, _NRF_SPIM_PRESCALER_MIN_GET, (), (), p_reg) \
327 #define NRF_SPIM_PRESCALER_CALCULATE(p_reg, frequency) \ argument
328 ((uint32_t)(NRF_SPIM_BASE_FREQUENCY_GET(p_reg)) / (uint32_t)(frequency))
339 #define NRF_SPIM_FREQUENCY_STATIC_CHECK(p_reg, frequency) … argument
342 …((NRF_SPIM_BASE_FREQUENCY_GET(p_reg) % (uint32_t)frequency == 0) && …
343 …(NRFX_IS_EVEN(NRF_SPIM_PRESCALER_CALCULATE(p_reg, (uint32_t)frequency))) && …
344 …(NRF_SPIM_PRESCALER_CALCULATE(p_reg, (uint32_t)frequency) >= (NRF_SPIM_PRESCALER_MIN_GET(p_reg))) …
345 …(NRF_SPIM_PRESCALER_CALCULATE(p_reg, (uint32_t)frequency) <= (NRF_SPIM_PRESCALER_MAX_GET(p_reg))))…
522 NRF_STATIC_INLINE void nrf_spim_task_trigger(NRF_SPIM_Type * p_reg,
533 NRF_STATIC_INLINE uint32_t nrf_spim_task_address_get(NRF_SPIM_Type const * p_reg,
542 NRF_STATIC_INLINE void nrf_spim_event_clear(NRF_SPIM_Type * p_reg,
554 NRF_STATIC_INLINE bool nrf_spim_event_check(NRF_SPIM_Type const * p_reg,
565 NRF_STATIC_INLINE uint32_t nrf_spim_event_address_get(NRF_SPIM_Type const * p_reg,
574 NRF_STATIC_INLINE void nrf_spim_shorts_enable(NRF_SPIM_Type * p_reg,
583 NRF_STATIC_INLINE void nrf_spim_shorts_disable(NRF_SPIM_Type * p_reg,
593 NRF_STATIC_INLINE uint32_t nrf_spim_shorts_get(NRF_SPIM_Type const * p_reg);
602 NRF_STATIC_INLINE void nrf_spim_int_enable(NRF_SPIM_Type * p_reg,
612 NRF_STATIC_INLINE void nrf_spim_int_disable(NRF_SPIM_Type * p_reg,
624 NRF_STATIC_INLINE uint32_t nrf_spim_int_enable_check(NRF_SPIM_Type const * p_reg, uint32_t mask);
633 NRF_STATIC_INLINE void nrf_spim_prescaler_set(NRF_SPIM_Type * p_reg,
643 NRF_STATIC_INLINE uint32_t nrf_spim_prescaler_get(NRF_SPIM_Type const * p_reg);
655 NRF_STATIC_INLINE void nrf_spim_subscribe_set(NRF_SPIM_Type * p_reg,
666 NRF_STATIC_INLINE void nrf_spim_subscribe_clear(NRF_SPIM_Type * p_reg,
677 NRF_STATIC_INLINE void nrf_spim_publish_set(NRF_SPIM_Type * p_reg,
688 NRF_STATIC_INLINE void nrf_spim_publish_clear(NRF_SPIM_Type * p_reg,
697 NRF_STATIC_INLINE void nrf_spim_enable(NRF_SPIM_Type * p_reg);
704 NRF_STATIC_INLINE void nrf_spim_disable(NRF_SPIM_Type * p_reg);
714 NRF_STATIC_INLINE bool nrf_spim_enable_check(NRF_SPIM_Type const * p_reg);
727 NRF_STATIC_INLINE void nrf_spim_pins_set(NRF_SPIM_Type * p_reg,
738 NRF_STATIC_INLINE void nrf_spim_sck_pin_set(NRF_SPIM_Type * p_reg, uint32_t pin);
746 NRF_STATIC_INLINE void nrf_spim_mosi_pin_set(NRF_SPIM_Type * p_reg, uint32_t pin);
754 NRF_STATIC_INLINE void nrf_spim_miso_pin_set(NRF_SPIM_Type * p_reg, uint32_t pin);
763 NRF_STATIC_INLINE uint32_t nrf_spim_sck_pin_get(NRF_SPIM_Type const * p_reg);
772 NRF_STATIC_INLINE uint32_t nrf_spim_mosi_pin_get(NRF_SPIM_Type const * p_reg);
781 NRF_STATIC_INLINE uint32_t nrf_spim_miso_pin_get(NRF_SPIM_Type const * p_reg);
797 NRF_STATIC_INLINE void nrf_spim_csn_configure(NRF_SPIM_Type * p_reg,
809 NRF_STATIC_INLINE uint32_t nrf_spim_csn_pin_get(NRF_SPIM_Type const * p_reg);
822 NRF_STATIC_INLINE void nrf_spim_dcx_pin_set(NRF_SPIM_Type * p_reg,
832 NRF_STATIC_INLINE uint32_t nrf_spim_dcx_pin_get(NRF_SPIM_Type const * p_reg);
845 NRF_STATIC_INLINE void nrf_spim_dcx_cnt_set(NRF_SPIM_Type * p_reg,
857 NRF_STATIC_INLINE void nrf_spim_iftiming_set(NRF_SPIM_Type * p_reg,
867 NRF_STATIC_INLINE void nrf_spim_stallstat_rx_clear(NRF_SPIM_Type * p_reg);
876 NRF_STATIC_INLINE bool nrf_spim_stallstat_rx_get(NRF_SPIM_Type const * p_reg);
883 NRF_STATIC_INLINE void nrf_spim_stallstat_tx_clear(NRF_SPIM_Type * p_reg);
892 NRF_STATIC_INLINE bool nrf_spim_stallstat_tx_get(NRF_SPIM_Type const * p_reg);
902 NRF_STATIC_INLINE void nrf_spim_frequency_set(NRF_SPIM_Type * p_reg,
912 NRF_STATIC_INLINE nrf_spim_frequency_t nrf_spim_frequency_get(NRF_SPIM_Type * p_reg);
922 NRF_STATIC_INLINE void nrf_spim_tx_buffer_set(NRF_SPIM_Type * p_reg,
933 NRF_STATIC_INLINE uint32_t nrf_spim_tx_amount_get(NRF_SPIM_Type const * p_reg);
942 NRF_STATIC_INLINE uint32_t nrf_spim_tx_maxcnt_get(NRF_SPIM_Type const * p_reg);
951 NRF_STATIC_INLINE void nrf_spim_rx_buffer_set(NRF_SPIM_Type * p_reg,
962 NRF_STATIC_INLINE uint32_t nrf_spim_rx_amount_get(NRF_SPIM_Type const * p_reg);
971 NRF_STATIC_INLINE uint32_t nrf_spim_rx_maxcnt_get(NRF_SPIM_Type const * p_reg);
980 NRF_STATIC_INLINE void nrf_spim_configure(NRF_SPIM_Type * p_reg,
991 NRF_STATIC_INLINE void nrf_spim_orc_set(NRF_SPIM_Type * p_reg,
1000 NRF_STATIC_INLINE void nrf_spim_tx_list_enable(NRF_SPIM_Type * p_reg);
1007 NRF_STATIC_INLINE void nrf_spim_tx_list_disable(NRF_SPIM_Type * p_reg);
1014 NRF_STATIC_INLINE void nrf_spim_rx_list_enable(NRF_SPIM_Type * p_reg);
1021 NRF_STATIC_INLINE void nrf_spim_rx_list_disable(NRF_SPIM_Type * p_reg);
1032 NRF_STATIC_INLINE void nrf_spim_rx_pattern_match_enable_set(NRF_SPIM_Type * p_reg,
1045 NRF_STATIC_INLINE bool nrf_spim_rx_pattern_match_enable_check(NRF_SPIM_Type const * p_reg,
1054 NRF_STATIC_INLINE void nrf_spim_rx_pattern_match_one_shot_enable(NRF_SPIM_Type * p_reg,
1063 NRF_STATIC_INLINE void nrf_spim_rx_pattern_match_one_shot_disable(NRF_SPIM_Type * p_reg,
1075 NRF_STATIC_INLINE bool nrf_spim_rx_pattern_match_one_shot_check(NRF_SPIM_Type const * p_reg,
1086 NRF_STATIC_INLINE void nrf_spim_rx_pattern_match_candidate_set(NRF_SPIM_Type * p_reg,
1098 NRF_STATIC_INLINE uint32_t nrf_spim_rx_pattern_match_candidate_get(NRF_SPIM_Type const * p_reg,
1108 NRF_STATIC_INLINE void nrf_spim_rx_terminate_on_bus_error_enable(NRF_SPIM_Type * p_reg);
1115 NRF_STATIC_INLINE void nrf_spim_rx_terminate_on_bus_error_disable(NRF_SPIM_Type * p_reg);
1125 NRF_STATIC_INLINE bool nrf_spim_rx_terminate_on_bus_error_check(NRF_SPIM_Type const * p_reg);
1132 NRF_STATIC_INLINE void nrf_spim_tx_terminate_on_bus_error_enable(NRF_SPIM_Type * p_reg);
1139 NRF_STATIC_INLINE void nrf_spim_tx_terminate_on_bus_error_disable(NRF_SPIM_Type * p_reg);
1149 NRF_STATIC_INLINE bool nrf_spim_tx_terminate_on_bus_error_check(NRF_SPIM_Type const * p_reg);
1154 NRF_STATIC_INLINE void nrf_spim_task_trigger(NRF_SPIM_Type * p_reg, in nrf_spim_task_trigger() argument
1157 *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)task)) = 0x1UL; in nrf_spim_task_trigger()
1160 NRF_STATIC_INLINE uint32_t nrf_spim_task_address_get(NRF_SPIM_Type const * p_reg, in nrf_spim_task_address_get() argument
1163 return nrf_task_event_address_get(p_reg, task); in nrf_spim_task_address_get()
1166 NRF_STATIC_INLINE void nrf_spim_event_clear(NRF_SPIM_Type * p_reg, in nrf_spim_event_clear() argument
1169 *((volatile uint32_t *)((uint8_t *)p_reg + (uint32_t)event)) = 0x0UL; in nrf_spim_event_clear()
1170 nrf_event_readback((uint8_t *)p_reg + (uint32_t)event); in nrf_spim_event_clear()
1173 NRF_STATIC_INLINE bool nrf_spim_event_check(NRF_SPIM_Type const * p_reg, in nrf_spim_event_check() argument
1176 return nrf_event_check(p_reg, event); in nrf_spim_event_check()
1179 NRF_STATIC_INLINE uint32_t nrf_spim_event_address_get(NRF_SPIM_Type const * p_reg, in nrf_spim_event_address_get() argument
1182 return nrf_task_event_address_get(p_reg, event); in nrf_spim_event_address_get()
1185 NRF_STATIC_INLINE void nrf_spim_shorts_enable(NRF_SPIM_Type * p_reg, in nrf_spim_shorts_enable() argument
1188 p_reg->SHORTS |= mask; in nrf_spim_shorts_enable()
1191 NRF_STATIC_INLINE void nrf_spim_shorts_disable(NRF_SPIM_Type * p_reg, in nrf_spim_shorts_disable() argument
1194 p_reg->SHORTS &= ~(mask); in nrf_spim_shorts_disable()
1197 NRF_STATIC_INLINE uint32_t nrf_spim_shorts_get(NRF_SPIM_Type const * p_reg) in nrf_spim_shorts_get() argument
1199 return p_reg->SHORTS; in nrf_spim_shorts_get()
1202 NRF_STATIC_INLINE void nrf_spim_int_enable(NRF_SPIM_Type * p_reg, in nrf_spim_int_enable() argument
1205 p_reg->INTENSET = mask; in nrf_spim_int_enable()
1208 NRF_STATIC_INLINE void nrf_spim_int_disable(NRF_SPIM_Type * p_reg, in nrf_spim_int_disable() argument
1211 p_reg->INTENCLR = mask; in nrf_spim_int_disable()
1214 NRF_STATIC_INLINE uint32_t nrf_spim_int_enable_check(NRF_SPIM_Type const * p_reg, uint32_t mask) in nrf_spim_int_enable_check() argument
1216 return p_reg->INTENSET & mask; in nrf_spim_int_enable_check()
1220 NRF_STATIC_INLINE void nrf_spim_prescaler_set(NRF_SPIM_Type * p_reg, in nrf_spim_prescaler_set() argument
1223 NRFX_ASSERT(prescaler >= NRF_SPIM_PRESCALER_MIN_GET(p_reg)); in nrf_spim_prescaler_set()
1224 NRFX_ASSERT(prescaler <= NRF_SPIM_PRESCALER_MAX_GET(p_reg)); in nrf_spim_prescaler_set()
1226 p_reg->PRESCALER = prescaler; in nrf_spim_prescaler_set()
1229 NRF_STATIC_INLINE uint32_t nrf_spim_prescaler_get(NRF_SPIM_Type const * p_reg) in nrf_spim_prescaler_get() argument
1231 return p_reg->PRESCALER; in nrf_spim_prescaler_get()
1236 NRF_STATIC_INLINE void nrf_spim_subscribe_set(NRF_SPIM_Type * p_reg, in nrf_spim_subscribe_set() argument
1240 *((volatile uint32_t *) ((uint8_t *) p_reg + (uint32_t) task + 0x80uL)) = in nrf_spim_subscribe_set()
1244 NRF_STATIC_INLINE void nrf_spim_subscribe_clear(NRF_SPIM_Type * p_reg, in nrf_spim_subscribe_clear() argument
1247 *((volatile uint32_t *) ((uint8_t *) p_reg + (uint32_t) task + 0x80uL)) = 0; in nrf_spim_subscribe_clear()
1250 NRF_STATIC_INLINE void nrf_spim_publish_set(NRF_SPIM_Type * p_reg, in nrf_spim_publish_set() argument
1254 *((volatile uint32_t *) ((uint8_t *) p_reg + (uint32_t) event + 0x80uL)) = in nrf_spim_publish_set()
1258 NRF_STATIC_INLINE void nrf_spim_publish_clear(NRF_SPIM_Type * p_reg, in nrf_spim_publish_clear() argument
1261 *((volatile uint32_t *) ((uint8_t *) p_reg + (uint32_t) event + 0x80uL)) = 0; in nrf_spim_publish_clear()
1265 NRF_STATIC_INLINE void nrf_spim_enable(NRF_SPIM_Type * p_reg) in nrf_spim_enable() argument
1267 p_reg->ENABLE = (SPIM_ENABLE_ENABLE_Enabled << SPIM_ENABLE_ENABLE_Pos); in nrf_spim_enable()
1270 NRF_STATIC_INLINE void nrf_spim_disable(NRF_SPIM_Type * p_reg) in nrf_spim_disable() argument
1275 uint32_t temp1 = *(volatile uint32_t *)((uint8_t *)p_reg + 0x508UL); in nrf_spim_disable()
1276 uint32_t temp2 = *(volatile uint32_t *)((uint8_t *)p_reg + 0x50CUL); in nrf_spim_disable()
1277 *(volatile uint32_t *)((uint8_t *)p_reg + 0x500) = 0; in nrf_spim_disable()
1278 *(volatile uint32_t *)((uint8_t *)p_reg + 0x508) = 0xFFFFFFFF; in nrf_spim_disable()
1279 *(volatile uint32_t *)((uint8_t *)p_reg + 0x50C) = 0xFFFFFFFF; in nrf_spim_disable()
1280 *(volatile uint32_t *)((uint8_t *)p_reg + 0x500) = 9; in nrf_spim_disable()
1282 p_reg->ENABLE = (SPIM_ENABLE_ENABLE_Disabled << SPIM_ENABLE_ENABLE_Pos); in nrf_spim_disable()
1284 *(volatile uint32_t *)((uint8_t *)p_reg + 0x508) = temp1; in nrf_spim_disable()
1285 *(volatile uint32_t *)((uint8_t *)p_reg + 0x50C) = temp2; in nrf_spim_disable()
1290 p_reg->ENABLE = (SPIM_ENABLE_ENABLE_Disabled << SPIM_ENABLE_ENABLE_Pos); in nrf_spim_disable()
1294 NRF_STATIC_INLINE bool nrf_spim_enable_check(NRF_SPIM_Type const * p_reg) in nrf_spim_enable_check() argument
1296 return p_reg->ENABLE == SPIM_ENABLE_ENABLE_Enabled; in nrf_spim_enable_check()
1299 NRF_STATIC_INLINE void nrf_spim_pins_set(NRF_SPIM_Type * p_reg, in nrf_spim_pins_set() argument
1304 p_reg->PSEL.SCK = sck_pin; in nrf_spim_pins_set()
1305 p_reg->PSEL.MOSI = mosi_pin; in nrf_spim_pins_set()
1306 p_reg->PSEL.MISO = miso_pin; in nrf_spim_pins_set()
1309 NRF_STATIC_INLINE void nrf_spim_sck_pin_set(NRF_SPIM_Type * p_reg, uint32_t pin) in nrf_spim_sck_pin_set() argument
1311 p_reg->PSEL.SCK = pin; in nrf_spim_sck_pin_set()
1314 NRF_STATIC_INLINE void nrf_spim_mosi_pin_set(NRF_SPIM_Type * p_reg, uint32_t pin) in nrf_spim_mosi_pin_set() argument
1316 p_reg->PSEL.MOSI = pin; in nrf_spim_mosi_pin_set()
1319 NRF_STATIC_INLINE void nrf_spim_miso_pin_set(NRF_SPIM_Type * p_reg, uint32_t pin) in nrf_spim_miso_pin_set() argument
1321 p_reg->PSEL.MISO = pin; in nrf_spim_miso_pin_set()
1324 NRF_STATIC_INLINE uint32_t nrf_spim_sck_pin_get(NRF_SPIM_Type const * p_reg) in nrf_spim_sck_pin_get() argument
1326 return p_reg->PSEL.SCK; in nrf_spim_sck_pin_get()
1329 NRF_STATIC_INLINE uint32_t nrf_spim_mosi_pin_get(NRF_SPIM_Type const * p_reg) in nrf_spim_mosi_pin_get() argument
1331 return p_reg->PSEL.MOSI; in nrf_spim_mosi_pin_get()
1334 NRF_STATIC_INLINE uint32_t nrf_spim_miso_pin_get(NRF_SPIM_Type const * p_reg) in nrf_spim_miso_pin_get() argument
1336 return p_reg->PSEL.MISO; in nrf_spim_miso_pin_get()
1340 NRF_STATIC_INLINE void nrf_spim_csn_configure(NRF_SPIM_Type * p_reg, in nrf_spim_csn_configure() argument
1346 p_reg->PSEL.CSN[0] = pin; in nrf_spim_csn_configure()
1348 p_reg->PSEL.CSN = pin; in nrf_spim_csn_configure()
1350 p_reg->CSNPOL = polarity; in nrf_spim_csn_configure()
1351 p_reg->IFTIMING.CSNDUR = duration; in nrf_spim_csn_configure()
1354 NRF_STATIC_INLINE uint32_t nrf_spim_csn_pin_get(NRF_SPIM_Type const * p_reg) in nrf_spim_csn_pin_get() argument
1357 return p_reg->PSEL.CSN[0]; in nrf_spim_csn_pin_get()
1359 return p_reg->PSEL.CSN; in nrf_spim_csn_pin_get()
1365 NRF_STATIC_INLINE void nrf_spim_dcx_pin_set(NRF_SPIM_Type * p_reg, uint32_t dcx_pin) in nrf_spim_dcx_pin_set() argument
1368 p_reg->PSEL.DCX = dcx_pin; in nrf_spim_dcx_pin_set()
1370 p_reg->PSELDCX = dcx_pin; in nrf_spim_dcx_pin_set()
1374 NRF_STATIC_INLINE uint32_t nrf_spim_dcx_pin_get(NRF_SPIM_Type const * p_reg) in nrf_spim_dcx_pin_get() argument
1377 return p_reg->PSEL.DCX; in nrf_spim_dcx_pin_get()
1379 return p_reg->PSELDCX; in nrf_spim_dcx_pin_get()
1383 NRF_STATIC_INLINE void nrf_spim_dcx_cnt_set(NRF_SPIM_Type * p_reg, uint32_t dcx_cnt) in nrf_spim_dcx_cnt_set() argument
1385 p_reg->DCXCNT = dcx_cnt; in nrf_spim_dcx_cnt_set()
1390 NRF_STATIC_INLINE void nrf_spim_iftiming_set(NRF_SPIM_Type * p_reg, in nrf_spim_iftiming_set() argument
1393 p_reg->IFTIMING.RXDELAY = rxdelay; in nrf_spim_iftiming_set()
1398 NRF_STATIC_INLINE void nrf_spim_stallstat_rx_clear(NRF_SPIM_Type * p_reg) in nrf_spim_stallstat_rx_clear() argument
1400 p_reg->STALLSTAT &= ~(SPIM_STALLSTAT_RX_Msk); in nrf_spim_stallstat_rx_clear()
1403 NRF_STATIC_INLINE bool nrf_spim_stallstat_rx_get(NRF_SPIM_Type const * p_reg) in nrf_spim_stallstat_rx_get() argument
1405 return (p_reg->STALLSTAT & SPIM_STALLSTAT_RX_Msk) != 0; in nrf_spim_stallstat_rx_get()
1408 NRF_STATIC_INLINE void nrf_spim_stallstat_tx_clear(NRF_SPIM_Type * p_reg) in nrf_spim_stallstat_tx_clear() argument
1410 p_reg->STALLSTAT &= ~(SPIM_STALLSTAT_TX_Msk); in nrf_spim_stallstat_tx_clear()
1413 NRF_STATIC_INLINE bool nrf_spim_stallstat_tx_get(NRF_SPIM_Type const * p_reg) in nrf_spim_stallstat_tx_get() argument
1415 return (p_reg->STALLSTAT & SPIM_STALLSTAT_TX_Msk) != 0; in nrf_spim_stallstat_tx_get()
1420 NRF_STATIC_INLINE void nrf_spim_frequency_set(NRF_SPIM_Type * p_reg, in nrf_spim_frequency_set() argument
1423 p_reg->FREQUENCY = (uint32_t)frequency; in nrf_spim_frequency_set()
1426 NRF_STATIC_INLINE nrf_spim_frequency_t nrf_spim_frequency_get(NRF_SPIM_Type * p_reg) in nrf_spim_frequency_get() argument
1428 return (nrf_spim_frequency_t)(p_reg->FREQUENCY); in nrf_spim_frequency_get()
1432 NRF_STATIC_INLINE void nrf_spim_tx_buffer_set(NRF_SPIM_Type * p_reg, in nrf_spim_tx_buffer_set() argument
1437 p_reg->DMA.TX.PTR = (uint32_t)p_buffer; in nrf_spim_tx_buffer_set()
1438 p_reg->DMA.TX.MAXCNT = length; in nrf_spim_tx_buffer_set()
1440 p_reg->TXD.PTR = (uint32_t)p_buffer; in nrf_spim_tx_buffer_set()
1441 p_reg->TXD.MAXCNT = length; in nrf_spim_tx_buffer_set()
1445 NRF_STATIC_INLINE uint32_t nrf_spim_tx_amount_get(NRF_SPIM_Type const * p_reg) in nrf_spim_tx_amount_get() argument
1448 return p_reg->DMA.TX.AMOUNT; in nrf_spim_tx_amount_get()
1450 return p_reg->TXD.AMOUNT; in nrf_spim_tx_amount_get()
1454 NRF_STATIC_INLINE uint32_t nrf_spim_tx_maxcnt_get(NRF_SPIM_Type const * p_reg) in nrf_spim_tx_maxcnt_get() argument
1457 return p_reg->DMA.TX.MAXCNT; in nrf_spim_tx_maxcnt_get()
1459 return p_reg->TXD.MAXCNT; in nrf_spim_tx_maxcnt_get()
1463 NRF_STATIC_INLINE void nrf_spim_rx_buffer_set(NRF_SPIM_Type * p_reg, in nrf_spim_rx_buffer_set() argument
1468 p_reg->DMA.RX.PTR = (uint32_t)p_buffer; in nrf_spim_rx_buffer_set()
1469 p_reg->DMA.RX.MAXCNT = length; in nrf_spim_rx_buffer_set()
1471 p_reg->RXD.PTR = (uint32_t)p_buffer; in nrf_spim_rx_buffer_set()
1472 p_reg->RXD.MAXCNT = length; in nrf_spim_rx_buffer_set()
1476 NRF_STATIC_INLINE uint32_t nrf_spim_rx_amount_get(NRF_SPIM_Type const * p_reg) in nrf_spim_rx_amount_get() argument
1479 return p_reg->DMA.RX.AMOUNT; in nrf_spim_rx_amount_get()
1481 return p_reg->RXD.AMOUNT; in nrf_spim_rx_amount_get()
1485 NRF_STATIC_INLINE uint32_t nrf_spim_rx_maxcnt_get(NRF_SPIM_Type const * p_reg) in nrf_spim_rx_maxcnt_get() argument
1488 return p_reg->DMA.RX.MAXCNT; in nrf_spim_rx_maxcnt_get()
1490 return p_reg->RXD.MAXCNT; in nrf_spim_rx_maxcnt_get()
1494 NRF_STATIC_INLINE void nrf_spim_configure(NRF_SPIM_Type * p_reg, in nrf_spim_configure() argument
1523 p_reg->CONFIG = config; in nrf_spim_configure()
1526 NRF_STATIC_INLINE void nrf_spim_orc_set(NRF_SPIM_Type * p_reg, in nrf_spim_orc_set() argument
1529 p_reg->ORC = orc; in nrf_spim_orc_set()
1533 NRF_STATIC_INLINE void nrf_spim_tx_list_enable(NRF_SPIM_Type * p_reg) in nrf_spim_tx_list_enable() argument
1535 p_reg->TXD.LIST = SPIM_TXD_LIST_LIST_ArrayList << SPIM_TXD_LIST_LIST_Pos; in nrf_spim_tx_list_enable()
1538 NRF_STATIC_INLINE void nrf_spim_tx_list_disable(NRF_SPIM_Type * p_reg) in nrf_spim_tx_list_disable() argument
1540 p_reg->TXD.LIST = SPIM_TXD_LIST_LIST_Disabled << SPIM_TXD_LIST_LIST_Pos; in nrf_spim_tx_list_disable()
1543 NRF_STATIC_INLINE void nrf_spim_rx_list_enable(NRF_SPIM_Type * p_reg) in nrf_spim_rx_list_enable() argument
1545 p_reg->RXD.LIST = SPIM_RXD_LIST_LIST_ArrayList << SPIM_RXD_LIST_LIST_Pos; in nrf_spim_rx_list_enable()
1548 NRF_STATIC_INLINE void nrf_spim_rx_list_disable(NRF_SPIM_Type * p_reg) in nrf_spim_rx_list_disable() argument
1550 p_reg->RXD.LIST = SPIM_RXD_LIST_LIST_Disabled << SPIM_RXD_LIST_LIST_Pos; in nrf_spim_rx_list_disable()
1555 NRF_STATIC_INLINE void nrf_spim_rx_pattern_match_enable_set(NRF_SPIM_Type * p_reg, in nrf_spim_rx_pattern_match_enable_set() argument
1563 p_reg->DMA.RX.MATCH.CONFIG = ((p_reg->DMA.RX.MATCH.CONFIG & in nrf_spim_rx_pattern_match_enable_set()
1571 p_reg->DMA.RX.MATCH.CONFIG = ((p_reg->DMA.RX.MATCH.CONFIG & in nrf_spim_rx_pattern_match_enable_set()
1579 p_reg->DMA.RX.MATCH.CONFIG = ((p_reg->DMA.RX.MATCH.CONFIG & in nrf_spim_rx_pattern_match_enable_set()
1587 p_reg->DMA.RX.MATCH.CONFIG = ((p_reg->DMA.RX.MATCH.CONFIG & in nrf_spim_rx_pattern_match_enable_set()
1600 NRF_STATIC_INLINE bool nrf_spim_rx_pattern_match_enable_check(NRF_SPIM_Type const * p_reg, in nrf_spim_rx_pattern_match_enable_check() argument
1607 return ((p_reg->DMA.RX.MATCH.CONFIG & SPIM_DMA_RX_MATCH_CONFIG_ENABLE0_Msk) in nrf_spim_rx_pattern_match_enable_check()
1611 return ((p_reg->DMA.RX.MATCH.CONFIG & SPIM_DMA_RX_MATCH_CONFIG_ENABLE1_Msk) in nrf_spim_rx_pattern_match_enable_check()
1615 return ((p_reg->DMA.RX.MATCH.CONFIG & SPIM_DMA_RX_MATCH_CONFIG_ENABLE2_Msk) in nrf_spim_rx_pattern_match_enable_check()
1619 return ((p_reg->DMA.RX.MATCH.CONFIG & SPIM_DMA_RX_MATCH_CONFIG_ENABLE3_Msk) in nrf_spim_rx_pattern_match_enable_check()
1628 NRF_STATIC_INLINE void nrf_spim_rx_pattern_match_one_shot_enable(NRF_SPIM_Type * p_reg, in nrf_spim_rx_pattern_match_one_shot_enable() argument
1635 p_reg->DMA.RX.MATCH.CONFIG |= SPIM_DMA_RX_MATCH_CONFIG_ONESHOT0_Msk; in nrf_spim_rx_pattern_match_one_shot_enable()
1638 p_reg->DMA.RX.MATCH.CONFIG |= SPIM_DMA_RX_MATCH_CONFIG_ONESHOT1_Msk; in nrf_spim_rx_pattern_match_one_shot_enable()
1641 p_reg->DMA.RX.MATCH.CONFIG |= SPIM_DMA_RX_MATCH_CONFIG_ONESHOT2_Msk; in nrf_spim_rx_pattern_match_one_shot_enable()
1644 p_reg->DMA.RX.MATCH.CONFIG |= SPIM_DMA_RX_MATCH_CONFIG_ONESHOT3_Msk; in nrf_spim_rx_pattern_match_one_shot_enable()
1652 NRF_STATIC_INLINE void nrf_spim_rx_pattern_match_one_shot_disable(NRF_SPIM_Type * p_reg, in nrf_spim_rx_pattern_match_one_shot_disable() argument
1659 p_reg->DMA.RX.MATCH.CONFIG &= ~(SPIM_DMA_RX_MATCH_CONFIG_ONESHOT0_Msk); in nrf_spim_rx_pattern_match_one_shot_disable()
1662 p_reg->DMA.RX.MATCH.CONFIG &= ~(SPIM_DMA_RX_MATCH_CONFIG_ONESHOT1_Msk); in nrf_spim_rx_pattern_match_one_shot_disable()
1665 p_reg->DMA.RX.MATCH.CONFIG &= ~(SPIM_DMA_RX_MATCH_CONFIG_ONESHOT2_Msk); in nrf_spim_rx_pattern_match_one_shot_disable()
1668 p_reg->DMA.RX.MATCH.CONFIG &= ~(SPIM_DMA_RX_MATCH_CONFIG_ONESHOT3_Msk); in nrf_spim_rx_pattern_match_one_shot_disable()
1676 NRF_STATIC_INLINE bool nrf_spim_rx_pattern_match_one_shot_check(NRF_SPIM_Type const * p_reg, in nrf_spim_rx_pattern_match_one_shot_check() argument
1683 return ((p_reg->DMA.RX.MATCH.CONFIG & SPIM_DMA_RX_MATCH_CONFIG_ONESHOT0_Msk) in nrf_spim_rx_pattern_match_one_shot_check()
1687 return ((p_reg->DMA.RX.MATCH.CONFIG & SPIM_DMA_RX_MATCH_CONFIG_ONESHOT1_Msk) in nrf_spim_rx_pattern_match_one_shot_check()
1691 return ((p_reg->DMA.RX.MATCH.CONFIG & SPIM_DMA_RX_MATCH_CONFIG_ONESHOT2_Msk) in nrf_spim_rx_pattern_match_one_shot_check()
1695 return ((p_reg->DMA.RX.MATCH.CONFIG & SPIM_DMA_RX_MATCH_CONFIG_ONESHOT3_Msk) in nrf_spim_rx_pattern_match_one_shot_check()
1704 NRF_STATIC_INLINE void nrf_spim_rx_pattern_match_candidate_set(NRF_SPIM_Type * p_reg, in nrf_spim_rx_pattern_match_candidate_set() argument
1709 p_reg->DMA.RX.MATCH.CANDIDATE[index] = pattern; in nrf_spim_rx_pattern_match_candidate_set()
1712 NRF_STATIC_INLINE uint32_t nrf_spim_rx_pattern_match_candidate_get(NRF_SPIM_Type const * p_reg, in nrf_spim_rx_pattern_match_candidate_get() argument
1716 return p_reg->DMA.RX.MATCH.CANDIDATE[index]; in nrf_spim_rx_pattern_match_candidate_get()
1721 NRF_STATIC_INLINE void nrf_spim_rx_terminate_on_bus_error_enable(NRF_SPIM_Type * p_reg) in nrf_spim_rx_terminate_on_bus_error_enable() argument
1723 p_reg->DMA.RX.TERMINATEONBUSERROR |= SPIM_DMA_RX_TERMINATEONBUSERROR_ENABLE_Msk; in nrf_spim_rx_terminate_on_bus_error_enable()
1726 NRF_STATIC_INLINE void nrf_spim_rx_terminate_on_bus_error_disable(NRF_SPIM_Type * p_reg) in nrf_spim_rx_terminate_on_bus_error_disable() argument
1728 p_reg->DMA.RX.TERMINATEONBUSERROR &= ~(SPIM_DMA_RX_TERMINATEONBUSERROR_ENABLE_Msk); in nrf_spim_rx_terminate_on_bus_error_disable()
1731 NRF_STATIC_INLINE bool nrf_spim_rx_terminate_on_bus_error_check(NRF_SPIM_Type const * p_reg) in nrf_spim_rx_terminate_on_bus_error_check() argument
1733 return ((p_reg->DMA.RX.TERMINATEONBUSERROR & SPIM_DMA_RX_TERMINATEONBUSERROR_ENABLE_Msk) in nrf_spim_rx_terminate_on_bus_error_check()
1738 NRF_STATIC_INLINE void nrf_spim_tx_terminate_on_bus_error_enable(NRF_SPIM_Type * p_reg) in nrf_spim_tx_terminate_on_bus_error_enable() argument
1740 p_reg->DMA.TX.TERMINATEONBUSERROR |= SPIM_DMA_TX_TERMINATEONBUSERROR_ENABLE_Msk; in nrf_spim_tx_terminate_on_bus_error_enable()
1743 NRF_STATIC_INLINE void nrf_spim_tx_terminate_on_bus_error_disable(NRF_SPIM_Type * p_reg) in nrf_spim_tx_terminate_on_bus_error_disable() argument
1745 p_reg->DMA.TX.TERMINATEONBUSERROR &= ~(SPIM_DMA_TX_TERMINATEONBUSERROR_ENABLE_Msk); in nrf_spim_tx_terminate_on_bus_error_disable()
1748 NRF_STATIC_INLINE bool nrf_spim_tx_terminate_on_bus_error_check(NRF_SPIM_Type const * p_reg) in nrf_spim_tx_terminate_on_bus_error_check() argument
1750 return ((p_reg->DMA.TX.TERMINATEONBUSERROR & SPIM_DMA_TX_TERMINATEONBUSERROR_ENABLE_Msk) in nrf_spim_tx_terminate_on_bus_error_check()