diff options
| author | hathach <thach@tinyusb.org> | 2018-09-04 20:54:36 +0700 |
|---|---|---|
| committer | hathach <thach@tinyusb.org> | 2018-09-04 20:54:36 +0700 |
| commit | b9e8e3cd1f4074cfb52805339dbb149e92f1bf2f (patch) | |
| tree | 3750c63f5d598b79df3a31b7b4e0c1aa3cbfcfec | |
| parent | 1fe3ed87ebf0624e8a1938b5f549943278e439e3 (diff) | |
fix nrf52832 build
| -rw-r--r-- | ports/nrf/common-hal/neopixel_write/__init__.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/nrf/common-hal/neopixel_write/__init__.c b/ports/nrf/common-hal/neopixel_write/__init__.c index 999cb1b0a..a4ca7524e 100644 --- a/ports/nrf/common-hal/neopixel_write/__init__.c +++ b/ports/nrf/common-hal/neopixel_write/__init__.c @@ -206,7 +206,11 @@ void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout // the LEDs and if you are not using the EasyDMA feature. __disable_irq(); +#ifdef NRF52840_XXAA NRF_GPIO_Type* port = ( digitalinout->pin->port ? NRF_P1 : NRF_P0 ); +#else + NRF_GPIO_Type* port = NRF_P0; +#endif uint32_t pinMask = ( 1UL << digitalinout->pin->pin ); uint32_t CYCLES_X00 = CYCLES_800; |
