Go to the documentation of this file. 1 #ifndef __IUSERINTERFACE_H_
2 #define __IUSERINTERFACE_H_
47 virtual void flush() = 0;
59 virtual int print(
const char* format, ...) = 0;
71 virtual int print(
const char* format, va_list args) = 0;
82 virtual int printLine(
const char* format, ...) = 0;
94 virtual int printLine(
const char* format, va_list args) = 0;
107 virtual void setLed(
LED led,
bool state) = 0;
126 #endif // __IUSERINTERFACE_H_
virtual void flush()=0
Adds a newline and flushes the input to the serial port.
virtual void setButtonCallback(Button button, buttonCallbackFunction_t callback, void *context)=0
Sets the callback associated with a given button press.
virtual int printLine(const char *format,...)=0
Provides an interface to print a line to the console or serial port. Flushes the input and adds a new...
LED
LED present on the board.
Definition: IUserInterface.h:22
virtual void setHexDisplay(uint8_t value)=0
Sets the hex display to a given 8 bit value (not available on the HiveSight)
Button
Buttons present on the board.
Definition: IUserInterface.h:16
constexpr uint16_t g_nbrLED
Definition: IUserInterface.h:23
virtual Mutex & getPrintMutex()=0
get the mutex for printing. Note that the mutex is not used in any functions, the user needs to lock ...
RgbColor
Possible colors obtainable with an RGB LED.
Definition: IUserInterface.h:11
virtual void setRGBLed(RgbColor color)=0
Sets the RGB LED to a given color.
virtual ~IUserInterface()=default
virtual int print(const char *format,...)=0
Provides an interface to print to the console or serial port. The arguments and return values match t...
virtual void setLed(LED led, bool state)=0
Sets an LED on or off.
Manages the user interface The user interface can consist of buttons, LED, serial print ports,...
Definition: IUserInterface.h:36
constexpr uint16_t g_brButton
Definition: IUserInterface.h:17
void(* buttonCallbackFunction_t)(void *instance)
Prototype for a callback from a button press.
Definition: IUserInterface.h:28