This repository has been archived by the owner on May 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 118
Plugins
Gal Zaidenstein edited this page Sep 21, 2019
·
4 revisions
MK32 currently supports launching one plugin at a time by an assigned key.
In order to close the plugin you need to assign a key for PN_CLOSE
.
In order to add a plugin to be assigned to a keypress:
- place it's files in
MK32/plugins
. - Include the plugin's header file in
plugins.h
. - modify
plugin_keycodes
to add the keycode to launch the plugin, do not remove PN_CLOSE:
enum plugin_keycodes {
PN_CLOSE = PLUGIN_BASE_VAL,
PN_LAYOUT,
PN_TEST
};
- Add a case for you plugin's keycode in
plugins.c
usingstart_plugin_task
:
case PN_TEST:
start_plugin_task(testFunc, 0, 0);
break;
usage:
/*
* @brief start a plugin FreeRTOS task
* @param plugin pass a function to be opened as the plugin
* @param wifi_enable set 0 if function does not require wiFi
* @param block_ble_report set 0 if you do not wish to block keyboard reports
*/
void start_plugin_task(func_t plugin, int wifi_enable, int block_ble_report);
Notes:
- If your plugin required WiFi, you can set the default SSID and Password in
plugins.h
, a plugin to add an AP configuration to flash will be added eventually.