Demo for MAXREFDES99

Dependencies:   MAX7219 mbed

Embed: (wiki syntax)

« Back to documentation index

maxrefdes99.cpp File Reference

maxrefdes99.cpp File Reference

Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved. More...

Go to the source code of this file.

Functions

void print_char (Max7219 *p_display, uint8_t position99, char c)
 Prints character to MAXREFDES99 at given position.
void print_string (Max7219 *p_display, uint8_t position, const char *s)
 Prints given string to MAXREFDES99 at given position.
void shift_display_right (Max7219 *p_display, uint8_t count, uint8_t ms_delay)
 Shifts display right 'count' positions with given delay between shifts.
void shift_display_left (Max7219 *p_display, uint8_t count, uint8_t ms_delay)
 Shifts display left 'count' positions with given delay between shifts.
void quad_all_on (Max7219 *p_display, uint8_t quad)
 Turns on all leds for given quadrant, with quad 1 being top left and quad 4 being bottom right.
void quad_all_off (Max7219 *p_display, uint8_t quad)
 Turns off all leds for given quadrant, with quad 1 being top left and quad 4 being bottom right.
void all_on (Max7219 *p_display)
 Turns all leds for whole display on.
void all_off (Max7219 *p_display)
 Turns all leds for whole display off.
void demo (Max7219 *display, max7219_configuration_t display_config, bool endless_loop)
 Demo loop for MAXREFDES99.
void endless_scroll_display (Max7219 *display, uint32_t scroll_right)
 Shift display in given direction forever.
void get_16x16_character (char c, uint8_t *char_buff, uint8_t font_type)
 Gets 16x16 character bitmap fom memory.
void print_char_16x16 (Max7219 *p_display, uint16_t position, char c, uint8_t font_type)
 Prints character to MAXREFDES99 16x16 LED display.
void print_string_16x16 (Max7219 *p_display, char *s, uint8_t font_type)
 Prints given string to MAXREFDES99 16x16 LED display.
void shift_display_right_16x16 (Max7219 *p_display, uint8_t count, uint8_t delay)
 Shifts 16x16 font display right 'count' positions with given delay between shifts.
void shift_display_left_16x16 (Max7219 *p_display, uint8_t count, uint8_t delay)
 Shifts 16x16 font display left 'count' positions with given delay between shifts.
void demo_16x16 (Max7219 *display, max7219_configuration_t display_config, uint8_t font_type, bool endless_loop)
 Demo loop for MAXREFDES99 with 16x16 font display.
void endless_scroll_display_16x16 (Max7219 *display, uint32_t scroll_right)
 Shift 16x16 font display in given direction forever.
uint32_t print_menu (void)
 Print demo menu.
uint32_t get_user_input (char *msg, uint32_t max_val)
 Get integer value from user.
char get_user_char (char *msg)
 Get char from user.
char * get_user_string (char *msg)
 Get string from user.

Detailed Description

Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the name of Maxim Integrated Products, Inc. shall not be used except as stated in the Maxim Integrated Products, Inc. Branding Policy.

The mere transfer of this software does not imply any licenses of trade secrets, proprietary technology, copyrights, patents, trademarks, maskwork rights, or any other form of intellectual property whatsoever. Maxim Integrated Products, Inc. retains all ownership rights.

Definition in file maxrefdes99.cpp.


Function Documentation

void all_off ( Max7219 *  p_display )

Turns all leds for whole display off.

On Entry:

Parameters:
[in]p_display- pointer to Max7219 object

On Exit:

Returns:
None

Definition at line 1425 of file maxrefdes99.cpp.

void all_on ( Max7219 *  p_display )

Turns all leds for whole display on.

On Entry:

Parameters:
[in]p_display- pointer to Max7219 object

On Exit:

Returns:
None

Definition at line 1411 of file maxrefdes99.cpp.

void demo ( Max7219 *  display,
max7219_configuration_t  display_config,
bool  endless_loop 
)

Demo loop for MAXREFDES99.

On Entry:

Parameters:
[in]p_display- pointer to Max7219 object
[in]display_config- structure holding configuration data
[in]endless_loop- if true run demo in endless loop

On Exit:

Returns:
None

Definition at line 1439 of file maxrefdes99.cpp.

void demo_16x16 ( Max7219 *  display,
max7219_configuration_t  display_config,
uint8_t  font_type,
bool  endless_loop 
)

Demo loop for MAXREFDES99 with 16x16 font display.

On Entry:

Parameters:
[in]p_display- pointer to Max7219 object
[in]display_config- structure holding configuration data
[in]font_type- 16x16 font type used for display
[in]endless_loop- if true run demo in endless loop

On Exit:

Returns:
None

Definition at line 1692 of file maxrefdes99.cpp.

void endless_scroll_display ( Max7219 *  display,
uint32_t  scroll_right 
)

Shift display in given direction forever.

On Entry:

Parameters:
[in]p_display- pointer to Max7219 object
[in]scroll_right- if true shift right, else shift left

On Exit:

Returns:
None

Definition at line 1491 of file maxrefdes99.cpp.

void endless_scroll_display_16x16 ( Max7219 *  display,
uint32_t  scroll_right 
)

Shift 16x16 font display in given direction forever.

On Entry:

Parameters:
[in]p_display- pointer to Max7219 object
[in]scroll_right- if true shift right, else shift left

On Exit:

Returns:
None

Definition at line 1741 of file maxrefdes99.cpp.

void get_16x16_character ( char  c,
uint8_t *  char_buff,
uint8_t  font_type 
)

Gets 16x16 character bitmap fom memory.

On Entry:

Parameters:
[in]c- character to get bitmap for
[in]char_buff- pointer to buffer to store bitmap Buffer should be 32 bytes
[in]font_type- 16x16 font type used for display On Exit:
Returns:
None

Definition at line 1512 of file maxrefdes99.cpp.

char get_user_char ( char *  msg )

Get char from user.

On Entry:

Parameters:
[in]msg- prompt for user

On Exit:

Returns:
User entry

Definition at line 1814 of file maxrefdes99.cpp.

uint32_t get_user_input ( char *  msg,
uint32_t  max_val 
)

Get integer value from user.

On Entry:

Parameters:
[in]msg- prompt for user
[in]max_val- maximum allowable input

On Exit:

Returns:
User entry

Definition at line 1783 of file maxrefdes99.cpp.

char* get_user_string ( char *  msg )

Get string from user.

On Entry:

Parameters:
[in]msg- prompt for user

On Exit:

Returns:
User entry

Definition at line 1846 of file maxrefdes99.cpp.

void print_char ( Max7219 *  p_display,
uint8_t  position,
char  c 
)

Prints character to MAXREFDES99 at given position.

On Entry:

Parameters:
[in]p_display- pointer to Max7219 object
[in]position- position to print char to posiion 1 is top left column, position 32 is bottom right column
[in]c- char to print

On Exit:

Returns:
None

Definition at line 1126 of file maxrefdes99.cpp.

void print_char_16x16 ( Max7219 *  p_display,
uint16_t  position,
char  c,
uint8_t  font_type 
)

Prints character to MAXREFDES99 16x16 LED display.

On Entry:

Parameters:
[in]p_display- pointer to Max7219 object
[in]position- for single char print this value is zero, for string case it is multiple of 32 bytes as each char data is 32 bytes,
[in]c- char to print
[in]font_type- 16x16 font type used for display

On Exit:

Returns:
None

Definition at line 1542 of file maxrefdes99.cpp.

uint32_t print_menu ( void   )

Print demo menu.

On Entry:

On Exit:

Returns:
User entry

Definition at line 1762 of file maxrefdes99.cpp.

void print_string ( Max7219 *  p_display,
uint8_t  position,
const char *  s 
)

Prints given string to MAXREFDES99 at given position.

On Entry:

Parameters:
[in]p_display- pointer to Max7219 object
[in]position- position to print char to posiion 1 is top left column, position 32 is bottom right column
[in]s- pointer to string to print

On Exit:

Returns:
None

Definition at line 1203 of file maxrefdes99.cpp.

void print_string_16x16 ( Max7219 *  p_display,
char *  s,
uint8_t  font_type 
)

Prints given string to MAXREFDES99 16x16 LED display.

On Entry:

Parameters:
[in]p_display- pointer to Max7219 object
[in]s- pointer to string to print
[in]font_type- 16x16 font type used for display

On Exit:

Returns:
None

Definition at line 1575 of file maxrefdes99.cpp.

void quad_all_off ( Max7219 *  p_display,
uint8_t  quad 
)

Turns off all leds for given quadrant, with quad 1 being top left and quad 4 being bottom right.

On Entry:

Parameters:
[in]p_display- pointer to Max7219 object
[in]quad- see brief

On Exit:

Returns:
None

Definition at line 1384 of file maxrefdes99.cpp.

void quad_all_on ( Max7219 *  p_display,
uint8_t  quad 
)

Turns on all leds for given quadrant, with quad 1 being top left and quad 4 being bottom right.

On Entry:

Parameters:
[in]p_display- pointer to Max7219 object
[in]quad- see brief

On Exit:

Returns:
None

Definition at line 1360 of file maxrefdes99.cpp.

void shift_display_left ( Max7219 *  p_display,
uint8_t  count,
uint8_t  delay 
)

Shifts display left 'count' positions with given delay between shifts.

On Entry:

Parameters:
[in]p_display- pointer to Max7219 object
[in]count- number of positions to shift
[in]delay- delay between shifts

On Exit:

Returns:
None

Definition at line 1287 of file maxrefdes99.cpp.

void shift_display_left_16x16 ( Max7219 *  p_display,
uint8_t  count,
uint8_t  delay 
)

Shifts 16x16 font display left 'count' positions with given delay between shifts.

On Entry:

Parameters:
[in]p_display- pointer to Max7219 object
[in]count- number of positions to shift
[in]delay- delay between shifts in milliseconds

On Exit:

Returns:
None

Definition at line 1646 of file maxrefdes99.cpp.

void shift_display_right ( Max7219 *  p_display,
uint8_t  count,
uint8_t  delay 
)

Shifts display right 'count' positions with given delay between shifts.

On Entry:

Parameters:
[in]p_display- pointer to Max7219 object
[in]count- number of positions to shift
[in]delay- delay between shifts

On Exit:

Returns:
None

Definition at line 1215 of file maxrefdes99.cpp.

void shift_display_right_16x16 ( Max7219 *  p_display,
uint8_t  count,
uint8_t  delay 
)

Shifts 16x16 font display right 'count' positions with given delay between shifts.

On Entry:

Parameters:
[in]p_display- pointer to Max7219 object
[in]count- number of positions to shift
[in]delay- delay between shifts in milliseconds

On Exit:

Returns:
None

Definition at line 1600 of file maxrefdes99.cpp.