summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJerzy Kasenberg <[email protected]>2021-05-11 08:53:33 +0200
committerJerzy Kasenberg <[email protected]>2021-05-11 12:37:08 +0200
commite2f795067acede0b93de8f7f27edb6aaa76eda57 (patch)
tree9ea35e6496eb4f29e263e152f072c53e5d751147 /src
parent59affc90aa429610561b151202073a717f84371f (diff)
Allow build for NRF5340 MCU
Errata code referred to NRF_USBD_BASE. This definition is not present in NRF5340 but both NRF52 and NRF53 do have NRF_USBD which maps to NRF_USBD_BASE for NRF52 and to NRF_USBD_S_BASE for NRF5340. This just make build possible for NRF5340.
Diffstat (limited to 'src')
-rw-r--r--src/portable/nordic/nrf5x/dcd_nrf5x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/portable/nordic/nrf5x/dcd_nrf5x.c b/src/portable/nordic/nrf5x/dcd_nrf5x.c
index 6b8095a00..3bb9bd37a 100644
--- a/src/portable/nordic/nrf5x/dcd_nrf5x.c
+++ b/src/portable/nordic/nrf5x/dcd_nrf5x.c
@@ -924,8 +924,8 @@ void tusb_hal_nrf_power_event (uint32_t event)
if ( nrfx_usbd_errata_166() )
{
- *((volatile uint32_t *) (NRF_USBD_BASE + 0x800)) = 0x7E3;
- *((volatile uint32_t *) (NRF_USBD_BASE + 0x804)) = 0x40;
+ *((volatile uint32_t *) ((uint8_t *) (NRF_USBD) + 0x800)) = 0x7E3;
+ *((volatile uint32_t *) ((uint8_t *) (NRF_USBD) + 0x804)) = 0x40;
__ISB(); __DSB();
}