aboutsummaryrefslogtreecommitdiff
path: root/lib/lufa/LUFA/Drivers/Board
diff options
context:
space:
mode:
authorskullY <skullydazed@gmail.com>2017-07-08 12:34:36 -0700
committerskullY <skullydazed@gmail.com>2017-07-08 12:34:36 -0700
commit6e2cae4cda122cfe58dc88dc181632d7b9521740 (patch)
tree89d9fe5e5d91f68d2e015ca8142bb7dcff0a01ad /lib/lufa/LUFA/Drivers/Board
parent03706de94621f42a469b0c3c4a4e570dc14666dc (diff)
downloadqmk_firmware-6e2cae4cda122cfe58dc88dc181632d7b9521740.tar.gz
qmk_firmware-6e2cae4cda122cfe58dc88dc181632d7b9521740.zip
commit files with wrong line endings
Diffstat (limited to 'lib/lufa/LUFA/Drivers/Board')
-rw-r--r--lib/lufa/LUFA/Drivers/Board/AVR8/QMK/Board.h130
-rw-r--r--lib/lufa/LUFA/Drivers/Board/AVR8/QMK/LEDs.h388
2 files changed, 259 insertions, 259 deletions
diff --git a/lib/lufa/LUFA/Drivers/Board/AVR8/QMK/Board.h b/lib/lufa/LUFA/Drivers/Board/AVR8/QMK/Board.h
index 19a0f2dfe..b0d5ac447 100644
--- a/lib/lufa/LUFA/Drivers/Board/AVR8/QMK/Board.h
+++ b/lib/lufa/LUFA/Drivers/Board/AVR8/QMK/Board.h
@@ -1,65 +1,65 @@
1/* 1/*
2Copyright 2017 Jack Humbert 2Copyright 2017 Jack Humbert
3 3
4This program is free software: you can redistribute it and/or modify 4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by 5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or 6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version. 7(at your option) any later version.
8 8
9This program is distributed in the hope that it will be useful, 9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of 10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details. 12GNU General Public License for more details.
13 13
14You should have received a copy of the GNU General Public License 14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 16*/
17 17
18/** \file 18/** \file
19 * \brief General driver header for QMK-powered keyboards. 19 * \brief General driver header for QMK-powered keyboards.
20 * \copydetails Group_BoardInfo_QMK 20 * \copydetails Group_BoardInfo_QMK
21 * 21 *
22 * \note This file should not be included directly. It is automatically included as needed by the Board driver 22 * \note This file should not be included directly. It is automatically included as needed by the Board driver
23 * dispatch header located in LUFA/Drivers/Board/Board.h. 23 * dispatch header located in LUFA/Drivers/Board/Board.h.
24 */ 24 */
25 25
26/** \ingroup Group_BoardInfo 26/** \ingroup Group_BoardInfo
27 * \defgroup Group_BoardInfo_QMK QMK 27 * \defgroup Group_BoardInfo_QMK QMK
28 * \brief General driver header for QMK-powered keyboards. 28 * \brief General driver header for QMK-powered keyboards.
29 * 29 *
30 * General driver header for QMK-powered keyboards (http://qmk.fm). 30 * General driver header for QMK-powered keyboards (http://qmk.fm).
31 * 31 *
32 * @{ 32 * @{
33 */ 33 */
34 34
35#ifndef __BOARD_QMK_H__ 35#ifndef __BOARD_QMK_H__
36#define __BOARD_QMK_H__ 36#define __BOARD_QMK_H__
37 37
38 /* Includes: */ 38 /* Includes: */
39 #include "../../../../Common/Common.h" 39 #include "../../../../Common/Common.h"
40 #include "../../LEDs.h" 40 #include "../../LEDs.h"
41 41
42 /* Enable C linkage for C++ Compilers: */ 42 /* Enable C linkage for C++ Compilers: */
43 #if defined(__cplusplus) 43 #if defined(__cplusplus)
44 extern "C" { 44 extern "C" {
45 #endif 45 #endif
46 46
47 /* Preprocessor Checks: */ 47 /* Preprocessor Checks: */
48 #if !defined(__INCLUDE_FROM_BOARD_H) 48 #if !defined(__INCLUDE_FROM_BOARD_H)
49 #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead. 49 #error Do not include this file directly. Include LUFA/Drivers/Board/Board.h instead.
50 #endif 50 #endif
51 51
52 /* Public Interface - May be used in end-application: */ 52 /* Public Interface - May be used in end-application: */
53 /* Macros: */ 53 /* Macros: */
54 /** Indicates the board has hardware LEDs mounted. */ 54 /** Indicates the board has hardware LEDs mounted. */
55 #define BOARD_HAS_LEDS 55 #define BOARD_HAS_LEDS
56 56
57 /* Disable C linkage for C++ Compilers: */ 57 /* Disable C linkage for C++ Compilers: */
58 #if defined(__cplusplus) 58 #if defined(__cplusplus)
59 } 59 }
60 #endif 60 #endif
61 61
62#endif 62#endif
63 63
64/** @} */ 64/** @} */
65 65
diff --git a/lib/lufa/LUFA/Drivers/Board/AVR8/QMK/LEDs.h b/lib/lufa/LUFA/Drivers/Board/AVR8/QMK/LEDs.h
index 1310612dc..9fc696be9 100644
--- a/lib/lufa/LUFA/Drivers/Board/AVR8/QMK/LEDs.h
+++ b/lib/lufa/LUFA/Drivers/Board/AVR8/QMK/LEDs.h
@@ -1,194 +1,194 @@
1/* 1/*
2Copyright 2017 Jack Humbert 2Copyright 2017 Jack Humbert
3 3
4This program is free software: you can redistribute it and/or modify 4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by 5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or 6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version. 7(at your option) any later version.
8 8
9This program is distributed in the hope that it will be useful, 9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of 10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details. 12GNU General Public License for more details.
13 13
14You should have received a copy of the GNU General Public License 14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 16*/
17 17
18/** \file 18/** \file
19 * \brief General driver header for QMK-powered keyboards. 19 * \brief General driver header for QMK-powered keyboards.
20 * \copydetails Group_LEDs_QMK 20 * \copydetails Group_LEDs_QMK
21 * 21 *
22 * \note This file should not be included directly. It is automatically included as needed by the LEDs driver 22 * \note This file should not be included directly. It is automatically included as needed by the LEDs driver
23 * dispatch header located in LUFA/Drivers/Board/LEDs.h. 23 * dispatch header located in LUFA/Drivers/Board/LEDs.h.
24 */ 24 */
25 25
26/** \ingroup Group_LEDs 26/** \ingroup Group_LEDs
27 * \defgroup Group_LEDs_QMK QMK 27 * \defgroup Group_LEDs_QMK QMK
28 * \brief General driver header for QMK-powered keyboards. 28 * \brief General driver header for QMK-powered keyboards.
29 * 29 *
30 * General driver header for QMK-powered keyboards (http://qmk.fm). 30 * General driver header for QMK-powered keyboards (http://qmk.fm).
31 * 31 *
32 * <b>QMK</b>: 32 * <b>QMK</b>:
33 * <table> 33 * <table>
34 * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr> 34 * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
35 * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORT(QMK_LED).6</td></tr> 35 * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORT(QMK_LED).6</td></tr>
36 * </table> 36 * </table>
37 * 37 *
38 * @{ 38 * @{
39 */ 39 */
40 40
41#ifndef __LEDS_QMK_H__ 41#ifndef __LEDS_QMK_H__
42#define __LEDS_QMK_H__ 42#define __LEDS_QMK_H__
43 43
44 /* Includes: */ 44 /* Includes: */
45 #include "../../../../Common/Common.h" 45 #include "../../../../Common/Common.h"
46 46
47 /* Enable C linkage for C++ Compilers: */ 47 /* Enable C linkage for C++ Compilers: */
48 #if defined(__cplusplus) 48 #if defined(__cplusplus)
49 extern "C" { 49 extern "C" {
50 #endif 50 #endif
51 51
52 /* Preprocessor Checks: */ 52 /* Preprocessor Checks: */
53 #if !defined(__INCLUDE_FROM_LEDS_H) 53 #if !defined(__INCLUDE_FROM_LEDS_H)
54 #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead. 54 #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
55 #endif 55 #endif
56 56
57 #define B0 0x30 57 #define B0 0x30
58 #define B1 0x31 58 #define B1 0x31
59 #define B2 0x32 59 #define B2 0x32
60 #define B3 0x33 60 #define B3 0x33
61 #define B4 0x34 61 #define B4 0x34
62 #define B5 0x35 62 #define B5 0x35
63 #define B6 0x36 63 #define B6 0x36
64 #define B7 0x37 64 #define B7 0x37
65 #define C0 0x60 65 #define C0 0x60
66 #define C1 0x61 66 #define C1 0x61
67 #define C2 0x62 67 #define C2 0x62
68 #define C3 0x63 68 #define C3 0x63
69 #define C4 0x64 69 #define C4 0x64
70 #define C5 0x65 70 #define C5 0x65
71 #define C6 0x66 71 #define C6 0x66
72 #define C7 0x67 72 #define C7 0x67
73 #define D0 0x90 73 #define D0 0x90
74 #define D1 0x91 74 #define D1 0x91
75 #define D2 0x92 75 #define D2 0x92
76 #define D3 0x93 76 #define D3 0x93
77 #define D4 0x94 77 #define D4 0x94
78 #define D5 0x95 78 #define D5 0x95
79 #define D6 0x96 79 #define D6 0x96
80 #define D7 0x97 80 #define D7 0x97
81 #define E0 0xC0 81 #define E0 0xC0
82 #define E1 0xC1 82 #define E1 0xC1
83 #define E2 0xC2 83 #define E2 0xC2
84 #define E3 0xC3 84 #define E3 0xC3
85 #define E4 0xC4 85 #define E4 0xC4
86 #define E5 0xC5 86 #define E5 0xC5
87 #define E6 0xC6 87 #define E6 0xC6
88 #define E7 0xC7 88 #define E7 0xC7
89 #define F0 0xF0 89 #define F0 0xF0
90 #define F1 0xF1 90 #define F1 0xF1
91 #define F2 0xF2 91 #define F2 0xF2
92 #define F3 0xF3 92 #define F3 0xF3
93 #define F4 0xF4 93 #define F4 0xF4
94 #define F5 0xF5 94 #define F5 0xF5
95 #define F6 0xF6 95 #define F6 0xF6
96 #define F7 0xF7 96 #define F7 0xF7
97 #define A0 0x00 97 #define A0 0x00
98 #define A1 0x01 98 #define A1 0x01
99 #define A2 0x02 99 #define A2 0x02
100 #define A3 0x03 100 #define A3 0x03
101 #define A4 0x04 101 #define A4 0x04
102 #define A5 0x05 102 #define A5 0x05
103 #define A6 0x06 103 #define A6 0x06
104 #define A7 0x07 104 #define A7 0x07
105 105
106 #define QMK_ESC_COL F1 106 #define QMK_ESC_COL F1
107 #define QMK_ESC_ROW D5 107 #define QMK_ESC_ROW D5
108 #define QMK_LED E6 108 #define QMK_LED E6
109 #define QMK_SPEAKER C6 109 #define QMK_SPEAKER C6
110 110
111 #define DDR(pin) _SFR_IO8(((pin) >> 4) + 1) 111 #define DDR(pin) _SFR_IO8(((pin) >> 4) + 1)
112 #define PORT(pin) _SFR_IO8(((pin) >> 4) + 2) 112 #define PORT(pin) _SFR_IO8(((pin) >> 4) + 2)
113 #define PIN(pin) _SFR_IO8((pin) >> 4) 113 #define PIN(pin) _SFR_IO8((pin) >> 4)
114 #define NUM(pin) _BV((pin) & 0xF) 114 #define NUM(pin) _BV((pin) & 0xF)
115 115
116 /* Public Interface - May be used in end-application: */ 116 /* Public Interface - May be used in end-application: */
117 /* Macros: */ 117 /* Macros: */
118 /** LED mask for the first LED on the board. */ 118 /** LED mask for the first LED on the board. */
119 #define LEDS_LED1 NUM(QMK_LED) 119 #define LEDS_LED1 NUM(QMK_LED)
120 #define LEDS_LED2 NUM(QMK_SPEAKER) 120 #define LEDS_LED2 NUM(QMK_SPEAKER)
121 121
122 /** LED mask for all the LEDs on the board. */ 122 /** LED mask for all the LEDs on the board. */
123 #define LEDS_ALL_LEDS LEDS_LED1 | LEDS_LED2 123 #define LEDS_ALL_LEDS LEDS_LED1 | LEDS_LED2
124 124
125 /** LED mask for none of the board LEDs. */ 125 /** LED mask for none of the board LEDs. */
126 #define LEDS_NO_LEDS 0 126 #define LEDS_NO_LEDS 0
127 127
128 /* Inline Functions: */ 128 /* Inline Functions: */
129 #if !defined(__DOXYGEN__) 129 #if !defined(__DOXYGEN__)
130 static inline void LEDs_Init(void) 130 static inline void LEDs_Init(void)
131 { 131 {
132 DDR(QMK_LED) |= LEDS_LED1; 132 DDR(QMK_LED) |= LEDS_LED1;
133 PORT(QMK_LED) |= LEDS_LED1; 133 PORT(QMK_LED) |= LEDS_LED1;
134 134
135 DDR(QMK_SPEAKER) |= LEDS_LED2; 135 DDR(QMK_SPEAKER) |= LEDS_LED2;
136 PORT(QMK_SPEAKER) |= LEDS_LED2; 136 PORT(QMK_SPEAKER) |= LEDS_LED2;
137 } 137 }
138 138
139 static inline void LEDs_Disable(void) 139 static inline void LEDs_Disable(void)
140 { 140 {
141 DDR(QMK_LED) &= ~LEDS_LED1; 141 DDR(QMK_LED) &= ~LEDS_LED1;
142 PORT(QMK_LED) &= ~LEDS_LED2; 142 PORT(QMK_LED) &= ~LEDS_LED2;
143 143
144 DDR(QMK_SPEAKER) &= ~LEDS_LED1; 144 DDR(QMK_SPEAKER) &= ~LEDS_LED1;
145 PORT(QMK_SPEAKER) &= ~LEDS_LED2; 145 PORT(QMK_SPEAKER) &= ~LEDS_LED2;
146 } 146 }
147 147
148 static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) 148 static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
149 { 149 {
150 PORT(QMK_LED) &= (LEDS_LED1 & ~LEDMask); 150 PORT(QMK_LED) &= (LEDS_LED1 & ~LEDMask);
151 PORT(QMK_SPEAKER) &= (LEDS_LED2 & ~LEDMask); 151 PORT(QMK_SPEAKER) &= (LEDS_LED2 & ~LEDMask);
152 } 152 }
153 153
154 static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) 154 static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
155 { 155 {
156 PORT(QMK_LED) |= (LEDS_LED1 & LEDMask); 156 PORT(QMK_LED) |= (LEDS_LED1 & LEDMask);
157 PORT(QMK_SPEAKER) |= (LEDS_LED2 & LEDMask); 157 PORT(QMK_SPEAKER) |= (LEDS_LED2 & LEDMask);
158 } 158 }
159 159
160 static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) 160 static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
161 { 161 {
162 PORT(QMK_LED) = ((PORT(QMK_LED) | LEDS_LED1) & ~LEDMask); 162 PORT(QMK_LED) = ((PORT(QMK_LED) | LEDS_LED1) & ~LEDMask);
163 PORT(QMK_SPEAKER) = ((PORT(QMK_SPEAKER) | LEDS_LED2) & ~LEDMask); 163 PORT(QMK_SPEAKER) = ((PORT(QMK_SPEAKER) | LEDS_LED2) & ~LEDMask);
164 } 164 }
165 165
166 static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, 166 static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
167 const uint8_t ActiveMask) 167 const uint8_t ActiveMask)
168 { 168 {
169 PORT(QMK_LED) = ((PORT(QMK_LED) | (LEDS_LED1 & LEDMask)) & ~ActiveMask); 169 PORT(QMK_LED) = ((PORT(QMK_LED) | (LEDS_LED1 & LEDMask)) & ~ActiveMask);
170 PORT(QMK_SPEAKER) = ((PORT(QMK_SPEAKER) | (LEDS_LED1 & LEDMask)) & ~ActiveMask); 170 PORT(QMK_SPEAKER) = ((PORT(QMK_SPEAKER) | (LEDS_LED1 & LEDMask)) & ~ActiveMask);
171 } 171 }
172 172
173 static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) 173 static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
174 { 174 {
175 PIN(QMK_LED) = (LEDS_LED1 & LEDMask); 175 PIN(QMK_LED) = (LEDS_LED1 & LEDMask);
176 PIN(QMK_SPEAKER) = (LEDS_LED2 & LEDMask); 176 PIN(QMK_SPEAKER) = (LEDS_LED2 & LEDMask);
177 } 177 }
178 178
179 static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; 179 static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
180 static inline uint8_t LEDs_GetLEDs(void) 180 static inline uint8_t LEDs_GetLEDs(void)
181 { 181 {
182 return (~PORT(QMK_LED) & LEDS_LED1) | (~(PORT(QMK_SPEAKER) & LEDS_LED2)); 182 return (~PORT(QMK_LED) & LEDS_LED1) | (~(PORT(QMK_SPEAKER) & LEDS_LED2));
183 } 183 }
184 #endif 184 #endif
185 185
186 /* Disable C linkage for C++ Compilers: */ 186 /* Disable C linkage for C++ Compilers: */
187 #if defined(__cplusplus) 187 #if defined(__cplusplus)
188 } 188 }
189 #endif 189 #endif
190 190
191#endif 191#endif
192 192
193/** @} */ 193/** @} */
194 194