STM8S/A Standard Peripherals Firmware Library
|
Functions | |
void | SD_LowLevel_DeInit (void) |
DeInitializes the SD/SD communication. | |
void | SD_LowLevel_Init (void) |
Initializes the SD_SPI and CS pins. | |
void | sEE_LowLevel_DeInit (void) |
DeInitializes peripherals used by the I2C EEPROM driver. | |
void | sEE_LowLevel_Init (void) |
Initializes peripherals used by the I2C EEPROM driver. | |
void | STM_EVAL_LEDInit (Led_TypeDef Led) |
Configures LED GPIO. | |
void | STM_EVAL_LEDOff (Led_TypeDef Led) |
Turns selected LED Off. | |
void | STM_EVAL_LEDOn (Led_TypeDef Led) |
Turns selected LED On. | |
void | STM_EVAL_LEDToggle (Led_TypeDef Led) |
Toggles the selected LED. | |
uint8_t | STM_EVAL_PBGetState (Button_TypeDef Button) |
Returns the selected Button state. | |
void | STM_EVAL_PBInit (Button_TypeDef Button, ButtonMode_TypeDef Button_Mode) |
Configures Button GPIO and EXTI Line. |
Function Documentation
void SD_LowLevel_DeInit | ( | void | ) |
DeInitializes the SD/SD communication.
- Parameters:
-
None
- Return values:
-
None
< SD_SPI disable
< SD_SPI Peripheral clock disable
< Configure SD_SPI pins: SCK
< Configure SD_SPI pins: MISO
< Configure SD_SPI pins: MOSI
< Configure SD_SPI_CS_PIN pin: SD Card CS pin
< Configure SD_SPI_DETECT_PIN pin: SD Card detect pin
Definition at line 211 of file stm8_128_eval.c.
References CLK_PeripheralClockConfig(), DISABLE, GPIO_Init(), GPIO_MODE_IN_FL_NO_IT, SD_CS_GPIO_PORT, SD_CS_PIN, SD_DETECT_GPIO_PORT, SD_DETECT_PIN, SD_SPI_CLK, SD_SPI_MISO_GPIO_PORT, SD_SPI_MISO_PIN, SD_SPI_MOSI_GPIO_PORT, SD_SPI_MOSI_PIN, SD_SPI_SCK_GPIO_PORT, SD_SPI_SCK_PIN, and SPI_Cmd().
Referenced by SD_DeInit().
void SD_LowLevel_Init | ( | void | ) |
Initializes the SD_SPI and CS pins.
- Parameters:
-
None
- Return values:
-
None
Definition at line 239 of file stm8_128_eval.c.
References CLK_PeripheralClockConfig(), ENABLE, GPIO_ExternalPullUpConfig(), GPIO_Init(), GPIO_MODE_OUT_PP_HIGH_SLOW, SD_CS_GPIO_PORT, SD_CS_PIN, SD_SPI_CLK, SD_SPI_MISO_PIN, SD_SPI_MOSI_PIN, SD_SPI_SCK_GPIO_PORT, SD_SPI_SCK_PIN, SPI_BAUDRATEPRESCALER_4, SPI_CLOCKPHASE_2EDGE, SPI_CLOCKPOLARITY_HIGH, SPI_Cmd(), SPI_DATADIRECTION_2LINES_FULLDUPLEX, SPI_FIRSTBIT_MSB, SPI_Init(), SPI_MODE_MASTER, and SPI_NSS_SOFT.
Referenced by SD_Init().
void sEE_LowLevel_DeInit | ( | void | ) |
DeInitializes peripherals used by the I2C EEPROM driver.
- Parameters:
-
None
- Return values:
-
None
< sEE_I2C Peripheral clock disable
< GPIO configuration
< Configure sEE_I2C pins: SCL
< Configure sEE_I2C pins: SDA
Definition at line 266 of file stm8_128_eval.c.
References CLK_PeripheralClockConfig(), DISABLE, GPIO_Init(), GPIO_MODE_IN_PU_NO_IT, I2C_Cmd(), I2C_DeInit(), sEE_I2C_CLK, sEE_I2C_SCL_GPIO_PORT, sEE_I2C_SCL_PIN, sEE_I2C_SDA_GPIO_PORT, and sEE_I2C_SDA_PIN.
Referenced by sEE_DeInit().
void sEE_LowLevel_Init | ( | void | ) |
Initializes peripherals used by the I2C EEPROM driver.
- Parameters:
-
None
- Return values:
-
None
< sEE_I2C Peripheral clock enable
Definition at line 290 of file stm8_128_eval.c.
References CLK_PeripheralClockConfig(), ENABLE, and sEE_I2C_CLK.
Referenced by sEE_Init().
void STM_EVAL_LEDInit | ( | Led_TypeDef | Led | ) |
Configures LED GPIO.
- Parameters:
-
Led,: Specifies the Led to be configured. This parameter can be one of following parameters: - LED1
- LED2
- LED3
- LED4
- Return values:
-
None
Definition at line 106 of file stm8_128_eval.c.
References GPIO_Init(), GPIO_MODE_OUT_PP_HIGH_FAST, and LED_PIN.
Referenced by GPIO_Config(), and main().
void STM_EVAL_LEDOff | ( | Led_TypeDef | Led | ) |
Turns selected LED Off.
- Parameters:
-
Led,: Specifies the Led to be set off. This parameter can be one of following parameters: - LED1
- LED2
- LED3
- LED4
- Return values:
-
None
Definition at line 137 of file stm8_128_eval.c.
References LED_PIN, and GPIO_struct::ODR.
Referenced by GPIO_Config(), INTERRUPT_HANDLER(), LED_Display(), and main().
void STM_EVAL_LEDOn | ( | Led_TypeDef | Led | ) |
Turns selected LED On.
- Parameters:
-
Led,: Specifies the Led to be set on. This parameter can be one of following parameters: - LED1
- LED2
- LED3
- LED4
- Return values:
-
None
Definition at line 122 of file stm8_128_eval.c.
References LED_PIN, and GPIO_struct::ODR.
Referenced by GPIO_Config(), LED_Display(), and main().
void STM_EVAL_LEDToggle | ( | Led_TypeDef | Led | ) |
Toggles the selected LED.
- Parameters:
-
Led,: Specifies the Led to be toggled. This parameter can be one of following parameters: - LED1
- LED2
- LED3
- LED4
- Return values:
-
None
Definition at line 152 of file stm8_128_eval.c.
References LED_PIN, and GPIO_struct::ODR.
Referenced by INTERRUPT_HANDLER(), and main().
uint8_t STM_EVAL_PBGetState | ( | Button_TypeDef | Button | ) |
Returns the selected Button state.
- Parameters:
-
Button,: Specifies the Button to be checked. This parameter can be one of following parameters: - BUTTON_KEY: Key Push Button
- BUTTON_RIGHT: Joystick Right Push Button
- BUTTON_LEFT: Joystick Left Push Button
- BUTTON_UP: Joystick Up Push Button
- BUTTON_DOWN: Joystick Down Push Button
- BUTTON_SEL: Joystick Sel Push Button
- Return values:
-
The Button GPIO pin value.
Definition at line 200 of file stm8_128_eval.c.
References BUTTON_PIN, and GPIO_ReadInputPin().
Referenced by INTERRUPT_HANDLER(), and ReadJoystick().
void STM_EVAL_PBInit | ( | Button_TypeDef | Button, |
ButtonMode_TypeDef | Button_Mode | ||
) |
Configures Button GPIO and EXTI Line.
- Parameters:
-
Button,: Specifies the Button to be configured. This parameter can be one of following parameters: - BUTTON_KEY: Key Push Button
- BUTTON_RIGHT: Joystick Right Push Button
- BUTTON_LEFT: Joystick Left Push Button
- BUTTON_UP: Joystick Up Push Button
- BUTTON_DOWN: Joystick Down Push Button
- BUTTON_SEL: Joystick Sel Push Button
Button_Mode,: Specifies Button mode. This parameter can be one of following parameters: - BUTTON_MODE_GPIO: Button will be used as simple IO
- BUTTON_MODE_EXTI: Button will be connected to EXTI pin (sensitive to falling trigger)
- Return values:
-
None
Definition at line 173 of file stm8_128_eval.c.
References BUTTON_EXTI, BUTTON_MODE_EXTI, BUTTON_PIN, EXTI_SENSITIVITY_FALL_LOW, EXTI_SetExtIntSensitivity(), GPIO_Init(), GPIO_MODE_IN_FL_IT, and GPIO_MODE_IN_FL_NO_IT.
Referenced by GPIO_Config().