STM32756G_EVAL BSP User Manual: stm32756g_eval.c File Reference

STM32756G EVAL BSP Drivers

stm32756g_eval.c File Reference

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

#include "stm32756g_eval.h"

Go to the source code of this file.

Defines

#define __STM32756G_EVAL_BSP_VERSION_MAIN   (0x01)
 STM32756G EVAL BSP Driver version number V1.0.0.
#define __STM32756G_EVAL_BSP_VERSION_SUB1   (0x00)
#define __STM32756G_EVAL_BSP_VERSION_SUB2   (0x00)
#define __STM32756G_EVAL_BSP_VERSION_RC   (0x00)
#define __STM32756G_EVAL_BSP_VERSION

Functions

static void I2Cx_MspInit (void)
 Initializes I2C MSP.
static void I2Cx_Init (void)
 Initializes I2C HAL.
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_WriteMultiple (uint8_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length)
 Writes a value in a register of the device through BUS in using DMA mode.
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.
void AUDIO_IO_Init (void)
 Initializes Audio low level.
void AUDIO_IO_Write (uint8_t Addr, uint16_t Reg, uint16_t Value)
 Writes a single data.
uint16_t AUDIO_IO_Read (uint8_t Addr, uint16_t Reg)
 Reads a single data.
void AUDIO_IO_Delay (uint32_t Delay)
 AUDIO Codec delay.
void CAMERA_IO_Init (void)
 Initializes Camera low level.
void CAMERA_Delay (uint32_t Delay)
 Camera delay.
void CAMERA_IO_Write (uint8_t Addr, uint16_t Reg, uint16_t Value)
 Camera writes single data.
uint16_t CAMERA_IO_Read (uint8_t Addr, uint16_t Reg)
 Camera reads single data.
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)
 Read 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 STM32756G EVAL BSP Driver revision.
void BSP_LED_Init (Led_TypeDef Led)
 Configures LED on GPIO and/or on MFX.
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.
void BSP_COM_Init (COM_TypeDef COM, UART_HandleTypeDef *huart)
 Configures COM port.
void BSP_COM_DeInit (COM_TypeDef COM, UART_HandleTypeDef *huart)
 DeInit COM port.

Variables

const uint32_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}
static I2C_HandleTypeDef hEvalI2c

Detailed Description

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

Author:
MCD Application Team
Version:
V1.0.0
Date:
22-May-2015
            This driver requires the stm32756g_eval_io.c/.h files to manage the 
            IO module resources mapped on the MFX IO expander.
            These resources are mainly LEDs, Joystick push buttons, SD detect pin, 
            USB OTG power switch/over current drive pins, Camera plug pin, Audio
            INT pin
            The use of the above eval resources is conditioned by the "USE_IOEXPANDER"
            preprocessor define which is enabled by default for the STM327x6G-EVAL
            boards Rev A. However for Rev B boards these resources are disabled by default
            (except LED1 and LED2) and to be able to use them, user must add "USE_IOEXPANDER"
            define in the compiler preprocessor configuration (or any header file that
            is processed before stm32756g_eval.h).
            On the STM327x6G-EVAL RevB LED1 and LED2 are directly mapped on GPIO pins,
            to avoid the unnecessary overhead of code brought by the use of MFX IO 
            expander when no further evaluation board resources are needed by the 
            application/example.
            For precise details on the use of the MFX IO expander, you can refer to
            the description provided within the stm32756g_eval_io.c file header
  
Attention:

© COPYRIGHT(c) 2015 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 stm32756g_eval.c.

Generated on Fri May 22 2015 13:59:20 for STM32756G_EVAL BSP User Manual by   doxygen 1.7.6.1