Environmental Shield API
BSP/Components/Common/pressure.h@0:9e645e6ed2ce, 2014-08-19 (annotated)
- Committer:
- Deepti
- Date:
- Tue Aug 19 07:13:15 2014 +0000
- Revision:
- 0:9e645e6ed2ce
Environment Shield API
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Deepti | 0:9e645e6ed2ce | 1 | /** |
Deepti | 0:9e645e6ed2ce | 2 | ****************************************************************************** |
Deepti | 0:9e645e6ed2ce | 3 | * @file pressure.c |
Deepti | 0:9e645e6ed2ce | 4 | * @author AST Robotics Team |
Deepti | 0:9e645e6ed2ce | 5 | * @version V0.0.1 |
Deepti | 0:9e645e6ed2ce | 6 | * @date 06-March-2014 |
Deepti | 0:9e645e6ed2ce | 7 | * @brief This header file contains the functions prototypes for the pressure driver. |
Deepti | 0:9e645e6ed2ce | 8 | ****************************************************************************** |
Deepti | 0:9e645e6ed2ce | 9 | * @attention |
Deepti | 0:9e645e6ed2ce | 10 | * |
Deepti | 0:9e645e6ed2ce | 11 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
Deepti | 0:9e645e6ed2ce | 12 | * |
Deepti | 0:9e645e6ed2ce | 13 | * Redistribution and use in source and binary forms, with or without modification, |
Deepti | 0:9e645e6ed2ce | 14 | * are permitted provided that the following conditions are met: |
Deepti | 0:9e645e6ed2ce | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
Deepti | 0:9e645e6ed2ce | 16 | * this list of conditions and the following disclaimer. |
Deepti | 0:9e645e6ed2ce | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Deepti | 0:9e645e6ed2ce | 18 | * this list of conditions and the following disclaimer in the documentation |
Deepti | 0:9e645e6ed2ce | 19 | * and/or other materials provided with the distribution. |
Deepti | 0:9e645e6ed2ce | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Deepti | 0:9e645e6ed2ce | 21 | * may be used to endorse or promote products derived from this software |
Deepti | 0:9e645e6ed2ce | 22 | * without specific prior written permission. |
Deepti | 0:9e645e6ed2ce | 23 | * |
Deepti | 0:9e645e6ed2ce | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Deepti | 0:9e645e6ed2ce | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Deepti | 0:9e645e6ed2ce | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Deepti | 0:9e645e6ed2ce | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Deepti | 0:9e645e6ed2ce | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Deepti | 0:9e645e6ed2ce | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Deepti | 0:9e645e6ed2ce | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Deepti | 0:9e645e6ed2ce | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Deepti | 0:9e645e6ed2ce | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Deepti | 0:9e645e6ed2ce | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Deepti | 0:9e645e6ed2ce | 34 | * |
Deepti | 0:9e645e6ed2ce | 35 | ****************************************************************************** |
Deepti | 0:9e645e6ed2ce | 36 | */ |
Deepti | 0:9e645e6ed2ce | 37 | |
Deepti | 0:9e645e6ed2ce | 38 | |
Deepti | 0:9e645e6ed2ce | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ |
Deepti | 0:9e645e6ed2ce | 40 | #ifndef __PRESSURE_H |
Deepti | 0:9e645e6ed2ce | 41 | #define __PRESSURE_H |
Deepti | 0:9e645e6ed2ce | 42 | |
Deepti | 0:9e645e6ed2ce | 43 | #ifdef __cplusplus |
Deepti | 0:9e645e6ed2ce | 44 | extern "C" { |
Deepti | 0:9e645e6ed2ce | 45 | #endif |
Deepti | 0:9e645e6ed2ce | 46 | |
Deepti | 0:9e645e6ed2ce | 47 | /* Includes ------------------------------------------------------------------*/ |
Deepti | 0:9e645e6ed2ce | 48 | #include <stdint.h> |
Deepti | 0:9e645e6ed2ce | 49 | |
Deepti | 0:9e645e6ed2ce | 50 | typedef struct |
Deepti | 0:9e645e6ed2ce | 51 | { |
Deepti | 0:9e645e6ed2ce | 52 | uint8_t OutputDataRate; |
Deepti | 0:9e645e6ed2ce | 53 | uint8_t PressureResolution; |
Deepti | 0:9e645e6ed2ce | 54 | uint8_t TemperatureResolution; |
Deepti | 0:9e645e6ed2ce | 55 | uint8_t DiffEnable; |
Deepti | 0:9e645e6ed2ce | 56 | uint8_t BlockDataUpdate; |
Deepti | 0:9e645e6ed2ce | 57 | uint8_t SPIMode; |
Deepti | 0:9e645e6ed2ce | 58 | }PRESSURE_InitTypeDef; |
Deepti | 0:9e645e6ed2ce | 59 | |
Deepti | 0:9e645e6ed2ce | 60 | |
Deepti | 0:9e645e6ed2ce | 61 | /** |
Deepti | 0:9e645e6ed2ce | 62 | * @brief PRESSURE driver structure definition |
Deepti | 0:9e645e6ed2ce | 63 | */ |
Deepti | 0:9e645e6ed2ce | 64 | typedef struct |
Deepti | 0:9e645e6ed2ce | 65 | { |
Deepti | 0:9e645e6ed2ce | 66 | void (*Init)(PRESSURE_InitTypeDef *); |
Deepti | 0:9e645e6ed2ce | 67 | void (*PowerOff)(void); |
Deepti | 0:9e645e6ed2ce | 68 | uint8_t (*ReadID)(void); |
Deepti | 0:9e645e6ed2ce | 69 | void (*Reset)(void); |
Deepti | 0:9e645e6ed2ce | 70 | void (*ConfigIT)(uint16_t); |
Deepti | 0:9e645e6ed2ce | 71 | void (*EnableIT)(uint8_t); |
Deepti | 0:9e645e6ed2ce | 72 | void (*DisableIT)(uint8_t); |
Deepti | 0:9e645e6ed2ce | 73 | uint8_t (*ITStatus)(uint16_t, uint16_t); |
Deepti | 0:9e645e6ed2ce | 74 | void (*ClearIT)(uint16_t, uint16_t); |
Deepti | 0:9e645e6ed2ce | 75 | void (*GetPressure)(float *); |
Deepti | 0:9e645e6ed2ce | 76 | void (*GetTemperature)(float *); |
Deepti | 0:9e645e6ed2ce | 77 | void (*SlaveAddrRemap)(uint8_t); |
Deepti | 0:9e645e6ed2ce | 78 | }PRESSURE_DrvTypeDef; |
Deepti | 0:9e645e6ed2ce | 79 | |
Deepti | 0:9e645e6ed2ce | 80 | |
Deepti | 0:9e645e6ed2ce | 81 | #ifdef __cplusplus |
Deepti | 0:9e645e6ed2ce | 82 | } |
Deepti | 0:9e645e6ed2ce | 83 | #endif |
Deepti | 0:9e645e6ed2ce | 84 | |
Deepti | 0:9e645e6ed2ce | 85 | #endif /* __PRESSURE_H */ |
Deepti | 0:9e645e6ed2ce | 86 | /** |
Deepti | 0:9e645e6ed2ce | 87 | * @} |
Deepti | 0:9e645e6ed2ce | 88 | */ |
Deepti | 0:9e645e6ed2ce | 89 | |
Deepti | 0:9e645e6ed2ce | 90 | /** |
Deepti | 0:9e645e6ed2ce | 91 | * @} |
Deepti | 0:9e645e6ed2ce | 92 | */ |
Deepti | 0:9e645e6ed2ce | 93 | |
Deepti | 0:9e645e6ed2ce | 94 | /** |
Deepti | 0:9e645e6ed2ce | 95 | * @} |
Deepti | 0:9e645e6ed2ce | 96 | */ |
Deepti | 0:9e645e6ed2ce | 97 | |
Deepti | 0:9e645e6ed2ce | 98 | |
Deepti | 0:9e645e6ed2ce | 99 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
Deepti | 0:9e645e6ed2ce | 100 |