-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathAbstractPL1167.h
More file actions
39 lines (28 loc) · 861 Bytes
/
Copy pathAbstractPL1167.h
File metadata and controls
39 lines (28 loc) · 861 Bytes
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
/*
* AbstractPL1167.h
*
* Created on: 29 May 2015
* Author: henryk
*/
#ifdef ARDUINO
#include "Arduino.h"
#else
#include <stdint.h>
#include <stdlib.h>
#endif
#ifndef ABSTRACTPL1167_H_
#define ABSTRACTPL1167_H_
class AbstractPL1167 {
public:
virtual int open() = 0;
virtual int setPreambleLength(uint8_t preambleLength) = 0;
virtual int setSyncword(uint16_t syncword0, uint16_t syncword3) = 0;
virtual int setTrailerLength(uint8_t trailerLength) = 0;
virtual int setMaxPacketLength(uint8_t maxPacketLength) = 0;
virtual int setCRC(bool crc) = 0;
virtual int writeFIFO(const uint8_t data[], size_t data_length) = 0;
virtual int transmit(uint8_t channel) = 0;
virtual int receive(uint8_t channel) = 0;
virtual int readFIFO(uint8_t data[], size_t &data_length) = 0;
};
#endif /* ABSTRACTPL1167_H_ */