Mercurial > louis > kiibohd-controller
comparison 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 |
comparison
equal
deleted
inserted
replaced
388:3ddab7faf67d | 389:fc2c2a1e9615 |
---|---|
117 } AnimationCommand; | 117 } AnimationCommand; |
118 | 118 |
119 // Remote Capability Command | 119 // Remote Capability Command |
120 // Initiated by the master to trigger a capability on a given node | 120 // Initiated by the master to trigger a capability on a given node |
121 // RemoteOutput is enabled while capability is activated | 121 // RemoteOutput is enabled while capability is activated |
122 // Set id to 255 if command should be sent in all directions | |
122 typedef struct RemoteCapabilityCommand { | 123 typedef struct RemoteCapabilityCommand { |
123 Command command; | 124 Command command; |
124 uint8_t id; | 125 uint8_t id; |
125 Capability capability; | 126 uint8_t capabilityIndex; |
126 uint8_t numArgs; | 127 uint8_t state; |
128 uint8_t stateType; | |
129 uint8_t numArgs; // # of bytes, args may be larger than 1 byte | |
127 uint8_t firstArg[0]; | 130 uint8_t firstArg[0]; |
128 } RemoteCapabilityCommand; | 131 } RemoteCapabilityCommand; |
129 | 132 |
130 // Remote Output Command | 133 // Remote Output Command |
131 // Sends debug output to the master node | 134 // Sends debug output to the master node |
160 | 163 |
161 void Connect_setup( uint8_t master ); | 164 void Connect_setup( uint8_t master ); |
162 void Connect_scan(); | 165 void Connect_scan(); |
163 | 166 |
164 void Connect_send_ScanCode( uint8_t id, TriggerGuide *scanCodeStateList, uint8_t numScanCodes ); | 167 void Connect_send_ScanCode( uint8_t id, TriggerGuide *scanCodeStateList, uint8_t numScanCodes ); |
168 void Connect_send_RemoteCapability( uint8_t id, uint8_t capabilityIndex, uint8_t state, uint8_t stateType, uint8_t numArgs, uint8_t *args ); | |
165 | 169 |