summaryrefslogtreecommitdiff
path: root/quantum/api.h
diff options
context:
space:
mode:
authorskullY <skullydazed@gmail.com>2019-08-30 11:19:03 -0700
committerskullydazed <skullydazed@users.noreply.github.com>2019-08-30 15:01:52 -0700
commitb624f32f944acdc59dcb130674c09090c5c404cb (patch)
treebc13adbba137d122d9a2c2fb2fafcbb08ac10e25 /quantum/api.h
parent61af76a10d00aba185b8338604171de490a13e3b (diff)
downloadqmk_firmware-b624f32f944acdc59dcb130674c09090c5c404cb.tar.gz
qmk_firmware-b624f32f944acdc59dcb130674c09090c5c404cb.zip
clang-format changes
Diffstat (limited to 'quantum/api.h')
-rw-r--r--quantum/api.h53
1 files changed, 17 insertions, 36 deletions
diff --git a/quantum/api.h b/quantum/api.h
index fc016391bc..90a4de8339 100644
--- a/quantum/api.h
+++ b/quantum/api.h
@@ -18,41 +18,25 @@
#define _API_H_
#ifdef __AVR__
-#include "lufa.h"
+# include "lufa.h"
#endif
enum MESSAGE_TYPE {
- MT_GET_DATA = 0x10, // Get data from keyboard
- MT_GET_DATA_ACK = 0x11, // returned data to process (ACK)
- MT_SET_DATA = 0x20, // Set data on keyboard
- MT_SET_DATA_ACK = 0x21, // returned data to confirm (ACK)
- MT_SEND_DATA = 0x30, // Sending data/action from keyboard
- MT_SEND_DATA_ACK = 0x31, // returned data/action confirmation (ACK)
- MT_EXE_ACTION = 0x40, // executing actions on keyboard
- MT_EXE_ACTION_ACK =0x41, // return confirmation/value (ACK)
- MT_TYPE_ERROR = 0x80 // type not recognised (ACK)
+ MT_GET_DATA = 0x10, // Get data from keyboard
+ MT_GET_DATA_ACK = 0x11, // returned data to process (ACK)
+ MT_SET_DATA = 0x20, // Set data on keyboard
+ MT_SET_DATA_ACK = 0x21, // returned data to confirm (ACK)
+ MT_SEND_DATA = 0x30, // Sending data/action from keyboard
+ MT_SEND_DATA_ACK = 0x31, // returned data/action confirmation (ACK)
+ MT_EXE_ACTION = 0x40, // executing actions on keyboard
+ MT_EXE_ACTION_ACK = 0x41, // return confirmation/value (ACK)
+ MT_TYPE_ERROR = 0x80 // type not recognised (ACK)
};
-enum DATA_TYPE {
- DT_NONE = 0x00,
- DT_HANDSHAKE,
- DT_DEFAULT_LAYER,
- DT_CURRENT_LAYER,
- DT_KEYMAP_OPTIONS,
- DT_BACKLIGHT,
- DT_RGBLIGHT,
- DT_UNICODE,
- DT_DEBUG,
- DT_AUDIO,
- DT_QUANTUM_ACTION,
- DT_KEYBOARD_ACTION,
- DT_USER_ACTION,
- DT_KEYMAP_SIZE,
- DT_KEYMAP
-};
+enum DATA_TYPE { DT_NONE = 0x00, DT_HANDSHAKE, DT_DEFAULT_LAYER, DT_CURRENT_LAYER, DT_KEYMAP_OPTIONS, DT_BACKLIGHT, DT_RGBLIGHT, DT_UNICODE, DT_DEBUG, DT_AUDIO, DT_QUANTUM_ACTION, DT_KEYBOARD_ACTION, DT_USER_ACTION, DT_KEYMAP_SIZE, DT_KEYMAP };
-void dword_to_bytes(uint32_t dword, uint8_t * bytes);
-uint32_t bytes_to_dword(uint8_t * bytes, uint8_t index);
+void dword_to_bytes(uint32_t dword, uint8_t* bytes);
+uint32_t bytes_to_dword(uint8_t* bytes, uint8_t index);
#define MT_GET_DATA(data_type, data, length) SEND_BYTES(MT_GET_DATA, data_type, data, length)
#define MT_GET_DATA_ACK(data_type, data, length) SEND_BYTES(MT_GET_DATA_ACK, data_type, data, length)
@@ -63,15 +47,12 @@ uint32_t bytes_to_dword(uint8_t * bytes, uint8_t index);
#define MT_EXE_ACTION(data_type, data, length) SEND_BYTES(MT_EXE_ACTION, data_type, data, length)
#define MT_EXE_ACTION_ACK(data_type, data, length) SEND_BYTES(MT_EXE_ACTION_ACK, data_type, data, length)
-void process_api(uint16_t length, uint8_t * data);
+void process_api(uint16_t length, uint8_t* data);
-__attribute__ ((weak))
-bool process_api_quantum(uint8_t length, uint8_t * data);
+__attribute__((weak)) bool process_api_quantum(uint8_t length, uint8_t* data);
-__attribute__ ((weak))
-bool process_api_keyboard(uint8_t length, uint8_t * data);
+__attribute__((weak)) bool process_api_keyboard(uint8_t length, uint8_t* data);
-__attribute__ ((weak))
-bool process_api_user(uint8_t length, uint8_t * data);
+__attribute__((weak)) bool process_api_user(uint8_t length, uint8_t* data);
#endif