Skip to content

Commit 4eb7804

Browse files
committed
added irq counts as defines
1 parent c93d0c5 commit 4eb7804

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cores/arduino/IRQManager.h

+9
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#if SERIAL_HOWMANY > 0
1414
#include "r_uart_api.h"
15+
#define UART_INTERRUPT_COUNT 4
1516
#endif
1617

1718
#if EXT_INTERRUPTS_HOWMANY > 0
@@ -78,6 +79,9 @@ typedef struct i2c_irq_req {
7879
i2c_master_cfg_t *mcfg;
7980
i2c_slave_cfg_t *scfg;
8081
} I2CIrqReq_t;
82+
#define WIRE_MASTER_INTERRUPT_COUNT 4
83+
#define WIRE_SLAVE_INTERRUPT_COUNT 4
84+
#define WIRE_SCI_MASTER_INTERRUPT_COUNT 3
8185
#endif
8286

8387
#if SPI_HOWMANY > 0
@@ -95,6 +99,7 @@ typedef struct sci_spi_master_irq {
9599
spi_cfg_t * cfg;
96100
uint8_t hw_channel;
97101
} SciSpiMasterIrqReq_t;
102+
#define SPI_INTERRUPT_COUNT 4
98103
#endif
99104

100105
#if CAN_HOWMANY > 0
@@ -103,6 +108,7 @@ typedef struct can_irq {
103108
can_instance_ctrl_t * ctrl;
104109
can_cfg_t * cfg;
105110
} CanIrqReq_t;
111+
#define CAN_INTERRUPT_COUNT 3
106112
#endif /* CAN_HOWMANY > 0 */
107113

108114
#if CANFD_HOWMANY > 0
@@ -111,8 +117,11 @@ typedef struct canfd_irq {
111117
canfd_instance_ctrl_t * ctrl;
112118
can_cfg_t * cfg;
113119
} CanFdIrqReq_t;
120+
#define CANFD_INTERRUPT_COUNT 3
114121
#endif /* CANFD_HOWMANY > 0 */
115122

123+
#define SD_INTERRUPT_COUNT 2
124+
116125
typedef struct usb {
117126
uint32_t num_of_irqs_required;
118127
uint32_t address_of_handler;

0 commit comments

Comments
 (0)