Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
test_shared_irq.h File Reference

Go to the source code of this file.

Macros

#define IRQ_PRIORITY   1
 
#define TEST_VECTOR_SIZE   10
 
#define TEST_INVALID_IDX   0xcafebabe
 
#define TEST_DUMMY_ISR_VAL   0xdeadbeef
 
#define TEST_INVALID_IRQ   0xcafebabe
 
#define ISR_DEFINE(name)
 

Functions

static void test_isr_0 (const void *data)
 
static void test_isr_1 (const void *data)
 
static void test_isr_2 (const void *data)
 
static bool client_exists_at_index (void(*routine)(const void *arg), void *arg, int irq, size_t idx)
 

Variables

static uint32_t test_vector [10]
 
static uint32_t result_vector [10]
 

Macro Definition Documentation

◆ IRQ_PRIORITY

#define IRQ_PRIORITY   1

◆ ISR_DEFINE

#define ISR_DEFINE (   name)
Value:
static inline void name(const void *data) \
{ \
int idx = POINTER_TO_INT(data); \
test_vector[idx] = result_vector[idx]; \
} \
#define POINTER_TO_INT(x)
Cast x, a pointer, to a signed integer.
Definition util.h:52
static fdata_t data[2]
Definition test_fifo_contexts.c:15
static uint32_t result_vector[10]
Definition test_shared_irq.h:29
static uint32_t test_vector[10]
Definition test_shared_irq.h:26

◆ TEST_DUMMY_ISR_VAL

#define TEST_DUMMY_ISR_VAL   0xdeadbeef

◆ TEST_INVALID_IDX

#define TEST_INVALID_IDX   0xcafebabe

◆ TEST_INVALID_IRQ

#define TEST_INVALID_IRQ   0xcafebabe

◆ TEST_VECTOR_SIZE

#define TEST_VECTOR_SIZE   10

Function Documentation

◆ client_exists_at_index()

static bool client_exists_at_index ( void(*)(const void *arg)  routine,
void *  arg,
int  irq,
size_t  idx 
)
inlinestatic

◆ test_isr_0()

static void test_isr_0 ( const void *  data)
inlinestatic

◆ test_isr_1()

static void test_isr_1 ( const void *  data)
inlinestatic

◆ test_isr_2()

static void test_isr_2 ( const void *  data)
inlinestatic

Variable Documentation

◆ result_vector

uint32_t result_vector[10]
static
Initial value:
= {
0xdeadbeef,
0xcafebabe,
0x1234cafe,
}

◆ test_vector

uint32_t test_vector[10]
static
Initial value:
= {
}