This is a driver for Atmel YMCC42364AAANDCL LCD component.
This component is the custom LCD used for SAM4C-EK and SAM4L-EK. This driver provides functions for initialization and control of the LCD segments.
This driver depends on the following modules:
Circular Animation Shift Direction | |
#define | C42364A_CSR_RIGHT 1 |
Right Direction. More... | |
#define | C42364A_CSR_LEFT 0 |
Left Direction. More... | |
Value for battery Icon setting | |
enum | c42364a_battery_value { C42364A_BATTERY_NONE = 0, C42364A_BATTERY_ONE, C42364A_BATTERY_TWO, C42364A_BATTERY_THREE } |
Function Prototypes | |
status_code_t | c42364a_init (void) |
Initialize the C42364A LCD Glass component. More... | |
void | c42364a_write_alphanum_packet (const uint8_t *data) |
Write string to c42364a lcd glass alphanumeric field. More... | |
void | c42364a_write_num_packet (const uint8_t *data) |
Write string to c42048a lcd glass numeric field. More... | |
void | c42364a_show_text (const uint8_t *data) |
Show text on C42364A LCD glass alphanumeric field. More... | |
void | c42364a_clear_text (void) |
Clear C42364A LCD glass alphanumeric field. More... | |
void | c42364a_clear_icon (uint8_t icon_com, uint8_t icon_seg) |
Clear a specific icon on the LCD glass. More... | |
void | c42364a_show_icon (uint8_t icon_com, uint8_t icon_seg) |
Show a specific icon on the LCD glass. More... | |
void | c42364a_blink_icon_start (uint8_t icon_com, uint8_t icon_seg) |
Blink a specific icon on the LCD glass. More... | |
void | c42364a_blink_icon_stop (uint8_t icon_com, uint8_t icon_seg) |
Stop blink a specific icon on the LCD glass. More... | |
void | c42364a_blink_screen (void) |
Blink the current screen content. More... | |
void | c42364a_blink_disable (void) |
Disable all Blink. More... | |
void | c42364a_set_contrast (int8_t contrast) |
Set the C42364A LCD glass contrast. More... | |
void | c42364a_circular_animation_start (uint8_t csr_dir, uint8_t size, uint8_t data) |
Start circular animation. More... | |
void | c42364a_circular_animation_stop (void) |
Stop circular animation. More... | |
void | c42364a_text_scrolling_start (const uint8_t *data, uint32_t length) |
Scrolling start. More... | |
void | c42364a_text_scrolling_stop (void) |
Scrolling stop. More... | |
void | c42364a_show_all (void) |
Show all content of the LCD glass. More... | |
void | c42364a_clear_all (void) |
Clear all content of the LCD glass. More... | |
void | c42364a_show_numeric_dec (int32_t value) |
Show a decimal numeric value to LCD glass. More... | |
void | c42364a_clear_numeric_dec (void) |
Clear C42364A LCD glass numeric field and the three C42364A_ICON_MINUS*** icons. More... | |
void | c42364a_show_battery (enum c42364a_battery_value val) |
Show battery condition by the battery icons on the LCD glass. More... | |
#define C42364A_CSR_LEFT 0 |
Left Direction.
#define C42364A_CSR_RIGHT 1 |
Right Direction.
Referenced by ui_lcd_init().
void c42364a_blink_disable | ( | void | ) |
void c42364a_blink_icon_start | ( | uint8_t | icon_com, |
uint8_t | icon_seg | ||
) |
Blink a specific icon on the LCD glass.
This function will blink a specific icon.
icon_com | Pixel coordinate - COMx - of the icon. |
icon_seg | Pixel coordinate - SEGy - of the icon. |
References CONF_C42364A_BLINK_TIMER, lcdca_blink_config::lcd_blink_mode, lcdca_blink_config::lcd_blink_timer, lcdca_blink_enable(), LCDCA_BLINK_SELECTED, lcdca_blink_set_config(), lcdca_set_blink_pixel(), and lcdca_set_pixel().
void c42364a_blink_icon_stop | ( | uint8_t | icon_com, |
uint8_t | icon_seg | ||
) |
Stop blink a specific icon on the LCD glass.
This function will stop blink a specific icon.
icon_com | Pixel coordinate - COMx - of the icon. |
icon_seg | Pixel coordinate - SEGy - of the icon. |
References lcdca_clear_blink_pixel().
void c42364a_blink_screen | ( | void | ) |
Blink the current screen content.
This function will make the current screen blink.
References CONF_C42364A_BLINK_TIMER, lcdca_blink_config::lcd_blink_mode, lcdca_blink_config::lcd_blink_timer, lcdca_blink_enable(), LCDCA_BLINK_FULL, lcdca_blink_set_config(), and lcdca_clear_blink_all_pixel().
void c42364a_circular_animation_start | ( | uint8_t | csr_dir, |
uint8_t | size, | ||
uint8_t | data | ||
) |
Start circular animation.
This function start the circular animation.
csr_dir | Direction. |
size | Defines the size of the circular animation icon. |
data | Circular Shift Register Value. |
References CONF_C42364A_CIRCULAR_ANIMATION_TIMER, lcdca_circular_shift_config::data, lcdca_circular_shift_config::lcd_csr_dir, lcdca_circular_shift_config::lcd_csr_timer, lcdca_circular_shift_enable(), lcdca_circular_shift_set_config(), and lcdca_circular_shift_config::size.
Referenced by ui_lcd_init().
void c42364a_circular_animation_stop | ( | void | ) |
Stop circular animation.
This function stop the circular animation.
References lcdca_circular_shift_disable().
void c42364a_clear_all | ( | void | ) |
Clear all content of the LCD glass.
This function clears all pixels and areas of the LCD glass C42364A.
References lcdca_automated_char_stop(), lcdca_blink_disable(), lcdca_circular_shift_disable(), and lcdca_clear_display_memory().
void c42364a_clear_icon | ( | uint8_t | icon_com, |
uint8_t | icon_seg | ||
) |
Clear a specific icon on the LCD glass.
This function will clear a specific icon.
icon_com | Pixel coordinate - COMx - of the icon. |
icon_seg | Pixel coordinate - SEGy - of the icon. |
References lcdca_clear_pixel().
void c42364a_clear_numeric_dec | ( | void | ) |
Clear C42364A LCD glass numeric field and the three C42364A_ICON_MINUS*** icons.
This function will clear the numeric field of the LCD glass.
References C42364A_FIRST_7SEG_4C, C42364A_ICON_MINUS, C42364A_ICON_MINUS_SEG1, C42364A_ICON_MINUS_SEG2, C42364A_WIDTH_7SEG_4C, lcdca_clear_pixel(), LCDCA_CMCFG_DREV_LEFT, LCDCA_TDG_7SEG4COM, and lcdca_write_packet().
void c42364a_clear_text | ( | void | ) |
Clear C42364A LCD glass alphanumeric field.
This function will clear the alphanumeric field of the LCD glass.
References C42364A_FIRST_14SEG_4C, C42364A_WIDTH_14SEG_4C, LCDCA_CMCFG_DREV_LEFT, LCDCA_TDG_14SEG4COM, and lcdca_write_packet().
status_code_t c42364a_init | ( | void | ) |
Initialize the C42364A LCD Glass component.
This function initializes the LCD driver to control the LCD glass. It perform LCD module intialization according to the C42364A characteristics.
References C42364A_LCD_DUTY, C42364A_PORT_MASK, CONF_C42364A_CLKDIV, CONF_C42364A_CONTRAST, CONF_C42364A_FC0, CONF_C42364A_FC1, CONF_C42364A_FC2, CONF_C42364A_PRES, CONF_C42364A_X_BIAS, lcdca_config::contrast, lcdca_config::duty_type, lcdca_config::fc0, lcdca_config::fc1, lcdca_config::fc2, lcdca_config::lcd_clkdiv, lcdca_config::lcd_pres, lcdca_clk_init(), lcdca_enable(), lcdca_enable_timer(), lcdca_set_config(), LCDCA_TIMER_FC0, LCDCA_TIMER_FC1, LCDCA_TIMER_FC2, lcdca_config::lp_wave, lcdca_config::port_mask, STATUS_OK, and lcdca_config::x_bias.
Referenced by ui_lcd_init().
void c42364a_set_contrast | ( | int8_t | contrast | ) |
Set the C42364A LCD glass contrast.
This function allows to adjust the contrast of the C42364A LCD glass.
contrast | -32 <= signed contrast value <= 31(Using LCDCA) 0 <= contrast value <= 15(Using SLCDC). |
References lcdca_set_contrast().
void c42364a_show_all | ( | void | ) |
Show all content of the LCD glass.
This function sets all pixels and areas of the LCD glass C42364A.
References lcdca_automated_char_stop(), lcdca_blink_disable(), lcdca_circular_shift_disable(), and lcdca_set_display_memory().
void c42364a_show_battery | ( | enum c42364a_battery_value | val | ) |
Show battery condition by the battery icons on the LCD glass.
This function allows to Show battery condition by the battery icons on the LCD glass..
val | The 0 to 3 value which show the battery condition. |
References C42364A_ICON_BAT, C42364A_ICON_BAT_LEVEL_1, C42364A_ICON_BAT_LEVEL_2, C42364A_ICON_BAT_LEVEL_3, lcdca_clear_pixel(), and lcdca_set_pixel().
void c42364a_show_icon | ( | uint8_t | icon_com, |
uint8_t | icon_seg | ||
) |
Show a specific icon on the LCD glass.
This function will show a specific icon.
icon_com | Pixel coordinate - COMx - of the icon. |
icon_seg | Pixel coordinate - SEGy - of the icon. |
References lcdca_clear_blink_pixel(), and lcdca_set_pixel().
Referenced by ui_lcd_init().
void c42364a_show_numeric_dec | ( | int32_t | value | ) |
Show a decimal numeric value to LCD glass.
This function displays an int32 value to the LCD numeric field of the glass.
value | The int32_t value to be displayed |
References Abs, Assert, C42364A_ICON_MINUS, C42364A_ICON_MINUS_SEG1, C42364A_ICON_MINUS_SEG2, c42364a_write_num_packet(), lcdca_clear_pixel(), and lcdca_set_pixel().
void c42364a_show_text | ( | const uint8_t * | data | ) |
Show text on C42364A LCD glass alphanumeric field.
This function will show text on the alphanumeric field of the LCD glass.
data | Pointer to the input string(max length is 7) |
References C42364A_FIRST_14SEG_4C, C42364A_WIDTH_14SEG_4C, LCDCA_CMCFG_DREV_LEFT, LCDCA_TDG_14SEG4COM, and lcdca_write_packet().
Referenced by ui_lcd_refresh_txt().
void c42364a_text_scrolling_start | ( | const uint8_t * | data, |
uint32_t | length | ||
) |
Scrolling start.
This function start the text scrolling.
data | Data string buffer. |
length | Data string length. |
References lcdca_automated_char_config::automated_mode, lcdca_automated_char_config::automated_timer, C42364A_FIRST_14SEG_4C, C42364A_WIDTH_14SEG_4C, CONF_C42364A_TEXT_SCROLLING_TIMER, lcdca_automated_char_config::dign, lcdca_automated_char_config::dir_reverse, lcdca_automated_char_config::lcd_tdg, lcdca_automated_char_set_config(), lcdca_automated_char_start(), LCDCA_AUTOMATED_DIR_REVERSE, LCDCA_AUTOMATED_MODE_SCROLLING, LCDCA_TDG_14SEG4COM, lcdca_automated_char_config::steps, and lcdca_automated_char_config::stseg.
Referenced by ui_lcd_init().
void c42364a_text_scrolling_stop | ( | void | ) |
Scrolling stop.
This function stop the text scrolling.
References lcdca_automated_char_stop().
Referenced by ui_lcd_init().
void c42364a_write_alphanum_packet | ( | const uint8_t * | data | ) |
Write string to c42364a lcd glass alphanumeric field.
This function will write the input string to the alphanumeric field of the lcd glass.
data | Pointer to the input string(max length is 7) |
References C42364A_FIRST_14SEG_4C, C42364A_WIDTH_14SEG_4C, LCDCA_CMCFG_DREV_LEFT, LCDCA_TDG_14SEG4COM, and lcdca_write_packet().
void c42364a_write_num_packet | ( | const uint8_t * | data | ) |
Write string to c42048a lcd glass numeric field.
This function will write the input string to the numeric field of the lcd glass.
data | Pointer to the input string(max length is 4) |
References C42364A_FIRST_7SEG_4C, C42364A_WIDTH_7SEG_4C, LCDCA_CMCFG_DREV_LEFT, LCDCA_TDG_7SEG4COM, and lcdca_write_packet().
Referenced by c42364a_show_numeric_dec(), and ui_lcd_refresh_alphanum().