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.
test_ehp_reg.h@0:be95bfb06686, 2022-01-17 (annotated)
- Committer:
- wuliqunyy
- Date:
- Mon Jan 17 13:20:09 2022 +0000
- Revision:
- 0:be95bfb06686
a working non_flat + adc_didt for ehp regulation version
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| wuliqunyy | 0:be95bfb06686 | 1 | //Class delclarations |
| wuliqunyy | 0:be95bfb06686 | 2 | |
| wuliqunyy | 0:be95bfb06686 | 3 | #include "mbed.h" |
| wuliqunyy | 0:be95bfb06686 | 4 | #include "test_vector.h" |
| wuliqunyy | 0:be95bfb06686 | 5 | |
| wuliqunyy | 0:be95bfb06686 | 6 | class test_ehp_reg:public test_vector { |
| wuliqunyy | 0:be95bfb06686 | 7 | |
| wuliqunyy | 0:be95bfb06686 | 8 | public: |
| wuliqunyy | 0:be95bfb06686 | 9 | /*constructor*/ |
| wuliqunyy | 0:be95bfb06686 | 10 | test_ehp_reg(PinName timerCapturePin, PinName adcCapturePin); |
| wuliqunyy | 0:be95bfb06686 | 11 | virtual void configure(); |
| wuliqunyy | 0:be95bfb06686 | 12 | virtual void run(); |
| wuliqunyy | 0:be95bfb06686 | 13 | virtual void stop(); |
| wuliqunyy | 0:be95bfb06686 | 14 | virtual uint32_t* getResult(); |
| wuliqunyy | 0:be95bfb06686 | 15 | virtual char* getResultStatus(); |
| wuliqunyy | 0:be95bfb06686 | 16 | virtual void release(); |
| wuliqunyy | 0:be95bfb06686 | 17 | virtual uint32_t getBufferSize(); |
| wuliqunyy | 0:be95bfb06686 | 18 | |
| wuliqunyy | 0:be95bfb06686 | 19 | private: |
| wuliqunyy | 0:be95bfb06686 | 20 | InterruptIn _interruptTrigger; |
| wuliqunyy | 0:be95bfb06686 | 21 | uint32_t* _ptr_ADC_arr; |
| wuliqunyy | 0:be95bfb06686 | 22 | uint32_t _ADC_idx; |
| wuliqunyy | 0:be95bfb06686 | 23 | volatile uint32_t _ADC_temp; |
| wuliqunyy | 0:be95bfb06686 | 24 | bool _ADCperiodInSync; |
| wuliqunyy | 0:be95bfb06686 | 25 | |
| wuliqunyy | 0:be95bfb06686 | 26 | void _handleADCTriggerPinRiseIRQ(); |
| wuliqunyy | 0:be95bfb06686 | 27 | uint32_t _readADC(); |
| wuliqunyy | 0:be95bfb06686 | 28 | bool _ADCBufferFull; |
| wuliqunyy | 0:be95bfb06686 | 29 | bool _getADCBufferFull(); |
| wuliqunyy | 0:be95bfb06686 | 30 | |
| wuliqunyy | 0:be95bfb06686 | 31 | |
| wuliqunyy | 0:be95bfb06686 | 32 | }; |
