diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/msp430fr5969lp/Kconfig | 16 | ||||
-rw-r--r-- | src/arch/msp430fr5969lp/driver/dmx1.cc (renamed from src/arch/msp430fr5969lp/driver/dmx.cc) | 16 | ||||
-rw-r--r-- | src/arch/msp430fr5969lp/driver/stdin.cc | 4 |
3 files changed, 18 insertions, 18 deletions
diff --git a/src/arch/msp430fr5969lp/Kconfig b/src/arch/msp430fr5969lp/Kconfig index b96a032..0e7052d 100644 --- a/src/arch/msp430fr5969lp/Kconfig +++ b/src/arch/msp430fr5969lp/Kconfig @@ -9,20 +9,20 @@ config arch_msp430fr5969lp_driver_counter bool "Cycle Counter" select meta_driver_counter -config arch_msp430fr5969lp_driver_dmx -bool "DMX" +config arch_msp430fr5969lp_driver_dmx1 +bool "DMX Output on eUSCI_A1 / P2.5" +depends on !meta_driver_stdout1 select meta_driver_dmx +select meta_driver_dmx1 config arch_msp430fr5969lp_driver_i2c -bool "I2C on eUSCI_B0" +bool "I²C on eUSCI_B0 / P1.[67]" +help + SDA: P1.6 + SCL: P1.7 select meta_driver_hardware_i2c select meta_driver_i2c -## broken -#config arch_msp430fr5969lp_driver_spi_a1 -#bool "SPI on eUSCI_A1" -#select meta_driver_spi - config arch_msp430fr5969lp_driver_spi bool "SPI on eUSCI_B0" select meta_driver_spi diff --git a/src/arch/msp430fr5969lp/driver/dmx.cc b/src/arch/msp430fr5969lp/driver/dmx1.cc index 78c7e19..cad965b 100644 --- a/src/arch/msp430fr5969lp/driver/dmx.cc +++ b/src/arch/msp430fr5969lp/driver/dmx1.cc @@ -5,7 +5,7 @@ */ #include <msp430.h> #include "arch.h" -#include "driver/dmx.h" +#include "driver/dmx1.h" #include "driver/gpio.h" /* @@ -16,7 +16,7 @@ * Set UCBRS0 according to table 21-4 */ -void DMX::setup() +void DMX1::setup() { UCA1CTLW0 |= UCSWRST; #if F_CPU == 16000000UL @@ -38,7 +38,7 @@ void DMX::setup() UCA1CTLW0 &= ~UCSWRST; } -void DMX::write() +void DMX1::write() { // Disable UART for reset and mark signals UCA1CTLW0 |= UCSWRST; @@ -49,18 +49,14 @@ void DMX::write() arch.delay_us(8); // mark P2SEL1 |= BIT5; UCA1CTLW0 &= ~UCSWRST; // causes line to go high - for (unsigned char i = 0; i < 16; i++) { + for (unsigned short i = 0; i < num_frames; i++) { while (!(UCA1IFG & UCTXIFG)); UCA1TXBUF = frames[i]; } - for (unsigned char i = 0; i < 241; i++) { - while (!(UCA1IFG & UCTXIFG)); - UCA1TXBUF = 0; - } - for (unsigned char i = 0; i < 255; i++) { + for (unsigned short i = 0; i < 258 - num_frames; i++) { while (!(UCA1IFG & UCTXIFG)); UCA1TXBUF = 0; } } -DMX dmx; +DMX1 dmx1; diff --git a/src/arch/msp430fr5969lp/driver/stdin.cc b/src/arch/msp430fr5969lp/driver/stdin.cc index 0850dab..92b7157 100644 --- a/src/arch/msp430fr5969lp/driver/stdin.cc +++ b/src/arch/msp430fr5969lp/driver/stdin.cc @@ -8,6 +8,10 @@ void StandardInput::setup() { + UCA0CTLW0 |= UCSWRST; + P2SEL0 &= ~BIT1; + P2SEL1 |= BIT1; + UCA0CTLW0 &= ~UCSWRST; UCA0IE |= UCRXIE; } |