Merge pull request #7 from keyboardio/f/detach-attach

Implement detachFromHost() and attachToHost()
pull/427/head^2
Gergely Nagy 7 years ago committed by GitHub
commit 9aae109305
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -217,6 +217,14 @@ void ErgoDox::debounceRow(uint8_t change, uint8_t row) {
}
}
void ErgoDox::detachFromHost() {
UDCON |= (1 << DETACH);
}
void ErgoDox::attachToHost() {
UDCON &= ~(1 << DETACH);
}
}
}

@ -63,6 +63,17 @@ class ErgoDox {
void actOnMatrixScan(void);
void setup();
/** Detaching from / attaching to the host.
*
* These two functions should detach the device from (or attach it to) the
* host, preferably without rebooting the device. Their purpose is to allow
* one to do some configuration inbetween, so the re-attach happens with
* different properties. The device remains powered between these operations,
* only the connection to the host gets severed.
*/
void detachFromHost();
void attachToHost();
/* Key masking
* -----------
*

Loading…
Cancel
Save