Electronics and Software
Engineering Innovation
ArmsysApi  0.12.18
BSys.h File Reference
#include <BTypes.h>
#include <BError.h>
#include <BDevices.h>
#include <BInterrupt.h>
#include <BTim.h>
#include <BHeap.h>
#include <FreeRTOS.h>
#include <task.h>

Classes

class  BSys
 

Macros

#define binterruptStart()   Bool oldYield = binterruptYield; binterruptYield = 0;
 
#define binterruptEnd()   if(binterruptYield){ binterruptYield = oldYield; portYIELD_FROM_ISR(1); } else { binterruptYield = oldYield; }
 

Typedefs

typedef void(* FuncRun) ()
 
typedef void(* FuncTask) (void *arg)
 
typedef void(* FuncDelay) (UInt us)
 

Functions

uint32_t timeUs ()
 
void delayUs (UInt us)
 Will delay for given time in us, if tasks running task will sleep. More...
 
void delayMs (UInt ms)
 Will delay for given time in ms, if tasks running task will sleep. More...
 
void delayUsTask (UInt us)
 RTOS task delay. More...
 
void delayUsClock (UInt us)
 Hard loop delay to system clock. More...
 
void delayUsLoop (UInt us)
 Hard loop delay. More...
 
void binterruptEnable ()
 
void binterruptDisable ()
 
Bool binterruptInside ()
 
void bsysTaskYield ()
 

Variables

const int BSysTimer = 2
 
BSys sys
 
FuncDelay delayFunc
 Pointer to function to use for delays, can be set to tasking delay function. More...
 
BaseType_t binterruptYield
 

Macro Definition Documentation

◆ binterruptEnd

#define binterruptEnd ( )    if(binterruptYield){ binterruptYield = oldYield; portYIELD_FROM_ISR(1); } else { binterruptYield = oldYield; }

◆ binterruptStart

#define binterruptStart ( )    Bool oldYield = binterruptYield; binterruptYield = 0;

Typedef Documentation

◆ FuncDelay

typedef void(* FuncDelay) (UInt us)

◆ FuncRun

typedef void(* FuncRun) ()

◆ FuncTask

typedef void(* FuncTask) (void *arg)

Function Documentation

◆ binterruptDisable()

void binterruptDisable ( )
inline

◆ binterruptEnable()

void binterruptEnable ( )
inline

◆ binterruptInside()

Bool binterruptInside ( )
inline

◆ bsysTaskYield()

void bsysTaskYield ( )
inline

◆ delayMs()

void delayMs ( UInt  ms)

Will delay for given time in ms, if tasks running task will sleep.

◆ delayUs()

void delayUs ( UInt  us)

Will delay for given time in us, if tasks running task will sleep.

◆ delayUsClock()

void delayUsClock ( UInt  us)

Hard loop delay to system clock.

◆ delayUsLoop()

void delayUsLoop ( UInt  us)

Hard loop delay.

◆ delayUsTask()

void delayUsTask ( UInt  us)

RTOS task delay.

◆ timeUs()

uint32_t timeUs ( )

Variable Documentation

◆ binterruptYield

BaseType_t binterruptYield

◆ BSysTimer

const int BSysTimer = 2

◆ delayFunc

FuncDelay delayFunc

Pointer to function to use for delays, can be set to tasking delay function.

◆ sys

BSys sys