WILLY BAYOT / stm32_adafruit

Dependents:   TDEMNucleo

Embed: (wiki syntax)

« Back to documentation index

STM32F4XX_NUCLEO_LOW_LEVEL_Private_Functions

STM32F4XX_NUCLEO_LOW_LEVEL_Private_Functions
[STM32F4XX_NUCLEO_LOW_LEVEL]

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_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.
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.
JOYState_TypeDef BSP_JOY_GetState (void)
 Returns the Joystick key pressed.
static void SPIx_MspInit (SPI_HandleTypeDef *hspi)
 Initializes SPI MSP.
static void SPIx_Init (void)
 Initializes SPI HAL.
static uint32_t SPIx_Read (void)
 SPI Read 4 bytes from device.
static void SPIx_Write (uint8_t Value)
 SPI Write a byte to device.
static void SPIx_Error (void)
 SPI error treatment function.
void SD_IO_Init (void)
 Initializes the SD Card and put it into StandBy State (Ready for data transfer).
void SD_IO_WriteByte (uint8_t Data)
 Writes a byte on the SD.
uint8_t SD_IO_ReadByte (void)
 Reads a byte from the SD.
HAL_StatusTypeDef SD_IO_WriteCmd (uint8_t Cmd, uint32_t Arg, uint8_t Crc, uint8_t Response)
 Sends 5 bytes command to the SD card and get response.
HAL_StatusTypeDef SD_IO_WaitResponse (uint8_t Response)
 Waits response from the SD card.
void SD_IO_WriteDummy (void)
 Sends dummy byte with CS High.
void LCD_IO_Init (void)
 Initializes the LCD.
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_Delay (uint32_t Delay)
 Wait for loop in ms.
static void ADCx_MspInit (ADC_HandleTypeDef *hadc)
 Initializes ADC MSP.
static void ADCx_Init (void)
 Initializes ADC HAL.

Function Documentation

static void ADCx_Init ( void   ) [static]

Initializes ADC HAL.

Parameters:
None
Return values:
None

Definition at line 675 of file stm32f4xx_nucleo.c.

static void ADCx_MspInit ( ADC_HandleTypeDef *  hadc ) [static]

Initializes ADC MSP.

Parameters:
None
Return values:
None

Definition at line 651 of file stm32f4xx_nucleo.c.

uint32_t BSP_GetVersion ( void   )

This method returns the STM32F4xx NUCLEO BSP Driver revision.

Parameters:
None
Return values:
version,:0xXYZR (8bits for each decimal, R for RC)

Definition at line 164 of file stm32f4xx_nucleo.c.

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 730 of file stm32f4xx_nucleo.c.

uint8_t BSP_JOY_Init ( void   )

Configures joystick available on adafruit 1.8" TFT shield managed through ADC to detect motion.

Parameters:
None
Return values:
Joystickstatus(0=> success, 1=> fail)

Definition at line 702 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
Return values:
None

Definition at line 176 of file stm32f4xx_nucleo.c.

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
Return values:
None

Definition at line 213 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
Return values:
None

Definition at line 201 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
Return values:
None

Definition at line 225 of file stm32f4xx_nucleo.c.

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:
TheButton GPIO pin value.

Definition at line 278 of file stm32f4xx_nucleo.c.

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
Return values:
None

Definition at line 241 of file stm32f4xx_nucleo.c.

void LCD_Delay ( uint32_t  Delay )

Wait for loop in ms.

Parameters:
Delayin ms.
Return values:
None

Definition at line 640 of file stm32f4xx_nucleo.c.

void LCD_IO_Init ( void   )

Initializes the LCD.

Parameters:
None
Return values:
None

Definition at line 568 of file stm32f4xx_nucleo.c.

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.
Return values:
None

Definition at line 620 of file stm32f4xx_nucleo.c.

void LCD_IO_WriteReg ( uint8_t  LCDReg )

Writes command to select the LCD register.

Parameters:
LCDReg,:Address of the selected register.
Return values:
None

Definition at line 599 of file stm32f4xx_nucleo.c.

void SD_IO_Init ( void   )

Initializes the SD Card and put it into StandBy State (Ready for data transfer).

Parameters:
None
Return values:
None

Definition at line 425 of file stm32f4xx_nucleo.c.

uint8_t SD_IO_ReadByte ( void   )

Reads a byte from the SD.

Parameters:
None
Return values:
Thereceived byte.

Definition at line 472 of file stm32f4xx_nucleo.c.

HAL_StatusTypeDef SD_IO_WaitResponse ( uint8_t  Response )

Waits response from the SD card.

Parameters:
Response,:Expected response from the SD card
Return values:
HAL_StatusTypeDefHAL Status

Definition at line 526 of file stm32f4xx_nucleo.c.

void SD_IO_WriteByte ( uint8_t  Data )

Writes a byte on the SD.

Parameters:
Data,:byte to send.
Return values:
None

Definition at line 461 of file stm32f4xx_nucleo.c.

HAL_StatusTypeDef SD_IO_WriteCmd ( uint8_t  Cmd,
uint32_t  Arg,
uint8_t  Crc,
uint8_t  Response 
)

Sends 5 bytes command to the SD card and get response.

Parameters:
Cmd,:The user expected command to send to SD card.
Arg,:The command argument
Crc,:The CRC
Response,:Expected response from the SD card
Return values:
HAL_StatusTypeDefHAL Status

Definition at line 491 of file stm32f4xx_nucleo.c.

void SD_IO_WriteDummy ( void   )

Sends dummy byte with CS High.

Parameters:
None
Return values:
None

Definition at line 553 of file stm32f4xx_nucleo.c.

static void SPIx_Error ( void   ) [static]

SPI error treatment function.

Parameters:
None
Return values:
None

Definition at line 405 of file stm32f4xx_nucleo.c.

static void SPIx_Init ( void   ) [static]

Initializes SPI HAL.

Parameters:
None
Return values:
None

Definition at line 327 of file stm32f4xx_nucleo.c.

static void SPIx_MspInit ( SPI_HandleTypeDef *  hspi ) [static]

Initializes SPI MSP.

Parameters:
None
Return values:
None

Definition at line 291 of file stm32f4xx_nucleo.c.

static uint32_t SPIx_Read ( void   ) [static]

SPI Read 4 bytes from device.

Parameters:
None
Return values:
Readdata

Definition at line 363 of file stm32f4xx_nucleo.c.

static void SPIx_Write ( uint8_t  Value ) [static]

SPI Write a byte to device.

Parameters:
Value,:value to be written
Return values:
None

Definition at line 386 of file stm32f4xx_nucleo.c.