7#ifndef __TEST_SHARED_IRQ_H__
8#define __TEST_SHARED_IRQ_H__
14#define TEST_VECTOR_SIZE 10
15#define TEST_INVALID_IDX 0xcafebabe
16#define TEST_DUMMY_ISR_VAL 0xdeadbeef
17#define TEST_INVALID_IRQ 0xcafebabe
19#define ISR_DEFINE(name) \
20static inline void name(const void *data) \
22 int idx = POINTER_TO_INT(data); \
23 test_vector[idx] = result_vector[idx]; \
40 void *arg,
int irq,
size_t idx)
43 struct z_shared_isr_table_entry *shared_entry;
44 struct _isr_table_entry *client;
46 shared_entry = &z_shared_sw_isr_table[irq];
49 for (i = 0; i < shared_entry->client_num; i++) {
50 client = &shared_entry->clients[i];
52 if (client->isr == routine && client->arg == arg) {
57 if (shared_entry->client_num <= idx) {
61 client = &shared_entry->clients[idx];
63 return client->isr == routine && client->arg == arg;
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
static void test_isr_0(const void *data)
Definition test_shared_irq.h:35
#define TEST_INVALID_IDX
Definition test_shared_irq.h:15
#define TEST_VECTOR_SIZE
Definition test_shared_irq.h:14
static uint32_t result_vector[10]
Definition test_shared_irq.h:29
static bool client_exists_at_index(void(*routine)(const void *arg), void *arg, int irq, size_t idx)
Definition test_shared_irq.h:39
static uint32_t test_vector[10]
Definition test_shared_irq.h:26
static void test_isr_2(const void *data)
Definition test_shared_irq.h:37
#define ISR_DEFINE(name)
Definition test_shared_irq.h:19
static void test_isr_1(const void *data)
Definition test_shared_irq.h:36