Update to drashna keymaps and userspace (#2876)

* Fix Unicode sample

* Add irony mark

* Remove unpretty keymaps

* Add QMK DFU and Conditional Music Mode

* Unicode fixes

* Unicode fixes

* Make layer indication more modular

* Finish removing Faux Click

* Cleanup of UserSpace and addition of 'update_tri_layer_state' function

* Add modifier status indicators to Orthodox

* Remove tri layer function

* Minor tweaks

* Remove the Orthodox's Indicator's reliance on layer_state_set

* Add custom EEPROM settings

* Make EEPROM config more efficient

* Viterbi Config

* Add Iris Keyboard layout and Userspace cleanup

* Iris keyboard tweaks

* Use Grave Escape on Iris

* Update Readmes
This commit is contained in:
Drashna Jaelre 2018-05-02 08:39:46 -07:00 committed by Jack Humbert
parent 9b8fc6f1c0
commit e5540dd055
16 changed files with 623 additions and 268 deletions

View file

@ -146,3 +146,31 @@ endif
```
Then, if you run `make keyboard:name NO_SECRETS=yes`, it will default to the test strings in your `<name>.c` file, rather than reading from your file.
Userspace EEPROM config
-----------------------
This adds EEPROM support fo the userspace, so that certain values are configurable in such a way that persists when power is lost. Namely, just the clicky feature and the Overwatch macro option ("is_overwatch"). This is done by reading and saving the structure from EEPROM.
To implement this, first you need to specify the location:
```c
#define EECONFIG_USERSPACE (uint8_t *)20
```
This tells us where in the EEPROM that the data structure is located, and this specifies that it's a byte (8 bits). However, to maximize it's usage, we want to specify a data structure here, so that we can use multiple settings. To do that:
```c
typedef union {
uint32_t raw;
struct {
bool clicky_enable :1;
bool is_overwatch :1;
};
} userspace_config_t;
```
Then, in your C file, you want to add: `userspace_config_t userspace_config;`, and in your `matrix_init_*` function, you want to add `userspace_config.raw = eeprom_read_byte(EECONFIG_USERSPACE);`
From there, you'd want to use the data structure (such as `userspace_config.is_overwatch`) when you want to check this value.
And if you want to update it, update directly and then use `eeprom_update_byte(EECONFIG_USERSPACE, userspace_config.raw);` to write the value back to the EEPROM.