Beginning to implement the ATTiny based firmwaare

pull/18/head
Jesse Vincent 9 years ago
parent 024c8f39ab
commit 59fbee7591

@ -1,20 +1,16 @@
#include <Arduino.h>
#include "Model01.h"
KeyboardioScanner Model01::leftHand(0);
KeyboardioScanner Model01::rightHand(3);
Model01::Model01(void) {
}
void Model01::setup(void) {
Wire.begin();
}
void Model01::led_set_crgb_at(byte row, byte col, cRGB color) {
}
cRGB Model01::get_key_color(byte row, byte col) {
}
void Model01::led_set_crgb_at(uint8_t i, cRGB crgb) {
}
@ -25,11 +21,11 @@ void Model01::led_sync() {
void Model01::scan_matrix() {
uint8_t key_data;
//scan the Keyboard matrix looking for connections
for (byte row = 0; row < LEFT_ROWS; row++) {
for (byte row = 0; row < 4; row++) {
for (byte col = 0; col < LEFT_COLS; col++) {
for (byte col = 0; col < 4; col++) {
handle_key_event(row, col, &key_data);
handle_key_event(row, (COLS - 1) - col, &key_data);
handle_key_event(row, (8- 1) - col, &key_data);
}
}
}

@ -1,18 +1,16 @@
#pragma once
#define HARDWARE_IMPLEMENTATION Model01
#include <Arduino.h>
#define HARDWARE_IMPLEMENTATION Model01
#include "KeyboardioScanner.h"
#include <Wire.h>
#include "../keymaps.h"
#include "../key_events.h"
#define RIGHT_COLS 8
#define RIGHT_ROWS 4
#define LEFT_COLS 8
#define LEFT_ROWS 4
@ -29,6 +27,9 @@ class Model01 {
private:
static KeyboardioScanner leftHand;
static KeyboardioScanner rightHand;
static constexpr uint8_t key_led_map[4][16] = {
{3,4,11,12,19,20,26,27, 36,37,43,44,51,52,59,60},
{2,5,10,13,18,21,31,28, 35,32,42,45,50,53,58,61},

Loading…
Cancel
Save