EFR32 Mighty Gecko 1 Software Documentation  efr32mg1-doc-5.1.2
SegmentLcd

Detailed Description

Macros

#define SEGMENT_LCD_BLOCK_MODE_BLANK   0
 
#define SEGMENT_LCD_BLOCK_MODE_FILL   1
 
#define SEGMENT_LCD_BLOCK_MODE_OUTLINE   2
 
#define SEGMENT_LCD_BLOCK_MODE_OUTLINE_FILL   3
 
#define SEGMENT_LCD_NUM_BLOCK_COLUMNS   7
 

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

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. More...
 
void SegmentLCD_Battery (int batteryLevel)
 Light up or shut off Battery Indicator. More...
 
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. More...
 
void SegmentLCD_Init (bool useBoost)
 Segment LCD Initialization routine for EFM32 STK display. More...
 
void SegmentLCD_LowerHex (uint32_t num)
 Write a hexadecimal number on lower alphanumeric part of Segment LCD display. More...
 
void SegmentLCD_LowerNumber (int num)
 Write number on lower alphanumeric part of Segment LCD display. More...
 
void SegmentLCD_Number (int value)
 Write number on numeric part on Segment LCD display. More...
 
void SegmentLCD_NumberOff (void)
 Turn all segments on numeric digits in display off.
 
void SegmentLCD_Symbol (lcdSymbol s, int on)
 Light up or shut off various symbols on Segment LCD. More...
 
void SegmentLCD_UnsignedHex (uint16_t value)
 Write hexadecimal number on numeric part on Segment LCD display. More...
 
void SegmentLCD_Write (const char *string)
 Write text on LCD display. More...
 

Enumeration Type Documentation

Enumerator
segmentLCDBlockModeBlank 

Blank

segmentLCDBlockModeFill 

Fill

segmentLCDBlockModeOutline 

Outline

segmentLCDBlockModeOutlineFill 

Outline and fill

Definition at line 51 of file segmentlcd.h.

Function Documentation

void SegmentLCD_ARing ( int  anum,
int  on 
)

Light up or shut off Ring of Indicators.

Parameters
anum"Segment number" on "Ring", range 0 - 7
onZero is off, non-zero is on

Definition at line 349 of file segmentlcd.c.

References MCU_DISPLAY::ARing, ARING_TypeDef::bit, and ARING_TypeDef::com.

void SegmentLCD_Battery ( int  batteryLevel)

Light up or shut off Battery Indicator.

Parameters
batteryLevelBattery Level, 0 to 4 (0 turns all off)

Definition at line 371 of file segmentlcd.c.

References MCU_DISPLAY::Battery, BATTERY_TypeDef::bit, and BATTERY_TypeDef::com.

void SegmentLCD_EnergyMode ( int  em,
int  on 
)

Light up or shut off Energy Mode indicator.

Parameters
emEnergy Mode numer 0 to 4
onZero is off, non-zero is on

Definition at line 454 of file segmentlcd.c.

References EM_TypeDef::bit, EM_TypeDef::com, and MCU_DISPLAY::EMode.

void SegmentLCD_Init ( bool  useBoost)

Segment LCD Initialization routine for EFM32 STK display.

Parameters
useBoostSet to use voltage boost

Definition at line 476 of file segmentlcd.c.

References CMU, CMU_ClockDivSet(), CMU_ClockEnable(), CMU_ClockSelectSet(), CMU_LCDClkFDIVSet(), cmuClock_LFA, cmuSelect_LFRCO, and SegmentLCD_AllOff().

void SegmentLCD_LowerHex ( uint32_t  num)

Write a hexadecimal number on lower alphanumeric part of Segment LCD display.

Parameters
numHexadecimal number value to put on display, in range 0 to 0x0FFFFFFF

Definition at line 526 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
numNumeric value to put on display, in range -9999999 to +9999999

Definition at line 557 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
valueNumeric 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, EFM_Numbers, MCU_DISPLAY::Number, and SegmentLCD_NumberOff().

void SegmentLCD_Symbol ( lcdSymbol  s,
int  on 
)

Light up or shut off various symbols on Segment LCD.

Parameters
sWhich symbol to turn on or off
onZero is off, non-zero is on

Definition at line 671 of file segmentlcd.c.

Referenced by SegmentLCD_LowerHex(), and SegmentLCD_LowerNumber().

void SegmentLCD_UnsignedHex ( uint16_t  value)

Write hexadecimal number on numeric part on Segment LCD display.

Parameters
valueNumeric value to put on display, in range 0x0000-0xFFFF

Definition at line 799 of file segmentlcd.c.

References NUMBER_TypeDef::bit, NUMBER_TypeDef::com, EFM_Numbers, MCU_DISPLAY::Number, and SegmentLCD_NumberOff().

void SegmentLCD_Write ( const char *  string)

Write text on LCD display.

Parameters
stringText string to show on display

Definition at line 843 of file segmentlcd.c.

References CHAR_TypeDef::bit, CHAR_TypeDef::com, EFM_Alphabet, SegmentLCD_AlphaNumberOff(), and MCU_DISPLAY::Text.

Referenced by SegmentLCD_LowerHex(), and SegmentLCD_LowerNumber().