SegmentLcdKit Drivers
Detailed Description
Segment LCD driver.
This driver implements symbol and string write support for EFM32 kits with segment LCD.
Data Structures |
|
struct | ARING_TypeDef |
Defines segment COM and BIT fields for A-wheel (suited for Anim)
|
|
struct | ARRAY_TypeDef |
Defines segment COM and BIT fields for array.
|
|
struct | BATTERY_TypeDef |
Defines segment COM and BIT fields for Battery (suited for Anim)
|
|
struct | Block_TypeDef |
Defines segment COM and BIT fields for top and bottom row blocks. The bit pattern shown above for characters can be split into upper and lower portions for animation purposes. There are separate COM and BIT numbers which together represent a set of stacked blocks which can be shown on two rows in the segmented LCD screen.
|
|
struct | CHAR_TypeDef |
Defines each text symbol's segment in terms of COM and BIT numbers, in a way that we can enumerate each bit for each text segment in the following bit pattern:
|
|
struct | EM_TypeDef |
Defines segment COM and BIT fields for Energy Modes on display.
|
|
struct | MCU_DISPLAY |
Defines prototype for all segments in display.
|
|
struct | NUMBER_TypeDef |
Defines segment COM and BIT fields numeric display.
|
|
Enumerations |
|
enum |
SegmentLCD_BlockMode_TypeDef
{
segmentLCDBlockModeBlank = SEGMENT_LCD_BLOCK_MODE_BLANK, segmentLCDBlockModeFill = SEGMENT_LCD_BLOCK_MODE_FILL, segmentLCDBlockModeOutline = SEGMENT_LCD_BLOCK_MODE_OUTLINE, segmentLCDBlockModeOutlineFill = SEGMENT_LCD_BLOCK_MODE_OUTLINE_FILL } |
Functions |
|
static void | displayBlock ( SegmentLCD_BlockMode_TypeDef topMode[SEGMENT_LCD_NUM_BLOCK_COLUMNS], SegmentLCD_BlockMode_TypeDef botMode[SEGMENT_LCD_NUM_BLOCK_COLUMNS]) |
Working instance of LCD display.
|
|
void | SegmentLCD_AllOff (void) |
Disable all segments.
|
|
void | SegmentLCD_AllOn (void) |
Enable all segments.
|
|
void | SegmentLCD_AlphaNumberOff (void) |
Turn all segments on alpha characters in display off.
|
|
void | SegmentLCD_ARing (int anum, int on) |
Light up or shut off Ring of Indicators.
|
|
void | SegmentLCD_Battery (int batteryLevel) |
Light up or shut off Battery Indicator.
|
|
void | SegmentLCD_Block ( SegmentLCD_BlockMode_TypeDef topMode[SEGMENT_LCD_NUM_BLOCK_COLUMNS], SegmentLCD_BlockMode_TypeDef botMode[SEGMENT_LCD_NUM_BLOCK_COLUMNS]) |
void | SegmentLCD_Disable (void) |
Disables LCD controller.
|
|
void | SegmentLCD_EnergyMode (int em, int on) |
Light up or shut off Energy Mode indicator.
|
|
void | SegmentLCD_Init (bool useBoost) |
Segment LCD Initialization routine for EFM32 STK display.
|
|
void | SegmentLCD_LowerHex (uint32_t num) |
Write a hexadecimal number on lower alphanumeric part of Segment LCD display.
|
|
void | SegmentLCD_LowerNumber (int num) |
Write number on lower alphanumeric part of Segment LCD display.
|
|
void | SegmentLCD_Number (int value) |
Write number on numeric part on Segment LCD display.
|
|
void | SegmentLCD_NumberOff (void) |
Turn all segments on numeric digits in display off.
|
|
unsigned int | SegmentLCD_segCnt (unsigned int segdl, unsigned int segdh) |
Counting the number of active segments in a single common line.
|
|
void | SegmentLCD_Symbol (lcdSymbol s, int on) |
Light up or shut off various symbols on Segment LCD.
|
|
void | SegmentLCD_UnsignedHex (uint32_t value) |
Write hexadecimal number on numeric part on Segment LCD display.
|
|
void | SegmentLCD_Write (const char *string) |
Write text on LCD display.
|
|
Variables |
|
static const uint16_t | Blocks [] |
Defines highlighted segments for the block display.
|
|
static const MCU_DISPLAY | EFM_Display = EFM_DISPLAY_DEF |
Working instance of LCD display.
|
|
static const uint16_t | Segment_Alphabet [] |
Defines higlighted segments for the alphabet, starting from "blank" (SPACE) Uses bit pattern as defined for text segments above. E.g. a capital O, would have bits 0 1 2 3 4 5 => 0x003f defined.
|
|
static const uint16_t | Segment_Numbers [] |
Defines higlighted segments for the numeric display.
|
|
Enumeration Type Documentation
Function Documentation
|
static |
Working instance of LCD display.
Enabling/disabling dynamic charge redistribution.
- Parameters
-
true
==> enable, false ==> disable
Dynamically switching charge redistribution ON/OFF based on display contents
- Parameters
-
None
Definition at line
1310
of file
segmentlcd.c
.
References Block_TypeDef::bit , Blocks , MCU_DISPLAY::BotBlocks , Block_TypeDef::com , LCD_SegmentSet() , and MCU_DISPLAY::TopBlocks .
void SegmentLCD_ARing | ( | int |
anum,
|
int |
on
|
||
) |
Light up or shut off Ring of Indicators.
- Parameters
-
anum
"Segment number" on "Ring", range 0 - 7 on
Zero is off, non-zero is on
Definition at line
1378
of file
segmentlcd.c
.
References MCU_DISPLAY::ARing , ARING_TypeDef::bit , ARING_TypeDef::com , and LCD_SegmentSet() .
void SegmentLCD_Battery | ( | int |
batteryLevel
|
) |
Light up or shut off Battery Indicator.
- Parameters
-
batteryLevel
Battery Level, 0 to 4 (0 turns all off)
Definition at line
1396
of file
segmentlcd.c
.
References MCU_DISPLAY::Battery , BATTERY_TypeDef::bit , BATTERY_TypeDef::com , and LCD_SegmentSet() .
void SegmentLCD_EnergyMode | ( | int |
em,
|
int |
on
|
||
) |
Light up or shut off Energy Mode indicator.
- Parameters
-
em
Energy Mode numer 0 to 4 on
Zero is off, non-zero is on
Definition at line
1423
of file
segmentlcd.c
.
References EM_TypeDef::bit , EM_TypeDef::com , MCU_DISPLAY::EMode , and LCD_SegmentSet() .
void SegmentLCD_Init | ( | bool |
useBoost
|
) |
Segment LCD Initialization routine for EFM32 STK display.
- Parameters
-
useBoost
Set to use voltage boost
Definition at line
465
of file
segmentlcd.c
.
References CMU_ClockDivSet() , CMU_ClockEnable() , CMU_ClockSelectSet() , CMU_LCDClkFDIVSet() , cmuClock_LCD , cmuClock_LCDpre , cmuClock_LFA , cmuSelect_LFRCO , LCD_Init() , LCD_IntDisable() , LCD_SyncBusyDelay() , LCD_VBoostSet() , LCD_VLCDSelect() , lcdVLCDSelVExtBoost , and SegmentLCD_AllOff() .
void SegmentLCD_LowerHex | ( | uint32_t |
num
|
) |
Write a hexadecimal number on lower alphanumeric part of Segment LCD display.
- Parameters
-
num
Hexadecimal number value to put on display, in range 0 to 0x0FFFFFFF
Definition at line
519
of file
segmentlcd.c
.
References SegmentLCD_Symbol() , and SegmentLCD_Write() .
void SegmentLCD_LowerNumber | ( | int |
num
|
) |
Write number on lower alphanumeric part of Segment LCD display.
- Parameters
-
num
Numeric value to put on display, in range -9999999 to +9999999
Definition at line
552
of file
segmentlcd.c
.
References SegmentLCD_Symbol() , and SegmentLCD_Write() .
void SegmentLCD_Number | ( | int |
value
|
) |
Write number on numeric part on Segment LCD display.
- Parameters
-
value
Numeric value to put on display, in range -999 to +9999
Definition at line
597
of file
segmentlcd.c
.
References NUMBER_TypeDef::bit , NUMBER_TypeDef::com , LCD_FreezeEnable() , LCD_SegmentSet() , LCD_SyncBusyDelay() , MCU_DISPLAY::Number , Segment_Numbers , and SegmentLCD_NumberOff() .
unsigned int SegmentLCD_segCnt | ( | unsigned int |
segdl,
|
unsigned int |
segdh
|
||
) |
Counting the number of active segments in a single common line.
- Parameters
-
value
in registers LCD_SEGDnL and LCD_SEGDnH (n = common line number)
Definition at line
1137
of file
segmentlcd.c
.
void SegmentLCD_Symbol | ( | lcdSymbol |
s,
|
int |
on
|
||
) |
Light up or shut off various symbols on Segment LCD.
- Parameters
-
s
Which symbol to turn on or off on
Zero is off, non-zero is on
Definition at line
678
of file
segmentlcd.c
.
References LCD_SegmentSet() .
Referenced by SegmentLCD_LowerHex() , and SegmentLCD_LowerNumber() .
void SegmentLCD_UnsignedHex | ( | uint32_t |
value
|
) |
Write hexadecimal number on numeric part on Segment LCD display.
- Parameters
-
value
Numeric value to put on display
Definition at line
1032
of file
segmentlcd.c
.
References NUMBER_TypeDef::bit , NUMBER_TypeDef::com , LCD_FreezeEnable() , LCD_SegmentSet() , LCD_SyncBusyDelay() , MCU_DISPLAY::Number , Segment_Numbers , and SegmentLCD_NumberOff() .
void SegmentLCD_Write | ( | const char * |
string
|
) |
Write text on LCD display.
- Parameters
-
string
Text string to show on display
Definition at line
1079
of file
segmentlcd.c
.
References CHAR_TypeDef::bit , CHAR_TypeDef::com , LCD_FreezeEnable() , LCD_SegmentSet() , LCD_SyncBusyDelay() , Segment_Alphabet , SegmentLCD_AlphaNumberOff() , and MCU_DISPLAY::Text .
Referenced by SegmentLCD_LowerHex() , and SegmentLCD_LowerNumber() .
Variable Documentation
|
static |
Defines highlighted segments for the block display.
Definition at line
345
of file
segmentlcd.c
.
Referenced by displayBlock() .
|
static |
Defines higlighted segments for the numeric display.
Definition at line
321
of file
segmentlcd.c
.
Referenced by SegmentLCD_Number() , and SegmentLCD_UnsignedHex() .