STM32F0xx Standard Peripherals Firmware Library: stm32f0xx_i2c_cpal_usercallback.c File Reference

STM32F0xx Standard Peripherals Library

I2C_TwoBoards/stm32f0xx_i2c_cpal_usercallback.c File Reference

This file provides all the CPAL UserCallback functions. More...

#include "main.h"

Go to the source code of this file.

Functions

uint8_t Buffer_Check (uint8_t *pBuffer, uint8_t *pBuffer1, uint8_t *pBuffer2, uint8_t *pBuffer3, uint16_t BufferLength)
 Compares a buffer to a list of buffers.
void CPAL_I2C_ERR_UserCallback (CPAL_DevTypeDef pDevInstance, uint32_t DeviceError)
 Manages Tx transfer event.
void CPAL_I2C_RXTC_UserCallback (CPAL_InitTypeDef *pDevInitStruct)
 Manages the End of Rx transfer event.
void CPAL_I2C_TXTC_UserCallback (CPAL_InitTypeDef *pDevInitStruct)
 Manages the End of Tx transfer event.
uint32_t CPAL_TIMEOUT_UserCallback (CPAL_InitTypeDef *pDevInitStruct)
 User callback that manages the Timeout error.
void Switch_Color (void)
 Swap the color of the line on LCD.
void Switch_ErrorColor (void)
 Swap the color of the line on LCD.

Variables

__IO uint32_t ActionState
uint32_t BufferSize
__IO uint32_t RecieverMode
CPAL_TransferTypeDef sRxStructure
CPAL_TransferTypeDef sTxStructure
uint8_t tRxBuffer []
const uint8_t tSignal1 []
const uint8_t tSignal2 []
const uint8_t tStateSignal []

Detailed Description

This file provides all the CPAL UserCallback functions.

Author:
MCD Application Team
Version:
V1.4.0
Date:
24-July-2014
Attention:

© COPYRIGHT 2014 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file I2C_TwoBoards/stm32f0xx_i2c_cpal_usercallback.c.


Function Documentation

void CPAL_I2C_ERR_UserCallback ( CPAL_DevTypeDef  pDevInstance,
uint32_t  DeviceError 
)

Manages Tx transfer event.

Parameters:
pDevInitStruct
Return values:
NoneManages Rx transfer event
Parameters:
pDevInitStruct
Return values:
NoneManages the End of DMA Tx transfer event
Parameters:
pDevInitStruct
Return values:
NoneManages the Half of DMA Tx transfer event
Parameters:
pDevInitStruct
Return values:
NoneManages Error of DMA Tx transfer event
Parameters:
pDevInitStruct
Return values:
NoneManages the End of DMA Rx transfer event
Parameters:
pDevInitStruct
Return values:
NoneManages the Half of DMA Rx transfer event
Parameters:
pDevInitStruct
Return values:
NoneManages Error of DMA Rx transfer event
Parameters:
pDevInitStruct
Return values:
NoneUser callback that manages the I2C device errors.
Note:
Make sure that the define USE_SINGLE_ERROR_CALLBACK is uncommented in the cpal_conf.h file, otherwise this callback will not be functional.
Parameters:
pDevInitStruct.
DeviceError.
Return values:
None

Definition at line 270 of file I2C_TwoBoards/stm32f0xx_i2c_cpal_usercallback.c.

References ACTION_NONE, ActionState, and Switch_ErrorColor().

void CPAL_I2C_RXTC_UserCallback ( CPAL_InitTypeDef *  pDevInitStruct)

Manages the End of Rx transfer event.

Parameters:
pDevInitStruct
Return values:
None

Definition at line 118 of file I2C_TwoBoards/stm32f0xx_i2c_cpal_usercallback.c.

References Buffer_Check(), BufferSize, i, MAX_BUFF_SIZE, MEASSAGE_EMPTY, RecieverMode, sRxStructure, Switch_Color(), tRxBuffer, tSignal1, tSignal2, and tStateSignal.

void CPAL_I2C_TXTC_UserCallback ( CPAL_InitTypeDef *  pDevInitStruct)

Manages the End of Tx transfer event.

Parameters:
pDevInitStruct
Return values:
None

Definition at line 97 of file I2C_TwoBoards/stm32f0xx_i2c_cpal_usercallback.c.

References ACTION_NONE, ActionState, MEASSAGE_EMPTY, and Switch_Color().

uint32_t CPAL_TIMEOUT_UserCallback ( CPAL_InitTypeDef *  pDevInitStruct)

User callback that manages the Timeout error.

Parameters:
pDevInitStruct
Return values:
None.

Definition at line 65 of file I2C_TwoBoards/stm32f0xx_i2c_cpal_usercallback.c.

References ACTION_NONE, ActionState, CPAL_I2C_TIMEOUT_DEFAULT, and Switch_ErrorColor().

STM32L1xx Standard Peripherals Library: Footer

 

 

 For complete documentation on STM32 Microcontrollers visit www.st.com/STM32