Timeline for Timer2 does not work as it should
Current License: CC BY-SA 3.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 2, 2017 at 3:32 | comment | added | kuroi neko |
That will bloat the code with the malloc library and consume a bit of the precious RAM for no good reason. The only thing needed here is to get the init code called after the static object constructors. You don't need another instance to do that, just move the object creation inside setup() or put the init code in a separate method that you will call inside setup().
|
|
| Mar 20, 2014 at 0:08 | comment | added | jfpoilpret |
There is no need for a new as timer is not a pointer but an instance of Timer: it is in the static data section, not the heap. Its constructor is called (otherwise my ISR would never get called)
|
|
| Mar 19, 2014 at 23:59 | history | edited | TheDoctor | CC BY-SA 3.0 |
new ideas...
|
| Mar 19, 2014 at 23:51 | history | answered | TheDoctor | CC BY-SA 3.0 |