diff options
author | Christian Pointner <equinox@spreadspace.org> | 2013-08-17 16:52:29 +0000 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2013-08-17 16:52:29 +0000 |
commit | d581af0dcf2b2ad5b575d060b4b03a5331b34ddf (patch) | |
tree | 12d47fd65cc0c9641497f97ea0b8f019199b6913 /lib/util.c | |
parent | moved tuer-rfid to teenstep (some port pins have changed) (diff) |
added jtag_disable to make PORTF usable
git-svn-id: https://svn.spreadspace.org/avr/trunk@221 aa12f405-d877-488e-9caf-2d797e2a1cc7
Diffstat (limited to 'lib/util.c')
-rw-r--r-- | lib/util.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -37,6 +37,17 @@ void cpu_init(void) CPU_PRESCALE(0); } +void jtag_disable(void) +{ + uint8_t tempreg; + __asm __volatile("in %[tempreg], %[mcucr]" "\n\t" + "ori %[tempreg], %[jtd]" "\n\t" + "out %[mcucr], %[tempreg]" "\n\t" + "out %[mcucr], %[tempreg]" + : [tempreg] "=d" (tempreg) + : [mcucr] "I" (_SFR_IO_ADDR(MCUCR)), [jtd] "M" (_BV(JTD))); +} + #if defined(__BOARD_teensy1__) #define BOOTLOADER_VEC 0x3E00 #elif defined(__BOARD_teensy2__) |