From 86e1830746c79ff2ceede56c540e208c659c8981 Mon Sep 17 00:00:00 2001 From: Scheiffler Date: Mon, 6 Nov 2023 15:30:09 -0600 Subject: [PATCH 1/3] Update MAX32570 boards to have default GPIO handler for the touchscreen interrupt --- Libraries/Boards/MAX32570/MN_EvKit_V1/Source/board.c | 4 ++-- Libraries/Boards/MAX32570/M_EvKit_V1/Source/board.c | 4 ++-- Libraries/Boards/MAX32570/QN_EvKit_V1/Source/board.c | 10 ++++++++++ Libraries/Boards/MAX32570/Q_EvKit_V1/Source/board.c | 12 +++++++++++- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/Libraries/Boards/MAX32570/MN_EvKit_V1/Source/board.c b/Libraries/Boards/MAX32570/MN_EvKit_V1/Source/board.c index c3c99802a58..ebea70ced6a 100644 --- a/Libraries/Boards/MAX32570/MN_EvKit_V1/Source/board.c +++ b/Libraries/Boards/MAX32570/MN_EvKit_V1/Source/board.c @@ -74,8 +74,8 @@ const mxc_gpio_cfg_t ts_busy_pin = { MXC_GPIO0, MXC_GPIO_PIN_1, MXC_GPIO_FUNC_IN /******************************************************************************/ /** - * NOTE: This weak definition is included to support Push Button interrupts in - * case the user does not define this interrupt handler in their application. + * NOTE: This weak definition is included to support Push Button/Touchscreen interrupts + * in case the user does not define this interrupt handler in their application. **/ __weak void GPIO0_IRQHandler(void) { diff --git a/Libraries/Boards/MAX32570/M_EvKit_V1/Source/board.c b/Libraries/Boards/MAX32570/M_EvKit_V1/Source/board.c index e394c7bda98..eff0b866123 100644 --- a/Libraries/Boards/MAX32570/M_EvKit_V1/Source/board.c +++ b/Libraries/Boards/MAX32570/M_EvKit_V1/Source/board.c @@ -72,8 +72,8 @@ const mxc_gpio_cfg_t ts_busy_pin = { MXC_GPIO0, MXC_GPIO_PIN_1, MXC_GPIO_FUNC_IN /******************************************************************************/ /** - * NOTE: This weak definition is included to support Push Button interrupts in - * case the user does not define this interrupt handler in their application. + * NOTE: This weak definition is included to support Push Button/Touchscreen interrupts + * in case the user does not define this interrupt handler in their application. **/ __weak void GPIO0_IRQHandler(void) { diff --git a/Libraries/Boards/MAX32570/QN_EvKit_V1/Source/board.c b/Libraries/Boards/MAX32570/QN_EvKit_V1/Source/board.c index 540dd613c87..3aa645b065b 100644 --- a/Libraries/Boards/MAX32570/QN_EvKit_V1/Source/board.c +++ b/Libraries/Boards/MAX32570/QN_EvKit_V1/Source/board.c @@ -86,6 +86,16 @@ __weak void GPIO3_IRQHandler(void) MXC_GPIO_Handler(MXC_GPIO_GET_IDX(MXC_GPIO3)); } +/******************************************************************************/ +/** + * NOTE: This weak definition is included to support Touchscreen interrupt in + * case the user does not define this interrupt handler in their application. + **/ +__weak void GPIO0_IRQHandler(void) +{ + MXC_GPIO_Handler(MXC_GPIO_GET_IDX(MXC_GPIO0)); +} + /******************************************************************************/ static int ext_flash_board_init(void) { diff --git a/Libraries/Boards/MAX32570/Q_EvKit_V1/Source/board.c b/Libraries/Boards/MAX32570/Q_EvKit_V1/Source/board.c index 8bfe8170f11..8ba4275ab43 100644 --- a/Libraries/Boards/MAX32570/Q_EvKit_V1/Source/board.c +++ b/Libraries/Boards/MAX32570/Q_EvKit_V1/Source/board.c @@ -79,11 +79,21 @@ const mxc_gpio_cfg_t ts_busy_pin = { MXC_GPIO0, MXC_GPIO_PIN_1, MXC_GPIO_FUNC_IN * NOTE: This weak definition is included to support Push Button interrupts in * case the user does not define this interrupt handler in their application. **/ -__weak void GPIO0_IRQHandler(void) +__weak void GPIO3_IRQHandler(void) { MXC_GPIO_Handler(MXC_GPIO_GET_IDX(MXC_GPIO3)); } +/******************************************************************************/ +/** + * NOTE: This weak definition is included to support Touchscreen interrupt in + * case the user does not define this interrupt handler in their application. + **/ +__weak void GPIO0_IRQHandler(void) +{ + MXC_GPIO_Handler(MXC_GPIO_GET_IDX(MXC_GPIO0)); +} + /******************************************************************************/ static int ext_flash_board_init(void) { From 6b62b9380fbe1fbcd8a41b2aa75b0792ad6a9841 Mon Sep 17 00:00:00 2001 From: Scheiffler Date: Mon, 6 Nov 2023 16:00:31 -0600 Subject: [PATCH 2/3] Updating comment in the ME17 board file for the touchscreen interrupt handler --- Libraries/Boards/MAX32655/EvKit_V1/Source/board.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/Boards/MAX32655/EvKit_V1/Source/board.c b/Libraries/Boards/MAX32655/EvKit_V1/Source/board.c index 552ebc6d866..9d70b832d4c 100644 --- a/Libraries/Boards/MAX32655/EvKit_V1/Source/board.c +++ b/Libraries/Boards/MAX32655/EvKit_V1/Source/board.c @@ -73,8 +73,8 @@ const unsigned int num_leds = (sizeof(led_pin) / sizeof(mxc_gpio_cfg_t)); /******************************************************************************/ /** - * NOTE: This weak definition is included to support Push Button interrupts in - * case the user does not define this interrupt handler in their application. + * NOTE: This weak definition is included to support Push Button/Touchscreen interrupt + * in case the user does not define this interrupt handler in their application. **/ __weak void GPIO0_IRQHandler(void) { From dcc8440d56f3a29aac806b207d4cb720a88e9b23 Mon Sep 17 00:00:00 2001 From: Scheiffler Date: Mon, 6 Nov 2023 16:13:58 -0600 Subject: [PATCH 3/3] Add touchscreen interrupt handler for MAX78000 EvKit --- Libraries/Boards/MAX78000/EvKit_V1/Source/board.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Libraries/Boards/MAX78000/EvKit_V1/Source/board.c b/Libraries/Boards/MAX78000/EvKit_V1/Source/board.c index 71a352b0399..58b109cbe5c 100644 --- a/Libraries/Boards/MAX78000/EvKit_V1/Source/board.c +++ b/Libraries/Boards/MAX78000/EvKit_V1/Source/board.c @@ -102,6 +102,16 @@ __weak void GPIO2_IRQHandler(void) MXC_GPIO_Handler(MXC_GPIO_GET_IDX(MXC_GPIO2)); } +/******************************************************************************/ +/** + * NOTE: This weak definition is included to support Touchscreen interrupts in + * case the user does not define this interrupt handler in their application. + **/ +__weak void GPIO0_IRQHandler(void) +{ + MXC_GPIO_Handler(MXC_GPIO_GET_IDX(MXC_GPIO0)); +} + #ifndef __riscv void TS_SPI_Init(void) {