Deepti AST / Envt_Shield_API
Committer:
Deepti
Date:
Tue Aug 19 07:00:40 2014 +0000
Revision:
1:d37d15b70bc5
Parent:
0:9ac219c9a7df
Environment Shield API;

Who changed what in which revision?

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