Most ergodox keymaps compiles on Infinity

There are linker errors due to missing led funcitonality though
example_keyboards
Fred Sundvik 8 years ago
parent b0376687f4
commit e01b4c3fd9

@ -1,8 +0,0 @@
/*
* ergodox.c
*
* Created on: 7 jul 2016
* Author: Fred Wales
*/

@ -1,6 +1,5 @@
#ifndef KEYBOARDS_ERGODOX_ERGODOX_H_ #ifndef KEYBOARDS_ERGODOX_ERGODOX_H_
#define KEYBOARDS_ERGODOX_ERGODOX_H_ #define KEYBOARDS_ERGODOX_ERGODOX_H_
#ifdef SUBPROJECT_ez #ifdef SUBPROJECT_ez
#include "ez.h" #include "ez.h"
#endif #endif

@ -52,14 +52,14 @@ ARMV = 7
# Vector table for application # Vector table for application
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ # 0x00000000-0x00001000 area is occupied by bootlaoder.*/
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
OPT_DEFS = -DCORTEX_VTOR_INIT=0x00002000 OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.
# #
CUSTOM_MATRIX ?= yes # Custom matrix file CUSTOM_MATRIX ?= yes # Custom matrix file
SERIAL_LINK_ENABLE = yes SERIAL_LINK_ENABLE = yes
VISUALIZER_ENABLE ?= yes VISUALIZER_ENABLE ?= no #temporarily disabled to make everything compile
LCD_ENABLE ?= yes LCD_ENABLE ?= yes
LED_ENABLE ?= yes LED_ENABLE ?= yes
LCD_BACKLIGHT_ENABLE ?= yes LCD_BACKLIGHT_ENABLE ?= yes

@ -1,8 +1,10 @@
#include "infinity_ergodox.h" #include "infinity.h"
#include "ch.h" #include "ch.h"
#include "hal.h" #include "hal.h"
#include "serial_link/system/serial_link.h" #include "serial_link/system/serial_link.h"
#ifdef VISUALIZER_ENABLE
#include "lcd_backlight.h" #include "lcd_backlight.h"
#endif
void init_serial_link_hal(void) { void init_serial_link_hal(void) {
PORTA->PCR[1] = PORTx_PCRn_PE | PORTx_PCRn_PS | PORTx_PCRn_PFE | PORTx_PCRn_MUX(2); PORTA->PCR[1] = PORTx_PCRn_PE | PORTx_PCRn_PS | PORTx_PCRn_PFE | PORTx_PCRn_MUX(2);
@ -36,7 +38,7 @@ void init_serial_link_hal(void) {
// Using a higher pre-scalar without flicker is possible but FTM0_MOD will need to be reduced // Using a higher pre-scalar without flicker is possible but FTM0_MOD will need to be reduced
// Which will reduce the brightness range // Which will reduce the brightness range
#define PRESCALAR_DEFINE 0 #define PRESCALAR_DEFINE 0
#ifdef VISUALIZER_ENABLE
void lcd_backlight_hal_init(void) { void lcd_backlight_hal_init(void) {
// Setup Backlight // Setup Backlight
SIM->SCGC6 |= SIM_SCGC6_FTM0; SIM->SCGC6 |= SIM_SCGC6_FTM0;
@ -74,3 +76,18 @@ void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b) {
CHANNEL_GREEN.CnV = g; CHANNEL_GREEN.CnV = g;
CHANNEL_BLUE.CnV = b; CHANNEL_BLUE.CnV = b;
} }
#endif
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}

@ -21,24 +21,24 @@
B04, \ B04, \
B14, B24, B34 \ B14, B24, B34 \
) { \ ) { \
{ KC_NO, KC_NO, KC_NO, KC_##A03, KC_##A04 }, \ { KC_NO, KC_NO, KC_NO, A03, A04 }, \
{ KC_NO, KC_NO, KC_NO, KC_##A13, KC_##A14 }, \ { KC_NO, KC_NO, KC_NO, A13, A14 }, \
{ KC_##A20, KC_##A21, KC_NO, KC_##A23, KC_##A24 }, \ { A20, A21, KC_NO, A23, A24 }, \
{ KC_##A30, KC_##A31, KC_##A32, KC_##A33, KC_##A34 }, \ { A30, A31, A32, A33, A34 }, \
{ KC_##A40, KC_##A41, KC_##A42, KC_##A43, KC_##A44 }, \ { A40, A41, A42, A43, A44 }, \
{ KC_##A50, KC_##A51, KC_##A52, KC_##A53, KC_##A54 }, \ { A50, A51, A52, A53, A54 }, \
{ KC_##A60, KC_##A61, KC_##A62, KC_##A63, KC_##A64 }, \ { A60, A61, A62, A63, A64 }, \
{ KC_##A70, KC_##A71, KC_##A72, KC_##A73, KC_##A74 }, \ { A70, A71, A72, A73, A74 }, \
{ KC_##A80, KC_##A81, KC_##A82, KC_##A83, KC_##A84 }, \ { A80, A81, A82, A83, A84 }, \
{ KC_NO, KC_NO, KC_NO, KC_##B03, KC_##B04 }, \ { KC_NO, KC_NO, KC_NO, B03, B04 }, \
{ KC_NO, KC_NO, KC_NO, KC_##B13, KC_##B14 }, \ { KC_NO, KC_NO, KC_NO, B13, B14 }, \
{ KC_##B20, KC_##B21, KC_NO, KC_##B23, KC_##B24 }, \ { B20, B21, KC_NO, B23, B24 }, \
{ KC_##B30, KC_##B31, KC_##B32, KC_##B33, KC_##B34 }, \ { B30, B31, B32, B33, B34 }, \
{ KC_##B40, KC_##B41, KC_##B42, KC_##B43, KC_##B44 }, \ { B40, B41, B42, B43, B44 }, \
{ KC_##B50, KC_##B51, KC_##B52, KC_##B53, KC_##B54 }, \ { B50, B51, B52, B53, B54 }, \
{ KC_##B60, KC_##B61, KC_##B62, KC_##B63, KC_##B64 }, \ { B60, B61, B62, B63, B64 }, \
{ KC_##B70, KC_##B71, KC_##B72, KC_##B73, KC_##B74 }, \ { B70, B71, B72, B73, B74 }, \
{ KC_##B80, KC_##B81, KC_##B82, KC_##B83, KC_##B84 } \ { B80, B81, B82, B83, B84 } \
} }
#endif /* KEYBOARDS_INFINITY_ERGODOX_INFINITY_ERGODOX_H_ */ #endif /* KEYBOARDS_INFINITY_ERGODOX_INFINITY_ERGODOX_H_ */

@ -63,6 +63,8 @@ void matrix_init(void)
memset(matrix, 0, MATRIX_ROWS); memset(matrix, 0, MATRIX_ROWS);
memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS); memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS);
matrix_init_quantum();
} }
uint8_t matrix_scan(void) uint8_t matrix_scan(void)
@ -127,6 +129,7 @@ uint8_t matrix_scan(void)
} }
debouncing = false; debouncing = false;
} }
matrix_scan_quantum();
return 1; return 1;
} }

@ -25,6 +25,7 @@
#include "led.h" #include "led.h"
#include "action_util.h" #include "action_util.h"
#include <stdlib.h> #include <stdlib.h>
#include "print.h"
extern uint32_t default_layer_state; extern uint32_t default_layer_state;

@ -29,7 +29,9 @@
#include <stdbool.h> #include <stdbool.h>
#include "util.h" #include "util.h"
#if defined(PROTOCOL_CHIBIOS)
#define PSTR(x) x
#endif
#ifndef NO_PRINT #ifndef NO_PRINT

Loading…
Cancel
Save