diff options
| author | Selene ToyKeeper | 2015-10-05 18:10:18 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2015-10-05 18:10:18 -0600 |
| commit | 95d877541c2f136243bc676fa555e2e31c3d307a (patch) | |
| tree | 12cae65293ea0e47ebe69b9ffcb69f928a35cbbb /tk-delay.h | |
| parent | Added nanjg board/pin layout definition to tk-attiny.h. (diff) | |
| download | anduril-95d877541c2f136243bc676fa555e2e31c3d307a.tar.gz anduril-95d877541c2f136243bc676fa555e2e31c3d307a.tar.bz2 anduril-95d877541c2f136243bc676fa555e2e31c3d307a.zip | |
Replaced how USE_FILE_DELAY works.
As a separate function, it seems to produce smaller builds.
Diffstat (limited to '')
| -rw-r--r-- | tk-delay.h | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -28,15 +28,20 @@ void _delay_ms(uint16_t n) { // TODO: make this take tenths of a ms instead of ms, // for more precise timing? - #ifdef USE_FINE_DELAY - if (n==0) { _delay_loop_2(BOGOMIPS/3); } - else { - while(n-- > 0) _delay_loop_2(BOGOMIPS); - } - #else + //#ifdef USE_FINE_DELAY + //if (n==0) { _delay_loop_2(BOGOMIPS/3); } + //else { + // while(n-- > 0) _delay_loop_2(BOGOMIPS); + //} + //#else while(n-- > 0) _delay_loop_2(BOGOMIPS); - #endif + //#endif } +#ifdef USE_FINE_DELAY +void _delay_zero() { + _delay_loop_2(BOGOMIPS/3); +} +#endif #ifdef USE_DELAY_S void _delay_s() // because it saves a bit of ROM space to do it this way { |
