Skip to content

Commit 863f6c1

Browse files
committed
fixup! [rp] Add DMA module
1 parent 0981a24 commit 863f6c1

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/modm/platform/dma/rp/dma.hpp.in

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,21 +103,13 @@ struct DmaBase
103103
/// @ingroup modm_platform_dma
104104
class DmaController : public DmaBase
105105
{
106-
template <uint32_t ...values> struct bit_or;
107-
template <uint32_t val,uint32_t ...values> struct bit_or<val,values...>{
108-
static constexpr uint32_t value = val | bit_or<values...>::value;
109-
};
110-
template <uint32_t val> struct bit_or<val>{
111-
static constexpr uint32_t value = val;
112-
};
113-
114106
public:
115107
/**
116108
* Start multiple channels simultaneously
117109
*/
118-
template <class ...Channels>
110+
template <class... Channels>
119111
static inline void start() {
120-
dma_hw->multi_channel_trigger = bit_or<Channels::mask...>::value;
112+
dma_hw->multi_channel_trigger = (Channels::mask | ...);
121113
}
122114

123115
class ChannelDummy

0 commit comments

Comments
 (0)