2012-03-27 12:06:52 +02:00
|
|
|
/* ----------------------------------------------------------------------------
|
2012-08-07 00:57:23 +02:00
|
|
|
* main() : functions and data that may be useful externally
|
2012-03-27 12:06:52 +02:00
|
|
|
* ----------------------------------------------------------------------------
|
|
|
|
* Copyright (c) 2012 Ben Blazak <benblazak.dev@gmail.com>
|
|
|
|
* Released under The MIT License (MIT) (see "license.md")
|
|
|
|
* Project located at <https://github.com/benblazak/ergodox-firmware>
|
|
|
|
* ------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
|
2012-07-31 23:48:31 +02:00
|
|
|
#ifndef MAIN_h
|
|
|
|
#define MAIN_h
|
2012-03-27 12:06:52 +02:00
|
|
|
|
2012-08-07 00:57:23 +02:00
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "./keyboard/matrix.h"
|
2012-07-31 23:48:31 +02:00
|
|
|
|
2012-08-07 00:57:23 +02:00
|
|
|
// --------------------------------------------------------------------
|
|
|
|
|
|
|
|
extern bool (*main_kb_is_pressed)[KB_ROWS][KB_COLUMNS];
|
|
|
|
extern bool (*main_kb_was_pressed)[KB_ROWS][KB_COLUMNS];
|
|
|
|
|
2012-11-30 21:06:41 +01:00
|
|
|
extern uint8_t main_layers_pressed[KB_ROWS][KB_COLUMNS];
|
2012-08-07 00:57:23 +02:00
|
|
|
|
|
|
|
extern uint8_t main_loop_row;
|
|
|
|
extern uint8_t main_loop_col;
|
|
|
|
|
|
|
|
extern uint8_t main_arg_layer;
|
2012-11-30 21:06:41 +01:00
|
|
|
extern uint8_t main_arg_layer_offset;
|
2012-08-07 00:57:23 +02:00
|
|
|
extern uint8_t main_arg_row;
|
|
|
|
extern uint8_t main_arg_col;
|
|
|
|
extern bool main_arg_is_pressed;
|
|
|
|
extern bool main_arg_was_pressed;
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------
|
|
|
|
|
2012-11-30 21:06:41 +01:00
|
|
|
void main_exec_key (void);
|
|
|
|
|
|
|
|
uint8_t main_layers_peek (uint8_t offset);
|
|
|
|
uint8_t main_layers_push (uint8_t layer);
|
|
|
|
void main_layers_pop_id (uint8_t id);
|
|
|
|
uint8_t main_layers_get_offset_id (uint8_t id);
|
|
|
|
|
2012-03-27 12:06:52 +02:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|