Make bidirectional communication work between the keyboard halves. Make the set test LED USB command set the test LED of the left half, too.

This commit is contained in:
László Monda
2016-10-19 19:39:00 +02:00
parent 1286d9cfc3
commit 7a6e5523fb
9 changed files with 167 additions and 37 deletions

View File

@@ -0,0 +1,29 @@
#ifndef __BRIDGE_PROTOCOL_HANDLER__
#define __BRIDGE_PROTOCOL_HANDLER__
// Includes:
#include "fsl_port.h"
// Macros:
#define BRIDGE_RX_BUFFER_SIZE 100
#define BRIDGE_TX_BUFFER_SIZE 100
#define PROTOCOL_RESPONSE_SUCCESS 0
#define PROTOCOL_RESPONSE_GENERIC_ERROR 1
#define BRIDGE_COMMAND_GET_KEY_STATES 0
#define BRIDGE_COMMAND_SET_LED 1
// Variables:
uint8_t BridgeRxBuffer[BRIDGE_RX_BUFFER_SIZE];
uint8_t BridgeTxBuffer[BRIDGE_TX_BUFFER_SIZE];
uint8_t BridgeTxSize;
// Functions:
extern void BridgeProtocolHandler();
#endif