STM32F4xx-Nucleo BSP User Manual
|
Functions | |
uint32_t | BSP_GetVersion (void) |
This method returns the STM32F4xx NUCLEO BSP Driver revision. | |
void | BSP_LED_Init (Led_TypeDef Led) |
Configures LED GPIO. | |
void | BSP_LED_DeInit (Led_TypeDef Led) |
DeInit LEDs. | |
void | BSP_LED_On (Led_TypeDef Led) |
Turns selected LED On. | |
void | BSP_LED_Off (Led_TypeDef Led) |
Turns selected LED Off. | |
void | BSP_LED_Toggle (Led_TypeDef Led) |
Toggles the selected LED. | |
void | BSP_PB_Init (Button_TypeDef Button, ButtonMode_TypeDef ButtonMode) |
Configures Button GPIO and EXTI Line. | |
void | BSP_PB_DeInit (Button_TypeDef Button) |
Push Button DeInit. | |
uint32_t | BSP_PB_GetState (Button_TypeDef Button) |
Returns the selected Button state. | |
uint8_t | BSP_JOY_Init (void) |
Configures joystick available on adafruit 1.8" TFT shield managed through ADC to detect motion. | |
void | BSP_JOY_DeInit (void) |
DeInit joystick GPIOs. | |
JOYState_TypeDef | BSP_JOY_GetState (void) |
Returns the Joystick key pressed. | |
static void | SPIx_WriteReadData (const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLegnth) |
SPI Write a byte to device. | |
static void | SPIx_Write (uint8_t Value) |
SPI Write a byte to device. | |
void | SD_IO_CSState (uint8_t val) |
Set the SD_CS pin. | |
void | SD_IO_WriteReadData (const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLength) |
Write a byte on the SD. | |
uint8_t | SD_IO_WriteByte (uint8_t Data) |
Writes a byte on the SD. | |
void | LCD_IO_WriteReg (uint8_t LCDReg) |
Writes command to select the LCD register. | |
void | LCD_IO_WriteData (uint8_t Data) |
Writes data to select the LCD register. | |
void | LCD_IO_WriteMultipleData (uint8_t *pData, uint32_t Size) |
Writes register value. | |
void | LCD_Delay (uint32_t Delay) |
Wait for loop in ms. | |
static void | ADCx_MspDeInit (ADC_HandleTypeDef *hadc) |
DeInitializes ADC MSP. |
Function Documentation
static void ADCx_MspDeInit | ( | ADC_HandleTypeDef * | hadc | ) | [static] |
DeInitializes ADC MSP.
- Note:
- ADC DeInit does not disable the GPIO clock
Definition at line 698 of file stm32f4xx_nucleo.c.
References NUCLEO_ADCx_CLK_DISABLE, NUCLEO_ADCx_GPIO_PIN, and NUCLEO_ADCx_GPIO_PORT.
Referenced by ADCx_DeInit().
uint32_t BSP_GetVersion | ( | void | ) |
This method returns the STM32F4xx NUCLEO BSP Driver revision.
- Return values:
-
version,: 0xXYZR (8bits for each decimal, R for RC)
Definition at line 179 of file stm32f4xx_nucleo.c.
References __STM32F4xx_NUCLEO_BSP_VERSION.
void BSP_JOY_DeInit | ( | void | ) |
DeInit joystick GPIOs.
- Note:
- JOY DeInit does not disable the Mfx, just set the Mfx pins in Off modee.
Definition at line 776 of file stm32f4xx_nucleo.c.
References ADCx_DeInit().
JOYState_TypeDef BSP_JOY_GetState | ( | void | ) |
Returns the Joystick key pressed.
- Note:
- To know which Joystick key is pressed we need to detect the voltage level on each key output
- None : 3.3 V / 4095
- SEL : 1.055 V / 1308
- DOWN : 0.71 V / 88
- LEFT : 3.0 V / 3720
- RIGHT : 0.595 V / 737
- UP : 1.65 V / 2046
- Return values:
-
JOYState_TypeDef,: Code of the Joystick key pressed.
Definition at line 793 of file stm32f4xx_nucleo.c.
References hnucleo_Adc, JOY_DOWN, JOY_LEFT, JOY_NONE, JOY_RIGHT, JOY_SEL, and JOY_UP.
uint8_t BSP_JOY_Init | ( | void | ) |
Configures joystick available on adafruit 1.8" TFT shield managed through ADC to detect motion.
- Return values:
-
Joystickstatus (0=> success, 1=> fail)
Definition at line 756 of file stm32f4xx_nucleo.c.
References ADCx_Init(), hnucleo_Adc, NUCLEO_ADCx_CHANNEL, and sConfig.
void BSP_LED_DeInit | ( | Led_TypeDef | Led | ) |
DeInit LEDs.
- Parameters:
-
Led,: LED to be de-init. This parameter can be one of the following values: - LED2
- Note:
- Led DeInit does not disable the GPIO clock nor disable the Mfx
Definition at line 215 of file stm32f4xx_nucleo.c.
void BSP_LED_Init | ( | Led_TypeDef | Led | ) |
Configures LED GPIO.
- Parameters:
-
Led,: Specifies the Led to be configured. This parameter can be one of following parameters: - LED2
Definition at line 190 of file stm32f4xx_nucleo.c.
References GPIO_PIN, GPIO_PORT, and LEDx_GPIO_CLK_ENABLE.
void BSP_LED_Off | ( | Led_TypeDef | Led | ) |
Turns selected LED Off.
- Parameters:
-
Led,: Specifies the Led to be set off. This parameter can be one of following parameters: - LED2
Definition at line 243 of file stm32f4xx_nucleo.c.
void BSP_LED_On | ( | Led_TypeDef | Led | ) |
Turns selected LED On.
- Parameters:
-
Led,: Specifies the Led to be set on. This parameter can be one of following parameters: - LED2
Definition at line 232 of file stm32f4xx_nucleo.c.
void BSP_LED_Toggle | ( | Led_TypeDef | Led | ) |
Toggles the selected LED.
- Parameters:
-
Led,: Specifies the Led to be toggled. This parameter can be one of following parameters: - LED2
Definition at line 254 of file stm32f4xx_nucleo.c.
void BSP_PB_DeInit | ( | Button_TypeDef | Button | ) |
Push Button DeInit.
- Parameters:
-
Button,: Button to be configured This parameter should be: BUTTON_KEY
- Note:
- PB DeInit does not disable the GPIO clock
Definition at line 306 of file stm32f4xx_nucleo.c.
References BUTTON_IRQn, BUTTON_PIN, and BUTTON_PORT.
uint32_t BSP_PB_GetState | ( | Button_TypeDef | Button | ) |
Returns the selected Button state.
- Parameters:
-
Button,: Specifies the Button to be checked. This parameter should be: BUTTON_KEY
- Return values:
-
The Button GPIO pin value.
Definition at line 321 of file stm32f4xx_nucleo.c.
References BUTTON_PIN, and BUTTON_PORT.
void BSP_PB_Init | ( | Button_TypeDef | Button, |
ButtonMode_TypeDef | ButtonMode | ||
) |
Configures Button GPIO and EXTI Line.
- Parameters:
-
Button,: Specifies the Button to be configured. This parameter should be: BUTTON_KEY ButtonMode,: 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 line with interrupt generation capability
Definition at line 269 of file stm32f4xx_nucleo.c.
References BUTTON_IRQn, BUTTON_MODE_EXTI, BUTTON_MODE_GPIO, BUTTON_PIN, BUTTON_PORT, and BUTTONx_GPIO_CLK_ENABLE.
void LCD_Delay | ( | uint32_t | Delay | ) |
void LCD_IO_WriteData | ( | uint8_t | Data | ) |
Writes data to select the LCD register.
This function must be used after st7735_WriteReg() function
- Parameters:
-
Data,: data to write to the selected register.
Definition at line 588 of file stm32f4xx_nucleo.c.
References LCD_CS_HIGH, LCD_CS_LOW, LCD_DC_HIGH, and SPIx_Write().
void LCD_IO_WriteMultipleData | ( | uint8_t * | pData, |
uint32_t | Size | ||
) |
Writes register value.
- Parameters:
-
pData,: Pointer on the register value Size,: Size of byte to transmit to the register
Definition at line 608 of file stm32f4xx_nucleo.c.
References hnucleo_Spi, LCD_CS_HIGH, LCD_CS_LOW, LCD_DC_HIGH, and SPIx_Write().
void LCD_IO_WriteReg | ( | uint8_t | LCDReg | ) |
Writes command to select the LCD register.
- Parameters:
-
LCDReg,: Address of the selected register.
Definition at line 568 of file stm32f4xx_nucleo.c.
References LCD_CS_HIGH, LCD_CS_LOW, LCD_DC_LOW, and SPIx_Write().
void SD_IO_CSState | ( | uint8_t | val | ) |
Set the SD_CS pin.
- Parameters:
-
val,: pin value.
Definition at line 498 of file stm32f4xx_nucleo.c.
References SD_CS_HIGH, and SD_CS_LOW.
uint8_t SD_IO_WriteByte | ( | uint8_t | Data | ) |
Writes a byte on the SD.
- Parameters:
-
Data,: byte to send.
Definition at line 526 of file stm32f4xx_nucleo.c.
References SPIx_WriteReadData().
Referenced by SD_IO_Init().
void SD_IO_WriteReadData | ( | const uint8_t * | DataIn, |
uint8_t * | DataOut, | ||
uint16_t | DataLength | ||
) |
Write a byte on the SD.
- Parameters:
-
DataIn,: value to be written DataOut,: value to be read DataLength,: length of data
Definition at line 516 of file stm32f4xx_nucleo.c.
References SPIx_WriteReadData().
static void SPIx_Write | ( | uint8_t | Value | ) | [static] |
SPI Write a byte to device.
- Parameters:
-
Value,: value to be written
Definition at line 427 of file stm32f4xx_nucleo.c.
References hnucleo_Spi, SPIx_Error(), and SpixTimeout.
Referenced by LCD_IO_WriteData(), LCD_IO_WriteMultipleData(), and LCD_IO_WriteReg().
static void SPIx_WriteReadData | ( | const uint8_t * | DataIn, |
uint8_t * | DataOut, | ||
uint16_t | DataLegnth | ||
) | [static] |
SPI Write a byte to device.
- Parameters:
-
DataIn,: value to be written DataOut,: value to be read DataLegnth,: length of data
Definition at line 409 of file stm32f4xx_nucleo.c.
References hnucleo_Spi, SPIx_Error(), and SpixTimeout.
Referenced by SD_IO_WriteByte(), and SD_IO_WriteReadData().
Generated on Fri Jan 20 2017 15:36:09 for STM32F4xx-Nucleo BSP User Manual by 1.7.6.1