~ruther/qmk_firmware

ref: fa8940e5a66635e2b37e7df56b8d2c10e7e562a5 qmk_firmware/users/mtei/layer_number_util.h -rw-r--r-- 643 bytes
fa8940e5 — Agent Blu, 006 Keyboard change blu/vimclutch to hardware revision B. (#22247) 1 year, 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright (c) 2022 Takeshi Ishii (mtei@github)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once

#include "cpp_map.h"

//build -> _<sym>,
#define _BUILD_LAYER_ENUM_NUMBER(sym, str) _ ## sym,
#define BUILD_LAYER_ENUM_NUMBER(ent) _BUILD_LAYER_ENUM_NUMBER ent

//build -> static const char <sym>_name[]  PROGMEM = str;
#define _BUILD_LAYER_NAME_STR(sym, str) static const char sym ## _name[]  PROGMEM = str;
#define BUILD_LAYER_NAME_STR(ent) _BUILD_LAYER_NAME_STR ent

//build -> [_<sym>] = <sym>_name,
#define _BUILD_LAYER_NAME_TABLE(sym, str) [_##sym] = sym ## _name,
#define BUILD_LAYER_NAME_TABLE(ent) _BUILD_LAYER_NAME_TABLE ent
Do not follow this link