File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ namespace klib::core::lpc175x::io::detail::dma {
6262 // check if the current value matches the burst size
6363 // from the data
6464 if (size >= values[i - 1 ]) {
65- return i;
65+ return i - 1 ;
6666 }
6767 }
6868
@@ -103,7 +103,7 @@ namespace klib::core::lpc175x::io::detail::dma {
103103 // check if the current value matches the burst size
104104 // from the data
105105 if (size >= values[i - 1 ]) {
106- return i;
106+ return i - 1 ;
107107 }
108108 }
109109
@@ -293,13 +293,13 @@ namespace klib::core::lpc175x::io {
293293 // enable dma on the source peripheral
294294 if constexpr (!std::is_same_v<Source, klib::io::dma::memory>) {
295295 // enable the dma on the source
296- Source::template dma_enable<true , 1 >();
296+ Source::template dma_enable<true , true >();
297297 }
298298
299299 // enable dma on the destination peripheral
300300 if constexpr (!std::is_same_v<Destination, klib::io::dma::memory>) {
301301 // enable the dma on the destination
302- Destination::template dma_enable<true , 0 >();
302+ Destination::template dma_enable<true , false >();
303303 }
304304
305305 // register our irq handler for the current channel
You can’t perform that action at this time.
0 commit comments