| BlueNRG-1 Peripherals drivers APIs

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

Macros | Functions
BlueNRG1_i2c.c File Reference

This file provides all the I2C firmware functions. More...

`#include "BlueNRG1_i2c.h"`

Go to the source code of this file.

## Macros

#define | I2C_CR_SM_STD (0x0)
#define | I2C_CR_SM_FAST (0x1)
#define | I2C_CLOCK (16000000)
#define | I2C_SLAVE_ADDR_EXT10_SMK (0x03FF)

## Functions

void | I2C_DeInit (I2C_Type *I2Cx)
| Deinitializes the I2C peripheral registers to their default reset values. More...
void | I2C_Init (I2C_Type *I2Cx, I2C_InitType *I2C_InitStruct)
| Initializes the I2Cx peripheral according to the specified parameters in the I2C_InitStruct. More...
void | I2C_StructInit (I2C_InitType *I2C_InitStruct)
| Fills the I2C_InitStruct with default values. More...
void | I2C_Cmd (I2C_Type *I2Cx, FunctionalState NewState)
| Enables or disables the specified I2C peripheral. More...
void | I2C_BeginTransaction (I2C_Type *I2Cx, I2C_TransactionType *tr)
| Start an I2C transaction sending the frame specified. More...
void | I2C_GeneralCallCmd (I2C_Type *I2Cx, FunctionalState NewState)
| Enables or disables the general call feature. More...
void | I2C_ITConfig (I2C_Type *I2Cx, uint32_t I2C_IT, FunctionalState NewState)
| Enables or disables the specified I2C interrupts. More...
void | I2C_FillTxFIFO (I2C_Type *I2Cx, uint8_t Data)
| Fills the Tx FIFO with the specified data byte. More...
uint8_t | I2C_ReceiveData (I2C_Type *I2Cx)
| Returns the most recent received data by the I2Cx peripheral. More...
void | I2C_FlushTx (I2C_Type *I2Cx)
| Returns the most recent received data by the I2Cx peripheral. More...
I2C_OpStatus | I2C_WaitFlushTx (I2C_Type *I2Cx)
| Return the status of the TX FIFO flush operation. More...
void | I2C_FlushRx (I2C_Type *I2Cx)
| Returns the most recent received data by the I2Cx peripheral. More...
I2C_OpStatus | I2C_WaitFlushRx (I2C_Type *I2Cx)
| Return the status of the RX FIFO flush operation. More...
void | I2C_SetTxThreshold (I2C_Type *I2Cx, uint16_t TxThres)
| Sets the transmit FIFO threshold by the I2Cx peripheral. More...
void | I2C_SetRxThreshold (I2C_Type *I2Cx, uint16_t RxThres)
| Sets the receive FIFO threshold by the I2Cx peripheral. More...
void | I2C_GenerateStopCondition (I2C_Type *I2Cx)
| Generate a stop condition. More...
void | I2C_SetHoldTime (I2C_Type *I2Cx, uint16_t I2C_HoldTime)
| Set the hold time value for data transfer. More...
void | I2C_SetHoldTimeStartCondition (I2C_Type *I2Cx, uint16_t I2C_HoldTime)
| Set the hold time value for start condition. More...
ITStatus | I2C_GetITStatus (I2C_Type *I2Cx, uint32_t I2C_IT)
| Checks whether the specified I2C interrupt has occurred or not. More...
ITStatus | I2C_GetITPendingBit (I2C_Type *I2Cx, uint32_t I2C_IT)
| Checks whether the specified I2C interrupt has occurred or not. More...
void | I2C_ClearITPendingBit (I2C_Type *I2Cx, uint32_t I2C_IT)
| Clears the I2Cx interrupt pending bits. More...
I2C_OpStatus | I2C_GetStatus (I2C_Type *I2Cx)
| Get the present state of the operation executed by I2C block. More...
void | I2C_DMACmd (I2C_Type *I2Cx, uint16_t I2C_DMAReq, FunctionalState NewState)
| Enables or disables the I2C DMA interface. More...
void | I2C_DMATxBurstMode (I2C_Type *I2Cx, FunctionalState NewState)
| Enables or disables the I2C TX DMA burst mode. More...
void | I2C_DMATxBurstSize (I2C_Type *I2Cx, uint8_t I2C_BurstSize)
| Set the number of burst of data. If this number is smaller than the transaction length, only one single request are generated. More...

## Detailed Description

This file provides all the I2C firmware functions.

Author
  VMA Application Team

Version
  V2.0.0

Date
  21-March-2016

Attention

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

##
© COPYRIGHT 2016 STMicroelectronics

Definition in file BlueNRG1_i2c.c.