| BlueNRG-1 SDK drivers APIs

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

SDK_EVAL_I2C.h
Go to the documentation of this file.
1
23 /* Define to prevent recursive inclusion -------------------------------------*/
24 #ifndef __SDK_EVAL_I2C_H
25 #define __SDK_EVAL_I2C_H
26
27 /* Includes ------------------------------------------------------------------*/
28 #include "BlueNRG1.h"
29 #include "BlueNRG1_conf.h"
30 #include "SDK_EVAL_Config.h"
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36
62 #define I2C_BUFF_SIZE (10)
63
67 #define DMA_CH_I2C_TX SDK_EVAL_I2C_DMA_TX
68
72 #define DMA_CH_I2C_TX_IT_TC SDK_EVAL_I2C_DMA_TX_ITTC
73
77 #define DMA_CH_I2C_RX SDK_EVAL_I2C_DMA_RX
78
82 #define DMA_CH_I2C_RX_IT_TC SDK_EVAL_I2C_DMA_RX_ITTC
83
84
85
103 ErrorStatus SdkEvalI2CInit(uint32_t baudrate);
104 ErrorStatus SdkEvalI2CWrite(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint8_t NumByteToWrite);
105 ErrorStatus SdkEvalI2CRead(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint8_t NumByteToRead);
106
107 ErrorStatus SdkEvalI2CDmaInit(uint32_t baudrate);
108 ErrorStatus SdkEvalI2CDmaWrite(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint8_t NumByteToWrite);
109 ErrorStatus SdkEvalI2CDmaRead(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint8_t NumByteToRead);
110 void DmaI2CHandlerCallback(void);
111
112 ErrorStatus SdkEvalI2CIrqInit(uint32_t baudrate);
113 ErrorStatus SdkEvalI2CIrqWrite(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint8_t NumByteToWrite);
114 ErrorStatus SdkEvalI2CIrqRead(uint8_t* pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint8_t NumByteToRead);
115 void IrqI2CHandlerCallback(void);
116
132 #ifdef __cplusplus
133 }
134 #endif
135
136 #endif
137
138 /******************* (C) COPYRIGHT 2015 STMicroelectronics *****END OF FILE****/
SDK_EVAL_Config.h
This file contains SDK EVAL configuration and useful defines.
SdkEvalI2CIrqWrite
ErrorStatus SdkEvalI2CIrqWrite(uint8_t *pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint8_t NumByteToWrite)
I2C function to write registers of a slave device.
Definition: SDK_EVAL_I2C.c:595
SdkEvalI2CRead
ErrorStatus SdkEvalI2CRead(uint8_t *pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint8_t NumByteToRead)
I2C function to read registers from a slave device.
Definition: SDK_EVAL_I2C.c:219
SdkEvalI2CWrite
ErrorStatus SdkEvalI2CWrite(uint8_t *pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint8_t NumByteToWrite)
I2C function to write registers of a slave device.
Definition: SDK_EVAL_I2C.c:171
SdkEvalI2CInit
ErrorStatus SdkEvalI2CInit(uint32_t baudrate)
Configures I2C interface.
Definition: SDK_EVAL_I2C.c:126
DmaI2CHandlerCallback
void DmaI2CHandlerCallback(void)
I2C DMA ISR callback function.
Definition: SDK_EVAL_I2C.c:503
SdkEvalI2CIrqInit
ErrorStatus SdkEvalI2CIrqInit(uint32_t baudrate)
Configures I2C interface.
Definition: SDK_EVAL_I2C.c:540
IrqI2CHandlerCallback
void IrqI2CHandlerCallback(void)
I2C DMA ISR callback function.
Definition: SDK_EVAL_I2C.c:694
SdkEvalI2CDmaInit
ErrorStatus SdkEvalI2CDmaInit(uint32_t baudrate)
Configures I2C interface and the I2C_TX/I2C_RX DMA channels.
Definition: SDK_EVAL_I2C.c:288
SdkEvalI2CIrqRead
ErrorStatus SdkEvalI2CIrqRead(uint8_t *pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint8_t NumByteToRead)
I2C function to read registers from a slave device.
Definition: SDK_EVAL_I2C.c:637
SdkEvalI2CDmaWrite
ErrorStatus SdkEvalI2CDmaWrite(uint8_t *pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint8_t NumByteToWrite)
I2C function to write registers of a slave device.
Definition: SDK_EVAL_I2C.c:366
SdkEvalI2CDmaRead
ErrorStatus SdkEvalI2CDmaRead(uint8_t *pBuffer, uint8_t DeviceAddr, uint8_t RegisterAddr, uint8_t NumByteToRead)
I2C function to read registers from a slave device.
Definition: SDK_EVAL_I2C.c:421