#include "pic_utils.h"
#include "config.h"
Go to the source code of this file.
Defines | |
#define | __ds1631_h defined |
#define | ds1631_access_config 0xAC |
#define | ds1631_access_th 0xA1 |
#define | ds1631_access_tl 0xA2 |
#define | ds1631_bit_delay() delay_us(20) |
#define | ds1631_read_temp 0xAA |
#define | ds1631_software_por 0x54 |
#define | ds1631_start_convert 0x51 |
#define | ds1631_stop_convert 0x22 |
Functions | |
uns8 | convert_to_dec1 (uns8 data) |
uns8 | convert_to_dec2 (uns8 data) |
uns8 | convert_to_dec2b (uns8 data) |
void | ds1631_get_config () |
void | ds1631_get_temp () |
uns16 | ds1631_get_temp (uns8 control, uns8 command) |
uns8 | ds1631_read_and_ack (uns8 last) |
uns8 | ds1631_read_config (uns8 control, uns8 command) |
void | ds1631_set_config () |
void | ds1631_setup () |
void | ds1631_start () |
void | ds1631_stop () |
void | ds1631_write_and_ack (uns8 data) |
void | ds1631_write_config (uns8 control, uns8 command, uns8 data) |
void | ds1631_write_convert (uns8 control, uns8 command) |
#define ds1631_bit_delay | ( | ) | delay_us(20) |
Definition at line 31 of file ds1631.h.
Referenced by ds1631_read_and_ack(), ds1631_start(), ds1631_stop(), ds1631_write_and_ack(), and ds1631_write_byte().
void ds1631_get_config | ( | ) |
void ds1631_get_temp | ( | ) |
uns16 ds1631_get_temp | ( | uns8 | control, | |
uns8 | command | |||
) |
Definition at line 136 of file ds1631.c.
References ds1631_read_and_ack(), ds1631_start(), ds1631_stop(), ds1631_write_and_ack(), READ, uns16, and WRITE.
uns8 ds1631_read_and_ack | ( | uns8 | last | ) |
Definition at line 56 of file ds1631.c.
References change_pin, clear_pin, ds1631_bit_delay, ds1631_read_mode(), ds1631_write_mode(), set_pin, test_pin, and uns8.
Referenced by ds1631_get_temp(), and ds1631_read_config().
uns8 ds1631_read_config | ( | uns8 | control, | |
uns8 | command | |||
) |
Definition at line 118 of file ds1631.c.
References ds1631_read_and_ack(), ds1631_start(), ds1631_stop(), ds1631_write_and_ack(), READ, uns8, and WRITE.
void ds1631_set_config | ( | ) |
void ds1631_setup | ( | ) |
void ds1631_start | ( | ) |
Definition at line 15 of file ds1631.c.
References clear_pin, ds1631_bit_delay, ds1631_write_mode(), and set_pin.
Referenced by ds1631_get_temp(), ds1631_read_config(), ds1631_write_config(), and ds1631_write_convert().
void ds1631_stop | ( | ) |
Definition at line 29 of file ds1631.c.
References clear_pin, ds1631_bit_delay, ds1631_write_mode(), and set_pin.
Referenced by ds1631_get_temp(), ds1631_read_config(), ds1631_write_config(), and ds1631_write_convert().
void ds1631_write_and_ack | ( | uns8 | data | ) |
Definition at line 91 of file ds1631.c.
References clear_pin, ds1631_bit_delay, ds1631_read_mode(), ds1631_write_byte(), ds1631_write_mode(), and set_pin.
Referenced by ds1631_get_temp(), ds1631_read_config(), ds1631_write_config(), and ds1631_write_convert().
void ds1631_write_config | ( | uns8 | control, | |
uns8 | command, | |||
uns8 | data | |||
) |
Definition at line 106 of file ds1631.c.
References ds1631_start(), ds1631_stop(), ds1631_write_and_ack(), and WRITE.
void ds1631_write_convert | ( | uns8 | control, | |
uns8 | command | |||
) |
Definition at line 80 of file ds1631.c.
References ds1631_start(), ds1631_stop(), and ds1631_write_and_ack().