paul@219 | 1 | /* |
paul@219 | 2 | * MiniPC GPIO details. |
paul@219 | 3 | * |
paul@219 | 4 | * Copyright (C) 2017 Paul Boddie <paul@boddie.org.uk> |
paul@219 | 5 | * |
paul@219 | 6 | * This program is free software; you can redistribute it and/or |
paul@219 | 7 | * modify it under the terms of the GNU General Public License as |
paul@219 | 8 | * published by the Free Software Foundation; either version 2 of |
paul@219 | 9 | * the License, or (at your option) any later version. |
paul@219 | 10 | * |
paul@219 | 11 | * This program is distributed in the hope that it will be useful, |
paul@219 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
paul@219 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
paul@219 | 14 | * GNU General Public License for more details. |
paul@219 | 15 | * |
paul@219 | 16 | * You should have received a copy of the GNU General Public License |
paul@219 | 17 | * along with this program; if not, write to the Free Software |
paul@219 | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, |
paul@219 | 19 | * Boston, MA 02110-1301, USA |
paul@219 | 20 | */ |
paul@219 | 21 | |
paul@234 | 22 | #include "minipc_gpio.h" |
paul@219 | 23 | #include "minipc.h" |
paul@219 | 24 | #include <stdint.h> |
paul@219 | 25 | |
paul@234 | 26 | #define PIN(x) gpio_global_pin(3, x) |
paul@219 | 27 | |
paul@219 | 28 | const uint8_t GPIO_KEYIN_ROW[GPIO_KEYIN_COUNT] = { |
paul@219 | 29 | 0, 1, 2, 3, 4, 5, 6, 7 /* if jz_keypad.c is understood correctly */ |
paul@219 | 30 | }; |
paul@219 | 31 | |
paul@219 | 32 | const uint8_t GPIO_KEYOUT_COL[GPIO_KEYOUT_COUNT] = { |
paul@219 | 33 | PIN(0), PIN(1), PIN(2), PIN(3), PIN(4), PIN(5), PIN(6), PIN(7), |
paul@219 | 34 | PIN(8), PIN(9), PIN(10), PIN(11), PIN(12), PIN(13), PIN(14), PIN(15), |
paul@219 | 35 | PIN(16) |
paul@219 | 36 | }; |
paul@219 | 37 | |
paul@219 | 38 | #undef PIN |