Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of LG by
Diff: DeviceProtocol.h
- Revision:
- 72:f5e189c62bcb
- Parent:
- 71:7835a18110bd
- Child:
- 73:29fccfe239a3
--- a/DeviceProtocol.h Tue Feb 23 05:55:37 2016 +0000
+++ b/DeviceProtocol.h Tue Feb 23 14:23:37 2016 +0000
@@ -18,19 +18,18 @@
} DeviceOutputBuffer;
typedef struct _DeviceCommunicationState {
- DeviceInputBuffer RequestBuffer;
- DeviceOutputBuffer ResponseBuffer;
+ DeviceInputBuffer requestBuffer;
+ DeviceOutputBuffer responseBuffer;
//Request settings
uint32_t requestBaudRate;
uint8_t requestCode;
uint8_t requestSelect;
//Response settings
+ uint8_t transmitterReady;
uint8_t responseReady;
uint8_t responseCode;
uint8_t responseSelect;
uint32_t responseBaudRate;
- //Delta command response mode
- DeviceDeltaMode deltaMode;
//Response broadcast and external latch delay
uint32_t responseDelay; //Values in mks; 0 - immediate response
uint32_t responseDelayClock; //Values in mks; response delay clock - send response if clock > delay;
@@ -47,6 +46,8 @@
typedef struct _DeviceCountersState {
//Latch
DeviceLatchState latch;
+ //Delta command mode
+ DeviceDeltaMode deltaMode;
} DeviceCountersState;
typedef struct _DeviceState {
@@ -182,4 +183,10 @@
uint32_t DecodeRequestBaudRateFromDeltaBINS(uint8_t param);
uint32_t DecodeResponsePeriodFromDeltaBINS(uint8_t param);
+void Encode8(uint8_t);
+void Encode16(uint16_t);
+void EncodeDeviceMode(void);
+void EncodeSysRgR(void);
+void EncodeCRC(void);
+
#endif /* __DEVICEPROTOCOL_H__ */
\ No newline at end of file
