Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of DSP_200kHz by
dma.h@40:bd6d8c35e822, 2015-01-30 (annotated)
- Committer:
- timmey9
- Date:
- Fri Jan 30 06:16:39 2015 +0000
- Revision:
- 40:bd6d8c35e822
- Parent:
- 39:82dc3daecf32
- Child:
- 41:3e0623d81b9a
ADC and DMA working. Start and stop of ADC/DMA is also working.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
timmey9 | 34:44cc9b76a507 | 1 | #ifndef DMA_H_ |
timmey9 | 34:44cc9b76a507 | 2 | #define DMA_H_ |
timmey9 | 34:44cc9b76a507 | 3 | |
timmey9 | 39:82dc3daecf32 | 4 | #include "mbed.h" |
timmey9 | 34:44cc9b76a507 | 5 | |
timmey9 | 36:07d8a3143967 | 6 | extern int rotary_count; |
timmey9 | 40:bd6d8c35e822 | 7 | extern uint16_t sample_array1[]; |
timmey9 | 40:bd6d8c35e822 | 8 | extern uint16_t sample_array2[]; |
timmey9 | 40:bd6d8c35e822 | 9 | extern uint16_t angle_array[]; |
timmey9 | 40:bd6d8c35e822 | 10 | void dma_init(int adc_reads); |
timmey9 | 40:bd6d8c35e822 | 11 | void reset_dma(); |
timmey9 | 36:07d8a3143967 | 12 | |
timmey9 | 40:bd6d8c35e822 | 13 | |
timmey9 | 40:bd6d8c35e822 | 14 | /* |
timmey9 | 40:bd6d8c35e822 | 15 | class DMA { |
timmey9 | 40:bd6d8c35e822 | 16 | public: |
timmey9 | 40:bd6d8c35e822 | 17 | DMA(uint16_t* sample_array1, uint16_t* sample_array2, uint16_t* sample_array3); |
timmey9 | 40:bd6d8c35e822 | 18 | void dma_init(int adc_reads); |
timmey9 | 40:bd6d8c35e822 | 19 | void reset_dma(); |
timmey9 | 40:bd6d8c35e822 | 20 | |
timmey9 | 40:bd6d8c35e822 | 21 | private: |
timmey9 | 40:bd6d8c35e822 | 22 | uint16_t* _array1; |
timmey9 | 40:bd6d8c35e822 | 23 | uint16_t* _array2; |
timmey9 | 40:bd6d8c35e822 | 24 | uint16_t* _array3; |
timmey9 | 40:bd6d8c35e822 | 25 | }; |
timmey9 | 40:bd6d8c35e822 | 26 | */ |
timmey9 | 40:bd6d8c35e822 | 27 | |
timmey9 | 40:bd6d8c35e822 | 28 | |
timmey9 | 34:44cc9b76a507 | 29 | |
timmey9 | 34:44cc9b76a507 | 30 | #endif /* DMA_H_ */ |