Skip to content

Commit cd3d939

Browse files
committed
Astyle fixed USBPhy_Nordic.cpp
1 parent 5386b87 commit cd3d939

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

usb/device/targets/TARGET_NORDIC/TARGET_MCU_NRF52840/USBPhy_Nordic.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ void USBPhyHw::init(USBPhyEvents *events)
7474
// Interrupts will be reenabled by the Nordic driver
7575
NRFX_IRQ_DISABLE(USBD_IRQn);
7676

77-
if(this->events == NULL) {
78-
sleep_manager_lock_deep_sleep();
77+
if (this->events == NULL) {
78+
sleep_manager_lock_deep_sleep();
7979
}
80-
80+
8181
this->events = events;
8282

8383
ret_code_t ret;
@@ -89,7 +89,7 @@ void USBPhyHw::init(USBPhyEvents *events)
8989

9090
// Register callback for USB Power events
9191
static const nrfx_power_usbevt_config_t config = {
92-
.handler = power_usb_event_handler
92+
.handler = power_usb_event_handler
9393
};
9494

9595
nrfx_power_usbevt_init(&config);
@@ -133,8 +133,8 @@ void USBPhyHw::deinit()
133133
// Disable the power peripheral driver
134134
nrfx_power_uninit();
135135

136-
if(this->events != NULL) {
137-
sleep_manager_unlock_deep_sleep();
136+
if (this->events != NULL) {
137+
sleep_manager_unlock_deep_sleep();
138138
}
139139

140140
this->events = NULL;
@@ -146,7 +146,7 @@ void USBPhyHw::deinit()
146146
bool USBPhyHw::powered()
147147
{
148148
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) {
150150
return true;
151151
} else {
152152
return false;
@@ -403,9 +403,10 @@ void USBPhyHw::endpoint_unstall(usb_ep_t endpoint)
403403
nrf_drv_usbd_ep_t ep = get_nordic_endpoint(endpoint);
404404

405405
// 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+
409410
// Clear data toggle
410411
nrf_drv_usbd_ep_dtoggle_clear(ep);
411412

0 commit comments

Comments
 (0)