Friedrich-Alexander-Universität UnivisSuche FAU-Logo
Techn. Fakultät Willkommen am Department Informatik FAU-Logo
Logo I4
Lehrstuhl für Informatik 4
GSPiC
 
  Übungen
  Dokumentation
  HowTos
  Evaluation
  Prüfungsinformationen
  protected area Intern
Übungen
  Anmeldung
  Folien
  Aufgaben
Department Informatik  >  Informatik 4  >  Lehre  >  WS 2010/11  >  GSPiC  >  Übung  >  Doku  >  libspicboard: 7SEG (Seven Segment Display)

SPiCboard library (libspicboard, revision 3032) API documentation

Found a bug or something ambiguous? Mail us to get it fixed!

7SEG (Seven Segment Display)


Files

file  7seg.h
 Controls the two 7-segment displays on the board.

Functions

int8_t sb_7seg_showNumber (int8_t nmbr)
 prints a number in the range [-9; 99] on the 7-segment display
int8_t sb_7seg_showHexNumber (uint8_t nmbr)
 prints the hexadecimal representation of an 8-bit unsigned integer on the 7-segment display
int8_t sb_7seg_showStr (char *str)
 prints a 2 character string on the 7-segment display
void sb_7seg_disable (void)
 disables the 7-segment displays

Function Documentation

void sb_7seg_disable ( void   ) 

disables the 7-segment displays

Any running alarms are unregistered.

int8_t sb_7seg_showHexNumber ( uint8_t  nmbr  ) 

prints the hexadecimal representation of an 8-bit unsigned integer on the 7-segment display

Parameters:
nmbr the number to print
Returns:
0 on success

!0 on error

int8_t sb_7seg_showNumber ( int8_t  nmbr  ) 

prints a number in the range [-9; 99] on the 7-segment display

Parameters:
nmbr the number to print
Returns:
0 on success, negative value on error
Return values:
0 success
-1 nmbr is smaller than -9
-2 nmbr is greater than 99

int8_t sb_7seg_showStr ( char *  str  ) 

prints a 2 character string on the 7-segment display

Supported characters are in the group [-_ 0-9ACE-JLPRUXb-dhnoru] (contains space). Read this article for possible representations of these characters. Two characters of the set should never have the same representation.

Parameters:
str the 0-terminated string
Returns:
0 on success, negative value on error
Return values:
0 success
-1 character at position 0 not printable
-2 character at position 1 not printable
-3 both characters not printable
-4 str is an empty string

  Impressum   Datenschutz Stand: 2010-07-02 13:45   MS