Driver for the range of Nokia 130x130 displays as found on Sparkfun and Olimex breakout boards, supporting the 6100, 6610 and PCF8833 drivers
Dependents: NokiaLCD_HelloWorld SpectrumAnalyzer MARMEX_OB_oled__HelloWorld GMT_counter ... more
NokiaLCD Class Reference
An interface for the 130x130 Nokia Mobile phone screens. More...
#include <NokiaLCD.h>
Public Types | |
enum | LCDType { LCD6100, LCD6610 } |
LCD panel format. More... | |
Public Member Functions | |
NokiaLCD (PinName mosi, PinName sclk, PinName cs, PinName rst, LCDType type=LCD6100) | |
Create and Nokia LCD interface, using a SPI and two DigitalOut interfaces. | |
int | putc (int c) |
Write a character to the LCD. | |
int | printf (const char *format,...) |
Write a formated string to the LCD. | |
void | locate (int column, int row) |
Locate to a screen column and row. | |
void | cls () |
Clear the screen and locate to 0,0. | |
void | pixel (int x, int y, int colour) |
Set a pixel on te screen. | |
void | fill (int x, int y, int width, int height, int colour) |
Fill an area of the screen. | |
void | foreground (int c) |
Set the foreground colour. | |
void | background (int c) |
Set the background colour. |
Detailed Description
An interface for the 130x130 Nokia Mobile phone screens.
#include "mbed.h" #include "NokiaLCD.h" NokiaLCD lcd(p5, p7, p8, p9, NokiaLCD::6610); // mosi, sclk, cs, rst, type int main() { lcd.printf("Hello World!"); }
Definition at line 41 of file NokiaLCD.h.
Member Enumeration Documentation
enum LCDType |
LCD panel format.
- Enumerator:
LCD6100 Nokia 6100, as found on sparkfun board (default)
LCD6610 Nokia 6610, as found on olimex board.
Definition at line 45 of file NokiaLCD.h.
Constructor & Destructor Documentation
Create and Nokia LCD interface, using a SPI and two DigitalOut interfaces.
- Parameters:
-
mosi SPI data out sclk SPI clock cs Chip Select (DigitalOut) rst Reset (DigitalOut) type The LCDType to select driver chip variants
Definition at line 15 of file NokiaLCD.cpp.
Member Function Documentation
void background | ( | int | c ) |
void cls | ( | ) |
Clear the screen and locate to 0,0.
Definition at line 286 of file NokiaLCD.cpp.
void fill | ( | int | x, |
int | y, | ||
int | width, | ||
int | height, | ||
int | colour | ||
) |
Fill an area of the screen.
- Parameters:
-
x horizontal position from left y vertical position from top width width in pixels height height in pixels colour 24-bit colour in format 0x00RRGGBB
Definition at line 312 of file NokiaLCD.cpp.
void foreground | ( | int | c ) |
void locate | ( | int | column, |
int | row | ||
) |
Locate to a screen column and row.
- Parameters:
-
column The horizontal position from the left, indexed from 0 row The vertical position from the top, indexed from 0
Definition at line 254 of file NokiaLCD.cpp.
void pixel | ( | int | x, |
int | y, | ||
int | colour | ||
) |
Set a pixel on te screen.
- Parameters:
-
x horizontal position from left y vertical position from top colour 24-bit colour in format 0x00RRGGBB
Definition at line 305 of file NokiaLCD.cpp.
int printf | ( | const char * | format, |
... | |||
) |
Write a formated string to the LCD.
- Parameters:
-
format A printf-style format string, followed by the variables to use in formating the string.
int putc | ( | int | c ) |
Write a character to the LCD.
- Parameters:
-
c The character to write to the display
Generated on Tue Jul 12 2022 22:55:10 by 1.7.2