Create a class HardwareTimer that represents a simple MCU hardware timer.
The default constructor must initialize all internal values to safe, reset-like defaults.
Your class must include:
int frequencybool enabledint prescalerfrequency = 0enabled = falseprescaler = 1void configure(int freq, int pre)frequency = freqprescaler = prevoid stop()void print()F=<frequency> P=<prescaler> EN=<0 or 1>In main()
HardwareTimer object using the default constructorf and pconfigure(f, p)xx == 0, call stop()print()
Example 1
Input:
1000 8
1 Output:
F=1000 P=8 EN=1
Example 2
Input:
500 4
0
Output:
F=500 P=4 EN=0
Constraints
Input
1000 8 1
Expected Output
F=1000 P=8 EN=1