annotate Scan/MatrixARM/matrix_setup.h @ 341:66eccdd9ced5

Code cleanup - Changing header file ifndef define to pragma once's - Removed duplicate output_com.h's
author Jacob Alexander <haata@kiibohd.com>
date Sun, 14 Jun 2015 13:56:56 -0700
parents 3caf3217b604
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
341
66eccdd9ced5 Code cleanup
Jacob Alexander <haata@kiibohd.com>
parents: 257
diff changeset
1 /* Copyright (C) 2014-2015 by Jacob Alexander
257
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
2 *
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
4 * of this software and associated documentation files (the "Software"), to deal
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
5 * in the Software without restriction, including without limitation the rights
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
7 * copies of the Software, and to permit persons to whom the Software is
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
8 * furnished to do so, subject to the following conditions:
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
9 *
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
10 * The above copyright notice and this permission notice shall be included in
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
11 * all copies or substantial portions of the Software.
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
12 *
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
19 * THE SOFTWARE.
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
20 */
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
21
341
66eccdd9ced5 Code cleanup
Jacob Alexander <haata@kiibohd.com>
parents: 257
diff changeset
22 #pragma once
257
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
23
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
24 // ----- Macros -----
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
25
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
26 // Convenience Macros
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
27 #define gpio( port, pin ) { Port_##port, Pin_##pin }
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
28 #define Matrix_colsNum sizeof( Matrix_cols ) / sizeof( GPIO_Pin )
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
29 #define Matrix_rowsNum sizeof( Matrix_rows ) / sizeof( GPIO_Pin )
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
30 #define Matrix_maxKeys sizeof( Matrix_scanArray ) / sizeof( KeyState )
3caf3217b604 Moving MatrixARM header macros to separate file
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
31