altos: Allow projects to specify clock at other than 100Hz
authorKeith Packard <keithp@keithp.com>
Fri, 12 Oct 2012 20:54:37 +0000 (13:54 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 12 Oct 2012 20:54:37 +0000 (13:54 -0700)
Leave the default at 100Hz, but allow it to be overridden

Signed-off-by: Keith Packard <keithp@keithp.com>
src/core/ao.h

index 711b3533069ef7127ee49cd0601bb602a94d9945..9d80148937d5d7e8e2ae6f5a372feae759d1bad6 100644 (file)
@@ -85,7 +85,9 @@ ao_panic(uint8_t reason);
 extern volatile __data AO_TICK_TYPE ao_tick_count;
 
 /* Our timer runs at 100Hz */
+#ifndef AO_HERTZ
 #define AO_HERTZ               100
+#endif
 #define AO_MS_TO_TICKS(ms)     ((ms) / (1000 / AO_HERTZ))
 #define AO_SEC_TO_TICKS(s)     ((s) * AO_HERTZ)