Loading src/arch/msp430fr5969lp/Makefile.inc +1 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ MCU = msp430fr5969 INCLUDES += -I/opt/msp430/ti/gcc/include COMMON_FLAGS += -mcpu=${CPU} -mmcu=${MCU} -DMULTIPASS_ARCH_msp430fr5969lp COMMON_FLAGS += -DF_CPU=16000000UL COMMON_FLAGS += -DMULTIPASS_ARCH_HAS_I2C CC = /opt/msp430/ti/gcc/bin/msp430-elf-gcc Loading src/arch/msp430fr5969lp/driver/spi_b.cc +6 −1 Original line number Diff line number Diff line #include "driver/spi_b.h" #include <msp430.h> #ifndef F_I2C #define F_I2C 1000000UL #endif void SPI::setup() { UCB0CTLW0 |= UCSWRST; Loading @@ -22,7 +26,8 @@ void SPI::setup() //P1REN |= BIT6; UCB0CTLW0 = UCCKPH | UCMSB | UCMST | UCSYNC | UCMODE_0 | UCSSEL__SMCLK | UCSWRST; UCB0BRW = 15; // /16 -> 1MHz UCB0BRW = (F_CPU/F_I2C)-1; // /16 -> 1MHz // UCB0BRW = (F_CPU / F_I2C) - 1 UCB0CTLW0 &= ~UCSWRST; } Loading Loading
src/arch/msp430fr5969lp/Makefile.inc +1 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ MCU = msp430fr5969 INCLUDES += -I/opt/msp430/ti/gcc/include COMMON_FLAGS += -mcpu=${CPU} -mmcu=${MCU} -DMULTIPASS_ARCH_msp430fr5969lp COMMON_FLAGS += -DF_CPU=16000000UL COMMON_FLAGS += -DMULTIPASS_ARCH_HAS_I2C CC = /opt/msp430/ti/gcc/bin/msp430-elf-gcc Loading
src/arch/msp430fr5969lp/driver/spi_b.cc +6 −1 Original line number Diff line number Diff line #include "driver/spi_b.h" #include <msp430.h> #ifndef F_I2C #define F_I2C 1000000UL #endif void SPI::setup() { UCB0CTLW0 |= UCSWRST; Loading @@ -22,7 +26,8 @@ void SPI::setup() //P1REN |= BIT6; UCB0CTLW0 = UCCKPH | UCMSB | UCMST | UCSYNC | UCMODE_0 | UCSSEL__SMCLK | UCSWRST; UCB0BRW = 15; // /16 -> 1MHz UCB0BRW = (F_CPU/F_I2C)-1; // /16 -> 1MHz // UCB0BRW = (F_CPU / F_I2C) - 1 UCB0CTLW0 &= ~UCSWRST; } Loading