MCPcopy Create free account
hub / github.com/SmingHub/Sming / enable

Method enable

Sming/Arch/Host/Components/driver/hw_timer.cpp:59–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 }
58
59 void enable(hw_timer_clkdiv_t div, hw_timer_intr_type_t, bool auto_load)
60 {
61 stop();
62 switch(div) {
63 case TIMER_CLKDIV_1:
64 prescale = 1;
65 break;
66 case TIMER_CLKDIV_16:
67 prescale = 16;
68 break;
69 case TIMER_CLKDIV_256:
70 prescale = 256;
71 break;
72 default:
73 assert(false);
74 }
75 this->auto_load = auto_load;
76 }
77
78 void write(uint32_t ticks)
79 {

Callers 1

hw_timer1_enableFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected