diff options
Diffstat (limited to 'src/arch/msp430fr5969lp')
-rw-r--r-- | src/arch/msp430fr5969lp/Kconfig | 31 | ||||
-rw-r--r-- | src/arch/msp430fr5969lp/Makefile.inc | 61 | ||||
-rw-r--r-- | src/arch/msp430fr5969lp/arch.cc | 6 | ||||
-rw-r--r-- | src/arch/msp430fr5969lp/driver/counter.cc | 4 | ||||
-rw-r--r-- | src/arch/msp430fr5969lp/prompt | 1 |
5 files changed, 83 insertions, 20 deletions
diff --git a/src/arch/msp430fr5969lp/Kconfig b/src/arch/msp430fr5969lp/Kconfig new file mode 100644 index 0000000..015d78d --- /dev/null +++ b/src/arch/msp430fr5969lp/Kconfig @@ -0,0 +1,31 @@ +config arch_msp430fr5969lp_driver_adc +bool "ADC (Analog-Digital-Converter)" +select meta_driver_adc + +config arch_msp430fr5969lp_driver_counter +bool "Cycle Counter" +select meta_driver_counter + +config arch_msp430fr5969lp_driver_i2c +bool "I2C on eUSCI_B0" +select meta_driver_i2c + +config arch_msp430fr5969lp_driver_spi_a1 +bool "SPI on eUSCI_A1" +select meta_driver_spi + +config arch_msp430fr5969lp_driver_spi_b +bool "SPI on eUSCI_B0" +select meta_driver_spi + +config arch_msp430fr5969lp_driver_stdin +bool "UART Input" +select meta_driver_stdin + +config arch_msp430fr5969lp_driver_timer +bool "Timer with Interrupts" +select meta_driver_timer + +config arch_msp430fr5969lp_driver_uptime +bool "Uptime Counter" +select meta_driver_uptime diff --git a/src/arch/msp430fr5969lp/Makefile.inc b/src/arch/msp430fr5969lp/Makefile.inc index 2c1e64c..8a48859 100644 --- a/src/arch/msp430fr5969lp/Makefile.inc +++ b/src/arch/msp430fr5969lp/Makefile.inc @@ -25,45 +25,86 @@ SIZE = /opt/msp430/ti/msp430-gcc-full-linux-5.1.2.0/bin/msp430-elf-size ARCH_SHORTNAME = msp430 CXX_TARGETS += src/arch/msp430fr5969lp/arch.cc +CXX_TARGETS += src/arch/msp430fr5969lp/driver/gpio.cc +CXX_TARGETS += src/arch/msp430fr5969lp/driver/stdout.cc ifeq (${aspectc}, 1) CXX = ag++ -r build/repo.acp -v 0 --c_compiler /opt/msp430/ti/msp430-gcc-full-linux-5.1.2.0/bin/msp430-elf-g++ -p . --Xcompiler endif +# Command-line + ifneq ($(findstring adc,${arch_drivers}), ) - CXX_TARGETS += src/arch/msp430fr5969lp/driver/adc.cc + CONFIG_arch_msp430fr5969lp_driver_adc = y endif -CXX_TARGETS += src/arch/msp430fr5969lp/driver/gpio.cc -CXX_TARGETS += src/arch/msp430fr5969lp/driver/stdout.cc -CXX_TARGETS += src/arch/msp430fr5969lp/driver/uptime.cc - ifneq ($(findstring stdin,${arch_drivers}), ) - CXX_TARGETS += src/arch/msp430fr5969lp/driver/stdin.cc + CONFIG_arch_msp430fr5969lp_driver_stdin = y endif ifneq ($(findstring softi2c,${drivers}), ) else ifneq ($(findstring i2c,${arch_drivers}), ) + CONFIG_arch_msp430fr5969lp_driver_i2c = y +endif + +ifneq ($(findstring spi_a1,${arch_drivers}), ) + CONFIG_arch_msp430fr5969lp_driver_spi_a1 = y +endif + +ifneq ($(findstring spi_b,${arch_drivers}), ) + CONFIG_arch_msp430fr5969lp_driver_spi_b = y +endif + +ifneq ($(findstring timer,${arch_drivers}), ) + CONFIG_arch_msp430fr5969lp_driver_timer = y +endif + +ifneq ($(findstring counter,${arch_drivers}), ) + CONFIG_arch_msp430fr5969lp_driver_counter = y +endif + +ifeq (${timer_s}, 1) + CONFIG_arch_msp430fr5969lp_driver_uptime = y +endif + +# Kconfig + +ifdef CONFIG_arch_msp430fr5969lp_driver_adc + CXX_TARGETS += src/arch/msp430fr5969lp/driver/adc.cc +endif + +ifdef CONFIG_arch_msp430fr5969lp_driver_stdin + CXX_TARGETS += src/arch/msp430fr5969lp/driver/stdin.cc +endif + +ifdef CONFIG_arch_msp430fr5969lp_driver_i2c CXX_TARGETS += src/arch/msp430fr5969lp/driver/i2c.cc COMMON_FLAGS += -DDRIVER_I2C endif -ifneq ($(findstring spi_a1,${arch_drivers}), ) +ifdef CONFIG_arch_msp430fr5969lp_driver_spi_a1 CXX_TARGETS += src/arch/msp430fr5969lp/driver/spi_a1.cc endif -ifneq ($(findstring spi_b,${arch_drivers}), ) +ifdef CONFIG_arch_msp430fr5969lp_driver_spi_b CXX_TARGETS += src/arch/msp430fr5969lp/driver/spi_b.cc endif -ifneq ($(findstring timer,${arch_drivers}), ) +ifdef CONFIG_arch_msp430fr5969lp_driver_timer CXX_TARGETS += src/arch/msp430fr5969lp/driver/timer.cc endif -ifneq ($(findstring counter,${arch_drivers}), ) +ifdef CONFIG_arch_msp430fr5969lp_driver_counter CXX_TARGETS += src/arch/msp430fr5969lp/driver/counter.cc endif +ifdef CONFIG_arch_msp430fr5969lp_driver_uptime + COMMON_FLAGS += -DTIMER_S + CXX_TARGETS += src/arch/msp430fr5969lp/driver/uptime.cc +endif + + + ifneq (${cpu_freq}, ) COMMON_FLAGS += -DF_CPU=${cpu_freq}UL else diff --git a/src/arch/msp430fr5969lp/arch.cc b/src/arch/msp430fr5969lp/arch.cc index fb7d167..5385d16 100644 --- a/src/arch/msp430fr5969lp/arch.cc +++ b/src/arch/msp430fr5969lp/arch.cc @@ -89,12 +89,6 @@ void Arch::setup(void) TA1CCR0 = 4096; TA1CTL |= TACLR | TAIE; #endif - -#ifdef TIMER_CYCLES - TA2CTL = TASSEL__SMCLK | ID__1 | MC__CONTINUOUS; - TA2EX0 = 0; - TA2CTL |= TACLR; -#endif } #ifdef WITH_WAKEUP diff --git a/src/arch/msp430fr5969lp/driver/counter.cc b/src/arch/msp430fr5969lp/driver/counter.cc index 7a5aca2..741b543 100644 --- a/src/arch/msp430fr5969lp/driver/counter.cc +++ b/src/arch/msp430fr5969lp/driver/counter.cc @@ -2,10 +2,6 @@ #include "driver/counter.h" #include "driver/gpio.h" -#if defined(TIMER_CYCLES) -#warn "timer_cycles and counter are mutually exclusive. Expect odd behaviour." -#endif - Counter counter; #ifndef __acweaving diff --git a/src/arch/msp430fr5969lp/prompt b/src/arch/msp430fr5969lp/prompt new file mode 100644 index 0000000..a8f2b86 --- /dev/null +++ b/src/arch/msp430fr5969lp/prompt @@ -0,0 +1 @@ +MSP430FR5969 Launchpad |