2016-11-26 06:11:40 +00:00
|
|
|
#ifndef PROMETHIUM_H
|
|
|
|
#define PROMETHIUM_H
|
|
|
|
|
|
|
|
#include "quantum.h"
|
|
|
|
|
2016-11-26 06:44:50 +00:00
|
|
|
#define PS2_INIT_DELAY 2000
|
2017-02-10 14:28:46 +00:00
|
|
|
#define BATTERY_PIN 9
|
|
|
|
#define BATTERY_POLL 30000
|
2017-02-11 07:50:43 +00:00
|
|
|
#define MAX_VOLTAGE 4.2
|
|
|
|
#define MIN_VOLTAGE 3.2
|
2016-11-26 06:44:50 +00:00
|
|
|
|
2016-11-26 06:11:40 +00:00
|
|
|
#define KEYMAP( \
|
|
|
|
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
|
|
|
|
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
|
|
|
|
k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
|
|
|
|
k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c \
|
|
|
|
) \
|
|
|
|
{ \
|
|
|
|
{k11, k12, k13, k14, k15, k16}, \
|
|
|
|
{k21, k22, k23, k24, k25, k26}, \
|
|
|
|
{k31, k32, k33, k34, k35, k36}, \
|
|
|
|
{k41, k42, k43, k44, k45, k46}, \
|
|
|
|
{k17, k18, k19, k1a, k1b, k1c}, \
|
|
|
|
{k27, k28, k29, k2a, k2b, k2c}, \
|
|
|
|
{k37, k38, k39, k3a, k3b, k3c}, \
|
|
|
|
{k47, k48, k49, k4a, k4b, k4c} \
|
|
|
|
}
|
|
|
|
|
2017-02-10 14:28:46 +00:00
|
|
|
|
|
|
|
|
2016-11-26 06:11:40 +00:00
|
|
|
enum led_sequence {
|
|
|
|
LED_IND_BLUETOOTH,
|
2016-12-04 07:51:27 +00:00
|
|
|
LED_IND_USB,
|
|
|
|
LED_IND_BATTERY,
|
2016-11-26 06:11:40 +00:00
|
|
|
|
2017-02-14 22:01:03 +00:00
|
|
|
LED_IND_FUN,
|
2016-12-04 07:51:27 +00:00
|
|
|
LED_IND_NUM,
|
|
|
|
LED_IND_EMOJI,
|
2016-11-26 06:11:40 +00:00
|
|
|
|
2016-12-04 07:51:27 +00:00
|
|
|
LED_BKSP,
|
|
|
|
LED_ENT,
|
|
|
|
LED_RSFT,
|
|
|
|
LED_RCTL,
|
2016-11-26 06:11:40 +00:00
|
|
|
|
2016-12-04 07:51:27 +00:00
|
|
|
LED_RGUI,
|
|
|
|
LED_SLSH,
|
|
|
|
LED_SCLN,
|
|
|
|
LED_P,
|
2016-11-26 06:11:40 +00:00
|
|
|
|
2016-12-04 07:51:27 +00:00
|
|
|
LED_O,
|
|
|
|
LED_L,
|
|
|
|
LED_DOT,
|
|
|
|
LED_RALT,
|
2016-11-26 06:11:40 +00:00
|
|
|
|
2016-12-04 07:51:27 +00:00
|
|
|
LED_EMOJI,
|
|
|
|
LED_COMM,
|
|
|
|
LED_K,
|
|
|
|
LED_I,
|
2016-11-26 06:11:40 +00:00
|
|
|
|
2016-12-04 07:51:27 +00:00
|
|
|
LED_U,
|
|
|
|
LED_J,
|
|
|
|
LED_M,
|
2017-02-14 22:01:03 +00:00
|
|
|
LED_FUN,
|
2016-11-26 06:11:40 +00:00
|
|
|
|
|
|
|
LED_RSPC,
|
|
|
|
LED_N,
|
|
|
|
LED_HH,
|
|
|
|
LED_Y,
|
|
|
|
|
2016-12-04 07:51:27 +00:00
|
|
|
LED_TRACKPOINT3,
|
|
|
|
LED_TRACKPOINT2,
|
|
|
|
LED_TRACKPOINT1,
|
2016-11-26 06:11:40 +00:00
|
|
|
|
2016-12-04 07:51:27 +00:00
|
|
|
LED_LSPC,
|
|
|
|
LED_B,
|
|
|
|
LED_G,
|
|
|
|
LED_T,
|
2016-11-26 06:11:40 +00:00
|
|
|
|
2016-12-04 07:51:27 +00:00
|
|
|
LED_R,
|
|
|
|
LED_F,
|
|
|
|
LED_V,
|
|
|
|
LED_NUM,
|
2016-11-26 06:11:40 +00:00
|
|
|
|
2016-12-04 07:51:27 +00:00
|
|
|
LED_PUNC,
|
|
|
|
LED_C,
|
|
|
|
LED_D,
|
|
|
|
LED_E,
|
2016-11-26 06:11:40 +00:00
|
|
|
|
2016-12-04 07:51:27 +00:00
|
|
|
LED_W,
|
|
|
|
LED_S,
|
|
|
|
LED_X,
|
|
|
|
LED_LALT,
|
|
|
|
|
|
|
|
LED_LGUI,
|
|
|
|
LED_Z,
|
|
|
|
LED_A,
|
|
|
|
LED_Q,
|
|
|
|
|
|
|
|
LED_TAB,
|
|
|
|
LED_ESC,
|
|
|
|
LED_LSFT,
|
|
|
|
LED_LCTL,
|
2016-11-26 06:11:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2017-02-11 07:50:43 +00:00
|
|
|
void battery_poll(uint8_t level);
|