Unverified Commit 56dc720d authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Remove unused TIMER_US support

parent 4cd3ce53
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -256,10 +256,6 @@ ifeq (${softi2c_timer}, 1)
	COMMON_FLAGS += -DSOFTI2C_TIMER
endif

ifeq (${timer_us}, 1)
	COMMON_FLAGS += -DTIMER_US
endif

# still used in makefiles
ifeq (${loop}, 1)
	COMMON_FLAGS += -DCONFIG_loop
@@ -307,7 +303,6 @@ clean: arch_clean
help: arch_help
	@echo
	@echo "common flags:"
	@echo "    timer_us timer_s -- enable specific timers. May be mutually exclusive"
	@echo "    loop -- enable loop() function"
	@echo "    i2c_freq -- I2C Frequency in Hz"
	@echo "    timer_freq -- Timer frequency in Hz"
+0 −8
Original line number Diff line number Diff line
@@ -50,14 +50,6 @@ void Arch::setup(void)
	TIMSK1 = _BV(OCIE1A);
#endif

#ifdef TIMER_US
#if F_CPU != 16000000UL
#error TIMER_US is only supported with F_CPU = 16MHz
#endif
	// 16MHz/8 -> 2MHz timer
	TCCR2A = 0;
	TCCR2B = _BV(CS21);
#endif
	sei();
}

+0 −7
Original line number Diff line number Diff line
@@ -17,13 +17,6 @@ void Arch::setup(void)
	TIMSK1 = _BV(OCIE1A);
#endif

/*
#ifdef TIMER_US
	// 16MHz/8 -> 2MHz timer
	TCCR1A = 0;
	TCCR2B = _BV(CS21);
#endif
*/
	sei();
}

+0 −19
Original line number Diff line number Diff line
@@ -68,25 +68,6 @@ void Arch::setup(void)
	__delay_cycles(1000000);
#endif

#ifdef TIMER_US
#if F_CPU == 16000000UL
	TA0CTL = TASSEL__SMCLK | ID__8 | MC__CONTINUOUS; // /8
	TA0EX0 = 1; // /2 -> /16
#elif F_CPU == 8000000UL
	TA0CTL = TASSEL__SMCLK | ID__8 | MC__CONTINUOUS; // /8
	TA0EX0 = 0; // /1 -> /8
#elif F_CPU == 4000000UL
	TA0CTL = TASSEL__SMCLK | ID__4 | MC__CONTINUOUS; // /4
	TA0EX0 = 0; // /1 -> /8
#elif F_CPU == 1000000UL
	TA0CTL = TASSEL__SMCLK | ID__1 | MC__CONTINUOUS; // /1
	TA0EX0 = 0; // /1 -> /8
#else
#error Unsupported F_CPU
#endif /* F_CPU */
	TA0CTL |= TACLR;
#endif /* TIMER_US */

#if defined(CONFIG_loop) || defined(TIMER_S)
	// 1s per wakeup for loop. Independent of SMCLK/F_CPU
	TA1CTL = TASSEL__ACLK | ID__8 | MC__UP;
+0 −19
Original line number Diff line number Diff line
@@ -108,25 +108,6 @@ void Arch::setup(void)
	CSCTL0_H = 0;
#endif

#ifdef TIMER_US
#if F_CPU == 16000000UL
	TA0CTL = TASSEL__SMCLK | ID__8 | MC__CONTINUOUS; // /8
	TA0EX0 = 1; // /2 -> /16
#elif F_CPU == 8000000UL
	TA0CTL = TASSEL__SMCLK | ID__8 | MC__CONTINUOUS; // /8
	TA0EX0 = 0; // /1 -> /8
#elif F_CPU == 4000000UL
	TA0CTL = TASSEL__SMCLK | ID__4 | MC__CONTINUOUS; // /4
	TA0EX0 = 0; // /1 -> /8
#elif F_CPU == 1000000UL
	TA0CTL = TASSEL__SMCLK | ID__1 | MC__CONTINUOUS; // /1
	TA0EX0 = 0; // /1 -> /8
#else
#error Unsupported F_CPU
#endif /* F_CPU */
	TA0CTL |= TACLR;
#endif /* TIMER_US */

#if F_CPU == 32768UL
	CSCTL0_H = CSKEY >> 8;
	CSCTL2 = SELA__LFXTCLK | SELS__LFXTCLK | SELM__LFXTCLK;