CLEON
Version 1
Cloud-Offloaded GPS Receiver
|
Sensors related functions. More...
Go to the source code of this file.
Data Structures | |
struct | sensors_s |
union | cleon_sensor_data_u |
Macros | |
#define | SIZE_OF_SENSOR_DATA_IN_BYTE 8 |
#define | SHT11_SDA_SET_TO_OUTPUT_PIN() (SENSOR_SHT11_PORT(DIR) |= BV(SENSOR_SHT11_SDA_PIN)) /* SDA Output=0 */ |
#define | SHT11_SDA_SET_TO_INPUT_PIN() (SENSOR_SHT11_PORT(DIR) &= ~BV(SENSOR_SHT11_SDA_PIN)) /* SDA Input */ |
#define | SHT11_IS_SDA_HIGH (SENSOR_SHT11_PORT(IN) & BV(SENSOR_SHT11_SDA_PIN)) |
#define | SHT11_SCL_LOW() (SENSOR_SHT11_PORT(OUT) &= ~BV(SENSOR_SHT11_SCL_PIN)) /* SCL Output=0 */ |
#define | SHT11_SCL_HIGH() (SENSOR_SHT11_PORT(OUT) |= BV(SENSOR_SHT11_SCL_PIN)) /* SCL Output=1 */ |
#define | SHT11_TIMING_DELAY(n) |
#define | STATUS_REG_W 0x06 |
#define | STATUS_REG_R 0x07 |
#define | MEASURE_TEMP 0x03 |
#define | MEASURE_HUMI 0x05 |
#define | RESET 0x1E |
Functions | |
void | SYS_SENSORS_Init (void) |
Initializing sensors. | |
void | SYS_SENSORS_SHT11_Init (void) |
Initializing SHT11 (Humidity & Temperature sensor) | |
void | SYS_SENSORS_SHT11_On (void) |
Turn SHT11 on. | |
void | SYS_SENSORS_SHT11_Off (void) |
Turn SHT11 off. | |
unsigned int | SYS_SENSORS_SHT11_ReadTemperature (void) |
Read SHT11 temperature. | |
unsigned int | SYS_SENSORS_SHT11_ReadHumidity (void) |
Read SHT11 humidity. | |
unsigned int | SYS_SENSORS_SHT11_Command (unsigned char ucCommand) |
Transmit command to SHT11. | |
void | SYS_SENSORS_S1087_Init (void) |
Initializing light sensor S1087 (PAR) | |
unsigned int | SYS_SENSORS_S1087_Read (void) |
Read sensor value of S1087 (PAR) | |
void | SYS_SENSORS_S108701_Init (void) |
Initializing light sensor S1087-01 (TSR) | |
unsigned int | SYS_SENSORS_S108701_Read (void) |
Read sensor value of S1087-01 (TSR) | |
Sensors related functions.
Definition in file sys_sensors.h.
#define MEASURE_HUMI 0x05 |
Definition at line 34 of file sys_sensors.h.
#define MEASURE_TEMP 0x03 |
Definition at line 33 of file sys_sensors.h.
#define RESET 0x1E |
Definition at line 35 of file sys_sensors.h.
#define SHT11_IS_SDA_HIGH (SENSOR_SHT11_PORT(IN) & BV(SENSOR_SHT11_SDA_PIN)) |
Definition at line 18 of file sys_sensors.h.
#define SHT11_SCL_HIGH | ( | ) | (SENSOR_SHT11_PORT(OUT) |= BV(SENSOR_SHT11_SCL_PIN)) /* SCL Output=1 */ |
Definition at line 21 of file sys_sensors.h.
#define SHT11_SCL_LOW | ( | ) | (SENSOR_SHT11_PORT(OUT) &= ~BV(SENSOR_SHT11_SCL_PIN)) /* SCL Output=0 */ |
Definition at line 20 of file sys_sensors.h.
#define SHT11_SDA_SET_TO_INPUT_PIN | ( | ) | (SENSOR_SHT11_PORT(DIR) &= ~BV(SENSOR_SHT11_SDA_PIN)) /* SDA Input */ |
Definition at line 17 of file sys_sensors.h.
#define SHT11_SDA_SET_TO_OUTPUT_PIN | ( | ) | (SENSOR_SHT11_PORT(DIR) |= BV(SENSOR_SHT11_SDA_PIN)) /* SDA Output=0 */ |
Definition at line 16 of file sys_sensors.h.
#define SHT11_TIMING_DELAY | ( | n | ) |
Definition at line 24 of file sys_sensors.h.
#define SIZE_OF_SENSOR_DATA_IN_BYTE 8 |
Definition at line 10 of file sys_sensors.h.
#define STATUS_REG_R 0x07 |
Definition at line 32 of file sys_sensors.h.
#define STATUS_REG_W 0x06 |
Definition at line 31 of file sys_sensors.h.
void SYS_SENSORS_Init | ( | void | ) |
Initializing sensors.
void |
Definition at line 126 of file sys_sensors.c.
void SYS_SENSORS_S108701_Init | ( | void | ) |
Initializing light sensor S1087-01 (TSR)
void |
Definition at line 73 of file sys_sensors.c.
unsigned int SYS_SENSORS_S108701_Read | ( | void | ) |
Read sensor value of S1087-01 (TSR)
void |
Definition at line 88 of file sys_sensors.c.
void SYS_SENSORS_S1087_Init | ( | void | ) |
Initializing light sensor S1087 (PAR)
void |
Definition at line 24 of file sys_sensors.c.
unsigned int SYS_SENSORS_S1087_Read | ( | void | ) |
Read sensor value of S1087 (PAR)
void |
Definition at line 39 of file sys_sensors.c.
unsigned int SYS_SENSORS_SHT11_Command | ( | unsigned char | ucCommand | ) |
Transmit command to SHT11.
ucCommand | - command to be transmitted |
Definition at line 352 of file sys_sensors.c.
void SYS_SENSORS_SHT11_Init | ( | void | ) |
Initializing SHT11 (Humidity & Temperature sensor)
- SHT11 requires 11ms after power on
void |
Definition at line 142 of file sys_sensors.c.
void SYS_SENSORS_SHT11_Off | ( | void | ) |
Turn SHT11 off.
void |
Definition at line 217 of file sys_sensors.c.
void SYS_SENSORS_SHT11_On | ( | void | ) |
Turn SHT11 on.
void |
Definition at line 200 of file sys_sensors.c.
unsigned int SYS_SENSORS_SHT11_ReadHumidity | ( | void | ) |
Read SHT11 humidity.
void |
Definition at line 177 of file sys_sensors.c.
unsigned int SYS_SENSORS_SHT11_ReadTemperature | ( | void | ) |
Read SHT11 temperature.
void |
Definition at line 155 of file sys_sensors.c.