HitLib 1.5.0
VEX V5 LED animation library for PROS
Loading...
Searching...
No Matches
hitlib::platform Namespace Reference

Classes

class  Mutex
 Non-recursive mutex, blocking take. More...
class  AdiLed
 A WS2812B strip on one ADI port, either the brain's own or an ADI expander's. More...

Functions

uint32_t millis ()
 Milliseconds since the program started.
void delay (uint32_t ms)
 Sleep the calling task for ms milliseconds.
void delayUntil (uint32_t &prevMs, uint32_t ms)
 Sleep until prevMs + ms, then advance prevMs by ms.
void startTask (void(*entry)(void *), void *arg, const char *name)
 Start a background task that runs entry(arg).

Function Documentation

◆ millis()

uint32_t hitlib::platform::millis ( )

Milliseconds since the program started.

◆ delay()

void hitlib::platform::delay ( uint32_t ms)

Sleep the calling task for ms milliseconds.

◆ delayUntil()

void hitlib::platform::delayUntil ( uint32_t & prevMs,
uint32_t ms )

Sleep until prevMs + ms, then advance prevMs by ms.

Keeps a loop on a fixed period no matter how long its body took. A body that overran the period returns straight away (after yielding) rather than sleeping.

◆ startTask()

void hitlib::platform::startTask ( void(* entry )(void *),
void * arg,
const char * name )

Start a background task that runs entry(arg).

The task is expected never to return.