Environmental Shield API

Committer:
Deepti
Date:
Tue Aug 19 07:13:15 2014 +0000
Revision:
0:9e645e6ed2ce
Environment Shield API

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Deepti 0:9e645e6ed2ce 1 /**
Deepti 0:9e645e6ed2ce 2 ******************************************************************************
Deepti 0:9e645e6ed2ce 3 * @file UV.h
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 uv driver.
Deepti 0:9e645e6ed2ce 8 ******************************************************************************
Deepti 0:9e645e6ed2ce 9 * @attention
Deepti 0:9e645e6ed2ce 10 *
Deepti 0:9e645e6ed2ce 11 * <h2><center>&copy; 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 __UV_H
Deepti 0:9e645e6ed2ce 41 #define __UV_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 Power_Mode; /* Power-down/Sleep/Normal Mode */
Deepti 0:9e645e6ed2ce 53 uint8_t Output_DataRate; /* OUT data rate */
Deepti 0:9e645e6ed2ce 54 //uint8_t Reboot_Mode; /* Normal Mode/Reboot memory content */
Deepti 0:9e645e6ed2ce 55 //uint8_t DifferentialThreshold; /* Differential Threshold */
Deepti 0:9e645e6ed2ce 56 }UV_InitTypeDef;
Deepti 0:9e645e6ed2ce 57
Deepti 0:9e645e6ed2ce 58 /**
Deepti 0:9e645e6ed2ce 59 * @brief UV driver structure definition
Deepti 0:9e645e6ed2ce 60 */
Deepti 0:9e645e6ed2ce 61 typedef struct
Deepti 0:9e645e6ed2ce 62 {
Deepti 0:9e645e6ed2ce 63 void (*Init)(UV_InitTypeDef *);
Deepti 0:9e645e6ed2ce 64 uint8_t (*ReadID)(void);
Deepti 0:9e645e6ed2ce 65 void (*Reset)(void);
Deepti 0:9e645e6ed2ce 66 void (*ConfigIT)(uint16_t);
Deepti 0:9e645e6ed2ce 67 void (*EnableIT)(uint8_t);
Deepti 0:9e645e6ed2ce 68 void (*DisableIT)(uint8_t);
Deepti 0:9e645e6ed2ce 69 uint8_t (*ITStatus)(uint16_t, uint16_t);
Deepti 0:9e645e6ed2ce 70 void (*ClearIT)(uint16_t, uint16_t);
Deepti 0:9e645e6ed2ce 71 void (*GetIndex)(float *);
Deepti 0:9e645e6ed2ce 72 }UV_DrvTypeDef;
Deepti 0:9e645e6ed2ce 73
Deepti 0:9e645e6ed2ce 74
Deepti 0:9e645e6ed2ce 75 /**
Deepti 0:9e645e6ed2ce 76 * @}
Deepti 0:9e645e6ed2ce 77 */
Deepti 0:9e645e6ed2ce 78
Deepti 0:9e645e6ed2ce 79 #ifdef __cplusplus
Deepti 0:9e645e6ed2ce 80 }
Deepti 0:9e645e6ed2ce 81 #endif
Deepti 0:9e645e6ed2ce 82
Deepti 0:9e645e6ed2ce 83 #endif /* __UV_H */
Deepti 0:9e645e6ed2ce 84 /**
Deepti 0:9e645e6ed2ce 85 * @}
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 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Deepti 0:9e645e6ed2ce 98