| BlueNRG-1 SDK drivers APIs

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

LPS25HB_hal.h
Go to the documentation of this file.
1
24 /* Define to prevent recursive inclusion -------------------------------------*/
25 #ifndef __LPS25HB_HAL_H
26 #define __LPS25HB_HAL_H
27
28 /* Includes ------------------------------------------------------------------*/
29 #include "SDK_EVAL_I2C.h"
30 #include "LPS25HB.h"
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36
80 #define LPS25HB_I2C_FREQUENCY (10000)
81
82
83 #ifdef BLUENRG1_I2C_DMA
84
85 #define LPS25HB_IO_Init() (PRESSURE_StatusTypeDef)SdkEvalI2CDmaInit(LPS25HB_I2C_FREQUENCY)
86 #define LPS25HB_IO_Write(pBuffer, DeviceAddr, RegisterAddr, NumByteToWrite) (PRESSURE_StatusTypeDef)SdkEvalI2CDmaWrite(pBuffer, DeviceAddr, RegisterAddr, NumByteToWrite)
87 #define LPS25HB_IO_Read(pBuffer, DeviceAddr, RegisterAddr, NumByteToRead) (PRESSURE_StatusTypeDef)SdkEvalI2CDmaRead(pBuffer, DeviceAddr, RegisterAddr, NumByteToRead)
88
89 #else
90 #ifdef BLUENRG1_I2C_IRQ
91
92 #define LPS25HB_IO_Init() (PRESSURE_StatusTypeDef)SdkEvalI2CIrqInit(LPS25HB_I2C_FREQUENCY)
93 #define LPS25HB_IO_Write(pBuffer, DeviceAddr, RegisterAddr, NumByteToWrite) (PRESSURE_StatusTypeDef)SdkEvalI2CIrqWrite(pBuffer, DeviceAddr, RegisterAddr, NumByteToWrite)
94 #define LPS25HB_IO_Read(pBuffer, DeviceAddr, RegisterAddr, NumByteToRead) (PRESSURE_StatusTypeDef)SdkEvalI2CIrqRead(pBuffer, DeviceAddr, RegisterAddr, NumByteToRead)
95
96 #else /* BLUENRG1_I2C_POLL */
97
98 #define LPS25HB_IO_Init() (PRESSURE_StatusTypeDef)SdkEvalI2CInit(LPS25HB_I2C_FREQUENCY)
99 #define LPS25HB_IO_Write(pBuffer, DeviceAddr, RegisterAddr, NumByteToWrite) (PRESSURE_StatusTypeDef)SdkEvalI2CWrite(pBuffer, DeviceAddr, RegisterAddr, NumByteToWrite)
100 #define LPS25HB_IO_Read(pBuffer, DeviceAddr, RegisterAddr, NumByteToRead) (PRESSURE_StatusTypeDef)SdkEvalI2CRead(pBuffer, DeviceAddr, RegisterAddr, NumByteToRead)
101
102 #endif /* BLUENRG1_I2C_IRQ */
103 #endif /* BLUENRG1_I2C_DMA */
104
105 #define LPS25HB_IO_ITConfig()
106
107
128 #ifdef __cplusplus
129 }
130 #endif
131
132 #endif
133
134 /******************* (C) COPYRIGHT 2015 STMicroelectronics *****END OF FILE****/
LPS25HB.h
This file contains definitions for the lps25hb.c firmware driver.
SDK_EVAL_I2C.h
This file provides all the low level API to manage I2C interface for eval board.