Lines Matching refs:ep
487 #define NRF_USBD_EP_NR_GET(ep) ((uint8_t)(((uint8_t)(ep)) & 0xFU)) argument
499 #define NRF_USBD_EPIN_CHECK(ep) ( (((uint8_t)(ep)) & NRF_USBD_EP_DIR_Msk) == NRF_USBD_EP_DIR_IN ) argument
511 #define NRF_USBD_EPOUT_CHECK(ep) ( (((uint8_t)(ep)) & NRF_USBD_EP_DIR_Msk) == NRF_USBD_EP_DIR_OUT ) argument
521 #define NRF_USBD_EPISO_CHECK(ep) (NRF_USBD_EP_NR_GET(ep) >= NRF_USBD_EPISO_FIRST) argument
531 #define NRF_USBD_EP_VALIDATE(ep) ( \ argument
532 (NRF_USBD_EPIN_CHECK(ep) && (NRF_USBD_EP_NR_GET(ep) < NRF_USBD_EPIN_CNT)) \
534 (NRF_USBD_EPOUT_CHECK(ep) && (NRF_USBD_EP_NR_GET(ep) < NRF_USBD_EPOUT_CNT)) \
687 NRF_STATIC_INLINE uint32_t nrf_usbd_halted_get(NRF_USBD_Type const * p_reg, uint8_t ep);
703 NRF_STATIC_INLINE bool nrf_usbd_ep_is_stall(NRF_USBD_Type const * p_reg, uint8_t ep);
826 NRF_STATIC_INLINE size_t nrf_usbd_epout_size_get(NRF_USBD_Type const * p_reg, uint8_t ep);
836 NRF_STATIC_INLINE size_t nrf_usbd_episoout_size_get(NRF_USBD_Type const * p_reg, uint8_t ep);
844 NRF_STATIC_INLINE void nrf_usbd_epout_clear(NRF_USBD_Type * p_reg, uint8_t ep);
892 uint8_t ep,
906 NRF_STATIC_INLINE nrf_usbd_dtoggle_t nrf_usbd_dtoggle_get(NRF_USBD_Type * p_reg, uint8_t ep);
917 NRF_STATIC_INLINE bool nrf_usbd_ep_enable_check(NRF_USBD_Type const * p_reg, uint8_t ep);
927 NRF_STATIC_INLINE void nrf_usbd_ep_enable(NRF_USBD_Type * p_reg, uint8_t ep);
937 NRF_STATIC_INLINE void nrf_usbd_ep_disable(NRF_USBD_Type * p_reg, uint8_t ep);
965 NRF_STATIC_INLINE void nrf_usbd_ep_stall(NRF_USBD_Type * p_reg, uint8_t ep);
975 NRF_STATIC_INLINE void nrf_usbd_ep_unstall(NRF_USBD_Type * p_reg, uint8_t ep);
1073 uint8_t ep,
1087 NRF_STATIC_INLINE uint32_t nrf_usbd_ep_amount_get(NRF_USBD_Type const * p_reg, uint8_t ep);
1123 NRF_STATIC_INLINE uint32_t nrf_usbd_halted_get(NRF_USBD_Type const * p_reg, uint8_t ep) in nrf_usbd_halted_get() argument
1125 uint8_t epnr = NRF_USBD_EP_NR_GET(ep); in nrf_usbd_halted_get()
1126 if (NRF_USBD_EPIN_CHECK(ep)) in nrf_usbd_halted_get()
1136 NRF_STATIC_INLINE bool nrf_usbd_ep_is_stall(NRF_USBD_Type const * p_reg, uint8_t ep) in nrf_usbd_ep_is_stall() argument
1138 if (NRF_USBD_EPISO_CHECK(ep)) in nrf_usbd_ep_is_stall()
1140 return USBD_HALTED_EPOUT_GETSTATUS_Halted == nrf_usbd_halted_get(p_reg, ep); in nrf_usbd_ep_is_stall()
1207 NRF_STATIC_INLINE size_t nrf_usbd_epout_size_get(NRF_USBD_Type const * p_reg, uint8_t ep) in nrf_usbd_epout_size_get() argument
1209 NRFX_ASSERT(NRF_USBD_EP_VALIDATE(ep)); in nrf_usbd_epout_size_get()
1210 NRFX_ASSERT(NRF_USBD_EPOUT_CHECK(ep)); in nrf_usbd_epout_size_get()
1211 if (NRF_USBD_EPISO_CHECK(ep)) in nrf_usbd_epout_size_get()
1222 return p_reg->SIZE.EPOUT[NRF_USBD_EP_NR_GET(ep)]; in nrf_usbd_epout_size_get()
1225 NRF_STATIC_INLINE size_t nrf_usbd_episoout_size_get(NRF_USBD_Type const * p_reg, uint8_t ep) in nrf_usbd_episoout_size_get() argument
1227 NRFX_ASSERT(NRF_USBD_EP_VALIDATE(ep)); in nrf_usbd_episoout_size_get()
1228 NRFX_ASSERT(NRF_USBD_EPOUT_CHECK(ep)); in nrf_usbd_episoout_size_get()
1229 NRFX_ASSERT(NRF_USBD_EPISO_CHECK(ep)); in nrf_usbd_episoout_size_get()
1244 NRF_STATIC_INLINE void nrf_usbd_epout_clear(NRF_USBD_Type * p_reg, uint8_t ep) in nrf_usbd_epout_clear() argument
1246 NRFX_ASSERT(NRF_USBD_EPOUT_CHECK(ep)); in nrf_usbd_epout_clear()
1247 p_reg->SIZE.EPOUT[NRF_USBD_EP_NR_GET(ep)] = 0; in nrf_usbd_epout_clear()
1248 (void) p_reg->SIZE.EPOUT[NRF_USBD_EP_NR_GET(ep)]; in nrf_usbd_epout_clear()
1274 uint8_t ep, in nrf_usbd_dtoggle_set() argument
1277 NRFX_ASSERT(NRF_USBD_EP_VALIDATE(ep)); in nrf_usbd_dtoggle_set()
1278 NRFX_ASSERT(!NRF_USBD_EPISO_CHECK(ep)); in nrf_usbd_dtoggle_set()
1279 p_reg->DTOGGLE = ep | (NRF_USBD_DTOGGLE_NOP << USBD_DTOGGLE_VALUE_Pos); in nrf_usbd_dtoggle_set()
1280 p_reg->DTOGGLE = ep | ((uint32_t)op << USBD_DTOGGLE_VALUE_Pos); in nrf_usbd_dtoggle_set()
1284 NRF_STATIC_INLINE nrf_usbd_dtoggle_t nrf_usbd_dtoggle_get(NRF_USBD_Type * p_reg, uint8_t ep) in nrf_usbd_dtoggle_get() argument
1288 p_reg->DTOGGLE = ep | (NRF_USBD_DTOGGLE_NOP << USBD_DTOGGLE_VALUE_Pos); in nrf_usbd_dtoggle_get()
1293 NRF_STATIC_INLINE bool nrf_usbd_ep_enable_check(NRF_USBD_Type const * p_reg, uint8_t ep) in nrf_usbd_ep_enable_check() argument
1295 NRFX_ASSERT(NRF_USBD_EP_VALIDATE(ep)); in nrf_usbd_ep_enable_check()
1296 uint8_t epnr = NRF_USBD_EP_NR_GET(ep); in nrf_usbd_ep_enable_check()
1298 if (NRF_USBD_EPIN_CHECK(ep)) in nrf_usbd_ep_enable_check()
1308 NRF_STATIC_INLINE void nrf_usbd_ep_enable(NRF_USBD_Type * p_reg, uint8_t ep) in nrf_usbd_ep_enable() argument
1310 NRFX_ASSERT(NRF_USBD_EP_VALIDATE(ep)); in nrf_usbd_ep_enable()
1311 uint8_t epnr = NRF_USBD_EP_NR_GET(ep); in nrf_usbd_ep_enable()
1313 if (NRF_USBD_EPIN_CHECK(ep)) in nrf_usbd_ep_enable()
1323 NRF_STATIC_INLINE void nrf_usbd_ep_disable(NRF_USBD_Type * p_reg, uint8_t ep) in nrf_usbd_ep_disable() argument
1325 NRFX_ASSERT(NRF_USBD_EP_VALIDATE(ep)); in nrf_usbd_ep_disable()
1326 uint8_t epnr = NRF_USBD_EP_NR_GET(ep); in nrf_usbd_ep_disable()
1328 if (NRF_USBD_EPIN_CHECK(ep)) in nrf_usbd_ep_disable()
1350 NRF_STATIC_INLINE void nrf_usbd_ep_stall(NRF_USBD_Type * p_reg, uint8_t ep) in nrf_usbd_ep_stall() argument
1352 NRFX_ASSERT(!NRF_USBD_EPISO_CHECK(ep)); in nrf_usbd_ep_stall()
1353 p_reg->EPSTALL = (USBD_EPSTALL_STALL_Stall << USBD_EPSTALL_STALL_Pos) | ep; in nrf_usbd_ep_stall()
1356 NRF_STATIC_INLINE void nrf_usbd_ep_unstall(NRF_USBD_Type * p_reg, uint8_t ep) in nrf_usbd_ep_unstall() argument
1358 NRFX_ASSERT(!NRF_USBD_EPISO_CHECK(ep)); in nrf_usbd_ep_unstall()
1359 p_reg->EPSTALL = (USBD_EPSTALL_STALL_UnStall << USBD_EPSTALL_STALL_Pos) | ep; in nrf_usbd_ep_unstall()
1408 uint8_t ep, in nrf_usbd_ep_easydma_set() argument
1412 if (NRF_USBD_EPIN_CHECK(ep)) in nrf_usbd_ep_easydma_set()
1414 if (NRF_USBD_EPISO_CHECK(ep)) in nrf_usbd_ep_easydma_set()
1421 uint8_t epnr = NRF_USBD_EP_NR_GET(ep); in nrf_usbd_ep_easydma_set()
1428 if (NRF_USBD_EPISO_CHECK(ep)) in nrf_usbd_ep_easydma_set()
1435 uint8_t epnr = NRF_USBD_EP_NR_GET(ep); in nrf_usbd_ep_easydma_set()
1442 NRF_STATIC_INLINE uint32_t nrf_usbd_ep_amount_get(NRF_USBD_Type const * p_reg, uint8_t ep) in nrf_usbd_ep_amount_get() argument
1446 if (NRF_USBD_EPIN_CHECK(ep)) in nrf_usbd_ep_amount_get()
1448 if (NRF_USBD_EPISO_CHECK(ep)) in nrf_usbd_ep_amount_get()
1454 uint8_t epnr = NRF_USBD_EP_NR_GET(ep); in nrf_usbd_ep_amount_get()
1460 if (NRF_USBD_EPISO_CHECK(ep)) in nrf_usbd_ep_amount_get()
1466 uint8_t epnr = NRF_USBD_EP_NR_GET(ep); in nrf_usbd_ep_amount_get()