Zephyr Project API 3.7.0-rc1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
main.c File Reference
#include <zephyr/ztest.h>
#include <zephyr/irq_offload.h>

Data Structures

struct  fdata_t
 

Macros

#define STACK_SIZE   (1024 + CONFIG_TEST_EXTRA_STACK_SIZE)
 
#define LIST_LEN   4
 

Functions

static K_FIFO_DEFINE (fifo1)
 
static K_FIFO_DEFINE (fifo2)
 
static K_THREAD_STACK_DEFINE (tstack,(1024+CONFIG_TEST_EXTRA_STACK_SIZE))
 
static void tIsr_entry_put (const void *p)
 
static void tIsr_entry_get (const void *p)
 
static void thread_entry_fn_single (void *p1, void *p2, void *p3)
 
static void thread_entry_fn_dual (void *p1, void *p2, void *p3)
 
static void thread_entry_fn_isr (void *p1, void *p2, void *p3)
 
 ZTEST (fifo_usage, test_single_fifo_play)
 Tests single fifo get and put operation in thread context.
 
 ZTEST (fifo_usage, test_dual_fifo_play)
 Tests dual fifo get and put operation in thread context.
 
 ZTEST (fifo_usage, test_isr_fifo_play)
 Tests fifo put and get operation in interrupt context.
 
 ZTEST_SUITE (fifo_usage, NULL, NULL, ztest_simple_1cpu_before, ztest_simple_1cpu_after, NULL)
 

Variables

static struct fdata_t data1 [4]
 
static struct fdata_t data2 [4]
 
static struct fdata_t data_isr [4]
 
static struct k_thread tdata
 
static struct k_sem end_sema
 

Macro Definition Documentation

◆ LIST_LEN

#define LIST_LEN   4

◆ STACK_SIZE

#define STACK_SIZE   (1024 + CONFIG_TEST_EXTRA_STACK_SIZE)

Function Documentation

◆ K_FIFO_DEFINE() [1/2]

static K_FIFO_DEFINE ( fifo1  )
static

◆ K_FIFO_DEFINE() [2/2]

static K_FIFO_DEFINE ( fifo2  )
static

◆ K_THREAD_STACK_DEFINE()

static K_THREAD_STACK_DEFINE ( tstack  ,
(1024+CONFIG_TEST_EXTRA_STACK_SIZE)   
)
static

◆ thread_entry_fn_dual()

static void thread_entry_fn_dual ( void *  p1,
void *  p2,
void *  p3 
)
static

◆ thread_entry_fn_isr()

static void thread_entry_fn_isr ( void *  p1,
void *  p2,
void *  p3 
)
static

◆ thread_entry_fn_single()

static void thread_entry_fn_single ( void *  p1,
void *  p2,
void *  p3 
)
static

◆ tIsr_entry_get()

static void tIsr_entry_get ( const void *  p)
static

◆ tIsr_entry_put()

static void tIsr_entry_put ( const void *  p)
static

◆ ZTEST_SUITE()

ZTEST_SUITE ( fifo_usage  ,
NULL  ,
NULL  ,
ztest_simple_1cpu_before  ,
ztest_simple_1cpu_after  ,
NULL   
)

Variable Documentation

◆ data1

struct fdata_t data1[4]
static

◆ data2

struct fdata_t data2[4]
static

◆ data_isr

struct fdata_t data_isr[4]
static

◆ end_sema

struct k_sem end_sema
static

◆ tdata

struct k_thread tdata
static