Mercurial > louis > kiibohd-controller
comparison Lib/delay.h @ 333:772f9bea482b
Adding 72 MHz clock support for mk20dx256vlh7
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Mon, 20 Apr 2015 00:55:58 -0700 |
parents | ab4515606277 |
children | 66eccdd9ced5 |
comparison
equal
deleted
inserted
replaced
332:2e0074f75855 | 333:772f9bea482b |
---|---|
61 static inline void delayMicroseconds(uint32_t) __attribute__((always_inline, unused)); | 61 static inline void delayMicroseconds(uint32_t) __attribute__((always_inline, unused)); |
62 static inline void delayMicroseconds(uint32_t usec) | 62 static inline void delayMicroseconds(uint32_t usec) |
63 { | 63 { |
64 #if F_CPU == 96000000 | 64 #if F_CPU == 96000000 |
65 uint32_t n = usec << 5; | 65 uint32_t n = usec << 5; |
66 #elif F_CPU == 72000000 | |
67 uint32_t n = usec << 5; // XXX Not accurate, assembly snippet needs to be updated | |
66 #elif F_CPU == 48000000 | 68 #elif F_CPU == 48000000 |
67 uint32_t n = usec << 4; | 69 uint32_t n = usec << 4; |
68 #elif F_CPU == 24000000 | 70 #elif F_CPU == 24000000 |
69 uint32_t n = usec << 3; | 71 uint32_t n = usec << 3; |
70 #endif | 72 #endif |