[Core] Allow usage of ChibiOS's SIO driver for split keyboards (#15907)

This commit is contained in:
Stefan Kerkmann 2022-06-17 22:06:44 +02:00 committed by GitHub
parent e44604c256
commit 6d67e9df4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 365 additions and 138 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,5 @@
/* Copyright 2021 QMK
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Copyright 2021 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@ -23,8 +10,24 @@
#include <ch.h>
#include <hal.h>
#if !defined(SERIAL_USART_DRIVER)
# define SERIAL_USART_DRIVER SD1
#if HAL_USE_SERIAL
typedef SerialDriver QMKSerialDriver;
typedef SerialConfig QMKSerialConfig;
# if !defined(SERIAL_USART_DRIVER)
# define SERIAL_USART_DRIVER SD1
# endif
#elif HAL_USE_SIO
typedef SIODriver QMKSerialDriver;
typedef SIOConfig QMKSerialConfig;
# if !defined(SERIAL_USART_DRIVER)
# define SERIAL_USART_DRIVER SIOD1
# endif
#endif
#if !defined(USE_GPIOV1)
@ -113,4 +116,4 @@
# define SERIAL_USART_TIMEOUT 20
#endif
#define HANDSHAKE_MAGIC 7
#define HANDSHAKE_MAGIC 7U