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.
Diff: test_ehp_reg.h
- Revision:
- 0:be95bfb06686
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test_ehp_reg.h Mon Jan 17 13:20:09 2022 +0000 @@ -0,0 +1,32 @@ +//Class delclarations + +#include "mbed.h" +#include "test_vector.h" + +class test_ehp_reg:public test_vector { + +public: + /*constructor*/ + test_ehp_reg(PinName timerCapturePin, PinName adcCapturePin); + virtual void configure(); + virtual void run(); + virtual void stop(); + virtual uint32_t* getResult(); + virtual char* getResultStatus(); + virtual void release(); + virtual uint32_t getBufferSize(); + +private: + InterruptIn _interruptTrigger; + uint32_t* _ptr_ADC_arr; + uint32_t _ADC_idx; + volatile uint32_t _ADC_temp; + bool _ADCperiodInSync; + + void _handleADCTriggerPinRiseIRQ(); + uint32_t _readADC(); + bool _ADCBufferFull; + bool _getADCBufferFull(); + + +};