libyggdrasil  v1.0.0
seven_segment.h File Reference

Driver to use the Seven segment display. More...

Include dependency graph for seven_segment.h:

Go to the source code of this file.

Functions

C_LINKAGE void yggdrasil_SevenSegment_Init (void)
 Initialization function. More...
 
C_LINKAGE void yggdrasil_SevenSegment_SetUnsigned (u16 value)
 Display a unsigned value from 0 to 9999 on the 7 segments. More...
 
C_LINKAGE void yggdrasil_SevenSegment_SetSigned (i16 value)
 Display a signed value from -999 to 999 on the 7 segments. More...
 
C_LINKAGE void yggdrasil_SevenSegment_SetHexadecimal (u16 value)
 Display a unsigned value from 0 to 0xFFFF in hexadecimal on the 7 segments. More...
 
C_LINKAGE void yggdrasil_SevenSegment_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...
 
C_LINKAGE void yggdrasil_SevenSegment_SetDigit (char value)
 Set the segments to the given value, supports hexadecimal, '-' for minus and ' ' for an empty segment. More...
 
C_LINKAGE void yggdrasil_SevenSegment_EnableDigit (u8 number)
 Enable one single segment. More...
 
C_LINKAGE void yggdrasil_SevenSegment_Disable (void)
 Disable all segments. More...
 

Detailed Description

Driver to use the Seven segment display.

Author
Fabian Weber, Nikolaij Saegesser

Function Documentation

◆ yggdrasil_SevenSegment_Disable()

C_LINKAGE void yggdrasil_SevenSegment_Disable ( void  )

Disable all segments.

◆ yggdrasil_SevenSegment_EnableDigit()

C_LINKAGE void yggdrasil_SevenSegment_EnableDigit ( u8  number)

Enable one single segment.

Parameters
numberDigit to enable

◆ yggdrasil_SevenSegment_Init()

C_LINKAGE void yggdrasil_SevenSegment_Init ( void  )

Initialization function.

Returns
Success

◆ yggdrasil_SevenSegment_SetDigit()

C_LINKAGE void yggdrasil_SevenSegment_SetDigit ( char  value)

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

◆ yggdrasil_SevenSegment_SetFloatingPoint()

C_LINKAGE void yggdrasil_SevenSegment_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.

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

◆ yggdrasil_SevenSegment_SetHexadecimal()

C_LINKAGE void yggdrasil_SevenSegment_SetHexadecimal ( u16  value)

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

◆ yggdrasil_SevenSegment_SetSigned()

C_LINKAGE void yggdrasil_SevenSegment_SetSigned ( i16  value)

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

◆ yggdrasil_SevenSegment_SetUnsigned()

C_LINKAGE void yggdrasil_SevenSegment_SetUnsigned ( u16  value)

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