mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
Fix nRF5340 DK USB host shield build
- Fix incorrect UART pins - Enable MAX3421 host shield - Use GPIOTE1_IRQn instead of GPIOTE_IRQn
This commit is contained in:
parent
d241f32342
commit
1315bc196c
@ -1,6 +1,9 @@
|
||||
set(MCU_VARIANT nrf5340_application)
|
||||
set(LD_FILE_GNU ${NRFX_DIR}/mdk/nrf5340_xxaa_application.ld)
|
||||
|
||||
# enable max3421 host driver for this board
|
||||
set(MAX3421_HOST 1)
|
||||
|
||||
function(update_board TARGET)
|
||||
target_sources(${TARGET} PRIVATE
|
||||
${NRFX_DIR}/drivers/src/nrfx_usbreg.c
|
||||
|
@ -42,8 +42,8 @@
|
||||
#define BUTTON_STATE_ACTIVE 0
|
||||
|
||||
// UART
|
||||
#define UART_RX_PIN 32
|
||||
#define UART_TX_PIN 33
|
||||
#define UART_RX_PIN 22
|
||||
#define UART_TX_PIN 20
|
||||
|
||||
// SPI for USB host shield
|
||||
#define MAX3421_SCK_PIN _PINNUM(1, 15)
|
||||
|
@ -2,6 +2,9 @@ CPU_CORE = cortex-m33
|
||||
MCU_VARIANT = nrf5340_application
|
||||
CFLAGS += -DNRF5340_XXAA -DNRF5340_XXAA_APPLICATION
|
||||
|
||||
# enable max3421 host driver for this board
|
||||
MAX3421_HOST = 1
|
||||
|
||||
LD_FILE = hw/mcu/nordic/nrfx/mdk/nrf5340_xxaa_application.ld
|
||||
|
||||
SRC_C += hw/mcu/nordic/nrfx/drivers/src/nrfx_usbreg.c
|
||||
|
@ -76,6 +76,7 @@ enum {
|
||||
#define LFCLK_SRC_RC CLOCK_LFCLKSRC_SRC_LFRC
|
||||
#define VBUSDETECT_Msk USBREG_USBREGSTATUS_VBUSDETECT_Msk
|
||||
#define OUTPUTRDY_Msk USBREG_USBREGSTATUS_OUTPUTRDY_Msk
|
||||
#define GPIOTE_IRQn GPIOTE1_IRQn
|
||||
#else
|
||||
#define LFCLK_SRC_RC CLOCK_LFCLKSRC_SRC_RC
|
||||
#define VBUSDETECT_Msk POWER_USBREGSTATUS_VBUSDETECT_Msk
|
||||
|
Loading…
x
Reference in New Issue
Block a user