/* * rhmidi * * Copyright (C) 2014 Christian Pointner * * This file is part of rhmidi. * * rhmidi is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * rhmidi is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with rhmidi. If not, see . */ #include #include "keypad.h" #define KEYPAD_PIN PINA #define KEYPAD_PORT PORTA #define KEYPAD_DDR DDRA #define LEDS_LOW_PORT PORTC #define LEDS_LOW_DDR DDRC #define LEDS_HIGH_PORT PORTD #define LEDS_HIGH_DDR DDRD void keypad_init(void) { KEYPAD_DDR = 0x00; KEYPAD_PORT = 0xFF; LEDS_LOW_DDR = 0xFF; LEDS_LOW_PORT = 0xFF; LEDS_HIGH_DDR = 0xFF; LEDS_HIGH_PORT = 0xFF; } void keypad_start_led_test(int cnt) { LEDS_LOW_PORT = 0x00; LEDS_HIGH_PORT = 0x00; } void keypad_task(void) { // TODO: poll keypad matrix for changes (with low pass) // control led test (if running) }