ArmSys Support
ArmsysApi  0.12.18
BSemaphoreCount Class Reference

#include <BSemaphore.h>

Public Member Functions

 BSemaphoreCount ()
 
 BSemaphoreCount (const BSemaphoreCount &semaphore)
 
 ~BSemaphoreCount ()
 
Bool setValue (BUInt v)
 
Bool add (int v=1)
 Set the semaphore. More...
 
Bool addFromIsr (int v=1)
 Set the semaphore from an IRQ handler, returns 1 if another task needs to run. More...
 
Bool wait (BUInt v=1, BTimeout timeoutUs=BTimeoutForever)
 Wait for the semaphore and greater than v. More...
 
Bool waitLessThan (BUInt v=1, BTimeout timeoutUs=BTimeoutForever)
 Wait for the semaphore and less than v. More...
 
Bool take (BUInt v=1, BTimeout timeoutUs=BTimeoutForever)
 Take for the semaphore. More...
 
BUInt value ()
 
BSemaphoreCountoperator= (const BSemaphoreCount &semaphore)
 

Private Attributes

BSemaphore osema
 
volatile BUInt ovalue
 

Constructor & Destructor Documentation

◆ BSemaphoreCount() [1/2]

BSemaphoreCount::BSemaphoreCount ( )

◆ BSemaphoreCount() [2/2]

BSemaphoreCount::BSemaphoreCount ( const BSemaphoreCount semaphore)

◆ ~BSemaphoreCount()

BSemaphoreCount::~BSemaphoreCount ( )

Member Function Documentation

◆ add()

Bool BSemaphoreCount::add ( int  v = 1)

Set the semaphore.

◆ addFromIsr()

Bool BSemaphoreCount::addFromIsr ( int  v = 1)

Set the semaphore from an IRQ handler, returns 1 if another task needs to run.

◆ operator=()

BSemaphoreCount & BSemaphoreCount::operator= ( const BSemaphoreCount semaphore)

◆ setValue()

Bool BSemaphoreCount::setValue ( BUInt  v)

◆ take()

Bool BSemaphoreCount::take ( BUInt  v = 1,
BTimeout  timeoutUs = BTimeoutForever 
)

Take for the semaphore.

◆ value()

BUInt BSemaphoreCount::value ( )

◆ wait()

Bool BSemaphoreCount::wait ( BUInt  v = 1,
BTimeout  timeoutUs = BTimeoutForever 
)

Wait for the semaphore and greater than v.

◆ waitLessThan()

Bool BSemaphoreCount::waitLessThan ( BUInt  v = 1,
BTimeout  timeoutUs = BTimeoutForever 
)

Wait for the semaphore and less than v.

Member Data Documentation

◆ osema

BSemaphore BSemaphoreCount::osema
private

◆ ovalue

volatile BUInt BSemaphoreCount::ovalue
private

The documentation for this class was generated from the following files: