diff options
author | Jack Humbert <jack.humb@gmail.com> | 2016-06-30 00:35:29 +0200 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2016-06-30 00:35:29 +0200 |
commit | 60fd885a6e540509baa2193932e15caeaeb8f4c5 (patch) | |
tree | e950930ea913afe8f343ffa42405d8b21510b66e /quantum | |
parent | 197f152dee834a737cd820f2a95d1ade98be4898 (diff) | |
download | qmk_firmware-60fd885a6e540509baa2193932e15caeaeb8f4c5.tar.gz qmk_firmware-60fd885a6e540509baa2193932e15caeaeb8f4c5.tar.xz |
rand supports other chips
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/quantum.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index 224bfb795..270b976e3 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -308,8 +308,11 @@ void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) { } void tap_random_base64(void) { - uint8_t key = (TCNT0 + TCNT1 + TCNT3 + TCNT4) % 64; - // uint8_t key = rand() % 64; + #if defined(__AVR_ATmega32U4__) + uint8_t key = (TCNT0 + TCNT1 + TCNT3 + TCNT4) % 64; + #else + uint8_t key = rand() % 64; + #endif switch (key) { case 0 ... 25: register_code(KC_LSFT); |