segmentlcd.c File Reference

EFM32 Segment LCD Display driver. More...

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include "em_device.h"
#include "em_cmu.h"
#include "em_gpio.h"
#include "segmentlcd.h"
#include <stdint.h>
#include "segmentlcdconfig.h"
Include dependency graph for segmentlcd.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

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: More...
struct  NUMBER_TypeDef
 Defines segment COM and BIT fields numeric display. More...
struct  EM_TypeDef
 Defines segment COM and BIT fields for Energy Modes on display. More...
struct  ARING_TypeDef
 Defines segment COM and BIT fields for A-wheel (suited for Anim). More...
struct  BATTERY_TypeDef
 Defines segment COM and BIT fields for A-wheel (suited for Anim). More...
struct  MCU_DISPLAY
 Defines prototype for all segments in display. More...

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.
void SegmentLCD_Battery (int batteryLevel)
 Light up or shut off Battery Indicator.
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.
void SegmentLCD_Symbol (lcdSymbol s, int on)
 Light up or shut off various symbols on Segment LCD.
void SegmentLCD_UnsignedHex (uint16_t value)
 Write hexadecimal number on numeric part on Segment LCD display.
void SegmentLCD_Write (char *string)
 Write text on LCD display.

Variables

static const MCU_DISPLAY EFM_Display = EFM_DISPLAY_DEF
 Working instance of LCD display.
static const uint16_t EFM_Alphabet []
 Defines higlighted segments for the alphabet, starting from "blank" (SPACE) Uses bit pattern as defined for text segments above.
static const uint16_t EFM_Numbers []
 Defines higlighted segments for the numeric display.

Detailed Description

EFM32 Segment LCD Display driver.

Author:
Energy Micro AS
Version:
3.20.0

License

(C) Copyright 2012 Energy Micro AS, http://www.energymicro.com

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. 4. The source and compiled code may only be used on Energy Micro "EFM32" microcontrollers and "EFR4" radios.

DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no obligation to support this Software. Energy Micro AS is providing the Software "AS IS", with no express or implied warranties of any kind, including, but not limited to, any implied warranties of merchantability or fitness for any particular purpose or warranties against infringement of any proprietary rights of a third party.

Energy Micro AS will not be liable for any consequential, incidental, or special damages, or any other relief, or for any claim by any third party, arising from your use of this Software.

Definition in file segmentlcd.c.


Variable Documentation

const uint16_t EFM_Alphabet[] [static]

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

Definition at line 134 of file segmentlcd.c.

Referenced by SegmentLCD_Write().

const MCU_DISPLAY EFM_Display = EFM_DISPLAY_DEF [static]

Working instance of LCD display.

Definition at line 125 of file segmentlcd.c.

const uint16_t EFM_Numbers[] [static]
Initial value:
 {
  0x003f, 
  0x0006, 
  0x005b, 
  0x004f, 
  0x0066, 
  0x006d, 
  0x007d, 
  0x0007, 
  0x007f, 
  0x006f, 
  0x0077, 
  0x007c, 
  0x0039, 
  0x005e, 
  0x0079, 
  0x0071, 
  0x0040  
}

Defines higlighted segments for the numeric display.

Definition at line 240 of file segmentlcd.c.

Referenced by SegmentLCD_Number(), and SegmentLCD_UnsignedHex().