Migrate serial_uart usages to UART driver (#15479)
* Migrate Thermal Printer feature to UART driver * Migrate 40percentclub UT47 to UART driver * Migrate Centromere to UART driver * Migrate Chimera Ergo to UART driver * Migrate Chimera Let's Split to UART driver * Migrate Chimera Ortho to UART driver * Migrate Chimera Ortho Plus to UART driver * Migrate Comet46 to UART driver * Migrate Palm USB converter to UART driver * Migrate Sun USB converter to UART driver * Migrate Dichotomy to UART driver * Migrate Honeycomb to UART driver * Migrate Mitosis to UART driver * Migrate Redox W to UART driver * Migrate Uni660 to UART driver * Migrate Telophase to UART driver
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
#ifdef LED_ENABLE
|
||||
#include "protocol/serial.h"
|
||||
#include "uart.h"
|
||||
#endif
|
||||
|
||||
#define LT3_TAB LT(3, KC_TAB)
|
||||
@@ -108,11 +108,11 @@ LAYOUT( /* Tab */
|
||||
//LED keymap functions
|
||||
#ifdef LED_ENABLE
|
||||
void led_chmode(void) {
|
||||
serial_send(101);
|
||||
uart_write(0x65);
|
||||
}
|
||||
|
||||
void led_toggle(void) {
|
||||
serial_send(100);
|
||||
uart_write(0x64);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
#ifdef LED_ENABLE
|
||||
#include "protocol/serial.h"
|
||||
#include "uart.h"
|
||||
#endif
|
||||
|
||||
#define LT3_TAB LT(3, KC_TAB)
|
||||
@@ -108,11 +108,11 @@ LAYOUT( /* Tab */
|
||||
//LED keymap functions
|
||||
#ifdef LED_ENABLE
|
||||
void led_chmode(void) {
|
||||
serial_send(101);
|
||||
uart_write(0x65);
|
||||
}
|
||||
|
||||
void led_toggle(void) {
|
||||
serial_send(100);
|
||||
uart_write(0x64);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
#ifdef LED_ENABLE
|
||||
#include "protocol/serial.h"
|
||||
#include "uart.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -151,11 +151,11 @@ LAYOUT( /* GAMING, toggled on and off - L5 */
|
||||
//LED keymap functions
|
||||
#ifdef LED_ENABLE
|
||||
void led_chmode(void) {
|
||||
serial_send(101);
|
||||
uart_write(0x65);
|
||||
}
|
||||
|
||||
void led_toggle(void) {
|
||||
serial_send(100);
|
||||
uart_write(0x64);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
#ifdef LED_ENABLE
|
||||
#include "protocol/serial.h"
|
||||
#include "uart.h"
|
||||
#endif
|
||||
|
||||
#define LT3_TAB LT(3, KC_TAB)
|
||||
@@ -60,11 +60,11 @@ LAYOUT( /* Tab */
|
||||
//LED keymap functions
|
||||
#ifdef LED_ENABLE
|
||||
void led_chmode(void) {
|
||||
serial_send(101);
|
||||
uart_write(0x65);
|
||||
}
|
||||
|
||||
void led_toggle(void) {
|
||||
serial_send(100);
|
||||
uart_write(0x64);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
@@ -26,10 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#ifdef LED_ENABLE
|
||||
#include "protocol/serial.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef DEBOUNCE
|
||||
# define DEBOUNCE 5
|
||||
@@ -69,10 +65,6 @@ void matrix_init(void)
|
||||
matrix[i] = 0;
|
||||
matrix_debouncing[i] = 0;
|
||||
}
|
||||
|
||||
#ifdef LED_ENABLE
|
||||
serial_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
|
@@ -18,4 +18,5 @@ AUDIO_ENABLE = no # Audio output
|
||||
|
||||
# custom matrix setup
|
||||
CUSTOM_MATRIX = yes
|
||||
SRC += matrix.c protocol/serial_uart.c
|
||||
SRC += matrix.c
|
||||
QUANTUM_LIB_SRC += uart.c
|
||||
|
@@ -15,15 +15,19 @@
|
||||
*/
|
||||
#include "ut47.h"
|
||||
#ifdef LED_ENABLE
|
||||
#include "protocol/serial.h"
|
||||
#include "uart.h"
|
||||
#endif
|
||||
|
||||
void matrix_init_kb() {
|
||||
uart_init(9600);
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
if (record->event.pressed) {
|
||||
#ifdef LED_ENABLE
|
||||
serial_send((record->event.key.row*16)+record->event.key.col);
|
||||
uart_write((record->event.key.row*16)+record->event.key.col);
|
||||
#endif
|
||||
}
|
||||
return process_record_user(keycode, record);
|
||||
|
Reference in New Issue
Block a user