Skip to content

Commit 2e79b96

Browse files
committed
Support InterruptIn class in ci-test/pwm_rise_fall test case
1 parent 0bbf119 commit 2e79b96

File tree

1 file changed

+2
-2
lines changed
  • targets/TARGET_NUVOTON/TARGET_M261/device/StdDriver

1 file changed

+2
-2
lines changed

targets/TARGET_NUVOTON/TARGET_M261/device/StdDriver/m261_gpio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ void GPIO_SetMode(GPIO_T *port, uint32_t u32PinMask, uint32_t u32Mode)
8080
void GPIO_EnableInt(GPIO_T *port, uint32_t u32Pin, uint32_t u32IntAttribs)
8181
{
8282
/* Configure interrupt mode of specified pin */
83-
port->INTTYPE = (port->INTTYPE & ~(1ul << u32Pin)) | (((u32IntAttribs >> 24) & 0xFFUL) << u32Pin);
83+
port->INTTYPE |= (((u32IntAttribs >> 24) & 0xFFUL) << u32Pin);
8484

8585
/* Enable interrupt function of specified pin */
86-
port->INTEN = (port->INTEN & ~(0x00010001ul << u32Pin)) | ((u32IntAttribs & 0xFFFFFFUL) << u32Pin);
86+
port->INTEN |= ((u32IntAttribs & 0xFFFFFFUL) << u32Pin);
8787
}
8888

8989

0 commit comments

Comments
 (0)