File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44#include < array>
55
6- #include < targets/core/nxp/lpc175x /dma.hpp>
6+ #include < targets/core/nxp/lpc17xx /dma.hpp>
77
88namespace klib ::lpc1754::io::periph {
99 struct dma0 {
@@ -26,10 +26,10 @@ namespace klib::lpc1754::io::periph {
2626
2727namespace klib ::lpc1754::io {
2828 template <typename Dma>
29- using dma = core::lpc175x ::io::dma<Dma>;
29+ using dma = core::lpc17xx ::io::dma<Dma>;
3030
3131 template <typename Dma, uint8_t Channel, typename Source, typename Destination>
32- using dma_channel = core::lpc175x ::io::dma_channel<Dma, Channel, Source, Destination>;
32+ using dma_channel = core::lpc17xx ::io::dma_channel<Dma, Channel, Source, Destination>;
3333}
3434
3535#endif
Original file line number Diff line number Diff line change 33
44#include < array>
55
6- #include < targets/core/nxp/lpc175x /dma.hpp>
6+ #include < targets/core/nxp/lpc17xx /dma.hpp>
77
88namespace klib ::lpc1756::io::periph {
99 struct dma0 {
@@ -26,10 +26,10 @@ namespace klib::lpc1756::io::periph {
2626
2727namespace klib ::lpc1756::io {
2828 template <typename Dma>
29- using dma = core::lpc175x ::io::dma<Dma>;
29+ using dma = core::lpc17xx ::io::dma<Dma>;
3030
3131 template <typename Dma, uint8_t Channel, typename Source, typename Destination>
32- using dma_channel = core::lpc175x ::io::dma_channel<Dma, Channel, Source, Destination>;
32+ using dma_channel = core::lpc17xx ::io::dma_channel<Dma, Channel, Source, Destination>;
3333}
3434
3535#endif
Original file line number Diff line number Diff line change 1+ #ifndef KLIB_LPC1788_DMA_HPP
2+ #define KLIB_LPC1788_DMA_HPP
3+
4+ #include < array>
5+
6+ #include < targets/core/nxp/lpc17xx/dma.hpp>
7+
8+ namespace klib ::lpc1788::io::periph {
9+ struct dma0 {
10+ // peripheral id (e.g dma0, dma1)
11+ constexpr static uint32_t id = 0 ;
12+
13+ // interrupt id (including the arm vector table)
14+ constexpr static uint32_t interrupt_id = 26 + 16 ;
15+
16+ // peripheral clock bit position
17+ constexpr static uint32_t clock_id = 29 ;
18+
19+ // port to the GPDMA hardware
20+ static inline GPDMA_Type *const port = GPDMA ;
21+
22+ // available channels in the dma
23+ constexpr static uint32_t max_channels = 8 ;
24+ };
25+ }
26+
27+ namespace klib ::lpc1788::io {
28+ template <typename Dma>
29+ using dma = core::lpc17xx::io::dma<Dma>;
30+
31+ template <typename Dma, uint8_t Channel, typename Source, typename Destination>
32+ using dma_channel = core::lpc17xx::io::dma_channel<Dma, Channel, Source, Destination>;
33+ }
34+
35+ #endif
Original file line number Diff line number Diff line change 1- #ifndef KLIB_NXP_LPC175X_DMA_HPP
2- #define KLIB_NXP_LPC175X_DMA_HPP
1+ #ifndef KLIB_NXP_LPC17XX_DMA_HPP
2+ #define KLIB_NXP_LPC17XX_DMA_HPP
33
44#include < array>
55#include < span>
1111
1212#include < io/power.hpp>
1313
14- #include " clocks.hpp"
15-
16- namespace klib ::core::lpc175x::io::detail::dma {
14+ namespace klib ::core::lpc17xx::io::detail::dma {
1715 // using to the interrupt callback in the transfer helper
1816 using interrupt_callback = void (*)();
1917
@@ -112,7 +110,7 @@ namespace klib::core::lpc175x::io::detail::dma {
112110 }
113111}
114112
115- namespace klib ::core::lpc175x ::io {
113+ namespace klib ::core::lpc17xx ::io {
116114 template <typename Dma>
117115 class dma {
118116 public:
You can’t perform that action at this time.
0 commit comments