summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authorhywing <[email protected]>2024-11-26 17:42:50 +0800
committerRbb666 <[email protected]>2024-11-26 20:04:31 +0800
commit07999dc84a2b0bd94fe45cff239559d2d599ac4f (patch)
tree912d4fca83ad48e7ea5a40a0831631a7df81cf23 /bsp
parent46b2850f1272caf9de4d3c25fca5706230d4304b (diff)
[bsp][nxp][mcxa153] add interrupt process in IRQ Handler functions
Diffstat (limited to 'bsp')
-rw-r--r--bsp/nxp/mcx/mcxa/Libraries/drivers/drv_hwtimer.c10
-rw-r--r--bsp/nxp/mcx/mcxa/Libraries/drivers/drv_hwtimer.h17
2 files changed, 6 insertions, 21 deletions
diff --git a/bsp/nxp/mcx/mcxa/Libraries/drivers/drv_hwtimer.c b/bsp/nxp/mcx/mcxa/Libraries/drivers/drv_hwtimer.c
index 7af444dabc..78b1e1e49a 100644
--- a/bsp/nxp/mcx/mcxa/Libraries/drivers/drv_hwtimer.c
+++ b/bsp/nxp/mcx/mcxa/Libraries/drivers/drv_hwtimer.c
@@ -15,7 +15,6 @@
#define LOG_TAG "drv.hwtimer"
#include <drv_log.h>
#include <rtdevice.h>
-#include "drv_hwtimer.h"
#include "fsl_ctimer.h"
enum
@@ -244,39 +243,42 @@ INIT_DEVICE_EXPORT(rt_hw_hwtimer_init);
#ifdef BSP_USING_CTIMER0
void CTIMER0_IRQHandler(void)
{
+ rt_interrupt_enter();
uint32_t int_stat;
/* Get Interrupt status flags */
int_stat = CTIMER_GetStatusFlags(CTIMER0);
/* Clear the status flags that were set */
CTIMER_ClearStatusFlags(CTIMER0, int_stat);
rt_device_hwtimer_isr(&mcxa_hwtimer_obj[TIM0_INDEX].time_device);
-
+ rt_interrupt_leave();
}
#endif /* BSP_USING_HWTIMER0 */
#ifdef BSP_USING_CTIMER1
void CTIMER1_IRQHandler(void)
{
+ rt_interrupt_enter();
uint32_t int_stat;
/* Get Interrupt status flags */
int_stat = CTIMER_GetStatusFlags(CTIMER1);
/* Clear the status flags that were set */
CTIMER_ClearStatusFlags(CTIMER1, int_stat);
rt_device_hwtimer_isr(&mcxa_hwtimer_obj[TIM1_INDEX].time_device);
-
+ rt_interrupt_leave();
}
#endif /* BSP_USING_HWTIMER1 */
#ifdef BSP_USING_CTIMER2
void CTIMER2_IRQHandler(void)
{
+ rt_interrupt_enter();
uint32_t int_stat;
/* Get Interrupt status flags */
int_stat = CTIMER_GetStatusFlags(CTIMER2);
/* Clear the status flags that were set */
CTIMER_ClearStatusFlags(CTIMER2, int_stat);
rt_device_hwtimer_isr(&mcxa_hwtimer_obj[TIM2_INDEX].time_device);
-
+ rt_interrupt_leave();
}
#endif /* BSP_USING_HWTIMER2 */
diff --git a/bsp/nxp/mcx/mcxa/Libraries/drivers/drv_hwtimer.h b/bsp/nxp/mcx/mcxa/Libraries/drivers/drv_hwtimer.h
deleted file mode 100644
index 926a21a0fa..0000000000
--- a/bsp/nxp/mcx/mcxa/Libraries/drivers/drv_hwtimer.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright (c) 2006-2024 RT-Thread Development Team
- *
- * SPDX-License-Identifier: Apache-2.0
- *
-* Change Logs:
-* Date Author Notes
-* 2024-11-26 hywing the first version.
-*/
-
-#ifndef DRV_HWTIMER_H__
-#define DRV_HWTIMER_H__
-
-int rt_hw_hwtimer_init(void);
-
-#endif /* __DRV_HWTIMER_H__ */
-