STM324xG_EVAL BSP User Manual: stm324xg_eval.c File Reference

STM3240G / STM3241G EVAL BSP Drivers

stm324xg_eval.c File Reference

This file provides a set of firmware functions to manage LEDs, push-buttons and COM ports available on STM324xG-EVAL evaluation board(MB786) RevB from STMicroelectronics. More...

#include "stm324xg_eval.h" #include "stm324xg_eval_io.h"

Go to the source code of this file.

Data Structures

struct  LCD_CONTROLLER_TypeDef

Defines

#define __STM324xG_EVAL_BSP_VERSION_MAIN   (0x02)
 STM324xG EVAL BSP Driver version number V2.2.1.
#define __STM324xG_EVAL_BSP_VERSION_SUB1   (0x02)
#define __STM324xG_EVAL_BSP_VERSION_SUB2   (0x01)
#define __STM324xG_EVAL_BSP_VERSION_RC   (0x00)
#define __STM324xG_EVAL_BSP_VERSION
#define FMC_BANK3_BASE   ((uint32_t)(0x60000000 | 0x08000000))
#define FMC_BANK3   ((LCD_CONTROLLER_TypeDef *) FMC_BANK3_BASE)
#define I2C_TIMEOUT   100 /*<! Value of Timeout when I2C communication fails */

Functions

static void I2Cx_Init (void)
 Initializes I2C HAL.
static void I2Cx_ITConfig (void)
 Configures I2C Interrupt.
static void I2Cx_Write (uint8_t Addr, uint8_t Reg, uint8_t Value)
 Writes a single data.
static uint8_t I2Cx_Read (uint8_t Addr, uint8_t Reg)
 Reads a single data.
static HAL_StatusTypeDef I2Cx_WriteMultiple (uint8_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length)
 Write a value in a register of the device through BUS in using DMA mode.
static HAL_StatusTypeDef I2Cx_ReadMultiple (uint8_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length)
 Reads multiple data.
static HAL_StatusTypeDef I2Cx_IsDeviceReady (uint16_t DevAddress, uint32_t Trials)
 Checks if target device is ready for communication.
static void I2Cx_Error (uint8_t Addr)
 Manages error callback by re-initializing I2C.
static void I2Cx_MspInit (void)
 Initializes I2C MSP.
static void FSMC_BANK3_WriteData (uint16_t Data)
 Writes register value.
static void FSMC_BANK3_WriteReg (uint8_t Reg)
 Writes register address.
static uint16_t FSMC_BANK3_ReadData (void)
 Reads register value.
static void FSMC_BANK3_Init (void)
 Initializes LCD IO.
static void FSMC_BANK3_MspInit (void)
 Initializes FSMC_BANK3 MSP.
void IOE_Init (void)
 Initializes IOE low level.
void IOE_ITConfig (void)
 Configures IOE low level Interrupt.
void IOE_Delay (uint32_t Delay)
 IOE delay.
void IOE_Write (uint8_t Addr, uint8_t Reg, uint8_t Value)
 IOE writes single data.
uint8_t IOE_Read (uint8_t Addr, uint8_t Reg)
 IOE reads single data.
uint16_t IOE_ReadMultiple (uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length)
 IOE reads multiple data.
void LCD_IO_Init (void)
 Initializes LCD low level.
void LCD_IO_WriteData (uint16_t Data)
 Writes data on LCD data register.
void LCD_IO_WriteMultipleData (uint8_t *pData, uint32_t Size)
 Write register value.
void LCD_IO_WriteReg (uint8_t Reg)
 Writes register on LCD register.
uint16_t LCD_IO_ReadData (uint16_t Reg)
 Reads data from LCD data register.
void AUDIO_IO_Init (void)
 Initializes Audio low level.
void AUDIO_IO_DeInit (void)
 DeInitializes Audio low level.
void AUDIO_IO_Write (uint8_t Addr, uint8_t Reg, uint8_t Value)
 Writes a single data.
uint8_t AUDIO_IO_Read (uint8_t Addr, uint8_t Reg)
 Reads a single data.
void CAMERA_IO_Init (void)
 Initializes Camera low level.
void CAMERA_IO_Write (uint8_t Addr, uint8_t Reg, uint8_t Value)
 Camera writes single data.
uint8_t CAMERA_IO_Read (uint8_t Addr, uint8_t Reg)
 Camera reads single data.
void CAMERA_Delay (uint32_t Delay)
 Camera delay.
void EEPROM_IO_Init (void)
 Initializes peripherals used by the I2C EEPROM driver.
HAL_StatusTypeDef EEPROM_IO_WriteData (uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize)
 Write data to I2C EEPROM driver in using DMA channel.
HAL_StatusTypeDef EEPROM_IO_ReadData (uint16_t DevAddress, uint16_t MemAddress, uint8_t *pBuffer, uint32_t BufferSize)
 Reads data from I2C EEPROM driver in using DMA channel.
HAL_StatusTypeDef EEPROM_IO_IsDeviceReady (uint16_t DevAddress, uint32_t Trials)
 Checks if target device is ready for communication.
uint32_t BSP_GetVersion (void)
 This method returns the STM324xG EVAL 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 Button_Mode)
 Configures button GPIO and EXTI Line.
uint32_t BSP_PB_GetState (Button_TypeDef Button)
 Returns the selected button state.
void BSP_COM_Init (COM_TypeDef COM, UART_HandleTypeDef *huart)
 Configures COM port.
uint8_t BSP_JOY_Init (JOYMode_TypeDef Joy_Mode)
 Configures joystick GPIO and EXTI modes.
JOYState_TypeDef BSP_JOY_GetState (void)
 Returns the current joystick status.

Variables

GPIO_TypeDef * GPIO_PORT [LEDn]
const uint16_t GPIO_PIN [LEDn]
GPIO_TypeDef * BUTTON_PORT [BUTTONn]
const uint16_t BUTTON_PIN [BUTTONn]
const uint16_t BUTTON_IRQn [BUTTONn]
USART_TypeDef * COM_USART [COMn] = {EVAL_COM1}
GPIO_TypeDef * COM_TX_PORT [COMn] = {EVAL_COM1_TX_GPIO_PORT}
GPIO_TypeDef * COM_RX_PORT [COMn] = {EVAL_COM1_RX_GPIO_PORT}
const uint16_t COM_TX_PIN [COMn] = {EVAL_COM1_TX_PIN}
const uint16_t COM_RX_PIN [COMn] = {EVAL_COM1_RX_PIN}
const uint16_t COM_TX_AF [COMn] = {EVAL_COM1_TX_AF}
const uint16_t COM_RX_AF [COMn] = {EVAL_COM1_RX_AF}
I2C_HandleTypeDef heval_I2c
static uint8_t Is_LCD_IO_Initialized = 0

Detailed Description

This file provides a set of firmware functions to manage LEDs, push-buttons and COM ports available on STM324xG-EVAL evaluation board(MB786) RevB from STMicroelectronics.

Author:
MCD Application Team
Version:
V2.2.1
Date:
15-January-2016
Attention:

© COPYRIGHT(c) 2016 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file stm324xg_eval.c.

Generated on Fri Jan 15 2016 14:22:29 for STM324xG_EVAL BSP User Manual by   doxygen 1.7.6.1