2021-11-28 21:34:32 +00:00
|
|
|
// -*- mode: C; tab-width: 2 ; indent-tabs-mode: nil -*-
|
|
|
|
//
|
|
|
|
// Unified Keyboard Project
|
|
|
|
// ASDF keyboard firmware
|
|
|
|
//
|
|
|
|
// asdf_keymap_table.c
|
|
|
|
//
|
|
|
|
// initialize keymap setup function table
|
|
|
|
//
|
|
|
|
// *** AUTO-generated file. DO NOT EDIT. ***
|
|
|
|
// *** To modify template, edit $ROOT/src/Keymaps/asdf_keymap_table.c.in ***
|
|
|
|
// *** To modify keymap list, edit $ROOT/keymap_list.cmake
|
|
|
|
//
|
|
|
|
// Copyright 2019 David Fenyes
|
|
|
|
//
|
|
|
|
// This program is free software: you can redistribute it and/or modify it under
|
|
|
|
// the terms of the GNU General Public License as published by the Free Software
|
|
|
|
// Foundation, either version 3 of the License, or (at your option) any later
|
|
|
|
// version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
|
|
// details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License along with
|
|
|
|
// this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
@keymap_declarations@
|
|
|
|
|
|
|
|
// PROCEDURE: asdf_keymap_setup
|
|
|
|
//
|
|
|
|
// INPUTS: (uint8_t) index - index of the keymap setup function to call
|
|
|
|
// OUTPUTS: none
|
|
|
|
////
|
|
|
|
// DESCRIPTION: This function calls the keymap setup function specified
|
|
|
|
// by the index.
|
|
|
|
//
|
|
|
|
// SIDE EFFECTS: See Description
|
|
|
|
//
|
|
|
|
// NOTES: This function is necessary because functions defined in external
|
|
|
|
// modules are not considered compile-time constants by the C99 standard, so the
|
|
|
|
// array cannot be initialized with a compile-time declaration.
|
|
|
|
//
|
|
|
|
// SCOPE: public
|
|
|
|
//
|
|
|
|
// COMPLEXITY: 1
|
|
|
|
//
|
|
|
|
void asdf_keymap_setup(uint8_t index) {
|
|
|
|
switch(index) {
|
2021-12-01 21:56:25 +00:00
|
|
|
default: @keymap_table@
|
2021-11-28 21:34:32 +00:00
|
|
|
}
|
2021-11-29 22:26:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PROCEDURE: asdf_keymap_valid
|
|
|
|
//
|
|
|
|
// INPUTS: (uint8_t) index - index of the keymap setup function to check
|
|
|
|
// OUTPUTS: (uintu_t) returns TRUE (nonzero) if valid, FALSE (0) otherwise
|
2021-12-11 04:26:59 +00:00
|
|
|
//
|
2021-11-29 22:26:08 +00:00
|
|
|
// DESCRIPTION: This function returns TRUE if the index corresponds to
|
|
|
|
// a valid keymap.
|
|
|
|
//
|
|
|
|
// SIDE EFFECTS: none
|
|
|
|
//
|
|
|
|
// NOTES:
|
|
|
|
//
|
|
|
|
// SCOPE: public
|
|
|
|
//
|
|
|
|
// COMPLEXITY: 1
|
|
|
|
//
|
|
|
|
uint8_t asdf_keymap_valid(uint8_t index) {
|
|
|
|
uint8_t valid = 0;
|
|
|
|
|
2021-12-01 21:56:25 +00:00
|
|
|
switch(index) { @keymap_valid@
|
|
|
|
valid = 1;
|
2021-11-29 22:26:08 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2021-12-01 21:56:25 +00:00
|
|
|
valid = 0;
|
2021-11-29 22:26:08 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return valid;
|
|
|
|
}
|
|
|
|
|
2021-11-28 21:34:32 +00:00
|
|
|
|
|
|
|
//-------|---------|---------+---------+---------+---------+---------+---------+
|
|
|
|
// Above line is 80 columns, and should display completely in the editor.
|
|
|
|
|