2
#ifndef _INCLUDE_RW3600_H_
3
#define _INCLUDE_RW3600_H_
14
#include <sys/types.h>
23
/* Generic functions */
25
int eeprom_read(WEATHERSTATION ws, unsigned char *buf, size_t count);
26
int eeprom_seek(WEATHERSTATION ws, off_t pos);
28
WEATHERSTATION open_weatherstation(const char *device);
29
void close_weatherstation(WEATHERSTATION ws);
31
int read_data(WEATHERSTATION ws, int number,
32
unsigned char *readdata);
34
int write_data(WEATHERSTATION ws, int address, int number,
35
unsigned char *writedata);
38
void read_next_byte_seq(WEATHERSTATION ws);
39
void read_last_byte_seq(WEATHERSTATION ws);
41
int read_bit(WEATHERSTATION ws);
42
void write_bit(WEATHERSTATION ws,int bit);
43
int read_byte(WEATHERSTATION ws);
44
int write_byte(WEATHERSTATION ws,int byte);
45
void print_log(int log_level, char* str);
47
void sleep_short(int milliseconds);
48
void set_DTR(WEATHERSTATION ws, int val);
49
void set_RTS(WEATHERSTATION ws, int val);
50
int get_DSR(WEATHERSTATION ws);
51
int get_CTS(WEATHERSTATION ws);
59
#endif /* _INCLUDE_RW3600_H_ */