lcd.h File Reference

LCD handling functions header. More...

#include <msp430x44x.h>
#include <msp430/basic_clock.h>
#include <msp430/system_clock.h>
#include <sys/types.h>
#include "common.h"

Include dependency graph for lcd.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define LCD_PRINTF_BUF_SIZE   (8)
#define LCD_ARROW_UP   (0x20)
#define LCD_ARROW_DOWN   (0x80)
#define LCD_ARROW_RIGHT   (0x40)
#define LCD_ARROW_LEFT   (0x10)
#define LCD_ARROW_ALL   (LCD_ARROW_UP + LCD_ARROW_DOWN + LCD_ARROW_LEFT + LCD_ARROW_RIGHT)

Functions

void LCD_init ()
 Initializes LCD driver.
void LCD_clear ()
 Clear all segment of LCD.
void LCD_clearClock ()
 Clear segments of clock on LCD (four digit at top-right).
void LCD_all ()
 Shows all segment of LCD.
void LCD_writeClockInt (uint16_t value, bool_t paddingZeroes)
 Write an integer variable to clock part of LCD (four digit at top-right).
void LCD_writeClockDigit (uint8_t position, uint8_t digit)
 Write a digit to clock part of LCD (four digit at top-right).
void LCD_setClockColon (bool_t on)
 Shows or hides colon on clock part of LCD (four digit at top-right).
void LCD_setClockDot (uint8_t position, bool_t on)
 Shows or hides dots on clock part of LCD (four digit at top-right).
void LCD_showArrows (uint8_t arrows)
 Shows arrows.
void LCD_clearArrows (uint8_t arrows)
 Clear arrows.
void LCD_showBatteryLevel (uint8_t level)
 Shows battery level.
void LCD_setColon (uint8_t position, bool_t on)
 Shows or hides colon.
void LCD_writeInt (int number)
 Write an integer variable to LCD.
void LCD_writeLetter (uint8_t position, char letter)
 Write an alphanumeric character to LCD.
void LCD_write (const char *buf, uint8_t length)
 Write a character buffer to LCD.
void LCD_printf (const char *fmt,...)
 Write a formatted string to LCD.

Variables

char * LCD
 Pointer to access LCD memory.


Detailed Description

LCD handling functions header.

Author:
Peter Ivanov

Definition in file lcd.h.


Define Documentation

#define LCD_ARROW_ALL   (LCD_ARROW_UP + LCD_ARROW_DOWN + LCD_ARROW_LEFT + LCD_ARROW_RIGHT)

Definition at line 30 of file lcd.h.

#define LCD_ARROW_DOWN   (0x80)

Definition at line 27 of file lcd.h.

#define LCD_ARROW_LEFT   (0x10)

Definition at line 29 of file lcd.h.

#define LCD_ARROW_RIGHT   (0x40)

Definition at line 28 of file lcd.h.

#define LCD_ARROW_UP   (0x20)

Definition at line 26 of file lcd.h.

#define LCD_PRINTF_BUF_SIZE   (8)

Definition at line 25 of file lcd.h.


Function Documentation

void LCD_all (  ) 

Shows all segment of LCD.

Useful for testing the LCD.

Author:
Peter Ivanov, Muneem Shahriar

Definition at line 50 of file lcd.c.

void LCD_clear (  ) 

Clear all segment of LCD.

Author:
Peter Ivanov, Muneem Shahriar

Definition at line 41 of file lcd.c.

void LCD_clearArrows ( uint8_t  arrows  ) 

Clear arrows.

Author:
Peter Ivanov
Input:
Parameters:
arrows Which arrow has to clear: LCD_ARROW_UP | LCD_ARROW_DOWN | LCD_ARROW_RIGHT | LCD_ARROW_LEFT | LCD_ARROW_ALL.

Definition at line 458 of file lcd.c.

void LCD_clearClock (  ) 

Clear segments of clock on LCD (four digit at top-right).

Author:
Peter Ivanov

Definition at line 59 of file lcd.c.

void LCD_init (  ) 

Initializes LCD driver.

Author:
Peter Ivanov, Muneem Shahriar

Definition at line 29 of file lcd.c.

void LCD_printf ( const char *  fmt,
  ... 
)

Write a formatted string to LCD.

Example:

LCD_printf ("I %02i", i);

Author:
Peter Ivanov
Input:
Parameters:
fmt Printf format string. e.g.: "I %02i"

Definition at line 422 of file lcd.c.

void LCD_setClockColon ( bool_t  on  ) 

Shows or hides colon on clock part of LCD (four digit at top-right).

Author:
Peter Ivanov
Input:
Parameters:
on TRUE: switch on colon, FALSE: switch off colon.

Definition at line 102 of file lcd.c.

void LCD_setClockDot ( uint8_t  position,
bool_t  on 
)

Shows or hides dots on clock part of LCD (four digit at top-right).

Author:
Peter Ivanov
Input:
Parameters:
position 0..2: 0 is the dot at most right digit.
on TRUE: switch on dot, FALSE: switch off dot.

Definition at line 114 of file lcd.c.

void LCD_setColon ( uint8_t  position,
bool_t  on 
)

Shows or hides colon.

Author:
Peter Ivanov
Input:
Parameters:
position 0..5: 0 is the dot at most right digit.
on TRUE: switch on colon, FALSE: switch off colon.

Definition at line 474 of file lcd.c.

void LCD_showArrows ( uint8_t  arrows  ) 

Shows arrows.

Author:
Peter Ivanov
Input:
Parameters:
arrows Which arrow has to display: LCD_ARROW_UP | LCD_ARROW_DOWN | LCD_ARROW_RIGHT | LCD_ARROW_LEFT | LCD_ARROW_ALL.

Definition at line 453 of file lcd.c.

void LCD_showBatteryLevel ( uint8_t  level  ) 

Shows battery level.

Author:
Peter Ivanov
Input:
Parameters:
level Valid values are 0..3: 0: Zero battery, 1: Low battery, 2: Medium battery, 3: Full battery.

Definition at line 463 of file lcd.c.

void LCD_write ( const char *  buf,
uint8_t  length 
)

Write a character buffer to LCD.

Author:
Peter Ivanov
Input:
Parameters:
buf Pointer to buffer.
length Length of buffer.

Definition at line 433 of file lcd.c.

void LCD_writeClockDigit ( uint8_t  position,
uint8_t  digit 
)

Write a digit to clock part of LCD (four digit at top-right).

Author:
Peter Ivanov
Input:
Parameters:
position 0..3: 0 is the most right digit.
digit 0..9: digit to display. -1: clear digit.

Definition at line 163 of file lcd.c.

void LCD_writeClockInt ( uint16_t  value,
bool_t  paddingZeroes 
)

Write an integer variable to clock part of LCD (four digit at top-right).

Author:
Peter Ivanov
Input:
Parameters:
value Integer value to display: 0..9999.
paddingZeroes Display zeroes if number of digits are less than four.

Definition at line 68 of file lcd.c.

void LCD_writeInt ( int  number  ) 

Write an integer variable to LCD.

Author:
Peter Ivanov, Muneem Shahriar
Input:
Parameters:
number Integer value to display: 0..9999999.

Definition at line 390 of file lcd.c.

void LCD_writeLetter ( uint8_t  position,
char  letter 
)

Write an alphanumeric character to LCD.

Author:
Peter Ivanov, Muneem Shahriar
Input:
Parameters:
position 0..5: 0 the most right digit.
letter Implemented characters: A-Z 0-9 . : , / \

Definition at line 500 of file lcd.c.


Variable Documentation

char* LCD

Pointer to access LCD memory.

Definition at line 27 of file lcd.c.


Generated on Thu Dec 27 14:21:52 2007 for Sample MSP430-449STK2 project by  doxygen 1.5.1