summaryrefslogtreecommitdiff
path: root/software/rhmixxx
diff options
context:
space:
mode:
Diffstat (limited to 'software/rhmixxx')
-rw-r--r--software/rhmixxx/keypad.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/software/rhmixxx/keypad.c b/software/rhmixxx/keypad.c
index 96214e8..7362ab4 100644
--- a/software/rhmixxx/keypad.c
+++ b/software/rhmixxx/keypad.c
@@ -19,19 +19,37 @@
* along with rhmidi. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <avr/io.h>
#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)
}