Andrew Tridgell
6836a986f3
PeriodicProcess: switch to SREG = oldSREG pattern for interrupt mask/restore
12 years ago
rmackay9
c007a19200
AP_PeriodicProcess: added running() method which tells the caller whether the timer is suspended or not
13 years ago
rmackay9
55ef1e0a29
AP_PeriodicProcess: queue_process changes to suspend other processes before running queued process
...
Also restored suspend_timer to void return type
13 years ago
uncrustify
621fafe370
uncrustify libraries/AP_PeriodicProcess/AP_TimerProcess.cpp
13 years ago
Andrew Tridgell
534aee17e9
TimerProcess: added suspend_timer()/resume_timer()
...
this will be used to avoid races in driver initialisation
13 years ago
Randy Mackay
ed19c25a97
Arduino 1.0 - changed all #includes of "WProgram.h", "wiring.h" and "WConstants.h to "Arduino.h".
...
Modified FastSerial's write function to return size_t (number of bytes written).
13 years ago
Andrew Tridgell
e7dab19260
TimerProcess: prevent a race in setting up the timer callbacks
13 years ago
Andrew Tridgell
4d71482d1c
TimerProcess: check for duplicate registrations
...
if a driver gets initialised twice, make sure it doesn't get called
twice in the timer loop
13 years ago
Andrew Tridgell
dbaa6fb6d2
TimerProcess: make some variables uint8_t
...
save a couple of bytes
13 years ago
Andrew Tridgell
79d6c21dde
PeriodicProcess: added set_failsafe() call
...
this adds an optional failsafe function that will be called in the
timer loop
13 years ago
Andrew Tridgell
c41e7c505b
timer: enable interrupts during timer processing
...
this prevents us losing serial bytes when we call sensor drivers that
take more than 100usec to read.
We also prevent timer recursion by re-enabling the timer after all
callbacks are complete
13 years ago
Pat Hickey
49ca774734
AP_PeriodicProcess: AP_TimerProcess can register multiple callbacks.
13 years ago
Pat Hickey
d288b8870d
purple: added PeriodicProcess library
...
this library provides a clean API for drivers to request periodic
timer driven calls at whatever rate they need
13 years ago