You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
822 B
C++
40 lines
822 B
C++
/*
|
|
* MeasureTimePeriod.h
|
|
*
|
|
* Author: Aleksey Gerasimenko
|
|
* gerasimenko.aleksey.n@gmail.com
|
|
*/
|
|
|
|
#include "F28335/DSP28x_Project.h"
|
|
|
|
#ifndef DSP28335_MEASURETIMEPERIOD_H_
|
|
#define DSP28335_MEASURETIMEPERIOD_H_
|
|
|
|
namespace DSP28335
|
|
{
|
|
|
|
class MeasureTimePeriod
|
|
{
|
|
private:
|
|
CPUTIMER_VARS& m_CPUTimer;
|
|
Uint32 m_timer_result;
|
|
Uint32 m_timer_result_previous;
|
|
Uint32 m_magic_number;
|
|
public:
|
|
MeasureTimePeriod(CPUTIMER_VARS& pCPUTimer);
|
|
void execute(void);
|
|
void reset(void);
|
|
void inc_counter();
|
|
void reset_counter();
|
|
void set_magic(const Uint32 magic);
|
|
private:
|
|
void (MeasureTimePeriod::*_execute)(void);
|
|
void _execute_start(void);
|
|
void _execute_scan(void);
|
|
//
|
|
};//end class MeasureTimePeriod
|
|
|
|
} /* namespace DSP28335 */
|
|
|
|
#endif /* DSP28335_MEASURETIMEPERIOD_H_ */
|