STM8S/A Standard Peripherals Firmware Library
|
Modules | |
STM8S_EVAL_LCD_Exported_Macros | |
STM8S_EVAL_SPI_SD_Private_Functions | |
STM8S_EVAL_I2C_EE | |
This file includes the I2C EEPROM driver of STM8S-EVAL boards. | |
STM8-128_EVAL_LOW_LEVEL_DOT_MATRIX_LCD | |
STM8S_EVAL_SPI_SD | |
Defines | |
#define | _delay_ delay |
#define | COMMAND_TYPE ((uint8_t)0xF8) |
#define | DATA_TYPE ((uint8_t)0xFA) |
#define | DISPLAY_CLR ((uint8_t)0x01) |
#define | DISPLAY_OFF ((uint8_t)0x08) |
#define | DISPLAY_ON ((uint8_t)0x0C) |
#define | ENTRY_MODE_SET_INC ((uint8_t)0x06) |
#define | LCD_LINE1 ((uint8_t)0x80) |
#define | LCD_LINE2 ((uint8_t)0x90) |
#define | LCD_LINE_MAX_CHAR ((uint8_t)15) |
#define | SET_EXTENDED_INST ((uint8_t)0x34) |
#define | SET_GRAPHIC_MODE ((uint8_t)0x36) |
#define | SET_TEXT_MODE ((uint8_t)0x30) |
Functions | |
void | LCD_BacklightCmd (FunctionalState NewState) |
Enable or Disable the LCD backlight. | |
void | LCD_Clear (void) |
Clear the LCD. | |
void | LCD_DisplayLogo (uint8_t address) |
Display ST logo. | |
void | LCD_Print (uint8_t *ptr) |
Display a string from current position of the LCD cursor. | |
void | LCD_RollString (uint8_t Line, uint8_t *ptr, uint16_t speed) |
Display a string in rolling mode. | |
void | LCD_SendByte (uint8_t DataType, uint8_t DataToSend) |
Send a byte to LCD. | |
void | LCD_SetCursorPos (uint8_t Line, uint8_t Offset) |
Set the LCD cursor to the specified location. | |
void | STM8S_EVAL_LCD_Init (void) |
Initialize the LCD. |
Define Documentation
#define _delay_ delay |
Definition at line 61 of file stm8s_eval_lcd.h.
Referenced by LCD_Clear(), LCD_RollString(), LCD_SendByte(), and STM8S_EVAL_LCD_Init().
#define COMMAND_TYPE ((uint8_t)0xF8) |
Definition at line 94 of file stm8s_eval_lcd.h.
Referenced by LCD_Clear(), LCD_DisplayCGRAM0(), LCD_DisplayCGRAM1(), LCD_RollString(), LCD_SetCursorPos(), and STM8S_EVAL_LCD_Init().
#define DATA_TYPE ((uint8_t)0xFA) |
Definition at line 95 of file stm8s_eval_lcd.h.
Referenced by LCD_DisplayCGRAM0(), LCD_DisplayCGRAM1(), LCD_Print(), and LCD_RollString().
#define DISPLAY_CLR ((uint8_t)0x01) |
Definition at line 101 of file stm8s_eval_lcd.h.
Referenced by LCD_Clear(), and STM8S_EVAL_LCD_Init().
#define DISPLAY_OFF ((uint8_t)0x08) |
Definition at line 100 of file stm8s_eval_lcd.h.
#define DISPLAY_ON ((uint8_t)0x0C) |
Definition at line 99 of file stm8s_eval_lcd.h.
Referenced by STM8S_EVAL_LCD_Init().
#define ENTRY_MODE_SET_INC ((uint8_t)0x06) |
Definition at line 102 of file stm8s_eval_lcd.h.
Referenced by STM8S_EVAL_LCD_Init().
#define LCD_LINE1 ((uint8_t)0x80) |
Definition at line 90 of file stm8s_eval_lcd.h.
Referenced by LCD_Config(), main(), and sEE_TIMEOUT_UserCallback().
#define LCD_LINE2 ((uint8_t)0x90) |
Definition at line 91 of file stm8s_eval_lcd.h.
Referenced by LCD_Config(), LCD_Display(), main(), PrintLogo(), and sEE_TIMEOUT_UserCallback().
#define LCD_LINE_MAX_CHAR ((uint8_t)15) |
Definition at line 89 of file stm8s_eval_lcd.h.
Referenced by LCD_RollString().
#define SET_EXTENDED_INST ((uint8_t)0x34) |
Definition at line 97 of file stm8s_eval_lcd.h.
#define SET_GRAPHIC_MODE ((uint8_t)0x36) |
Definition at line 98 of file stm8s_eval_lcd.h.
#define SET_TEXT_MODE ((uint8_t)0x30) |
Definition at line 96 of file stm8s_eval_lcd.h.
Referenced by STM8S_EVAL_LCD_Init().
Function Documentation
void LCD_BacklightCmd | ( | FunctionalState | NewState | ) |
Enable or Disable the LCD backlight.
- Parameters:
-
NewState Backlight state
- Return values:
-
None
Definition at line 192 of file stm8s_eval_lcd.c.
References DISABLE, GPIO_WriteHigh(), GPIO_WriteLow(), LCD_BACKLIGHT_PIN, and LCD_BACKLIGHT_PORT.
void LCD_Clear | ( | void | ) |
Clear the LCD.
- Parameters:
-
None
- Return values:
-
None
Definition at line 245 of file stm8s_eval_lcd.c.
References _delay_, COMMAND_TYPE, DISPLAY_CLR, and LCD_SendByte().
Referenced by LCD_Config(), and main().
void LCD_DisplayLogo | ( | uint8_t | address | ) |
Display ST logo.
- Parameters:
-
address : Display address (LINE1:0x80-0x87 and LINE2:0x90-0x97)
- Return values:
-
None
Definition at line 330 of file stm8s_eval_lcd.c.
References LCD_DisplayCGRAM0(), LCD_DisplayCGRAM1(), S_CGRAM, and T_CGRAM.
Referenced by main(), and PrintLogo().
void LCD_Print | ( | uint8_t * | ptr | ) |
Display a string from current position of the LCD cursor.
- Parameters:
-
ptr : Pointer to the string to display
- Return values:
-
None
Definition at line 259 of file stm8s_eval_lcd.c.
References __IO, DATA_TYPE, and LCD_SendByte().
Referenced by LCD_Config(), LCD_Display(), main(), PrintLogo(), and sEE_TIMEOUT_UserCallback().
Display a string in rolling mode.
- Parameters:
-
Line : line used for displaying the text (LCD_LINE1 or LCD_LINE2) ptr : Pointer to the text to display speed : Rolling speed
- Return values:
-
None
Definition at line 279 of file stm8s_eval_lcd.c.
References _delay_, COMMAND_TYPE, DATA_TYPE, LCD_LINE_MAX_CHAR, and LCD_SendByte().
Send a byte to LCD.
- Parameters:
-
DataType Type of Data to be sent DataToSend Data to be sent
- Return values:
-
None
Definition at line 221 of file stm8s_eval_lcd.c.
References _delay_, LCD_NCS_HIGH, LCD_NCS_LOW, and LCD_SPISendByte().
Referenced by LCD_Clear(), LCD_DisplayCGRAM0(), LCD_DisplayCGRAM1(), LCD_Print(), LCD_RollString(), LCD_SetCursorPos(), and STM8S_EVAL_LCD_Init().
Set the LCD cursor to the specified location.
- Parameters:
-
Line : line where the cursor will be set (LCD_LINE1 or LCD_LINE2) Offset : is the position offset (only even position are supported)
- Return values:
-
None
Definition at line 210 of file stm8s_eval_lcd.c.
References COMMAND_TYPE, and LCD_SendByte().
Referenced by LCD_Config(), LCD_Display(), main(), PrintLogo(), and sEE_TIMEOUT_UserCallback().
void STM8S_EVAL_LCD_Init | ( | void | ) |
Initialize the LCD.
- Parameters:
-
None
- Return values:
-
None
Definition at line 148 of file stm8s_eval_lcd.c.
References _delay_, CLK_PeripheralClockConfig(), COMMAND_TYPE, DISPLAY_CLR, DISPLAY_ON, ENABLE, ENTRY_MODE_SET_INC, GPIO_Init(), GPIO_MODE_OUT_PP_LOW_FAST, LCD_BACKLIGHT_PIN, LCD_BACKLIGHT_PORT, LCD_NCS_GPIO_PORT, LCD_NCS_PIN, LCD_SendByte(), LCD_SPI_CLK, LCD_SPI_GPIO_PORT, LCD_SPI_MOSI_PIN, LCD_SPI_SCK_PIN, SET_TEXT_MODE, SPI_BAUDRATEPRESCALER_64, SPI_CLOCKPHASE_2EDGE, SPI_CLOCKPOLARITY_HIGH, SPI_Cmd(), SPI_DATADIRECTION_1LINE_TX, SPI_FIRSTBIT_MSB, SPI_Init(), SPI_MODE_MASTER, and SPI_NSS_SOFT.
Referenced by LCD_Config(), and main().