Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
QMK Bot 2020-12-26 04:56:43 +00:00
commit 0b37c0dfa0
60 changed files with 96 additions and 258 deletions

View file

@ -35,8 +35,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ADB_H
#define ADB_H
#pragma once
#include <stdint.h>
#include <stdbool.h>
@ -57,5 +56,3 @@ void adb_host_listen(uint8_t cmd, uint8_t data_h, uint8_t data_l);
void adb_host_kbd_led(uint8_t led);
void adb_mouse_task(void);
void adb_mouse_init(void);
#endif

View file

@ -22,10 +22,9 @@
* @{
*/
#ifndef USB_DRIVER_H
# define USB_DRIVER_H
#pragma once
# include <hal_usb_cdc.h>
#include <hal_usb_cdc.h>
/*===========================================================================*/
/* Driver constants. */
@ -35,9 +34,9 @@
/* Derived constants and error checks. */
/*===========================================================================*/
# if HAL_USE_USB == FALSE
# error "The USB Driver requires HAL_USE_USB"
# endif
#if HAL_USE_USB == FALSE
# error "The USB Driver requires HAL_USE_USB"
#endif
/*===========================================================================*/
/* Driver data structures and types. */
@ -112,21 +111,21 @@ typedef struct {
/**
* @brief @p SerialDriver specific data.
*/
# define _qmk_usb_driver_data \
_base_asynchronous_channel_data /* Driver state.*/ \
qmkusbstate_t state; \
/* Input buffers queue.*/ \
input_buffers_queue_t ibqueue; \
/* Output queue.*/ \
output_buffers_queue_t obqueue; \
/* End of the mandatory fields.*/ \
/* Current configuration data.*/ \
const QMKUSBConfig *config;
#define _qmk_usb_driver_data \
_base_asynchronous_channel_data /* Driver state.*/ \
qmkusbstate_t state; \
/* Input buffers queue.*/ \
input_buffers_queue_t ibqueue; \
/* Output queue.*/ \
output_buffers_queue_t obqueue; \
/* End of the mandatory fields.*/ \
/* Current configuration data.*/ \
const QMKUSBConfig *config;
/**
* @brief @p SerialUSBDriver specific methods.
*/
# define _qmk_usb_driver_methods _base_asynchronous_channel_methods
#define _qmk_usb_driver_methods _base_asynchronous_channel_methods
/**
* @extends BaseAsynchronousChannelVMT
@ -158,9 +157,9 @@ struct QMKUSBDriver {
/* External declarations. */
/*===========================================================================*/
# ifdef __cplusplus
#ifdef __cplusplus
extern "C" {
# endif
#endif
void qmkusbInit(void);
void qmkusbObjectInit(QMKUSBDriver *qmkusbp, const QMKUSBConfig *config);
void qmkusbStart(QMKUSBDriver *qmkusbp, const QMKUSBConfig *config);
@ -173,10 +172,8 @@ void qmkusbSOFHookI(QMKUSBDriver *qmkusbp);
void qmkusbDataTransmitted(USBDriver *usbp, usbep_t ep);
void qmkusbDataReceived(USBDriver *usbp, usbep_t ep);
void qmkusbInterruptTransmitted(USBDriver *usbp, usbep_t ep);
# ifdef __cplusplus
#ifdef __cplusplus
}
# endif
#endif /* USB_DRIVER_H */
#endif
/** @} */

View file

@ -15,8 +15,7 @@
* GPL v2 or later.
*/
#ifndef _USB_MAIN_H_
#define _USB_MAIN_H_
#pragma once
// TESTING
// extern uint8_t blinkLed;
@ -89,5 +88,3 @@ int8_t sendchar(uint8_t c);
void console_flush_output(void);
#endif /* CONSOLE_ENABLE */
#endif /* _USB_MAIN_H_ */

View file

@ -1,8 +1,8 @@
/*
Copyright 2014 Jun WAKO <wakojun@gmail.com>
*/
#ifndef IBM4704_H
#define IBM4704_H
#pragma once
#define IBM4704_ERR_NONE 0
#define IBM4704_ERR_PARITY 0x70
@ -101,5 +101,3 @@ static inline void inhibit(void) {
clock_hi();
data_lo();
}
#endif

View file

@ -36,8 +36,7 @@
this software.
*/
#ifndef _LUFA_H_
#define _LUFA_H_
#pragma once
#include <avr/io.h>
#include <avr/wdt.h>
@ -68,5 +67,3 @@ extern host_driver_t lufa_driver;
// The header and terminator are not stored to save a few bytes of precious ram
# define MIDI_SYSEX_BUFFER (API_SYSEX_MAX_SIZE + API_SYSEX_MAX_SIZE / 7 + (API_SYSEX_MAX_SIZE % 7 ? 1 : 0))
#endif
#endif

View file

@ -35,8 +35,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef M0110_H
#define M0110_H
#pragma once
/* port settings for clock and data line */
#if !(defined(M0110_CLOCK_PORT) && defined(M0110_CLOCK_PIN) && defined(M0110_CLOCK_DDR) && defined(M0110_CLOCK_BIT))
@ -80,5 +79,3 @@ uint8_t m0110_recv(void);
uint8_t m0110_recv_key(void);
uint8_t m0110_inquiry(void);
uint8_t m0110_instant(void);
#endif

View file

@ -39,8 +39,7 @@
* manual section "Summary of Compile Tokens".
*/
#ifndef _LUFA_CONFIG_H_
#define _LUFA_CONFIG_H_
#pragma once
#if (ARCH == ARCH_AVR8)
@ -90,4 +89,3 @@
# error Unsupported architecture for this LUFA configuration file.
#endif
#endif

View file

@ -17,8 +17,7 @@
// You should have received a copy of the GNU General Public License
// along with avr-bytequeue. If not, see <http://www.gnu.org/licenses/>.
#ifndef BYTEQUEUE_H
#define BYTEQUEUE_H
#pragma once
#ifdef __cplusplus
extern "C" {
@ -54,5 +53,3 @@ void bytequeue_remove(byteQueue_t* queue, byteQueueIndex_t numToRemove);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -16,8 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with avr-bytequeue. If not, see <http://www.gnu.org/licenses/>.
#ifndef INTERRUPT_SETTING_H
#define INTERRUPT_SETTING_H
#pragma once
#ifdef __cplusplus
extern "C" {
@ -34,5 +33,3 @@ void restore_interrupt_setting(interrupt_setting_t setting);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -25,8 +25,7 @@
*
*/
#ifndef XNOR_MIDI_H
#define XNOR_MIDI_H
#pragma once
#ifdef __cplusplus
extern "C" {
@ -486,5 +485,3 @@ midi_packet_length_t midi_packet_length(uint8_t status);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -21,8 +21,7 @@
* @brief Device implementation functions
*/
#ifndef MIDI_DEVICE_H
#define MIDI_DEVICE_H
#pragma once
#ifdef __cplusplus
extern "C" {
@ -147,5 +146,3 @@ void midi_device_set_pre_input_process_func(MidiDevice* device, midi_no_byte_fun
#ifdef __cplusplus
}
#endif
#endif

View file

@ -21,8 +21,7 @@
* @brief Function signature definitions
*/
#ifndef MIDI_FUNCTION_TYPES_H
#define MIDI_FUNCTION_TYPES_H
#pragma once
#ifdef __cplusplus
extern "C" {
@ -46,5 +45,3 @@ typedef void (*midi_sysex_func_t)(MidiDevice *device, uint16_t start_byte, uint8
#ifdef __cplusplus
}
#endif
#endif

View file

@ -16,8 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with avr-midi. If not, see <http://www.gnu.org/licenses/>.
#ifndef SYSEX_TOOLS_H
#define SYSEX_TOOLS_H
#pragma once
#ifdef __cplusplus
extern "C" {
@ -91,5 +90,3 @@ uint16_t sysex_decode(uint8_t *decoded, const uint8_t *source, uint16_t length);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -35,8 +35,8 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef NEWS_H
#define NEWS_H
#pragma once
/*
* Primitive PS/2 Library for AVR
*/
@ -46,5 +46,3 @@ void news_init(void);
uint8_t news_recv(void);
/* device role */
#endif

View file

@ -45,13 +45,12 @@ POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#include <stdbool.h>
#ifndef NEXT_KBD_H
# define NEXT_KBD_H
# define NEXT_KBD_KMBUS_IDLE 0x300600
# define NEXT_KBD_TIMING 50
#define NEXT_KBD_KMBUS_IDLE 0x300600
#define NEXT_KBD_TIMING 50
extern uint8_t next_kbd_error;
@ -59,5 +58,3 @@ extern uint8_t next_kbd_error;
void next_kbd_init(void);
void next_kbd_set_leds(bool left, bool right);
uint32_t next_kbd_recv(void);
#endif

View file

@ -35,8 +35,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef PS2_H
#define PS2_H
#pragma once
#include <stdbool.h>
#include "wait.h"
@ -138,5 +137,3 @@ static inline void inhibit(void) {
clock_lo();
data_hi();
}
#endif

View file

@ -1,5 +1,4 @@
#ifndef PS2_IO_H
#define PS2_IO_H
#pragma once
void clock_init(void);
void clock_lo(void);
@ -10,5 +9,3 @@ void data_init(void);
void data_lo(void);
void data_hi(void);
bool data_in(void);
#endif

View file

@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PS2_MOUSE_H
#define PS2_MOUSE_H
#pragma once
#include <stdbool.h>
#include "debug.h"
@ -176,5 +175,3 @@ void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution);
void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
void ps2_mouse_moved_user(report_mouse_t *mouse_report);
#endif

View file

@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SERIAL_MOUSE_H
#define SERIAL_MOUSE_H
#pragma once
#include <stdint.h>
@ -28,5 +27,3 @@ static inline uint8_t serial_mouse_init(void) {
}
void serial_mouse_task(void);
#endif

View file

@ -40,8 +40,8 @@
*
* Header file for Descriptors.c.
*/
#ifndef _DESCRIPTORS_H_
#define _DESCRIPTORS_H_
#pragma once
#include <LUFA/Drivers/USB/USB.h>
@ -286,4 +286,3 @@ enum usb_endpoints {
#define JOYSTICK_EPSIZE 8
uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const void** const DescriptorAddress);
#endif

View file

@ -36,8 +36,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef XT_H
#define XT_H
#pragma once
#define XT_DATA_IN() \
do { \
@ -69,5 +68,3 @@ POSSIBILITY OF SUCH DAMAGE.
void xt_host_init(void);
uint8_t xt_host_recv(void);
#endif