diff options
author | root <root@no.no.james.local> | 2014-12-08 18:39:07 +0000 |
---|---|---|
committer | root <root@no.no.james.local> | 2014-12-08 18:39:07 +0000 |
commit | 804820fe687affa38a52e302179e4a2293cb1ffb (patch) | |
tree | acb784fd60af24d8c389e366d74409c75802dfa0 /util.c | |
download | rgb_ring-804820fe687affa38a52e302179e4a2293cb1ffb.tar.gz rgb_ring-804820fe687affa38a52e302179e4a2293cb1ffb.tar.bz2 rgb_ring-804820fe687affa38a52e302179e4a2293cb1ffb.zip |
fish
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -0,0 +1,13 @@ +#include "project.h" + +void +setup_clocks (void) +{ +#ifdef __AVR_ATtiny10__ + CCP = 0xD8; // configuration change protection, write signature + CLKPSR = 0; // set cpu clock prescaler =1 (8Mhz) (attiny 4/5/9/10) +#else + CLKPR = _BV (CLKPCE); + CLKPR = 0; // set clock prescaler to 1 (attiny 25/45/85/24/44/84/13/13A) +#endif +} |