LevelMeter-Display  2.0
An ultrasonic Level Meter for Stormwater Cisterns
adeunis.h
Go to the documentation of this file.
1 
23 #ifndef ADEUNIS_H_
24 #define ADEUNIS_H_
25 
26 #include <stdbool.h>
27 
28 #define ADEUNIS_REQ 0x52
29 #define ADEUNIS_CFM 0x43
30 #define ADEUNIS_IND 0x69
31 #define ADEUNIS_RES 0x72
32 
33 #define LMX9830_READY 0x25
34 #define SPP_INCOMING_LINK_ESTABLISHED 0x0c
35 #define SPP_LINK_RELEASED 0x0e
36 #define SPP_TRANSPARENT_MODE 0x11
37 
43 typedef struct
44 {
45  uint8_t packetType;
46  uint8_t opcode;
47  uint8_t dataLengthL;
48 
59  uint8_t dataLengthH;
60  uint8_t checksum;
61  uint8_t data[];
62 } BTPacket_t;
63 
66 typedef struct
67 {
68  bool haveBT;
70  uint8_t remoteAddress[6];
71  uint8_t localPort;
72  uint8_t unknTelCnt;
73 } BTStatus_t;
74 
75 extern BTStatus_t BTStatus;
76 
77 #endif /* ADEUNIS_H_ */
uint8_t dataLengthH
The high byte of the data length.
Definition: adeunis.h:59
uint8_t unknTelCnt
Number of unknown telegrams detected.
Definition: adeunis.h:72
Description of a Bluetooth Packet.
Definition: adeunis.h:43
uint8_t dataLengthL
The low byte of the data length.
Definition: adeunis.h:47
bool haveBT
Do we have a Bluetooth module at all?
Definition: adeunis.h:68
BTStatus_t BTStatus
Status for Bluetooth connection.
Definition: display.c:87
uint8_t opcode
Definition: adeunis.h:46
uint8_t localPort
Number of the local port.
Definition: adeunis.h:71
uint8_t packetType
Definition: adeunis.h:45
Collects Status Information about Bluetooth in a single Unity.
Definition: adeunis.h:66
bool linkEstablished
Bluetooth link established.
Definition: adeunis.h:69
uint8_t checksum
The checksum from packetType to dataLengthH.
Definition: adeunis.h:60