diff options
| author | James Young <18669334+noroadsleft@users.noreply.github.com> | 2020-05-30 13:14:59 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-30 13:14:59 -0700 |
| commit | fced377ac007d27f2650ccffbe0b18abcdcfe23d (patch) | |
| tree | bd5b141987394a5a16cfc416bfe2b9efdb14d067 /keyboards/lily58/serial.h | |
| parent | 7b8a013826ad90714a05ea522de53adf964ab3b9 (diff) | |
| download | qmk_firmware-fced377ac007d27f2650ccffbe0b18abcdcfe23d.tar.gz qmk_firmware-fced377ac007d27f2650ccffbe0b18abcdcfe23d.zip | |
2020 May 30 Breaking Changes Update (#9215)
* Branch point for 2020 May 30 Breaking Change
* Migrate `ACTION_LAYER_TOGGLE` to `TG()` (#8954)
* Migrate `ACTION_MODS_ONESHOT` to `OSM()` (#8957)
* Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` (#8958)
* Migrate `ACTION_LAYER_MODS` to `LM()` (#8959)
* Migrate `ACTION_MODS_TAP_KEY` to `MT()` (#8968)
* Convert V-USB usbdrv to a submodule (#8321)
* Unify Tap Hold functions and documentation (#8348)
* Changing board names to prevent confusion (#8412)
* Move the Keyboardio Model01 to a keyboardio/ subdir (#8499)
* Move spaceman keyboards (#8830)
* Migrate miscellaneous `fn_actions` entries (#8977)
* Migrate `ACTION_MODS_KEY` to chained mod keycodes (#8979)
* Organizing my keyboards (plaid, tartan, ergoinu) (#8537)
* Refactor Lily58 to use split_common (#6260)
* Refactor zinc to use split_common (#7114)
* Add a message if bin/qmk doesn't work (#9000)
* Fix conflicting types for 'tfp_printf' (#8269)
* Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup (#6480)
* Refactor and updates to TKC1800 code (#8472)
* Switch to qmk forks for everything (#9019)
* audio refactor: replace deprecated PLAY_NOTE_ARRAY (#8484)
* Audio enable corrections (2/3) (#8903)
* Split HHKB to ANSI and JP layouts and Add VIA support for each (#8582)
* Audio enable corrections (Part 4) (#8974)
* Fix typo from PR7114 (#9171)
* Augment future branch Changelogs (#8978)
* Revert "Branch point for 2020 May 30 Breaking Change"
Diffstat (limited to 'keyboards/lily58/serial.h')
| -rwxr-xr-x | keyboards/lily58/serial.h | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/keyboards/lily58/serial.h b/keyboards/lily58/serial.h deleted file mode 100755 index 7e0c0847a..000000000 --- a/keyboards/lily58/serial.h +++ /dev/null | |||
| @@ -1,84 +0,0 @@ | |||
| 1 | #ifndef SOFT_SERIAL_H | ||
| 2 | #define SOFT_SERIAL_H | ||
| 3 | |||
| 4 | #include <stdbool.h> | ||
| 5 | |||
| 6 | // ///////////////////////////////////////////////////////////////// | ||
| 7 | // Need Soft Serial defines in config.h | ||
| 8 | // ///////////////////////////////////////////////////////////////// | ||
| 9 | // ex. | ||
| 10 | // #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 | ||
| 11 | // OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 | ||
| 12 | // // 1: about 137kbps (default) | ||
| 13 | // // 2: about 75kbps | ||
| 14 | // // 3: about 39kbps | ||
| 15 | // // 4: about 26kbps | ||
| 16 | // // 5: about 20kbps | ||
| 17 | // | ||
| 18 | // //// USE Simple API (OLD API, compatible with let's split serial.c) | ||
| 19 | // ex. | ||
| 20 | // #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 | ||
| 21 | // #define SERIAL_MASTER_BUFFER_LENGTH 1 | ||
| 22 | // | ||
| 23 | // //// USE flexible API (using multi-type transaction function) | ||
| 24 | // #define SERIAL_USE_MULTI_TRANSACTION | ||
| 25 | // | ||
| 26 | // ///////////////////////////////////////////////////////////////// | ||
| 27 | |||
| 28 | |||
| 29 | #ifndef SERIAL_USE_MULTI_TRANSACTION | ||
| 30 | /* --- USE Simple API (OLD API, compatible with let's split serial.c) */ | ||
| 31 | #if SERIAL_SLAVE_BUFFER_LENGTH > 0 | ||
| 32 | extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; | ||
| 33 | #endif | ||
| 34 | #if SERIAL_MASTER_BUFFER_LENGTH > 0 | ||
| 35 | extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; | ||
| 36 | #endif | ||
| 37 | |||
| 38 | void serial_master_init(void); | ||
| 39 | void serial_slave_init(void); | ||
| 40 | int serial_update_buffers(void); | ||
| 41 | |||
| 42 | #endif // USE Simple API | ||
| 43 | |||
| 44 | // Soft Serial Transaction Descriptor | ||
| 45 | typedef struct _SSTD_t { | ||
| 46 | uint8_t *status; | ||
| 47 | uint8_t initiator2target_buffer_size; | ||
| 48 | uint8_t *initiator2target_buffer; | ||
| 49 | uint8_t target2initiator_buffer_size; | ||
| 50 | uint8_t *target2initiator_buffer; | ||
| 51 | } SSTD_t; | ||
| 52 | #define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) | ||
| 53 | |||
| 54 | // initiator is transaction start side | ||
| 55 | void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); | ||
| 56 | // target is interrupt accept side | ||
| 57 | void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); | ||
| 58 | |||
| 59 | // initiator resullt | ||
| 60 | #define TRANSACTION_END 0 | ||
| 61 | #define TRANSACTION_NO_RESPONSE 0x1 | ||
| 62 | #define TRANSACTION_DATA_ERROR 0x2 | ||
| 63 | #define TRANSACTION_TYPE_ERROR 0x4 | ||
| 64 | #ifndef SERIAL_USE_MULTI_TRANSACTION | ||
| 65 | int soft_serial_transaction(void); | ||
| 66 | #else | ||
| 67 | int soft_serial_transaction(int sstd_index); | ||
| 68 | #endif | ||
| 69 | |||
| 70 | // target status | ||
| 71 | // *SSTD_t.status has | ||
| 72 | // initiator: | ||
| 73 | // TRANSACTION_END | ||
| 74 | // or TRANSACTION_NO_RESPONSE | ||
| 75 | // or TRANSACTION_DATA_ERROR | ||
| 76 | // target: | ||
| 77 | // TRANSACTION_DATA_ERROR | ||
| 78 | // or TRANSACTION_ACCEPTED | ||
| 79 | #define TRANSACTION_ACCEPTED 0x8 | ||
| 80 | #ifdef SERIAL_USE_MULTI_TRANSACTION | ||
| 81 | int soft_serial_get_and_clean_status(int sstd_index); | ||
| 82 | #endif | ||
| 83 | |||
| 84 | #endif /* SOFT_SERIAL_H */ | ||
