annotate Scan/UARTConnect/connect_scan.h @ 412:e7a3be42ae1e

Debug code for interconnect cable debugging
author Jacob Alexander <haata@kiibohd.com>
date Sat, 20 Feb 2016 13:27:49 -0800
parents fc2c2a1e9615
children 23a1868b4ac2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
307
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
1 /* Copyright (C) 2014-2015 by Jacob Alexander
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
2 *
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
3 * This file is free software: you can redistribute it and/or modify
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
4 * it under the terms of the GNU General Public License as published by
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
5 * the Free Software Foundation, either version 3 of the License, or
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
6 * (at your option) any later version.
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
7 *
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
8 * This file is distributed in the hope that it will be useful,
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
11 * GNU General Public License for more details.
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
12 *
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
13 * You should have received a copy of the GNU General Public License
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
14 * along with this file. If not, see <http://www.gnu.org/licenses/>.
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
15 */
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
16
341
66eccdd9ced5 Code cleanup
Jacob Alexander <haata@kiibohd.com>
parents: 307
diff changeset
17 #pragma once
307
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
18
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
19 // ----- Includes -----
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
20
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
21 // Project Includes
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
22 #include <kll.h>
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
23
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
24
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
25
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
26 // ----- Enums -----
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
27
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
28 // Functions
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
29 typedef enum Command {
348
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
30 CableCheck, // Comm check
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
31
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
32 IdRequest, // Slave initialization (request id from master)
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
33 IdEnumeration, // Slave initialization (begin enumeration from master)
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
34 IdReport, // Slave initialization complete, report id to master
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
35
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
36 ScanCode, // ScanCode event status change
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
37 Animation, // Master trigger animation event (same command is sent back to master when ready)
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
38
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
39 RemoteCapability, // Activate a capability on the given node
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
40 RemoteOutput, // Remote debug output from a given node
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
41 RemoteInput, // Remote command to send to a given node's debug cli
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
42
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
43 Command_TOP, // Enum bounds
361
7c6ac7b88cda Working support for Interconnect
Jacob Alexander <haata@kiibohd.com>
parents: 360
diff changeset
44 Command_SYN = 0x16, // Reserved for error handling
307
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
45 } Command;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
46
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
47 // UART Rx/Tx Status
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
48 typedef enum UARTStatus {
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
49 UARTStatus_Wait = 0, // Waiting Rx: for SYN Tx: for current command copy to finish
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
50 UARTStatus_SYN = 1, // Rx: SYN Received, waiting for SOH
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
51 UARTStatus_SOH = 2, // Rx: SOH Received, waiting for Command
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
52 UARTStatus_Command = 3, // Rx: Command Received, waiting for data
347
136e47478441 UARTConnect enumeration working!
Jacob Alexander <haata@kiibohd.com>
parents: 341
diff changeset
53 UARTStatus_Ready = 4, // Tx: Ready to send commands
307
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
54 } UARTStatus;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
55
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
56
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
57
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
58 // ----- Structs -----
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
59
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
60 // UART Connect Commands
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
61
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
62 // Cable Check Command
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
63 // Called on each UART every few seconds to make sure there is a connection
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
64 // Also used to make sure there aren't any serious problems with the cable with data corruption
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
65 // This command must pass before sending any other commands on the particular UART
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
66 // Each argument is always 0xD2 (11010010)
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
67 typedef struct CableCheckCommand {
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
68 Command command;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
69 uint8_t numArgs;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
70 uint8_t firstArg[0];
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
71 } CableCheckCommand;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
72
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
73 // Id Request Command
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
74 // Issued by the slave device (non-master) whenever it is powered up
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
75 // Do not issue any commands until given an Id
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
76 // (Except for Cable Check and IdRequestCommand)
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
77 typedef struct IdRequestCommand {
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
78 Command command;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
79 } IdRequestCommand;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
80
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
81 // Id Enumeration Command
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
82 // Issued by the master whenever an Id Request is received
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
83 typedef struct IdEnumerationCommand {
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
84 Command command;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
85 uint8_t id;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
86 } IdEnumerationCommand;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
87
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
88 // Id Report Command
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
89 // Issued by each slave to the master when assigned an Id
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
90 typedef struct IdReportCommand {
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
91 Command command;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
92 uint8_t id;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
93 } IdReportCommand;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
94
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
95 // Scan Code Command
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
96 // Sent from the slave to the master whenever there is a scan code state change
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
97 typedef struct ScanCodeCommand {
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
98 Command command;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
99 uint8_t id;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
100 uint8_t numScanCodes;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
101 TriggerGuide firstScanCode[0];
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
102 } ScanCodeCommand;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
103
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
104 // Animation Command
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
105 // Initiated by the master whenever an animation id should modify it's state
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
106 // Then after the leaf slave node receives the command, send it back to the master
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
107 // On the way back, each device can begin the animation adjustment
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
108 //
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
109 // The master->leaf command should indicate to each device that it should finish sending the
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
110 // current slave->master data and wait for the leaf->master command
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
111 // This allows for a tighter synchronization of animation events
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
112 typedef struct AnimationCommand {
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
113 Command command;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
114 uint8_t animationId;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
115 uint8_t numParams;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
116 uint8_t firstParam[0];
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
117 } AnimationCommand;
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
118
348
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
119 // Remote Capability Command
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
120 // Initiated by the master to trigger a capability on a given node
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
121 // RemoteOutput is enabled while capability is activated
389
fc2c2a1e9615 Adding basic remote capabilities + UART Rx DMA buffers
Jacob Alexander <haata@kiibohd.com>
parents: 361
diff changeset
122 // Set id to 255 if command should be sent in all directions
348
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
123 typedef struct RemoteCapabilityCommand {
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
124 Command command;
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
125 uint8_t id;
389
fc2c2a1e9615 Adding basic remote capabilities + UART Rx DMA buffers
Jacob Alexander <haata@kiibohd.com>
parents: 361
diff changeset
126 uint8_t capabilityIndex;
fc2c2a1e9615 Adding basic remote capabilities + UART Rx DMA buffers
Jacob Alexander <haata@kiibohd.com>
parents: 361
diff changeset
127 uint8_t state;
fc2c2a1e9615 Adding basic remote capabilities + UART Rx DMA buffers
Jacob Alexander <haata@kiibohd.com>
parents: 361
diff changeset
128 uint8_t stateType;
fc2c2a1e9615 Adding basic remote capabilities + UART Rx DMA buffers
Jacob Alexander <haata@kiibohd.com>
parents: 361
diff changeset
129 uint8_t numArgs; // # of bytes, args may be larger than 1 byte
348
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
130 uint8_t firstArg[0];
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
131 } RemoteCapabilityCommand;
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
132
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
133 // Remote Output Command
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
134 // Sends debug output to the master node
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
135 // Uses print command redirection to generate each command message
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
136 typedef struct RemoteOutputCommand {
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
137 Command command;
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
138 uint8_t id;
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
139 uint8_t length;
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
140 uint8_t firstChar[0];
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
141 } RemoteOutputCommand;
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
142
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
143 // Remote Input Command
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
144 // Sends debug input to given node (usually from master)
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
145 // Uses debug cli to execute command and sends all output using Remote Output Command
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
146 typedef struct RemoteInputCommand {
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
147 Command command;
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
148 uint8_t id;
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
149 uint8_t length;
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
150 uint8_t firstChar[0];
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
151 } RemoteInputCommand;
06225a619152 Adding connection type list
Jacob Alexander <haata@kiibohd.com>
parents: 347
diff changeset
152
307
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
153
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
154
360
dbefb68411e1 Initial UARTConnect scancode support
Jacob Alexander <haata@kiibohd.com>
parents: 348
diff changeset
155 // ----- Variables -----
dbefb68411e1 Initial UARTConnect scancode support
Jacob Alexander <haata@kiibohd.com>
parents: 348
diff changeset
156
dbefb68411e1 Initial UARTConnect scancode support
Jacob Alexander <haata@kiibohd.com>
parents: 348
diff changeset
157 extern uint8_t Connect_id;
dbefb68411e1 Initial UARTConnect scancode support
Jacob Alexander <haata@kiibohd.com>
parents: 348
diff changeset
158 extern uint8_t Connect_master; // Set if master
dbefb68411e1 Initial UARTConnect scancode support
Jacob Alexander <haata@kiibohd.com>
parents: 348
diff changeset
159
dbefb68411e1 Initial UARTConnect scancode support
Jacob Alexander <haata@kiibohd.com>
parents: 348
diff changeset
160
dbefb68411e1 Initial UARTConnect scancode support
Jacob Alexander <haata@kiibohd.com>
parents: 348
diff changeset
161
307
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
162 // ----- Functions -----
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
163
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
164 void Connect_setup( uint8_t master );
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
165 void Connect_scan();
ecd2ae35d25c Initial commit for UARTConnect module
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
166
360
dbefb68411e1 Initial UARTConnect scancode support
Jacob Alexander <haata@kiibohd.com>
parents: 348
diff changeset
167 void Connect_send_ScanCode( uint8_t id, TriggerGuide *scanCodeStateList, uint8_t numScanCodes );
389
fc2c2a1e9615 Adding basic remote capabilities + UART Rx DMA buffers
Jacob Alexander <haata@kiibohd.com>
parents: 361
diff changeset
168 void Connect_send_RemoteCapability( uint8_t id, uint8_t capabilityIndex, uint8_t state, uint8_t stateType, uint8_t numArgs, uint8_t *args );
360
dbefb68411e1 Initial UARTConnect scancode support
Jacob Alexander <haata@kiibohd.com>
parents: 348
diff changeset
169