libyggdrasil  v1.0.0
bsp::ygg::prph::SevenSegment Class Reference

Sevensegment driver. More...

#include <seven_segment.hpp>

Public Member Functions

 SevenSegment ()=delete
 

Static Public Member Functions

static bool init ()
 Initialization function. More...
 
static void setUnsigned (u16 value)
 Display a unsigned value from 0 to 9999 on the 7 segments. More...
 
static void setSigned (i16 value)
 Display a signed value from -999 to 999 on the 7 segments. More...
 
static void setHexadecimal (u16 value)
 Display a unsigned value from 0 to 0xFFFF in hexadecimal on the 7 segments. More...
 
static void setFloatingPoint (float value)
 Display a floating point value from -99.9 to 99.9 on the 7 segments, the function will show as many decimal places as possible. More...
 
static void setDigit (char value)
 Set the segments to the given value, supports hexadecimal, '-' for minus and ' ' for an empty segment. More...
 
static void enableDigit (u8 number)
 Enable one single segment. More...
 
static void disable ()
 Disable all segments. More...
 

Detailed Description

Sevensegment driver.

Constructor & Destructor Documentation

◆ SevenSegment()

bsp::ygg::prph::SevenSegment::SevenSegment ( )
delete

Member Function Documentation

◆ disable()

static void bsp::ygg::prph::SevenSegment::disable ( )
inlinestatic

Disable all segments.

◆ enableDigit()

static void bsp::ygg::prph::SevenSegment::enableDigit ( u8  number)
inlinestatic

Enable one single segment.

Parameters
numberDigit to enable

◆ init()

static bool bsp::ygg::prph::SevenSegment::init ( )
inlinestatic

Initialization function.

Returns
Success

◆ setDigit()

static void bsp::ygg::prph::SevenSegment::setDigit ( char  value)
inlinestatic

Set the segments to the given value, supports hexadecimal, '-' for minus and ' ' for an empty segment.

Note
The function does not enable any segment
Parameters
valueDigit to set

◆ setFloatingPoint()

static void bsp::ygg::prph::SevenSegment::setFloatingPoint ( float  value)
inlinestatic

Display a floating point value from -99.9 to 99.9 on the 7 segments, the function will show as many decimal places as possible.

Note
The function takes care of the multiplexing, but must be called frequently (>= 200Hz recommended)
Parameters
valueValue to display

◆ setHexadecimal()

static void bsp::ygg::prph::SevenSegment::setHexadecimal ( u16  value)
inlinestatic

Display a unsigned value from 0 to 0xFFFF in hexadecimal on the 7 segments.

Note
The function takes care of the multiplexing, but must be called frequently (>= 200Hz recommended)
Parameters
valueValue to display in hexadecimal

◆ setSigned()

static void bsp::ygg::prph::SevenSegment::setSigned ( i16  value)
inlinestatic

Display a signed value from -999 to 999 on the 7 segments.

Note
The function takes care of the multiplexing, but must be called frequently (>= 200Hz recommended)
Parameters
valueValue to display

◆ setUnsigned()

static void bsp::ygg::prph::SevenSegment::setUnsigned ( u16  value)
inlinestatic

Display a unsigned value from 0 to 9999 on the 7 segments.

Note
The function takes care of the multiplexing, but must be called frequently (>= 200Hz recommended)
Parameters
valueValue to display

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