Skip to content

Commit

Permalink
fix(Boards): Add default interrupt handlers for the touchscreen (#795)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob-Scheiffler authored Nov 8, 2023
1 parent 73bac29 commit a24a7be
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Libraries/Boards/MAX32570/MN_EvKit_V1/Source/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions Libraries/Boards/MAX32570/M_EvKit_V1/Source/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
10 changes: 10 additions & 0 deletions Libraries/Boards/MAX32570/QN_EvKit_V1/Source/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
12 changes: 11 additions & 1 deletion Libraries/Boards/MAX32570/Q_EvKit_V1/Source/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions Libraries/Boards/MAX32655/EvKit_V1/Source/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
10 changes: 10 additions & 0 deletions Libraries/Boards/MAX78000/EvKit_V1/Source/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit a24a7be

Please sign in to comment.