@@ -74,10 +74,10 @@ void USBPhyHw::init(USBPhyEvents *events)
74
74
// Interrupts will be reenabled by the Nordic driver
75
75
NRFX_IRQ_DISABLE (USBD_IRQn);
76
76
77
- if (this ->events == NULL ) {
78
- sleep_manager_lock_deep_sleep ();
77
+ if (this ->events == NULL ) {
78
+ sleep_manager_lock_deep_sleep ();
79
79
}
80
-
80
+
81
81
this ->events = events;
82
82
83
83
ret_code_t ret;
@@ -89,7 +89,7 @@ void USBPhyHw::init(USBPhyEvents *events)
89
89
90
90
// Register callback for USB Power events
91
91
static const nrfx_power_usbevt_config_t config = {
92
- .handler = power_usb_event_handler
92
+ .handler = power_usb_event_handler
93
93
};
94
94
95
95
nrfx_power_usbevt_init (&config);
@@ -133,8 +133,8 @@ void USBPhyHw::deinit()
133
133
// Disable the power peripheral driver
134
134
nrfx_power_uninit ();
135
135
136
- if (this ->events != NULL ) {
137
- sleep_manager_unlock_deep_sleep ();
136
+ if (this ->events != NULL ) {
137
+ sleep_manager_unlock_deep_sleep ();
138
138
}
139
139
140
140
this ->events = NULL ;
@@ -146,7 +146,7 @@ void USBPhyHw::deinit()
146
146
bool USBPhyHw::powered ()
147
147
{
148
148
if (nrfx_power_usbstatus_get () == NRFX_POWER_USB_STATE_CONNECTED
149
- || nrfx_power_usbstatus_get () == NRFX_POWER_USB_STATE_READY) {
149
+ || nrfx_power_usbstatus_get () == NRFX_POWER_USB_STATE_READY) {
150
150
return true ;
151
151
} else {
152
152
return false ;
@@ -403,9 +403,10 @@ void USBPhyHw::endpoint_unstall(usb_ep_t endpoint)
403
403
nrf_drv_usbd_ep_t ep = get_nordic_endpoint (endpoint);
404
404
405
405
// Unstall may be called on an endpoint that isn't stalled
406
- if (nrf_drv_usbd_ep_stall_check (ep))
407
- nrf_drv_usbd_ep_stall_clear (ep);
408
-
406
+ if (nrf_drv_usbd_ep_stall_check (ep)) {
407
+ nrf_drv_usbd_ep_stall_clear (ep);
408
+ }
409
+
409
410
// Clear data toggle
410
411
nrf_drv_usbd_ep_dtoggle_clear (ep);
411
412
0 commit comments