Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
humid_sht.h File Reference
#include "std.h"
+ Include dependency graph for humid_sht.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DAT_PIN   30
 
#define SCK_PIN   4
 
#define noACK   0
 
#define ACK   1
 
#define TEMP   0
 
#define HUMI   1
 
#define STATUS_REG_W   0x06
 
#define STATUS_REG_R   0x07
 
#define MEASURE_TEMP   0x03
 
#define MEASURE_HUMI   0x05
 
#define RESET   0x1e
 
#define DATA_INIT   (IO0DIR &= ~(_BV(DAT_PIN)); IO0CLR=_BV(DAT_PIN))
 
#define DATA_SET   (IO0DIR &= ~(_BV(DAT_PIN)))
 
#define DATA_CLR   (IO0DIR |= _BV(DAT_PIN))
 
#define DATA_IN   ((IO0PIN & _BV(DAT_PIN))>>DAT_PIN)
 
#define SCK_INIT   (IO0DIR=_BV(SCK_PIN); IO0CLR=_BV(SCK_PIN))
 
#define SCK_SET   (IO0SET=_BV(SCK_PIN))
 
#define SCK_CLR   (IO0CLR=_BV(SCK_PIN))
 
#define SHT_IDLE   0
 
#define SHT_MEASURING_HUMID   1
 
#define SHT_MEASURING_TEMP   2
 

Functions

void humid_sht_init (void)
 
void humid_sht_periodic (void)
 

Variables

uint16_t humidsht
 
uint16_t tempsht
 
float fhumidsht
 
float ftempsht
 
bool_t humid_sht_available
 
uint8_t humid_sht_status
 

Macro Definition Documentation

#define ACK   1

Definition at line 26 of file humid_sht.h.

Referenced by s_measure(), s_read_measure(), and s_read_statusreg().

#define DAT_PIN   30

Definition at line 13 of file humid_sht.h.

Referenced by humid_sht_init().

#define DATA_CLR   (IO0DIR |= _BV(DAT_PIN))

Definition at line 47 of file humid_sht.h.

Referenced by s_read_byte(), s_transstart(), and s_write_byte().

#define DATA_IN   ((IO0PIN & _BV(DAT_PIN))>>DAT_PIN)

Definition at line 49 of file humid_sht.h.

Referenced by s_measure(), s_read_byte(), s_read_measure(), and s_write_byte().

#define DATA_INIT   (IO0DIR &= ~(_BV(DAT_PIN)); IO0CLR=_BV(DAT_PIN))

Definition at line 43 of file humid_sht.h.

#define DATA_SET   (IO0DIR &= ~(_BV(DAT_PIN)))

Definition at line 45 of file humid_sht.h.

Referenced by s_connectionreset(), s_read_byte(), s_transstart(), and s_write_byte().

#define HUMI   1

Definition at line 28 of file humid_sht.h.

Referenced by humid_sht_periodic(), s_measure(), and s_start_measure().

#define MEASURE_HUMI   0x05

Definition at line 38 of file humid_sht.h.

Referenced by s_measure(), and s_start_measure().

#define MEASURE_TEMP   0x03

Definition at line 36 of file humid_sht.h.

Referenced by s_measure(), and s_start_measure().

#define noACK   0

Definition at line 25 of file humid_sht.h.

Referenced by s_measure(), s_read_measure(), and s_read_statusreg().

#define SCK_CLR   (IO0CLR=_BV(SCK_PIN))

Definition at line 56 of file humid_sht.h.

Referenced by s_connectionreset(), s_read_byte(), s_transstart(), and s_write_byte().

#define SCK_INIT   (IO0DIR=_BV(SCK_PIN); IO0CLR=_BV(SCK_PIN))

Definition at line 52 of file humid_sht.h.

#define SCK_PIN   4

Definition at line 20 of file humid_sht.h.

Referenced by humid_sht_init().

#define SCK_SET   (IO0SET=_BV(SCK_PIN))

Definition at line 54 of file humid_sht.h.

Referenced by s_connectionreset(), s_read_byte(), s_transstart(), and s_write_byte().

#define SHT_IDLE   0

Definition at line 58 of file humid_sht.h.

Referenced by humid_sht_init(), and humid_sht_periodic().

#define SHT_MEASURING_HUMID   1

Definition at line 59 of file humid_sht.h.

Referenced by humid_sht_periodic().

#define SHT_MEASURING_TEMP   2

Definition at line 60 of file humid_sht.h.

Referenced by humid_sht_periodic().

#define STATUS_REG_R   0x07

Definition at line 34 of file humid_sht.h.

Referenced by s_read_statusreg().

#define STATUS_REG_W   0x06

Definition at line 32 of file humid_sht.h.

Referenced by s_write_statusreg().

#define TEMP   0

Definition at line 27 of file humid_sht.h.

Referenced by humid_sht_periodic(), s_measure(), and s_start_measure().

Function Documentation

void humid_sht_init ( void  )
void humid_sht_periodic ( void  )

Variable Documentation

float fhumidsht

Definition at line 23 of file humid_sht.c.

Referenced by humid_sht_periodic().

float ftempsht

Definition at line 23 of file humid_sht.c.

Referenced by humid_hih_periodic(), and humid_sht_periodic().

bool_t humid_sht_available

Definition at line 24 of file humid_sht.c.

Referenced by humid_sht_init(), and humid_sht_periodic().

uint8_t humid_sht_status

Definition at line 25 of file humid_sht.c.

Referenced by humid_sht_init(), and humid_sht_periodic().

uint16_t humidsht

Definition at line 22 of file humid_sht.c.

Referenced by humid_sht_periodic().

uint16_t tempsht

Definition at line 22 of file humid_sht.c.

Referenced by humid_sht_periodic().