Mercurial > louis > kiibohd-controller
comparison 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 |
comparison
equal
deleted
inserted
replaced
340:e8841d3c6db5 | 341:66eccdd9ced5 |
---|---|
1 /* Copyright (C) 2014 by Jacob Alexander | 1 /* Copyright (C) 2014-2015 by Jacob Alexander |
2 * | 2 * |
3 * Permission is hereby granted, free of charge, to any person obtaining a copy | 3 * Permission is hereby granted, free of charge, to any person obtaining a copy |
4 * of this software and associated documentation files (the "Software"), to deal | 4 * of this software and associated documentation files (the "Software"), to deal |
5 * in the Software without restriction, including without limitation the rights | 5 * in the Software without restriction, including without limitation the rights |
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | 6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | 17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | 18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
19 * THE SOFTWARE. | 19 * THE SOFTWARE. |
20 */ | 20 */ |
21 | 21 |
22 #ifndef __MATRIX_SETUP_H | 22 #pragma once |
23 #define __MATRIX_SETUP_H | |
24 | 23 |
25 // ----- Macros ----- | 24 // ----- Macros ----- |
26 | 25 |
27 // Convenience Macros | 26 // Convenience Macros |
28 #define gpio( port, pin ) { Port_##port, Pin_##pin } | 27 #define gpio( port, pin ) { Port_##port, Pin_##pin } |
29 #define Matrix_colsNum sizeof( Matrix_cols ) / sizeof( GPIO_Pin ) | 28 #define Matrix_colsNum sizeof( Matrix_cols ) / sizeof( GPIO_Pin ) |
30 #define Matrix_rowsNum sizeof( Matrix_rows ) / sizeof( GPIO_Pin ) | 29 #define Matrix_rowsNum sizeof( Matrix_rows ) / sizeof( GPIO_Pin ) |
31 #define Matrix_maxKeys sizeof( Matrix_scanArray ) / sizeof( KeyState ) | 30 #define Matrix_maxKeys sizeof( Matrix_scanArray ) / sizeof( KeyState ) |
32 | 31 |
33 | |
34 #endif // __MATRIX_SETUP_H | |
35 |