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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
| -
|
!
-
|
|
|
|
|
-
!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
-
!
| #pragma once
#include "common.h"
class OutBuffer{
private:
unsigned char channelID;
unsigned char output;
unsigned char pb;
unsigned char bits[BitsParChar];
unsigned char sampleIntervalCounter;
unsigned char status;
unsigned char stringOutputStatus;
unsigned char ledNo;
int strp;
int strl;
int sendingLength;
int sentLength;
int ackFlag;
unsigned char str[MaxInterFaceStrLen];
unsigned char allOrOne;
public:
OutBuffer(unsigned char id);
void clear(void);
unsigned char (*getPort[DirMax])(void);
unsigned char getStatus(void);
unsigned char getStringOutputStatus(void);
unsigned char isOutPutting(void);
unsigned char putChar(unsigned char c);
void putChar1(unsigned char c);
int putString(char *s);
void putStringStart( char *s);
int putStringEnd( char *s);
void putStringWaitPreviousOutput(void);
void putStringX(char *s);
void (*setPort[DirMax])(unsigned char s);
void (*setPortMode[DirMax])(unsigned char s);
void (*setPortX)( unsigned char s);
void (*setPortXMode)(unsigned char s);
void setPortConf(unsigned char ledn, void (* portf)(unsigned char x), unsigned char (* gportf)(void), void (* modef)(unsigned char x) );
void setPortXConf(void (* portf)(unsigned char x), void (* modef)(unsigned char x) );
void intrProcess(void);
void setLedNumber( unsigned char n);
void setLedOn( unsigned char n);
void setLedOff( unsigned char n);
void setLedNo(unsigned char ledNo);
void setPortXOn(void);
void setPortXOff(void);
void setStatus( unsigned char s);
void setAllOrOne( unsigned char allOrOne);
void setStringOutputStatus(unsigned char c);
void waitUntilOutputDone(void);
int waitForAck(void);
};
|