krnl 1
Loading...
Searching...
No Matches
rt-arduino-reader-writer02.ino File Reference
#include <krnl.h>
Include dependency graph for rt-arduino-reader-writer02.ino:

Go to the source code of this file.

Data Structures

struct  rdWrLockTp

Functions

int rdWrLockInit (struct rdWrLockTp *lock)
void rdEnter (struct rdWrLockTp *lock)
void wrEnter (struct rdWrLockTp *lock)
void wrLeave (struct rdWrLockTp *lock)
void rdLeave (struct rdWrLockTp *lock)
void wr (void)
void rd (void)
void setup ()
void loop ()

Variables

struct rdWrLockTp rdWrLock1
volatile int rdInsideFortest = 0
volatile int rdNr = 0

Function Documentation

◆ loop()

void loop ( void )

Definition at line 112 of file rt-arduino-reader-writer02.ino.

◆ rd()

void rd ( void )

Definition at line 82 of file rt-arduino-reader-writer02.ino.

References DI, EI, rdEnter(), rdLeave(), rdNr, and rdWrLock1.

Here is the call graph for this function:

◆ rdEnter()

void rdEnter ( struct rdWrLockTp * lock)

Definition at line 28 of file rt-arduino-reader-writer02.ino.

References k_signal(), k_wait(), ki_semval(), rdWrLockTp::rdCount, rdWrLockTp::rdSem, and rdWrLockTp::wrSem.

Referenced by rd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdLeave()

void rdLeave ( struct rdWrLockTp * lock)

Definition at line 52 of file rt-arduino-reader-writer02.ino.

References k_signal(), k_wait(), rdWrLockTp::rdCount, rdInsideFortest, rdWrLockTp::rdSem, and rdWrLockTp::wrSem.

Referenced by rd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rdWrLockInit()

int rdWrLockInit ( struct rdWrLockTp * lock)

Definition at line 19 of file rt-arduino-reader-writer02.ino.

References rdWrLockTp::fifoSem, k_crt_sem(), rdWrLockTp::rdCount, rdWrLockTp::rdSem, and rdWrLockTp::wrSem.

Referenced by setup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup()

void setup ( )

Definition at line 98 of file rt-arduino-reader-writer02.ino.

References k_crt_task(), k_init(), k_start(), rd(), rdWrLock1, rdWrLockInit(), and wr().

Here is the call graph for this function:

◆ wr()

void wr ( void )

Definition at line 64 of file rt-arduino-reader-writer02.ino.

References i, rdInsideFortest, rdWrLock1, wrEnter(), and wrLeave().

Here is the call graph for this function:

◆ wrEnter()

void wrEnter ( struct rdWrLockTp * lock)

Definition at line 41 of file rt-arduino-reader-writer02.ino.

References k_wait(), and rdWrLockTp::wrSem.

Referenced by wr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wrLeave()

void wrLeave ( struct rdWrLockTp * lock)

Definition at line 46 of file rt-arduino-reader-writer02.ino.

References rdWrLockTp::fifoSem, k_signal(), and rdWrLockTp::wrSem.

Referenced by wr().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ rdInsideFortest

volatile int rdInsideFortest = 0

Definition at line 15 of file rt-arduino-reader-writer02.ino.

◆ rdNr

volatile int rdNr = 0

Definition at line 81 of file rt-arduino-reader-writer02.ino.

◆ rdWrLock1

struct rdWrLockTp rdWrLock1

Definition at line 13 of file rt-arduino-reader-writer02.ino.