This module provides a simple API to the Maxim MAX7456 on-screen display chip

Embed: (wiki syntax)

« Back to documentation index

MAX7456_API

MAX7456_API

Functions

 MAX7456 (PinName mosi, PinName miso, PinName sclk, const char *name, PinName cs, PinName rst, PinName vsync)
 MAX7456 constructor.
 MAX7456 (PinName mosi, PinName miso, PinName sclk, PinName cs, PinName rst, PinName vsync)
 MAX7456 constructor.
void reset (void)
 reset()
void clear_display (void)
 clear_display()
void cursor (int x, int y)
 cursor(x,y)
int string (char *s)
 string(*s)
int stringxy (int x, int y, char *s)
 stringxy(x,y,s)
int stringxy (int x, int y, char *s, uint8_t a)
 stringxy(x,y,s,a)
int stringxy (int x, int y, char *s, char *a)
 stringxy(x,y,s,a)
void stringl (int x, int y, char *s, int len)
 stringxy(x,y,s,len)
void attributes_xyl (int x, int y, char *s, int len)
 attribute_xyl(x,y,s,len)
void backGround (BGbrightness i)
 Set the background brightness.
void blinkRate (BlinkTime bt, BlinkingDutyCycle dc)
 Set the character blink rate.
void read_char_map (unsigned char address, unsigned char *data54)
 read_char_map(address,data54)
void write_char_map (unsigned char address, const unsigned char *data54)
 write_char_map(address,data54)
template<typename T >
void vsync_set_callback (T *tptr, void(T::*mptr)(void))
 attach(tptr,mptr)
void vsync_set_callback (void(*fptr)(void))
 attach(tptr,mptr)

Function Documentation

void attributes_xyl ( int  x,
int  y,
char *  s,
int  len 
) [inherited]

attribute_xyl(x,y,s,len)

Write the character attribute bytes at x,y Since attributes can be zero (NULL), the string length must be provided.

Parameters:
xThe X position
yThe Y position
sA char * pointer to the NULL terminated string of attributes.
lenThe length of the string of attributes.

Definition at line 203 of file MAX7456.cpp.

void backGround ( BGbrightness  i ) [inherited]

Set the background brightness.

See also:
BGbrightness
Parameters:
iThe brightness level

Definition at line 343 of file MAX7456.h.

void blinkRate ( BlinkTime  bt,
BlinkingDutyCycle  dc 
) [inherited]

Set the character blink rate.

See also:
BlinkTime
BlinkingDutyCycle
Parameters:
btThe blink time
dcThe duty cycle

Definition at line 354 of file MAX7456.h.

void clear_display ( void   ) [inherited]

clear_display()

Cleasr the entire display area.

Definition at line 166 of file MAX7456.cpp.

void cursor ( int  x,
int  y 
) [inherited]

cursor(x,y)

Moves the "cursor" to the screen X,Y position. Future writes to the screen ram will occur at this position.

Parameters:
xThe X position
yThe Y position

Definition at line 173 of file MAX7456.cpp.

MAX7456 ( PinName  mosi,
PinName  miso,
PinName  sclk,
PinName  cs,
PinName  rst,
PinName  vsync 
) [inherited]

MAX7456 constructor.

The MAX7456 constructor is used to initialise the MAX7456 object.

Example 1

     #include "mbed.h"
     #include "MAX7456.h"

     MAX7456 max(p5, p6, p7, p8, p20, p15);

     int main() {

         max.stringxy(1, 1, "Hello World");

         while(1); 
     }

Example 2

     #include "mbed.h"
     #include "MAX7456.h"

     int main() {

         MAX7456 max = new MAX7456(p5, p6, p7, p8, p20, p15);

         max->stringxy(1, 1, "Hello World");

         while(1); 
     }
Parameters:
misoPinName p5 or p11
mosiPinName p6 or p12
sclkPinName p7 pr p13
csPinName CS signal
rstPinName RESET signal
vsyncPinName Vertical sync signal

Definition at line 77 of file MAX7456.cpp.

MAX7456 ( PinName  mosi,
PinName  miso,
PinName  sclk,
const char *  name,
PinName  cs,
PinName  rst,
PinName  vsync 
) [inherited]

MAX7456 constructor.

The MAX7456 constructor is used to initialise the MAX7456 object.

Example 1

     #include "mbed.h"
     #include "MAX7456.h"

     MAX7456 max(p5, p6, p7, NULL, p8, p20, p15);

     int main() {

         max.stringxy(1, 1, "Hello World");

         while(1); 
     }

Example 2

     #include "mbed.h"
     #include "MAX7456.h"

     int main() {

         MAX7456 max = new MAX7456(p5, p6, p7, NULL, p8, p20, p15);

         max->stringxy(1, 1, "Hello World");

         while(1); 
     }
Parameters:
misoPinName p5 or p11
mosiPinName p6 or p12
sclkPinName p7 pr p13
nameOptional const char * SSP object name
csPinName CS signal
rstPinName RESET signal
vsyncPinName Vertical sync signal

Definition at line 72 of file MAX7456.cpp.

void read_char_map ( unsigned char  address,
unsigned char *  data54 
) [inherited]

read_char_map(address,data54)

Read the 54byte character map from MAX7456 ROM.

Parameters:
addressThe uchar address to read from (which character)
data54A char * pointer to a buffer where to write to.

Definition at line 262 of file MAX7456.cpp.

void reset ( void   ) [inherited]

reset()

Resets the MAX7456 device.

Definition at line 157 of file MAX7456.cpp.

int string ( char *  s ) [inherited]

string(*s)

Print the string pointed to by s at the current cursor position. The string should be an ASCII NULL terminated string.

Parameters:
sA char * pointer to the NULL terminated string to print.

Definition at line 190 of file MAX7456.cpp.

void stringl ( int  x,
int  y,
char *  s,
int  len 
) [inherited]

stringxy(x,y,s,len)

Print the string pointed to by s at the position supplied by x,y. The string should be an ASCII terminated string. len determines the length of the string to print (not the term NULL).

Parameters:
xThe X position
yThe Y position
sA char * pointer to the NULL terminated string to print.
lenThe length of teh string to print.

Definition at line 250 of file MAX7456.cpp.

int stringxy ( int  x,
int  y,
char *  s,
uint8_t  a 
) [inherited]

stringxy(x,y,s,a)

Print the string pointed to by s at the position supplied by x,y. The string should be an ASCII NULL terminated string.

Parameters:
xThe X position
yThe Y position
sA char * pointer to the NULL terminated string to print.
aAn attribute byte to appply to the string.
Returns:
int The length of the string written.

Definition at line 223 of file MAX7456.cpp.

int stringxy ( int  x,
int  y,
char *  s,
char *  a 
) [inherited]

stringxy(x,y,s,a)

Print the string pointed to by s at the position supplied by x,y. The string should be an ASCII NULL terminated string.

Parameters:
xThe X position
yThe Y position
sA char * pointer to the NULL terminated string to print.
aA char * pointer to the 30byte attribute string.
Returns:
int The length of the string written.

Definition at line 240 of file MAX7456.cpp.

int stringxy ( int  x,
int  y,
char *  s 
) [inherited]

stringxy(x,y,s)

Print the string pointed to by s at the position supplied by x,y. The string should be an ASCII NULL terminated string.

Parameters:
xThe X position
yThe Y position
sA char * pointer to the NULL terminated string to print.
Returns:
int The length of the string written.

Definition at line 216 of file MAX7456.cpp.

void vsync_set_callback ( T *  tptr,
void(T::*)(void)  mptr 
) [inherited]

attach(tptr,mptr)

Attach a callback method to teh vertical sync interrupt.

Parameters:
tptrThe class object pointer conatining the method.
mptrThe method within the object to invoke.

Definition at line 385 of file MAX7456.h.

void vsync_set_callback ( void(*)(void)  fptr ) [inherited]

attach(tptr,mptr)

Attach a callback function to the vertical sync interrupt.

Parameters:
fptrA function pointer to call on vertical sync irq.

Definition at line 396 of file MAX7456.h.

void write_char_map ( unsigned char  address,
const unsigned char *  data54 
) [inherited]

write_char_map(address,data54)

Write the 54byte character map to the MAX7456 ROM.

Parameters:
addressThe uchar address to write to
data54A char * pointer to a buffer where to read from.

Definition at line 274 of file MAX7456.cpp.