#include "sht15.h"
#include "pic_utils.h"
#include "pic_serial.h"
Go to the source code of this file.
Defines | |
#define | CHECK_HUMD 0b00000101 |
#define | CHECK_STAT 0b00000111 |
#define | CHECK_TEMP 0b00000011 |
#define | sht15_read_sda() set_bit(tris_array[sht15_sda_port - PORTA], sht15_sda_pin); |
#define | sht15_write_sda() clear_bit(tris_array[sht15_sda_port - PORTA], sht15_sda_pin); |
#define | WRITE_STAT 0b00000110 |
Functions | |
uns16 | sht15_fix_humidity (uns16 sensor_out) |
uns16 | sht15_fix_humidity_l (uns8 sensor_out) |
uns16 | sht15_fix_humidity_r (uns16 sensor_out) |
int16 | sht15_fix_temperature_h (uns16 sensor_out) |
void | sht15_read (void) |
uns16 | sht15_read_byte16 (void) |
uns16 | sht15_read_humidity (void) |
uns16 | sht15_read_temperature (void) |
void | sht15_send_byte (uns8 sht15_command) |
void | sht15_setup_io (void) |
void | sht15_start (void) |
#define CHECK_HUMD 0b00000101 |
Definition at line 46 of file sht15.c.
Referenced by sht15_read(), and sht15_read_humidity().
#define CHECK_TEMP 0b00000011 |
Definition at line 45 of file sht15.c.
Referenced by sht15_read(), and sht15_read_temperature().
#define sht15_read_sda | ( | ) | set_bit(tris_array[sht15_sda_port - PORTA], sht15_sda_pin); |
Definition at line 42 of file sht15.c.
Referenced by sht15_read_byte16(), and sht15_send_byte().
#define sht15_write_sda | ( | ) | clear_bit(tris_array[sht15_sda_port - PORTA], sht15_sda_pin); |
Definition at line 41 of file sht15.c.
Referenced by sht15_read_byte16(), sht15_send_byte(), and sht15_start().
uns16 sht15_fix_humidity | ( | uns16 | sensor_out | ) |
Definition at line 327 of file sht15.c.
Referenced by sht15_read().
uns16 sht15_fix_humidity_l | ( | uns8 | sensor_out | ) |
Definition at line 347 of file sht15.c.
References uns16.
Referenced by sht15_read_humidity().
uns16 sht15_fix_humidity_r | ( | uns16 | sensor_out | ) |
int16 sht15_fix_temperature_h | ( | uns16 | sensor_out | ) |
Definition at line 366 of file sht15.c.
References int16.
Referenced by sht15_read(), and sht15_read_temperature().
void sht15_read | ( | void | ) |
Definition at line 87 of file sht15.c.
References CHECK_HUMD, CHECK_TEMP, serial_print_int(), serial_print_str(), sht15_fix_humidity(), sht15_fix_temperature_h(), sht15_read_byte16(), sht15_send_byte(), sht15_start(), and uns16.
uns16 sht15_read_byte16 | ( | void | ) |
Definition at line 216 of file sht15.c.
References clear_pin, set_pin, sht15_read_sda, sht15_write_sda, test_pin, uns16, and uns8.
Referenced by sht15_read(), sht15_read_humidity(), and sht15_read_temperature().
uns16 sht15_read_humidity | ( | void | ) |
Definition at line 59 of file sht15.c.
References CHECK_HUMD, sht15_fix_humidity_l(), sht15_read_byte16(), sht15_send_byte(), sht15_start(), and uns16.
uns16 sht15_read_temperature | ( | void | ) |
Definition at line 71 of file sht15.c.
References CHECK_TEMP, serial_print_int(), serial_print_str(), sht15_fix_temperature_h(), sht15_read_byte16(), sht15_send_byte(), sht15_start(), and uns16.
void sht15_send_byte | ( | uns8 | sht15_command | ) |
Definition at line 118 of file sht15.c.
References change_pin, clear_pin, serial_print_int(), serial_print_str(), set_pin, sht15_read_sda, sht15_write_sda, test_pin, and uns8.
Referenced by sht15_read(), sht15_read_humidity(), and sht15_read_temperature().
void sht15_setup_io | ( | void | ) |
Definition at line 51 of file sht15.c.
References clear_pin, and make_output.
void sht15_start | ( | void | ) |
Definition at line 172 of file sht15.c.
References clear_pin, set_pin, and sht15_write_sda.
Referenced by sht15_read(), sht15_read_humidity(), and sht15_read_temperature().