diff options
author | ai03 <sarcaphx510@gmail.com> | 2019-03-10 19:57:36 -0700 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-03-10 19:57:36 -0700 |
commit | 9bea41c9b239916ae8786e7df02c29fad79ef459 (patch) | |
tree | b9b4b3cdacd87156ebc29e70a79e846cb32e8679 /keyboards/ai03/orbit/transport.h | |
parent | ad12acd3c049e1eef02ac21bb749eda375e09cec (diff) | |
download | qmk_firmware-9bea41c9b239916ae8786e7df02c29fad79ef459.tar.gz qmk_firmware-9bea41c9b239916ae8786e7df02c29fad79ef459.zip |
[Keyboard] Add Orbit keyboard (#5306)
* Get things working except indicators
* Attempt to get things working
* hmm
* Compiles but doesn't run
* Make data transfer work
* Get all indicators working
* Remove old transport
* Prepare for pullreq
* Revert keymap from testing to production
* Final error checking for pull request
* Remove autogenerated is_command from config.h
* Rewrite pin toggles using qmk functions
Diffstat (limited to 'keyboards/ai03/orbit/transport.h')
-rw-r--r-- | keyboards/ai03/orbit/transport.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/keyboards/ai03/orbit/transport.h b/keyboards/ai03/orbit/transport.h new file mode 100644 index 0000000000..422e2ecb99 --- /dev/null +++ b/keyboards/ai03/orbit/transport.h @@ -0,0 +1,42 @@ +#pragma once + +#include <common/matrix.h> + +#define ROWS_PER_HAND (MATRIX_ROWS/2) + +typedef struct _Serial_s2m_buffer_t { + // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack + matrix_row_t smatrix[ROWS_PER_HAND]; +} Serial_s2m_buffer_t; + +typedef struct _Serial_m2s_buffer_t { +#ifdef BACKLIGHT_ENABLE + uint8_t backlight_level; +#endif +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + rgblight_config_t rgblight_config; //not yet use + // + // When MCUs on both sides drive their respective RGB LED chains, + // it is necessary to synchronize, so it is necessary to communicate RGB information. + // In that case, define the RGBLIGHT_SPLIT macro. + // + // Otherwise, if the master side MCU drives both sides RGB LED chains, + // there is no need to communicate. +#endif + + uint8_t current_layer; + uint8_t nlock_led; + uint8_t clock_led; + uint8_t slock_led; + +} Serial_m2s_buffer_t; + +extern volatile Serial_s2m_buffer_t serial_s2m_buffer; +extern volatile Serial_m2s_buffer_t serial_m2s_buffer; + +void transport_master_init(void); +void transport_slave_init(void); + +// returns false if valid data not received from slave +bool transport_master(matrix_row_t matrix[]); +void transport_slave(matrix_row_t matrix[]); |