STM32F3xx-Nucleo BSP User Manual: Link Operation functions

STM32F3xx-Nucleo BSP Drivers

STM32F3xx-Nucleo BSP User Manual
Link Operation functions

Functions

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.
void SD_IO_Init (void)
 Initializes the SD Card and put it into StandBy State (Ready for data transfer).
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_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.
uint8_t SD_IO_WriteByte (uint8_t Data)
 Writes a byte on the SD.
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_IO_WriteMultipleData (uint8_t *pData, uint32_t Size)
 Write register value.
void LCD_Delay (uint32_t Delay)
 Wait for loop in ms.
static void ADCx_MspInit (ADC_HandleTypeDef *hadc)
 Initializes ADC MSP.
static void ADCx_MspDeInit (ADC_HandleTypeDef *hadc)
 DeInitializes ADC MSP.
static HAL_StatusTypeDef ADCx_Init (void)
 Initializes ADC HAL.
static void ADCx_DeInit (void)
 Initializes ADC HAL.

Function Documentation

static void ADCx_DeInit ( void  ) [static]

Initializes ADC HAL.

Return values:
None

Definition at line 919 of file stm32f3xx_nucleo.c.

References ADCx_MspDeInit(), and hnucleo_Adc.

Referenced by BSP_JOY_DeInit().

static HAL_StatusTypeDef ADCx_Init ( void  ) [static]

Initializes ADC HAL.

Return values:
None

Definition at line 860 of file stm32f3xx_nucleo.c.

References ADCx_MspInit(), and hnucleo_Adc.

Referenced by BSP_JOY_Init().

static void ADCx_MspDeInit ( ADC_HandleTypeDef *  hadc) [static]

DeInitializes ADC MSP.

Note:
ADC DeInit does not disable the GPIO clock
Return values:
None

Definition at line 840 of file stm32f3xx_nucleo.c.

References NUCLEO_ADCx_GPIO_PIN, and NUCLEO_ADCx_GPIO_PORT.

Referenced by ADCx_DeInit().

static void ADCx_MspInit ( ADC_HandleTypeDef *  hadc) [static]

Initializes ADC MSP.

Return values:
None

Definition at line 813 of file stm32f3xx_nucleo.c.

References NUCLEO_ADCx_GPIO_CLK_ENABLE, NUCLEO_ADCx_GPIO_PIN, and NUCLEO_ADCx_GPIO_PORT.

Referenced by ADCx_Init().

void BSP_JOY_DeInit ( void  )

DeInit joystick GPIOs.

Note:
JOY DeInit does not disable the Mfx, just set the Mfx pins in Off mode
Return values:
None.

Definition at line 963 of file stm32f3xx_nucleo.c.

References ADCx_DeInit().

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 980 of file stm32f3xx_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 934 of file stm32f3xx_nucleo.c.

References ADCx_Init(), hnucleo_Adc, and sConfig.

void LCD_Delay ( uint32_t  Delay)

Wait for loop in ms.

Parameters:
Delayin ms.
Return values:
None

Definition at line 801 of file stm32f3xx_nucleo.c.

void LCD_IO_Init ( void  )

Initializes the LCD.

Return values:
None

Definition at line 672 of file stm32f3xx_nucleo.c.

References LCD_CS_GPIO_CLK_ENABLE, LCD_CS_HIGH, LCD_CS_PIN, LCD_DC_GPIO_CLK_ENABLE, LCD_DC_GPIO_PORT, LCD_DC_PIN, SD_CS_GPIO_PORT, and SPIx_Init().

void LCD_IO_WriteData ( uint8_t  Data)

Writes data to select the LCD register.

This function must be used after st7735_WriteReg() function

Parameters:
Datadata to write to the selected register.
Return values:
None

Definition at line 724 of file stm32f3xx_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 
)

Write register value.

Parameters:
pDataPointer on the register value
SizeSize of byte to transmit to the register
Return values:
None

Definition at line 745 of file stm32f3xx_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:
LCDRegAddress of the selected register.
Return values:
None

Definition at line 703 of file stm32f3xx_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:
valpin value.
Return values:
None

Definition at line 534 of file stm32f3xx_nucleo.c.

References SD_CS_HIGH, and SD_CS_LOW.

void SD_IO_Init ( void  )

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

Return values:
None

Definition at line 498 of file stm32f3xx_nucleo.c.

References SD_CS_GPIO_CLK_ENABLE, SD_CS_GPIO_PORT, SD_CS_HIGH, SD_CS_PIN, SD_DUMMY_BYTE, SD_IO_WriteByte(), and SPIx_Init().

uint8_t SD_IO_ReadByte ( void  )

Reads a byte from the SD.

Return values:
Thereceived byte.

Definition at line 565 of file stm32f3xx_nucleo.c.

References SPIx_Read().

Referenced by SD_IO_WaitResponse().

HAL_StatusTypeDef SD_IO_WaitResponse ( uint8_t  Response)

Waits response from the SD card.

Parameters:
ResponseExpected response from the SD card
Return values:
HAL_StatusTypeDefHAL Status

Definition at line 619 of file stm32f3xx_nucleo.c.

References SD_IO_ReadByte().

Referenced by SD_IO_WriteCmd().

uint8_t SD_IO_WriteByte ( uint8_t  Data)

Writes a byte on the SD.

Parameters:
Databyte to send.
Return values:
None

Definition at line 646 of file stm32f3xx_nucleo.c.

References SPIx_WriteReadData().

Referenced by SD_IO_Init(), SD_IO_WriteCmd(), and SD_IO_WriteDummy().

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:
CmdThe user expected command to send to SD card.
ArgThe command argument.
CrcThe CRC.
ResponseExpected response from the SD card
Return values:
HAL_StatusTypeDefHAL Status

Definition at line 584 of file stm32f3xx_nucleo.c.

References SD_CS_LOW, SD_IO_WaitResponse(), SD_IO_WriteByte(), and SD_NO_RESPONSE_EXPECTED.

void SD_IO_WriteDummy ( void  )

Sends dummy byte with CS High.

Return values:
None

Definition at line 658 of file stm32f3xx_nucleo.c.

References SD_CS_HIGH, SD_DUMMY_BYTE, and SD_IO_WriteByte().

void SD_IO_WriteReadData ( const uint8_t *  DataIn,
uint8_t *  DataOut,
uint16_t  DataLength 
)

Write a byte on the SD.

Parameters:
DataInbyte to be written
DataOutread value
DataLengthlength of data value
Return values:
None

Definition at line 553 of file stm32f3xx_nucleo.c.

References SPIx_WriteReadData().

Generated on Wed May 31 2017 10:59:20 for STM32F3xx-Nucleo BSP User Manual by   doxygen 1.7.6.1