CSTANDARD = -std=gnu99\r
\r
# Place -D or -U options here\r
-CDEFS = -DF_CPU=16000000\r
+CDEFS = -DF_CPU=8000000\r
\r
# Place -I options here\r
CINCS =\r
\r
program_leo: all\r
avrdude -patmega32u4 -cavr109 -P/dev/ttyACM0 -b57600 -D -Uflash:w:$(TARGET).hex:i\r
+\r
+fuses:\r
+ $(AVRDUDE) $(AVRDUDE_FLAGS) -U lfuse:w:0x46:m -U hfuse:w:0xd9:m -U efuse:w:0xff:m\r
float SensZ[4];\r
\r
//For CLK setting\r
- CLKPR = (0<<CLKPCE); // No prescale\r
- CLKPR = 0x00; //prescaler 2\r
+ CLKPR = (1<<CLKPCE); // No prescale\r
+ CLKPR = 0x01; //prescaler 2\r
PRR = 0;\r
//Init UART\r
uinit(); \r
\r
\r
#ifndef F_CPU\r
-#define F_CPU 16000000\r
+#define F_CPU 8000000\r
#endif\r
\r
# define USART_BAUDRATE 19200\r
-# define BAUD_PRESCALE (unsigned int)(1.0 * F_CPU / USART_BAUDRATE / 16 - 0.5);\r
+# define BAUD_PRESCALE (unsigned int)(1.0 * F_CPU / USART_BAUDRATE / 8 - 0.5);\r
\r
#define ADDR_MAG_0 0x0C\r
#define ADDR_MAG_1 0x0D\r