This is an automated email from the ASF dual-hosted git repository. kasjer pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit a70ec32bf88b1261bfcfc065aa009b9174cd31d8 Author: Jerzy Kasenberg <[email protected]> AuthorDate: Wed Oct 14 08:22:34 2026 +0200 tinyusb/nrf53: Provide nrf52_errata_199 for nRF5340 TinyUSB nRF5x device driver applies nRF52840 USBD errata 199 workaround and calls nrf52_errata_199() also when it is built for nRF5340. TinyUSB builds against nrfx 3.x, where nrf_erratas.h includes errata headers of all series and nrf52_errata_199() returns false outside NRF52_SERIES. nrfx v4 used by Mynewt includes nRF52 errata only for NRF52_SERIES, so the build failed with implicit declaration error. Provide the function returning false when not building for nRF52; the errata does not apply to nRF5340. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Jerzy Kasenberg <[email protected]> --- hw/usb/tinyusb/nrf53/include/tusb_hw.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hw/usb/tinyusb/nrf53/include/tusb_hw.h b/hw/usb/tinyusb/nrf53/include/tusb_hw.h index 0268b592a..c8ee70fa9 100644 --- a/hw/usb/tinyusb/nrf53/include/tusb_hw.h +++ b/hw/usb/tinyusb/nrf53/include/tusb_hw.h @@ -22,8 +22,23 @@ #define CFG_TUSB_MCU OPT_MCU_NRF5X +#include <stdbool.h> #include <syscfg/syscfg.h> +/* + * TinyUSB nRF5x device driver applies nRF52840 USBD errata 199 workaround + * and calls nrf52_errata_199() also when built for nRF5340. nrfx declares + * nRF52 errata functions for NRF52_SERIES only; the errata does not apply + * to nRF5340. + */ +#ifndef NRF52_SERIES +static inline bool +nrf52_errata_199(void) +{ + return false; +} +#endif + #define CFG_TUSB_RHPORT0_SPEED OPT_MODE_FULL_SPEED #if defined(MYNEWT_VAL_USBD_CDC_NOTIFY_EP)
