Unverified Commit 1e5c3ee7 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

MSP430FR5994: support DMX on eUSCI_A1 and eUSCI_A2 as well

parent ed1ab107
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -81,8 +81,8 @@ Peripheral communication:

* I²C controller on eUSCI\_B1
* SPI controller on eUSCI\_B1
* UART input/output on eUSCI\_A1 (FR5994)
* DMX output on eUSCI\_A3
* UART input/output on eUSCI\_A1
* DMX output on eUSCI\_A1 / eUSCI\_A2 / eUSCI\_A3

Hardware features:

+6 −5
Original line number Diff line number Diff line
@@ -4,17 +4,18 @@
 * SPDX-License-Identifier: BSD-2-Clause
 */

class DMX {
class DMX1 {
	private:
		DMX(const DMX &copy);
		DMX1(const DMX1 &copy);

	public:
		unsigned char frames[16];
		static unsigned char const num_frames = 32;
		unsigned char frames[num_frames];

		DMX() {}
		DMX1() {}

		void setup();
		void write();
};

extern DMX dmx;
extern DMX1 dmx1;
+21 −0
Original line number Diff line number Diff line
/*
 * Copyright 2022 Birte Kristina Friesel
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

class DMX2 {
	private:
		DMX2(const DMX2 &copy);

	public:
		static unsigned char const num_frames = 32;
		unsigned char frames[num_frames];

		DMX2() {}

		void setup();
		void write();
};

extern DMX2 dmx2;
+21 −0
Original line number Diff line number Diff line
/*
 * Copyright 2022 Birte Kristina Friesel
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

class DMX3 {
	private:
		DMX3(const DMX3 &copy);

	public:
		static unsigned char const num_frames = 32;
		unsigned char frames[num_frames];

		DMX3() {}

		void setup();
		void write();
};

extern DMX3 dmx3;
+17 −3
Original line number Diff line number Diff line
@@ -9,12 +9,26 @@ config arch_msp430fr5994lp_driver_counter
bool "Cycle Counter"
select meta_driver_counter

config arch_msp430fr5994lp_driver_dmx
bool "DMX"
config arch_msp430fr5994lp_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_msp430fr5994lp_driver_dmx2
bool "DMX Output on eUSCI_A2 / P5.4"
depends on !meta_driver_stdout2
select meta_driver_dmx
select meta_driver_dmx2

config arch_msp430fr5994lp_driver_dmx3
bool "DMX Output on eUSCI_A3 / P6.0"
depends on !meta_driver_stdout3
select meta_driver_dmx
select meta_driver_dmx3

config arch_msp430fr5994lp_driver_i2c
bool "I2C on eUSCI_B1"
bool "I²C on eUSCI_B1"
select meta_driver_hardware_i2c
select meta_driver_i2c

Loading