diff options
Diffstat (limited to 'keyboards/infinity60')
-rw-r--r-- | keyboards/infinity60/chconf.h | 2 | ||||
-rw-r--r-- | keyboards/infinity60/infinity60.c | 15 | ||||
-rw-r--r-- | keyboards/infinity60/keymaps/default/keymap.c | 9 | ||||
-rwxr-xr-x | keyboards/infinity60/keymaps/depariel/keymap.c | 9 | ||||
-rw-r--r-- | keyboards/infinity60/keymaps/hasu/keymap.c | 10 | ||||
-rw-r--r-- | keyboards/infinity60/matrix.c | 10 |
6 files changed, 53 insertions, 2 deletions
diff --git a/keyboards/infinity60/chconf.h b/keyboards/infinity60/chconf.h index 43c845739a..d9114ec858 100644 --- a/keyboards/infinity60/chconf.h +++ b/keyboards/infinity60/chconf.h @@ -48,7 +48,7 @@ * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ -#define CH_CFG_ST_FREQUENCY 1000 +#define CH_CFG_ST_FREQUENCY 100000 /** * @brief Time delta constant for the tick-less mode. diff --git a/keyboards/infinity60/infinity60.c b/keyboards/infinity60/infinity60.c index e471250feb..fdeed5124d 100644 --- a/keyboards/infinity60/infinity60.c +++ b/keyboards/infinity60/infinity60.c @@ -15,3 +15,18 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "infinity60.h" + +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(); +} + diff --git a/keyboards/infinity60/keymaps/default/keymap.c b/keyboards/infinity60/keymaps/default/keymap.c index 4434128579..8347c94b48 100644 --- a/keyboards/infinity60/keymaps/default/keymap.c +++ b/keyboards/infinity60/keymaps/default/keymap.c @@ -46,3 +46,12 @@ const uint16_t fn_actions[] = { }; +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + +}; diff --git a/keyboards/infinity60/keymaps/depariel/keymap.c b/keyboards/infinity60/keymaps/depariel/keymap.c index 7412b9b9dd..57f9487f22 100755 --- a/keyboards/infinity60/keymaps/depariel/keymap.c +++ b/keyboards/infinity60/keymaps/depariel/keymap.c @@ -80,3 +80,12 @@ const uint16_t PROGMEM fn_actions[] = { }; +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + +}; diff --git a/keyboards/infinity60/keymaps/hasu/keymap.c b/keyboards/infinity60/keymaps/hasu/keymap.c index d3728869ab..9982078c19 100644 --- a/keyboards/infinity60/keymaps/hasu/keymap.c +++ b/keyboards/infinity60/keymaps/hasu/keymap.c @@ -111,3 +111,13 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t fn_actions[] = { }; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + +}; diff --git a/keyboards/infinity60/matrix.c b/keyboards/infinity60/matrix.c index 62c165aa53..b6ccf86c3a 100644 --- a/keyboards/infinity60/matrix.c +++ b/keyboards/infinity60/matrix.c @@ -62,6 +62,8 @@ void matrix_init(void) #endif memset(matrix, 0, MATRIX_ROWS); memset(matrix_debouncing, 0, MATRIX_ROWS); + + matrix_init_quantum(); } uint8_t matrix_scan(void) @@ -96,7 +98,12 @@ uint8_t matrix_scan(void) } #endif - wait_us(1); // need wait to settle pin state + // need wait to settle pin state + // if you wait too short, or have a too high update rate + // the keyboard might freeze, or there might not be enough + // processing power to update the LCD screen properly. + // 20us, or two ticks at 100000Hz seems to be OK + wait_us(20); // read col data data = (palReadPort(GPIOD)>>1); @@ -141,6 +148,7 @@ uint8_t matrix_scan(void) } debouncing = false; } + matrix_scan_quantum(); return 1; } |