STM32F0 Standard Peripheral bibliotheek
1.0
ST Microelectronics standard peripheral bibliotheek documentatie voor de STM32F0 familie
|
This file contains all the functions prototypes for the I2C firmware library. More...
#include "stm32f0xx.h"
Go to the source code of this file.
Data Structures | |
struct | I2C_InitTypeDef |
I2C Init structure definition. More... | |
Functions | |
void | I2C_DeInit (I2C_TypeDef *I2Cx) |
Deinitializes the I2Cx peripheral registers to their default reset values. More... | |
void | I2C_Init (I2C_TypeDef *I2Cx, I2C_InitTypeDef *I2C_InitStruct) |
Initializes the I2Cx peripheral according to the specified parameters in the I2C_InitStruct. More... | |
void | I2C_StructInit (I2C_InitTypeDef *I2C_InitStruct) |
Fills each I2C_InitStruct member with its default value. More... | |
void | I2C_Cmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables the specified I2C peripheral. More... | |
void | I2C_SoftwareResetCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables the specified I2C software reset. More... | |
void | I2C_ITConfig (I2C_TypeDef *I2Cx, uint32_t I2C_IT, FunctionalState NewState) |
Enables or disables the specified I2C interrupts. More... | |
void | I2C_StretchClockCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables the I2C Clock stretching. More... | |
void | I2C_StopModeCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables I2C wakeup from stop mode. More... | |
void | I2C_DualAddressCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables the I2C own address 2. More... | |
void | I2C_OwnAddress2Config (I2C_TypeDef *I2Cx, uint16_t Address, uint8_t Mask) |
Configures the I2C slave own address 2 and mask. More... | |
void | I2C_GeneralCallCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables the I2C general call mode. More... | |
void | I2C_SlaveByteControlCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables the I2C slave byte control. More... | |
void | I2C_SlaveAddressConfig (I2C_TypeDef *I2Cx, uint16_t Address) |
Configures the slave address to be transmitted after start generation. More... | |
void | I2C_10BitAddressingModeCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables the I2C 10-bit addressing mode for the master. More... | |
void | I2C_AutoEndCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables the I2C automatic end mode (stop condition is automatically sent when nbytes data are transferred). More... | |
void | I2C_ReloadCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables the I2C nbytes reload mode. More... | |
void | I2C_NumberOfBytesConfig (I2C_TypeDef *I2Cx, uint8_t Number_Bytes) |
Configures the number of bytes to be transmitted/received. More... | |
void | I2C_MasterRequestConfig (I2C_TypeDef *I2Cx, uint16_t I2C_Direction) |
Configures the type of transfer request for the master. More... | |
void | I2C_GenerateSTART (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Generates I2Cx communication START condition. More... | |
void | I2C_GenerateSTOP (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Generates I2Cx communication STOP condition. More... | |
void | I2C_10BitAddressHeaderCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables the I2C 10-bit header only mode with read direction. More... | |
void | I2C_AcknowledgeConfig (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Generates I2C communication Acknowledge. More... | |
uint8_t | I2C_GetAddressMatched (I2C_TypeDef *I2Cx) |
Returns the I2C slave matched address . More... | |
uint16_t | I2C_GetTransferDirection (I2C_TypeDef *I2Cx) |
Returns the I2C slave received request. More... | |
void | I2C_TransferHandling (I2C_TypeDef *I2Cx, uint16_t Address, uint8_t Number_Bytes, uint32_t ReloadEndMode, uint32_t StartStopMode) |
Handles I2Cx communication when starting transfer or during transfer (TC or TCR flag are set). More... | |
void | I2C_SMBusAlertCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables I2C SMBus alert. More... | |
void | I2C_ClockTimeoutCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables I2C Clock Timeout (SCL Timeout detection). More... | |
void | I2C_ExtendedClockTimeoutCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables I2C Extended Clock Timeout (SCL cumulative Timeout detection). More... | |
void | I2C_IdleClockTimeoutCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables I2C Idle Clock Timeout (Bus idle SCL and SDA high detection). More... | |
void | I2C_TimeoutAConfig (I2C_TypeDef *I2Cx, uint16_t Timeout) |
Configures the I2C Bus Timeout A (SCL Timeout when TIDLE = 0 or Bus idle SCL and SDA high when TIDLE = 1). More... | |
void | I2C_TimeoutBConfig (I2C_TypeDef *I2Cx, uint16_t Timeout) |
Configures the I2C Bus Timeout B (SCL cumulative Timeout). More... | |
void | I2C_CalculatePEC (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables I2C PEC calculation. More... | |
void | I2C_PECRequestCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables I2C PEC transmission/reception request. More... | |
uint8_t | I2C_GetPEC (I2C_TypeDef *I2Cx) |
Returns the I2C PEC. More... | |
uint32_t | I2C_ReadRegister (I2C_TypeDef *I2Cx, uint8_t I2C_Register) |
Reads the specified I2C register and returns its value. More... | |
void | I2C_SendData (I2C_TypeDef *I2Cx, uint8_t Data) |
Sends a data byte through the I2Cx peripheral. More... | |
uint8_t | I2C_ReceiveData (I2C_TypeDef *I2Cx) |
Returns the most recent received data by the I2Cx peripheral. More... | |
void | I2C_DMACmd (I2C_TypeDef *I2Cx, uint32_t I2C_DMAReq, FunctionalState NewState) |
Enables or disables the I2C DMA interface. More... | |
FlagStatus | I2C_GetFlagStatus (I2C_TypeDef *I2Cx, uint32_t I2C_FLAG) |
Checks whether the specified I2C flag is set or not. More... | |
void | I2C_ClearFlag (I2C_TypeDef *I2Cx, uint32_t I2C_FLAG) |
Clears the I2Cx's pending flags. More... | |
ITStatus | I2C_GetITStatus (I2C_TypeDef *I2Cx, uint32_t I2C_IT) |
Checks whether the specified I2C interrupt has occurred or not. More... | |
void | I2C_ClearITPendingBit (I2C_TypeDef *I2Cx, uint32_t I2C_IT) |
Clears the I2Cx's interrupt pending bits. More... | |
This file contains all the functions prototypes for the I2C firmware library.
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.