diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-01-26 23:21:42 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-01-26 23:21:42 +0100 |
commit | 021e08eba3272e3e3f30b6175464e48792dff1d1 (patch) | |
tree | 83866ba4bf3dcaeb6bbe5191813a4bb105c0620a /include/arch/atmega2560 | |
parent | 218166456b68ca2266c8e7c77c1085ad4fc16e86 (diff) |
atmega2560: provide one DMX driver per extra UART
Diffstat (limited to 'include/arch/atmega2560')
-rw-r--r-- | include/arch/atmega2560/driver/dmx1.h (renamed from include/arch/atmega2560/driver/dmx.h) | 8 | ||||
-rw-r--r-- | include/arch/atmega2560/driver/dmx2.h | 21 | ||||
-rw-r--r-- | include/arch/atmega2560/driver/dmx3.h | 21 |
3 files changed, 46 insertions, 4 deletions
diff --git a/include/arch/atmega2560/driver/dmx.h b/include/arch/atmega2560/driver/dmx1.h index 444cb26..2f738b8 100644 --- a/include/arch/atmega2560/driver/dmx.h +++ b/include/arch/atmega2560/driver/dmx1.h @@ -4,18 +4,18 @@ * SPDX-License-Identifier: BSD-2-Clause */ -class DMX { +class DMX1 { private: - DMX(const DMX ©); + DMX1(const DMX1 ©); public: static unsigned char const num_frames = 32; unsigned char frames[num_frames]; - DMX() {} + DMX1() {} void setup(); void write(); }; -extern DMX dmx; +extern DMX1 dmx1; diff --git a/include/arch/atmega2560/driver/dmx2.h b/include/arch/atmega2560/driver/dmx2.h new file mode 100644 index 0000000..1c8cd67 --- /dev/null +++ b/include/arch/atmega2560/driver/dmx2.h @@ -0,0 +1,21 @@ +/* + * Copyright 2022 Birte Kristina Friesel + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +class DMX2 { + private: + DMX2(const DMX2 ©); + + public: + static unsigned char const num_frames = 32; + unsigned char frames[num_frames]; + + DMX2() {} + + void setup(); + void write(); +}; + +extern DMX2 dmx2; diff --git a/include/arch/atmega2560/driver/dmx3.h b/include/arch/atmega2560/driver/dmx3.h new file mode 100644 index 0000000..c8541bf --- /dev/null +++ b/include/arch/atmega2560/driver/dmx3.h @@ -0,0 +1,21 @@ +/* + * Copyright 2022 Birte Kristina Friesel + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +class DMX3 { + private: + DMX3(const DMX3 ©); + + public: + static unsigned char const num_frames = 32; + unsigned char frames[num_frames]; + + DMX3() {} + + void setup(); + void write(); +}; + +extern DMX3 dmx3; |