diff --git a/src/modm/platform/dma/samx7x/transfer.hpp b/src/modm/platform/dma/samx7x/transfer.hpp index cecd30110b..717baec564 100644 --- a/src/modm/platform/dma/samx7x/transfer.hpp +++ b/src/modm/platform/dma/samx7x/transfer.hpp @@ -126,6 +126,9 @@ class LinkedListTransfer : public DmaBase constexpr LinkedListTransfer(); + constexpr LinkedListTransfer(const LinkedListTransfer& other); + constexpr LinkedListTransfer& operator=(const LinkedListTransfer& other); + template friend auto descriptor(LinkedListTransfer& transfer); diff --git a/src/modm/platform/dma/samx7x/transfer_impl.hpp b/src/modm/platform/dma/samx7x/transfer_impl.hpp index b9fcc84cc6..a20fe0c47c 100644 --- a/src/modm/platform/dma/samx7x/transfer_impl.hpp +++ b/src/modm/platform/dma/samx7x/transfer_impl.hpp @@ -188,6 +188,22 @@ constexpr LinkedListTransfer::LinkedListTransfer() detail::SetupList<0, std::tuple>::setup(descriptors_); } +template +constexpr LinkedListTransfer::LinkedListTransfer(const LinkedListTransfer& other) + : descriptors_{other.descriptors_} +{ + detail::SetupList<0, std::tuple>::setAddress(descriptors_); +} + +template +constexpr LinkedListTransfer& +LinkedListTransfer::operator=(const LinkedListTransfer& other) +{ + descriptors_ = other.descriptors_; + detail::SetupList<0, std::tuple>::setAddress(descriptors_); + return *this; +} + template auto descriptor(LinkedListTransfer& transfer) {