Merge pull request #4 from jamesnvc/master

Clarify/fix documentation in README
pull/389/head
Gergely Nagy 7 years ago committed by GitHub
commit 052cef8488

@ -42,10 +42,10 @@ the `HostOS` library header.
#include <Kaleidoscope/HostOS-select.h> #include <Kaleidoscope/HostOS-select.h>
void someFunction(void) { void someFunction(void) {
if (HostOS.os() == kaleidoscope::HostOS::LINUX) { if (HostOS.os() == kaleidoscope::hostos::LINUX) {
// do something linux-y // do something linux-y
} }
if (HostOS.os() == kaleidoscope::HostOS::OSX) { if (HostOS.os() == kaleidoscope::hostos::OSX) {
// do something OSX-y // do something OSX-y
} }
} }
@ -73,6 +73,15 @@ The extension provides the following methods on the `HostOS` singleton:
> Sets the type of the host OS, overriding any previous value. The type is then > Sets the type of the host OS, overriding any previous value. The type is then
> stored in EEPROM for persistence. > stored in EEPROM for persistence.
## Host OS Values
The OS type (i.e. the return type of `.os()` and the arguments to `.os(type)`) will be one of the following:
- `kaleidoscope::hostos::LINUX`
- `kaleidoscope::hostos::OSX`
- `kaleidoscope::hostos::WINDOWS`
- `kaleidoscope::hostos::OTHER`
## Dependencies ## Dependencies
* [Kaleidoscope-EEPROM-Settings](https://github.com/keyboardio/Kaleidoscope-EEPROM-Settings) * [Kaleidoscope-EEPROM-Settings](https://github.com/keyboardio/Kaleidoscope-EEPROM-Settings)

Loading…
Cancel
Save