(mostly small doc and comment changes)
parent
4e1bd12990
commit
76eaa117ce
|
@ -117,12 +117,14 @@ static _layout_t PROGMEM _layout;
|
||||||
* keypresses on this run of the function (see the documentation in
|
* keypresses on this run of the function (see the documentation in
|
||||||
* ".../firmware/lib/timer.h" for more precisely what this means)
|
* ".../firmware/lib/timer.h" for more precisely what this means)
|
||||||
* - This is useful for defining things like sticky keys, if, e.g., you
|
* - This is useful for defining things like sticky keys, if, e.g., you
|
||||||
* want to make it so that you can press more than one and have none of
|
* want to make it so that you can press more than one and have none of
|
||||||
* them release until the press of the next normal key.
|
* them release until the press of the next normal key.
|
||||||
*/
|
*/
|
||||||
static struct {
|
static struct {
|
||||||
bool tick_keypresses : 1;
|
bool tick_keypresses : 1;
|
||||||
} _flags = { .tick_keypresses = true };
|
} _flags = {
|
||||||
|
.tick_keypresses = true,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
* Meant to be included *only* by the layout using it.
|
* Meant to be included *only* by the layout using it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// TODO: make a KF for windows/mac style unicode input
|
|
||||||
|
|
||||||
// TODO: write a chordmak (or asetniop) layout, on top of a standard colemak
|
// TODO: write a chordmak (or asetniop) layout, on top of a standard colemak
|
||||||
// layout, using chained sticky keys for the modifiers
|
// layout, using chained sticky keys for the modifiers
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,10 @@
|
||||||
* counter and running any scheduled events).
|
* counter and running any scheduled events).
|
||||||
*
|
*
|
||||||
* - A "timer" is a collection of related `...get...()`, `...schedule...()`,
|
* - A "timer" is a collection of related `...get...()`, `...schedule...()`,
|
||||||
* and `...tick...()` functions, all dealing with the same (not externally
|
* and `...tick...()` functions, all dealing with the same (private)
|
||||||
* visible) variables.
|
* variables.
|
||||||
*
|
*
|
||||||
* - For milliseconds
|
* - Table, for milliseconds
|
||||||
*
|
*
|
||||||
* ---------------------------------------------------------------------
|
* ---------------------------------------------------------------------
|
||||||
* number highest value in in in in
|
* number highest value in in in in
|
||||||
|
@ -90,15 +90,15 @@ void timer___tick_milliseconds (void);
|
||||||
* - Should be called exactly once by `main()` before entering the run loop.
|
* - Should be called exactly once by `main()` before entering the run loop.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// === (group) get() ===
|
// === (group) get ===
|
||||||
/** functions/(group) get/description
|
/** functions/(group) get/description
|
||||||
* Return the number of "ticks" since the given timer was initialized
|
* Return the number of "ticks" since the given timer was initialized
|
||||||
* (mod 2^16)
|
* (mod 2^16)
|
||||||
*
|
*
|
||||||
* Members:
|
* Members:
|
||||||
* - `timer__get_cycles`
|
* - `timer__get_cycles`: Counts the number of scan cycles
|
||||||
* - `timer__get_keypresses`
|
* - `timer__get_keypresses`: Counts the number of applicable key presses
|
||||||
* - `timer__get_milliseconds`
|
* - `timer__get_milliseconds`: Counts real time milliseconds
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* - success: The number of "ticks" since the timer was initialized (mod 2^16)
|
* - success: The number of "ticks" since the timer was initialized (mod 2^16)
|
||||||
|
@ -153,7 +153,7 @@ void timer___tick_milliseconds (void);
|
||||||
* except within the first 2^8 milliseconds of the timer being initialized.
|
* except within the first 2^8 milliseconds of the timer being initialized.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// === (group) schedule() ===
|
// === (group) schedule ===
|
||||||
/** functions/(group) schedule/description
|
/** functions/(group) schedule/description
|
||||||
* Schedule `function` to run in the given number of "ticks"
|
* Schedule `function` to run in the given number of "ticks"
|
||||||
*
|
*
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
* Warnings:
|
* Warnings:
|
||||||
* - These functions are not safe for use within interrupt vectors. Just in
|
* - These functions are not safe for use within interrupt vectors. Just in
|
||||||
* case you were tempted to try :)
|
* case you were tempted to try :)
|
||||||
|
* - It is safe to `...append()` while `...tick()`ing though (as when a
|
||||||
|
* function reschedules itself)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,6 @@
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// --- for main() loop ---
|
|
||||||
|
|
||||||
bool (* is_pressed) [OPT__KB__ROWS][OPT__KB__COLUMNS]
|
bool (* is_pressed) [OPT__KB__ROWS][OPT__KB__COLUMNS]
|
||||||
= &( bool [OPT__KB__ROWS][OPT__KB__COLUMNS] ){};
|
= &( bool [OPT__KB__ROWS][OPT__KB__COLUMNS] ){};
|
||||||
bool (* was_pressed) [OPT__KB__ROWS][OPT__KB__COLUMNS]
|
bool (* was_pressed) [OPT__KB__ROWS][OPT__KB__COLUMNS]
|
||||||
|
@ -53,9 +51,6 @@ uint8_t col;
|
||||||
|
|
||||||
struct main__flags_t flags = { .update_leds = true };
|
struct main__flags_t flags = { .update_leds = true };
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// --- main() loop ------------------------------------------------------------
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
/** functions/main/description
|
/** functions/main/description
|
||||||
|
|
Loading…
Reference in New Issue