DMAを使用してDAC CubeMXで生成したコードを流用
DMAC.h@0:0ea9475fc06f, 2018-06-26 (annotated)
- Committer:
- k0050288
- Date:
- Tue Jun 26 06:27:49 2018 +0000
- Revision:
- 0:0ea9475fc06f
DAC?DMA??????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
k0050288 | 0:0ea9475fc06f | 1 | #ifndef DMAC_H |
k0050288 | 0:0ea9475fc06f | 2 | #define DMAC_H |
k0050288 | 0:0ea9475fc06f | 3 | |
k0050288 | 0:0ea9475fc06f | 4 | #include <stdint.h> |
k0050288 | 0:0ea9475fc06f | 5 | #include "mbed.h" |
k0050288 | 0:0ea9475fc06f | 6 | |
k0050288 | 0:0ea9475fc06f | 7 | class DMAC{ |
k0050288 | 0:0ea9475fc06f | 8 | private: |
k0050288 | 0:0ea9475fc06f | 9 | void MX_DMA_Init(); |
k0050288 | 0:0ea9475fc06f | 10 | void MX_TIM6_Init(); |
k0050288 | 0:0ea9475fc06f | 11 | void MX_DAC_Init(); |
k0050288 | 0:0ea9475fc06f | 12 | public: |
k0050288 | 0:0ea9475fc06f | 13 | void init(); |
k0050288 | 0:0ea9475fc06f | 14 | |
k0050288 | 0:0ea9475fc06f | 15 | void play(const uint16_t* data, uint32_t len); |
k0050288 | 0:0ea9475fc06f | 16 | }; |
k0050288 | 0:0ea9475fc06f | 17 | |
k0050288 | 0:0ea9475fc06f | 18 | #endif |