52 static void (* listen_callback)(
int time);
53 static announcement_observer observer_callback;
64 announcement_callback_t callback)
68 a->callback = callback;
70 if(observer_callback) {
71 observer_callback(a->id, a->has_value,
72 a->value, 0, ANNOUNCEMENT_BUMP);
86 if(observer_callback) {
87 observer_callback(a->id, 0, 0, 0, ANNOUNCEMENT_NOBUMP);
95 uint16_t oldvalue = a->value;
99 if(observer_callback) {
100 observer_callback(a->id, a->has_value,
101 value, oldvalue, ANNOUNCEMENT_NOBUMP);
108 if(observer_callback) {
109 observer_callback(a->id, a->has_value,
110 a->value, a->value, ANNOUNCEMENT_BUMP);
117 if(listen_callback) {
118 listen_callback(time);
125 listen_callback = callback;
131 observer_callback = callback;
146 if(a->callback !=
NULL) {
147 a->callback(a, from,
id, value);