sxkbd

Firmware for RP2040-based corne split keyboard
git clone https://git.sinitax.com/sinitax/sxkbd
Log | Files | Refs | Submodules | README | LICENSE | sfeed.txt

keymat.h (519B)


      1#pragma once
      2
      3#include "util.h"
      4
      5#include <stdint.h>
      6
      7#define KEY_ROWS_HALF 4
      8#define KEY_ROWS (KEY_ROWS_HALF * 2)
      9#define KEY_COLS 6
     10#define KEY_COUNT (KEY_ROWS * KEY_COLS)
     11
     12#define KEYMAT_HALF(keymat, side) ((side) == LEFT ? &(keymat)[0] : &(keymat)[KEY_ROWS_HALF])
     13
     14void keymat_init(void);
     15bool keymat_scan(void);
     16uint32_t keymat_encode_half(int side);
     17void keymat_decode_half(int side, uint32_t mask);
     18
     19void keymat_debug(void);
     20
     21extern bool keymat_prev[KEY_ROWS][KEY_COLS];
     22extern bool keymat[KEY_ROWS][KEY_COLS];
     23