paul@219 | 1 | /* |
paul@219 | 2 | * Ben NanoNote 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 "nanonote_gpio.h" |
paul@219 | 23 | #include "nanonote.h" |
paul@219 | 24 | #include <stdint.h> |
paul@219 | 25 | |
paul@234 | 26 | #define PIN(x) gpio_global_pin(3, 18 + x) |
paul@219 | 27 | |
paul@219 | 28 | const uint8_t GPIO_KEYIN_ROW[GPIO_KEYIN_COUNT] = { |
paul@234 | 29 | PIN(0), PIN(1), PIN(2), PIN(3), PIN(4), PIN(5), PIN(6), PIN(8) |
paul@219 | 30 | }; |
paul@219 | 31 | |
paul@219 | 32 | #undef PIN |
paul@234 | 33 | #define PIN(x) gpio_global_pin(2, 10 + x) |
paul@219 | 34 | |
paul@219 | 35 | const uint8_t GPIO_KEYOUT_COL[GPIO_KEYOUT_COUNT] = { |
paul@234 | 36 | PIN(0), PIN(1), PIN(2), PIN(3), PIN(4), PIN(5), PIN(6), PIN(7), |
paul@219 | 37 | }; |
paul@219 | 38 | |
paul@219 | 39 | #undef PIN |