~awuerl/klimalogger/klimalogger

« back to all changes in this revision

Viewing changes to source/lib/hardware/eeprom/open3600/eeprom.h

  • Committer: Andreas Würl
  • Date: 2010-11-17 15:54:27 UTC
  • Revision ID: awuerl@gmx.net-20101117155427-yiscgpq5xjruss8j
deleted all content

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
#ifndef _INCLUDE_RW3600_H_
3
 
#define _INCLUDE_RW3600_H_ 
4
 
 
5
 
#include "linux3600.h"
6
 
 
7
 
#include <string.h>
8
 
#include <fcntl.h>
9
 
#include <stdio.h>
10
 
#include <time.h>
11
 
#include <stdlib.h>
12
 
#include <stdbool.h>
13
 
#include <math.h>
14
 
#include <sys/types.h>
15
 
#include <sys/stat.h>
16
 
 
17
 
#ifdef __cplusplus
18
 
extern "C" {
19
 
#endif
20
 
 
21
 
#define MAXRETRIES          20
22
 
 
23
 
/* Generic functions */
24
 
 
25
 
int eeprom_read(WEATHERSTATION ws, unsigned char *buf, size_t count);
26
 
int eeprom_seek(WEATHERSTATION ws, off_t pos);
27
 
 
28
 
WEATHERSTATION open_weatherstation(const char *device);
29
 
void close_weatherstation(WEATHERSTATION ws);
30
 
 
31
 
int read_data(WEATHERSTATION ws, int number,
32
 
                          unsigned char *readdata);
33
 
                          
34
 
int write_data(WEATHERSTATION ws, int address, int number,
35
 
                           unsigned char *writedata);
36
 
 
37
 
 
38
 
void read_next_byte_seq(WEATHERSTATION ws);
39
 
void read_last_byte_seq(WEATHERSTATION ws);
40
 
 
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);
46
 
 
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);
52
 
long calibrate();
53
 
void nanodelay();
54
 
 
55
 
#ifdef __cplusplus
56
 
}
57
 
#endif
58
 
 
59
 
#endif /* _INCLUDE_RW3600_H_ */
60