|
@@ -15,7 +15,8 @@
|
|
|
#include "board.h"
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
-extern "C" {
|
|
|
+extern "C"
|
|
|
+{
|
|
|
#endif
|
|
|
|
|
|
#ifdef BSP_USING_UART0
|
|
@@ -27,44 +28,44 @@ cy_stc_sysint_t UART0_SCB_IRQ_cfg =
|
|
|
};
|
|
|
#endif
|
|
|
#ifdef BSP_USING_UART1
|
|
|
-/* UART1 device driver structure */
|
|
|
-cy_stc_sysint_t UART1_SCB_IRQ_cfg =
|
|
|
-{
|
|
|
- .intrSrc = (IRQn_Type) scb_1_interrupt_IRQn,
|
|
|
- .intrPriority = (7u),
|
|
|
-};
|
|
|
+ /* UART1 device driver structure */
|
|
|
+ cy_stc_sysint_t UART1_SCB_IRQ_cfg =
|
|
|
+ {
|
|
|
+ .intrSrc = (IRQn_Type)scb_1_interrupt_IRQn,
|
|
|
+ .intrPriority = (7u),
|
|
|
+ };
|
|
|
#endif
|
|
|
#ifdef BSP_USING_UART2
|
|
|
-/* UART2 device driver structure */
|
|
|
-cy_stc_sysint_t UART2_SCB_IRQ_cfg =
|
|
|
-{
|
|
|
- .intrSrc = (IRQn_Type) scb_2_interrupt_IRQn,
|
|
|
- .intrPriority = (7u),
|
|
|
-};
|
|
|
+ /* UART2 device driver structure */
|
|
|
+ cy_stc_sysint_t UART2_SCB_IRQ_cfg =
|
|
|
+ {
|
|
|
+ .intrSrc = (IRQn_Type)scb_2_interrupt_IRQn,
|
|
|
+ .intrPriority = (7u),
|
|
|
+ };
|
|
|
#endif
|
|
|
#ifdef BSP_USING_UART3
|
|
|
-/* UART3 device driver structure */
|
|
|
-cy_stc_sysint_t UART3_SCB_IRQ_cfg =
|
|
|
-{
|
|
|
- .intrSrc = (IRQn_Type) scb_3_interrupt_IRQn,
|
|
|
- .intrPriority = (7u),
|
|
|
-};
|
|
|
+ /* UART3 device driver structure */
|
|
|
+ cy_stc_sysint_t UART3_SCB_IRQ_cfg =
|
|
|
+ {
|
|
|
+ .intrSrc = (IRQn_Type)scb_3_interrupt_IRQn,
|
|
|
+ .intrPriority = (7u),
|
|
|
+ };
|
|
|
#endif
|
|
|
#ifdef BSP_USING_UART4
|
|
|
-/* UART4 device driver structure */
|
|
|
-cy_stc_sysint_t UART4_SCB_IRQ_cfg =
|
|
|
-{
|
|
|
- .intrSrc = (IRQn_Type) scb_4_interrupt_IRQn,
|
|
|
- .intrPriority = (7u),
|
|
|
-};
|
|
|
+ /* UART4 device driver structure */
|
|
|
+ cy_stc_sysint_t UART4_SCB_IRQ_cfg =
|
|
|
+ {
|
|
|
+ .intrSrc = (IRQn_Type)scb_4_interrupt_IRQn,
|
|
|
+ .intrPriority = (7u),
|
|
|
+ };
|
|
|
#endif
|
|
|
#ifdef BSP_USING_UART5
|
|
|
-/* UART5 device driver structure */
|
|
|
-cy_stc_sysint_t UART5_SCB_IRQ_cfg =
|
|
|
-{
|
|
|
- .intrSrc = (IRQn_Type) scb_5_interrupt_IRQn,
|
|
|
- .intrPriority = (7u),
|
|
|
-};
|
|
|
+ /* UART5 device driver structure */
|
|
|
+ cy_stc_sysint_t UART5_SCB_IRQ_cfg =
|
|
|
+ {
|
|
|
+ .intrSrc = (IRQn_Type)scb_5_interrupt_IRQn,
|
|
|
+ .intrPriority = (7u),
|
|
|
+ };
|
|
|
#endif
|
|
|
|
|
|
#if defined(BSP_USING_UART0)
|
|
@@ -76,10 +77,10 @@ cy_stc_sysint_t UART5_SCB_IRQ_cfg =
|
|
|
.rx_pin = P0_2, \
|
|
|
.usart_x = SCB0, \
|
|
|
.intrSrc = scb_0_interrupt_IRQn, \
|
|
|
- .userIsr = uart_isr_callback(uart0) \
|
|
|
+ .userIsr = uart_isr_callback(uart0), \
|
|
|
.UART_SCB_IRQ_cfg = &UART0_SCB_IRQ_cfg, \
|
|
|
}
|
|
|
-void uart0_isr_callback(void);
|
|
|
+ void uart0_isr_callback(void);
|
|
|
#endif /* UART0_CONFIG */
|
|
|
#endif /* BSP_USING_UART0 */
|
|
|
|
|
@@ -92,10 +93,10 @@ void uart0_isr_callback(void);
|
|
|
.rx_pin = P10_0, \
|
|
|
.usart_x = SCB1, \
|
|
|
.intrSrc = scb_1_interrupt_IRQn, \
|
|
|
- .userIsr = uart_isr_callback(uart1) \
|
|
|
+ .userIsr = uart_isr_callback(uart1), \
|
|
|
.UART_SCB_IRQ_cfg = &UART1_SCB_IRQ_cfg, \
|
|
|
}
|
|
|
-void uart1_isr_callback(void);
|
|
|
+ void uart1_isr_callback(void);
|
|
|
#endif /* UART1_CONFIG */
|
|
|
#endif /* BSP_USING_UART1 */
|
|
|
|
|
@@ -111,7 +112,7 @@ void uart1_isr_callback(void);
|
|
|
.userIsr = uart_isr_callback(uart2), \
|
|
|
.UART_SCB_IRQ_cfg = &UART2_SCB_IRQ_cfg, \
|
|
|
}
|
|
|
-void uart2_isr_callback(void);
|
|
|
+ void uart2_isr_callback(void);
|
|
|
#endif /* UART2_CONFIG */
|
|
|
#endif /* BSP_USING_UART2 */
|
|
|
|
|
@@ -127,7 +128,7 @@ void uart2_isr_callback(void);
|
|
|
.userIsr = uart_isr_callback(uart3), \
|
|
|
.UART_SCB_IRQ_cfg = &UART3_SCB_IRQ_cfg, \
|
|
|
}
|
|
|
-void uart3_isr_callback(void);
|
|
|
+ void uart3_isr_callback(void);
|
|
|
#endif /* UART3_CONFIG */
|
|
|
#endif /* BSP_USING_UART3 */
|
|
|
|
|
@@ -143,7 +144,7 @@ void uart3_isr_callback(void);
|
|
|
.userIsr = uart_isr_callback(uart4), \
|
|
|
.UART_SCB_IRQ_cfg = &UART4_SCB_IRQ_cfg, \
|
|
|
}
|
|
|
-void uart4_isr_callback(void);
|
|
|
+ void uart4_isr_callback(void);
|
|
|
#endif /* UART4_CONFIG */
|
|
|
#endif /* BSP_USING_UART4 */
|
|
|
|
|
@@ -159,7 +160,7 @@ void uart4_isr_callback(void);
|
|
|
.userIsr = uart_isr_callback(uart5), \
|
|
|
.UART_SCB_IRQ_cfg = &UART5_SCB_IRQ_cfg, \
|
|
|
}
|
|
|
-void uart5_isr_callback(void);
|
|
|
+ void uart5_isr_callback(void);
|
|
|
#endif /* UART5_CONFIG */
|
|
|
#endif /* BSP_USING_UART5 */
|
|
|
|