aboutsummaryrefslogtreecommitdiff
path: root/src/nio.h
blob: 63b4997f9e829f3e07c7726fd88b178343b7c7de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
 * N: I/O
 */

#ifndef NIO_H
#define NIO_H

#define DFUJI   0x71
#define DREAD   0x40
#define DWRITE  0x80
#define DUPDATE 0xC0

#define OREAD   0x04
#define OWRITE  0x08
#define OUPDATE 0x0C

#define SUCCESS 1
#define DERROR  144

#define DVSTAT_BYTES_WATING_LO  0
#define DVSTAT_BYTES_WATING_HI  1
#define DVSTAT_PROTOCOL		    2 
#define DVSTAT_EXTENDED_ERROR	3

char nopen(void);
char nclose(void);
char nstatus(void);
char nread(char *buf, unsigned short len);
char nwrite(char *buf, unsigned short len);
char nreset(void);

/**
 * Send username and password credentials
 * @param devicespec - The devicespec.
 * @param login - The username to send
 * @param password - The password to send
 */
// unsigned char nlogin(char* devicespec, char* login, char* password);

#endif /* NIO_H */