diff Scan/UARTConnect/connect_scan.h @ 389:fc2c2a1e9615

Adding basic remote capabilities + UART Rx DMA buffers - Rx buffers weren't fast enough, had to use DMA :D - Basic LCD remote capabilities are working, single node - Multi-node broadcast seems to have a bug still - DMA ring buffer allowed for significant processing simplification * There is an overrun risk, but the buffer is large and generally there isn't too much data being sent (just very quickly) - Split out LCD layer stack capability into itself and an "exact" version used for updating remote nodes
author Jacob Alexander <haata@kiibohd.com>
date Thu, 15 Oct 2015 00:16:36 -0700
parents 7c6ac7b88cda
children 23a1868b4ac2
line wrap: on
line diff
--- a/Scan/UARTConnect/connect_scan.h	Mon Oct 12 14:47:13 2015 -0700
+++ b/Scan/UARTConnect/connect_scan.h	Thu Oct 15 00:16:36 2015 -0700
@@ -119,11 +119,14 @@
 // Remote Capability Command
 // Initiated by the master to trigger a capability on a given node
 // RemoteOutput is enabled while capability is activated
+// Set id to 255 if command should be sent in all directions
 typedef struct RemoteCapabilityCommand {
 	Command command;
 	uint8_t id;
-	Capability capability;
-	uint8_t numArgs;
+	uint8_t capabilityIndex;
+	uint8_t state;
+	uint8_t stateType;
+	uint8_t numArgs; // # of bytes, args may be larger than 1 byte
 	uint8_t firstArg[0];
 } RemoteCapabilityCommand;
 
@@ -162,4 +165,5 @@
 void Connect_scan();
 
 void Connect_send_ScanCode( uint8_t id, TriggerGuide *scanCodeStateList, uint8_t numScanCodes );
+void Connect_send_RemoteCapability( uint8_t id, uint8_t capabilityIndex, uint8_t state, uint8_t stateType, uint8_t numArgs, uint8_t *args );