Evironmental 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 #include "nucleo-f401re.h"
Deepti 1:d37d15b70bc5 2 #include "Envt_Shield_F4_API.h"
Deepti 1:d37d15b70bc5 3 /*#include "x_nucleo_ike01x1_hum_temp.h"
Deepti 0:9ac219c9a7df 4 #include "x_nucleo_ike01x1_pressure.h"
Deepti 1:d37d15b70bc5 5 #include "x_nucleo_ike01x1_uv.h"*/
Deepti 1:d37d15b70bc5 6
Deepti 1:d37d15b70bc5 7
Deepti 1:d37d15b70bc5 8 uint8_t Envt_Shield_API::Pressure_Init(void)
Deepti 1:d37d15b70bc5 9 {
Deepti 1:d37d15b70bc5 10 uint8_t ret= BSP_PRESSURE_Init();
Deepti 1:d37d15b70bc5 11 return ret;
Deepti 1:d37d15b70bc5 12 }
Deepti 1:d37d15b70bc5 13
Deepti 1:d37d15b70bc5 14 uint8_t Envt_Shield_API::Pressure_isInitialized(void)
Deepti 1:d37d15b70bc5 15 {
Deepti 1:d37d15b70bc5 16 uint8_t PressureInitialised=BSP_PRESSURE_isInitialized();
Deepti 1:d37d15b70bc5 17 return PressureInitialised;
Deepti 1:d37d15b70bc5 18 }
Deepti 1:d37d15b70bc5 19
Deepti 1:d37d15b70bc5 20 void Envt_Shield_API::Pressure_Reset(void)
Deepti 1:d37d15b70bc5 21 {
Deepti 1:d37d15b70bc5 22 BSP_PRESSURE_Reset();
Deepti 1:d37d15b70bc5 23 }
Deepti 1:d37d15b70bc5 24
Deepti 1:d37d15b70bc5 25 uint8_t Envt_Shield_API::Pressure_ReadID(void)
Deepti 1:d37d15b70bc5 26 {
Deepti 1:d37d15b70bc5 27 uint8_t id = BSP_PRESSURE_ReadID();
Deepti 1:d37d15b70bc5 28 return id;
Deepti 1:d37d15b70bc5 29 }
Deepti 1:d37d15b70bc5 30
Deepti 1:d37d15b70bc5 31 void Envt_Shield_API::Pressure_ITConfig(
Deepti 1:d37d15b70bc5 32 void/*PRESSURE_InterruptConfigTypeDef *pIntConfigStruct*/)
Deepti 1:d37d15b70bc5 33 {
Deepti 1:d37d15b70bc5 34 BSP_PRESSURE_ITConfig();
Deepti 1:d37d15b70bc5 35 }
Deepti 1:d37d15b70bc5 36
Deepti 1:d37d15b70bc5 37 void Envt_Shield_API::Pressure_EnableIT(uint8_t IntPin)
Deepti 1:d37d15b70bc5 38 {
Deepti 1:d37d15b70bc5 39 BSP_PRESSURE_EnableIT(IntPin);
Deepti 1:d37d15b70bc5 40 }
Deepti 1:d37d15b70bc5 41
Deepti 1:d37d15b70bc5 42 void Envt_Shield_API::Pressure_DisableIT(uint8_t IntPin)
Deepti 1:d37d15b70bc5 43 {
Deepti 1:d37d15b70bc5 44 BSP_PRESSURE_DisableIT(IntPin);
Deepti 1:d37d15b70bc5 45 }
Deepti 0:9ac219c9a7df 46
Deepti 1:d37d15b70bc5 47 void Envt_Shield_API::Pressure_GetPressure(float* pfData)
Deepti 1:d37d15b70bc5 48 {
Deepti 1:d37d15b70bc5 49 BSP_PRESSURE_GetPressure(pfData);
Deepti 1:d37d15b70bc5 50 }
Deepti 1:d37d15b70bc5 51
Deepti 1:d37d15b70bc5 52 void Envt_Shield_API::Pressure_GetTemperature(float* pfData)
Deepti 1:d37d15b70bc5 53 {
Deepti 1:d37d15b70bc5 54 BSP_PRESSURE_GetTemperature(pfData);
Deepti 1:d37d15b70bc5 55 }
Deepti 1:d37d15b70bc5 56
Deepti 1:d37d15b70bc5 57
Deepti 1:d37d15b70bc5 58 uint8_t Envt_Shield_API::Hum_Temp_Init(void)
Deepti 1:d37d15b70bc5 59 {
Deepti 1:d37d15b70bc5 60 uint8_t ret = BSP_HUM_TEMP_Init();
Deepti 1:d37d15b70bc5 61 return ret;
Deepti 1:d37d15b70bc5 62 }
Deepti 1:d37d15b70bc5 63
Deepti 1:d37d15b70bc5 64 uint8_t Envt_Shield_API::Hum_Temp_isInitialized(void)
Deepti 1:d37d15b70bc5 65 {
Deepti 1:d37d15b70bc5 66 uint8_t HumpTempInitialised=BSP_HUM_TEMP_isInitialized();
Deepti 1:d37d15b70bc5 67 return HumpTempInitialised;
Deepti 1:d37d15b70bc5 68 }
Deepti 0:9ac219c9a7df 69
Deepti 1:d37d15b70bc5 70 void Envt_Shield_API::Hum_Temp_Reset(void)
Deepti 1:d37d15b70bc5 71 {
Deepti 1:d37d15b70bc5 72 BSP_HUM_TEMP_Reset();
Deepti 1:d37d15b70bc5 73 }
Deepti 1:d37d15b70bc5 74
Deepti 1:d37d15b70bc5 75 uint8_t Envt_Shield_API::Hum_Temp_ReadID(void)
Deepti 0:9ac219c9a7df 76 {
Deepti 1:d37d15b70bc5 77 uint8_t id = BSP_HUM_TEMP_ReadID();
Deepti 1:d37d15b70bc5 78 return id;
Deepti 1:d37d15b70bc5 79 }
Deepti 1:d37d15b70bc5 80
Deepti 1:d37d15b70bc5 81 void Envt_Shield_API::Hum_Temp_ITConfig(
Deepti 1:d37d15b70bc5 82 void/*HUM_TEMP_InterruptConfigTypeDef *pIntConfig*/)
Deepti 1:d37d15b70bc5 83 {
Deepti 1:d37d15b70bc5 84 BSP_HUM_TEMP_ITConfig();
Deepti 1:d37d15b70bc5 85 }
Deepti 1:d37d15b70bc5 86
Deepti 1:d37d15b70bc5 87 void Envt_Shield_API::Hum_Temp_EnableIT(uint8_t IntPin)
Deepti 1:d37d15b70bc5 88 {
Deepti 1:d37d15b70bc5 89 BSP_HUM_TEMP_EnableIT(IntPin);
Deepti 1:d37d15b70bc5 90 }
Deepti 1:d37d15b70bc5 91
Deepti 1:d37d15b70bc5 92 void Envt_Shield_API::Hum_Temp_DisableIT(uint8_t IntPin)
Deepti 1:d37d15b70bc5 93 {
Deepti 1:d37d15b70bc5 94 BSP_HUM_TEMP_DisableIT(IntPin);
Deepti 0:9ac219c9a7df 95 }
Deepti 0:9ac219c9a7df 96
Deepti 1:d37d15b70bc5 97 void Envt_Shield_API::Hum_Temp_GetHumidity(float* pfData)
Deepti 1:d37d15b70bc5 98 {
Deepti 1:d37d15b70bc5 99 BSP_HUM_TEMP_GetHumidity(pfData);
Deepti 1:d37d15b70bc5 100 }
Deepti 1:d37d15b70bc5 101
Deepti 1:d37d15b70bc5 102 void Envt_Shield_API::Hum_Temp_GetTemperature(float* pfData)
Deepti 1:d37d15b70bc5 103 {
Deepti 1:d37d15b70bc5 104 BSP_HUM_TEMP_GetTemperature(pfData);
Deepti 1:d37d15b70bc5 105 }
Deepti 1:d37d15b70bc5 106
Deepti 1:d37d15b70bc5 107 void Envt_Shield_API::Hum_Temp_PowerOFF()
Deepti 1:d37d15b70bc5 108 {
Deepti 1:d37d15b70bc5 109 BSP_HUM_TEMP_PowerOFF();
Deepti 1:d37d15b70bc5 110 }
Deepti 1:d37d15b70bc5 111
Deepti 1:d37d15b70bc5 112 uint8_t Envt_Shield_API::UV_Init(void)
Deepti 1:d37d15b70bc5 113 {
Deepti 1:d37d15b70bc5 114 uint8_t ret = BSP_UV_Init();
Deepti 1:d37d15b70bc5 115 return ret;
Deepti 1:d37d15b70bc5 116 }
Deepti 1:d37d15b70bc5 117
Deepti 1:d37d15b70bc5 118 uint8_t Envt_Shield_API::UV_isInitialized(void)
Deepti 1:d37d15b70bc5 119 {
Deepti 1:d37d15b70bc5 120 uint8_t UvInitialized=BSP_UV_isInitialized();
Deepti 1:d37d15b70bc5 121 return UvInitialized;
Deepti 1:d37d15b70bc5 122 }
Deepti 1:d37d15b70bc5 123
Deepti 1:d37d15b70bc5 124 /**
Deepti 1:d37d15b70bc5 125 * @brief Read ID of Uv component
Deepti 1:d37d15b70bc5 126 * @param None
Deepti 1:d37d15b70bc5 127 * @retval ID
Deepti 1:d37d15b70bc5 128 */
Deepti 1:d37d15b70bc5 129 uint8_t Envt_Shield_API::UV_ReadID(void)
Deepti 0:9ac219c9a7df 130 {
Deepti 1:d37d15b70bc5 131 uint8_t id = BSP_UV_ReadID();
Deepti 1:d37d15b70bc5 132 return id;
Deepti 1:d37d15b70bc5 133 }
Deepti 1:d37d15b70bc5 134
Deepti 1:d37d15b70bc5 135 /**
Deepti 1:d37d15b70bc5 136 * @brief Reboot memory content of UV
Deepti 1:d37d15b70bc5 137 * @param None
Deepti 1:d37d15b70bc5 138 * @retval None
Deepti 1:d37d15b70bc5 139 */
Deepti 1:d37d15b70bc5 140 void Envt_Shield_API::UV_Reset(void)
Deepti 1:d37d15b70bc5 141 {
Deepti 1:d37d15b70bc5 142 BSP_UV_Reset();
Deepti 1:d37d15b70bc5 143 }
Deepti 1:d37d15b70bc5 144
Deepti 1:d37d15b70bc5 145
Deepti 1:d37d15b70bc5 146 /**
Deepti 1:d37d15b70bc5 147 * @brief Configure INT1 interrupt
Deepti 1:d37d15b70bc5 148 * @param pIntConfig: pointer to a UVIS3_InterruptConfig_TypeDef
Deepti 1:d37d15b70bc5 149 * structure that contains the configuration setting for the UVIS3 Interrupt.
Deepti 1:d37d15b70bc5 150 * @retval None
Deepti 1:d37d15b70bc5 151 */
Deepti 1:d37d15b70bc5 152 void Envt_Shield_API::UV_ITConfig(void/*UV_InterruptConfigTypeDef *pIntConfig*/)
Deepti 1:d37d15b70bc5 153 {
Deepti 1:d37d15b70bc5 154 BSP_UV_ITConfig();
Deepti 1:d37d15b70bc5 155 }
Deepti 1:d37d15b70bc5 156
Deepti 1:d37d15b70bc5 157 /**
Deepti 1:d37d15b70bc5 158 * @brief Enable INT1 or INT2 interrupt
Deepti 1:d37d15b70bc5 159 * @param IntPin: Interrupt pin
Deepti 1:d37d15b70bc5 160 * This parameter can be:
Deepti 1:d37d15b70bc5 161 * @arg UVIS3_INT1
Deepti 1:d37d15b70bc5 162 * @arg UVIS3_INT2
Deepti 1:d37d15b70bc5 163 * @retval None
Deepti 1:d37d15b70bc5 164 */
Deepti 1:d37d15b70bc5 165 void Envt_Shield_API::UV_EnableIT(uint8_t IntPin)
Deepti 1:d37d15b70bc5 166 {
Deepti 1:d37d15b70bc5 167 BSP_UV_EnableIT(IntPin);
Deepti 1:d37d15b70bc5 168 }
Deepti 1:d37d15b70bc5 169
Deepti 1:d37d15b70bc5 170 /**
Deepti 1:d37d15b70bc5 171 * @brief Disable INT1 or INT2 interrupt
Deepti 1:d37d15b70bc5 172 * @param IntPin: Interrupt pin
Deepti 1:d37d15b70bc5 173 * This parameter can be:
Deepti 1:d37d15b70bc5 174 * @arg UVIS3_INT1
Deepti 1:d37d15b70bc5 175 * @arg UVIS3_INT2
Deepti 1:d37d15b70bc5 176 * @retval None
Deepti 1:d37d15b70bc5 177 */
Deepti 1:d37d15b70bc5 178 void Envt_Shield_API::UV_DisableIT(uint8_t IntPin)
Deepti 1:d37d15b70bc5 179 {
Deepti 1:d37d15b70bc5 180 BSP_UV_DisableIT(IntPin);
Deepti 1:d37d15b70bc5 181 }
Deepti 1:d37d15b70bc5 182
Deepti 1:d37d15b70bc5 183 /**
Deepti 1:d37d15b70bc5 184 * @brief Get Index UV
Deepti 1:d37d15b70bc5 185 * @param pfData: pointer on floating data
Deepti 1:d37d15b70bc5 186 * @retval None
Deepti 1:d37d15b70bc5 187 */
Deepti 1:d37d15b70bc5 188 void Envt_Shield_API::UV_GetIndex(float* pfData)
Deepti 1:d37d15b70bc5 189 {
Deepti 1:d37d15b70bc5 190 BSP_UV_GetIndex(pfData);
Deepti 0:9ac219c9a7df 191 }