Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of EFM32_SegmentLCD by
EFM32_SegmentLCD Class Reference
A driver for the Segment LCD present on some EFM32 starter kits. More...
#include <EFM32_SegmentLCD.h>
Public Member Functions | |
| EFM32_SegmentLCD () | |
| Constructor. | |
| ~EFM32_SegmentLCD () | |
| Destructor. | |
| void | AllOff (void) |
| Switch off all elements. | |
| void | AllOn (void) |
| Switch on all elements. | |
| void | AlphaNumberOff (void) |
| Switch off (clear) the alphanumeric portion of the display. | |
| void | ARing (int anum, bool on) |
| Switch specified segment on the ring on/off. | |
| void | Battery (int batteryLevel) |
| Display a battery level on the LCD. | |
| void | EnergyMode (int em, bool on) |
| Display an energy mode ring on the LCD. | |
| void | LowerHex (uint32_t num) |
| Display an unsigned integer on the alphanumeric portion of the display as a hex value. | |
| void | LowerNumber (int num) |
| Display a signed integer as decimal number on the alphanumeric part of the display. | |
| void | Number (int value) |
| Display a signed integer on the numeric part of the display (clock area). | |
| void | NumberOff (void) |
| Clear the numeric part of the display. | |
| void | Symbol (lcdSymbol s, bool on) |
| Turn a predefined symbol on or off. | |
| void | UnsignedHex (uint16_t value) |
| Display an unsigned short integer as a hex value on the numeric part of the display. | |
| void | Write (char *string) |
| Display a 7-character string on the alphanumeric portion of the display. | |
Detailed Description
A driver for the Segment LCD present on some EFM32 starter kits.
Supports Giant, Leopard and Wonder Gecko STKs
#include "mbed.h" #include "EFM32_SegmentLCD.h" EFM32_SegmentLCD segmentDisplay; int main() { segmentDisplay.Write("Hello"); while(1); }
Definition at line 62 of file EFM32_SegmentLCD.h.
Constructor & Destructor Documentation
| EFM32_SegmentLCD | ( | ) |
Constructor.
Definition at line 42 of file EFM32_SegmentLCD.cpp.
| ~EFM32_SegmentLCD | ( | ) |
Destructor.
Definition at line 56 of file EFM32_SegmentLCD.cpp.
Member Function Documentation
| void AllOff | ( | void | ) |
Switch off all elements.
Definition at line 64 of file EFM32_SegmentLCD.cpp.
| void AllOn | ( | void | ) |
Switch on all elements.
Definition at line 68 of file EFM32_SegmentLCD.cpp.
| void AlphaNumberOff | ( | void | ) |
Switch off (clear) the alphanumeric portion of the display.
Definition at line 75 of file EFM32_SegmentLCD.cpp.
| void ARing | ( | int | anum, |
| bool | on | ||
| ) |
Switch specified segment on the ring on/off.
- Parameters:
-
anum ring segment index on true to turn on, false to turn off
Definition at line 84 of file EFM32_SegmentLCD.cpp.
| void Battery | ( | int | batteryLevel ) |
Display a battery level on the LCD.
0 = off 1 = lowest block 2 = lowest + second-to-lowest ...
- Parameters:
-
batteryLevel Level to show
Definition at line 95 of file EFM32_SegmentLCD.cpp.
| void EnergyMode | ( | int | em, |
| bool | on | ||
| ) |
Display an energy mode ring on the LCD.
- Parameters:
-
em energy mode number to display on true to turn on, false to turn off.
Definition at line 104 of file EFM32_SegmentLCD.cpp.
| void LowerHex | ( | uint32_t | num ) |
Display an unsigned integer on the alphanumeric portion of the display as a hex value.
- Parameters:
-
num number to display
Definition at line 114 of file EFM32_SegmentLCD.cpp.
| void LowerNumber | ( | int | num ) |
Display a signed integer as decimal number on the alphanumeric part of the display.
- Parameters:
-
num number to display
Definition at line 122 of file EFM32_SegmentLCD.cpp.
| void Number | ( | int | value ) |
Display a signed integer on the numeric part of the display (clock area).
max = 9999, min = -9999
Definition at line 131 of file EFM32_SegmentLCD.cpp.
| void NumberOff | ( | void | ) |
Clear the numeric part of the display.
Definition at line 138 of file EFM32_SegmentLCD.cpp.
| void Symbol | ( | lcdSymbol | s, |
| bool | on | ||
| ) |
Turn a predefined symbol on or off.
- Parameters:
-
lcdSymbol predefined symbol in segmentlcdconfig_*.h on true to turn on, false to turn off.
Definition at line 147 of file EFM32_SegmentLCD.cpp.
| void UnsignedHex | ( | uint16_t | value ) |
Display an unsigned short integer as a hex value on the numeric part of the display.
max = FFFF, min = 0
- Parameters:
-
value Value to show
Definition at line 156 of file EFM32_SegmentLCD.cpp.
| void Write | ( | char * | string ) |
Display a 7-character string on the alphanumeric portion of the display.
- Parameters:
-
string String to show (only the first 7 characters will be shown)
Definition at line 164 of file EFM32_SegmentLCD.cpp.
Generated on Tue Jul 19 2022 15:26:32 by
1.7.2