We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c9fcf7 commit ef06820Copy full SHA for ef06820
1 file changed
targets/core/nxp/lpc17xx/ssp.hpp
@@ -297,7 +297,12 @@ namespace klib::core::lpc17xx::io {
297
template <bool Enable, bool Read>
298
static void dma_enable() {
299
// set the new state
300
- Ssp::port->DMACR = (Ssp::port->DMACR & ~(0x1 << Read)) | (Enable << Read);
+ if constexpr (Read) {
301
+ Ssp::port->DMACR = (Ssp::port->DMACR & (~0x1)) | Enable;
302
+ }
303
+ else {
304
+ Ssp::port->DMACR = (Ssp::port->DMACR & (~(0x1 << 1))) | (Enable << 1);
305
306
}
307
308
/**
@@ -325,7 +330,7 @@ namespace klib::core::lpc17xx::io {
325
330
326
331
* @brief Returns the read/write transfer width of the ssp
327
332
*
328
- * @return uint32_t* const
333
+ * @return uint32_t
329
334
*/
335
template <bool Read>
336
static uint32_t dma_width() {
0 commit comments