@@ -795,9 +795,9 @@ static inline void usbd_work_process_recvreq(struct nrf_usbd_ctx *ctx,
795795 k_mutex_lock (& ctx -> drv_lock , K_FOREVER );
796796 NRF_USBD_COMMON_TRANSFER_OUT (transfer , ep_ctx -> buf .data ,
797797 ep_ctx -> cfg .max_sz );
798- nrfx_err_t err = nrf_usbd_common_ep_transfer (
798+ int err = nrf_usbd_common_ep_transfer (
799799 ep_addr_to_nrfx (ep_ctx -> cfg .addr ), & transfer );
800- if (err != NRFX_SUCCESS ) {
800+ if (err != 0 ) {
801801 LOG_ERR ("nRF USBD transfer error (OUT): 0x%02x" , err );
802802 }
803803 k_mutex_unlock (& ctx -> drv_lock );
@@ -1146,7 +1146,7 @@ static void usbd_event_handler(nrf_usbd_common_evt_t const *const p_event)
11461146static inline void usbd_reinit (void )
11471147{
11481148 int ret ;
1149- nrfx_err_t err ;
1149+ int err ;
11501150
11511151 nrfx_power_usbevt_disable ();
11521152 nrf_usbd_common_disable ();
@@ -1160,7 +1160,7 @@ static inline void usbd_reinit(void)
11601160 nrfx_power_usbevt_enable ();
11611161 err = nrf_usbd_common_init (usbd_event_handler );
11621162
1163- if (err != NRFX_SUCCESS ) {
1163+ if (err != 0 ) {
11641164 LOG_DBG ("nRF USBD driver reinit failed. Code: %d" , err );
11651165 __ASSERT_NO_MSG (0 );
11661166 }
@@ -1692,9 +1692,9 @@ int usb_dc_ep_write(const uint8_t ep, const uint8_t *const data,
16921692
16931693 ep_ctx -> write_in_progress = true;
16941694 NRF_USBD_COMMON_TRANSFER_IN (transfer , data , data_len , 0 );
1695- nrfx_err_t err = nrf_usbd_common_ep_transfer (ep_addr_to_nrfx (ep ), & transfer );
1695+ int err = nrf_usbd_common_ep_transfer (ep_addr_to_nrfx (ep ), & transfer );
16961696
1697- if (err != NRFX_SUCCESS ) {
1697+ if (err != 0 ) {
16981698 ep_ctx -> write_in_progress = false;
16991699 if (ret_bytes ) {
17001700 * ret_bytes = 0 ;
@@ -1883,7 +1883,7 @@ int usb_dc_wakeup_request(void)
18831883static int usb_init (void )
18841884{
18851885 struct nrf_usbd_ctx * ctx = get_usbd_ctx ();
1886- nrfx_err_t err ;
1886+ int err ;
18871887
18881888#ifdef CONFIG_HAS_HW_NRF_USBREG
18891889 /* Use CLOCK/POWER priority for compatibility with other series where
@@ -1909,12 +1909,12 @@ static int usb_init(void)
19091909 };
19101910
19111911 err = nrf_usbd_common_init (usbd_event_handler );
1912- if (err != NRFX_SUCCESS ) {
1912+ if (err != 0 ) {
19131913 LOG_DBG ("nRF USBD driver init failed. Code: %d" , (uint32_t )err );
19141914 return - EIO ;
19151915 }
19161916
1917- /* Ignore the return value, as NRFX_ERROR_ALREADY is not
1917+ /* Ignore the return value, as -EALREADY is not
19181918 * a problem here.
19191919 */
19201920 (void )nrfx_power_init (& power_config );
0 commit comments