2
Apakah fungsi penunjuk fungsi atom di Arduino?
Cuplikan berikut ini dari kode sumber pustaka TimerOne : // TimerOne.h: void (*isrCallback)(); // TimerOne.cpp: ISR(TIMER1_OVF_vect) // interrupt service routine that wraps a user defined function supplied by attachInterrupt { Timer1.isrCallback(); } // TimerOne.cpp: void TimerOne::attachInterrupt(void (*isr)(), long microseconds) { if(microseconds > 0) setPeriod(microseconds); isrCallback = isr; // register the …