7:5cf4034ba4e0 | 8:55021f3f1929 |
---|---|
5 #include "CircularBuffer.h" | 5 #include "CircularBuffer.h" |
6 | 6 |
7 /***** HP 34970A communication class ***/ | 7 /***** HP 34970A communication class ***/ |
8 | 8 |
9 #define MAX_ERRS 10 | 9 #define MAX_ERRS 10 |
10 #define MAX_BUFF 32 | 10 #define MAX_BUFF 16 |
11 #define BUF_SIZE 32 | 11 #define BUF_SIZE 16 |
12 | 12 |
13 class HPSerial { | 13 class HPSerial { |
14 | 14 |
15 public: | 15 public: |
16 enum TrState { | 16 enum TrState { |
27 unsigned long id; | 27 unsigned long id; |
28 } CMD; | 28 } CMD; |
29 | 29 |
30 | 30 |
31 | 31 |
32 HPSerial(); | 32 HPSerial(PinName rx, PinName tx); |
33 | 33 |
34 bool cmd_available(void); | 34 bool cmd_available(void); |
35 bool pop(CMD& cmd); | 35 bool pop(CMD& cmd); |
36 bool cmd_buf_full(void); | 36 bool cmd_buf_full(void); |
37 unsigned int nerrors(uint8_t errorno); | 37 unsigned int nerrors(uint8_t errorno); |