Andrew Tridgell
911a99b79e
AP_HAL: removed hal argument to EXPECT_DELAY_MS()
6 years ago
Andrew Tridgell
b1ed77bee9
AP_HAL: added EXPECT_DELAY() macro
...
this prevents nesting errors in use of EXPECT_DELAY(), ensuring we
always close the expected delay
6 years ago
Andrew Tridgell
88352b73bb
AP_HAL: added expect_delay_ms() to Scheduler
...
used to notify scheduler of long expected delay in main thread
6 years ago
Michael du Breuil
73901274b0
AP_HAL: Define a scripting base priority
6 years ago
Francisco Ferreira
0645a5b11a
AP_HAL: introduce a CANProtocol interface and remove HAL CAN thread management
7 years ago
Andrew Tridgell
e14e0b8a14
AP_HAL: added thread_create() API
...
this is deliberately a minimalistic API, for ease of implementation in
each HAL
7 years ago
Michael du Breuil
1183ed61fb
AP_HAL: Remove timer process suspension interface
7 years ago
Peter Barker
939aec090e
AP_HAL: allow F4Light to call delay callback
7 years ago
Peter Barker
0ad53e53eb
AP_HAL: move delay callback handling to base HAL Scheduler class
...
This allows us to move a lot of delay handling from vehicle classes into
HAL Scheduler.
The most notable improvement is that it moves the detection of recursion
into the Scheduler, out of each separate vehicle.
7 years ago
Andrew Tridgell
84a4f9dc96
AP_HAL: added boost_end() method to Scheduler API
...
this allows for a better method of controlling main thread priority
7 years ago
Andrew Tridgell
d2075b4b67
AP_HAL: added irq save/restore API to hal.scheduler
...
these are used by RPM driver
7 years ago
Peter Barker
68652867e1
AP_HAL: make in_main_thread public, pure and virtual
7 years ago
Lucas De Marchi
5ea1784838
global: remove AP_HAL::in_timerprocess()
...
This is not used and in the only places it would make sense would be
internally to the scheduler so remove it.
8 years ago
Lucas De Marchi
dbd074b250
AP_HAL: remove register_timer_process with extra arg
8 years ago
Eugene Shamaev
9b98c304c4
AP_HAL: top level HAL definitions for CAN bus driver
8 years ago
Lucas De Marchi
dbf2aedf1e
AP_HAL: replace header guard with pragma once
9 years ago
Lucas De Marchi
9aa49cda93
Global: remove system_initializing() from scheduler
...
This is not used anymore.
9 years ago
Julien BERAUD
d5c4917bcd
AP_HAL: add default support for timesliced timers
...
To keep compatibility
9 years ago
Lucas De Marchi
036eb21c09
AP_HAL: remove init() method with unused argument
9 years ago
Lucas De Marchi
6b1c5e6f72
AP_HAL: add init() method without argument
...
The argument in init() is not used by any implementation. Add a second
method without it so the HAL implementation can used it instead. Later
the unused method will be removed.
9 years ago
Caio Marcelo de Oliveira Filho
c5fc0deee9
AP_HAL_Scheduler: remove unused functions
...
Getting the time elapsed and panic are now functions in AP_HAL, so
remove them from HAL class interface and it's implementations.
9 years ago
Caio Marcelo de Oliveira Filho
a348424551
AP_HAL: remove unused function
...
This was used by APM1/2 that were removed.
9 years ago
Lucas De Marchi
5244559010
Minimize AP_Progmem.h includes
...
Most of AP_Progmem is already gone so we can stop including it in most
of the places. The only places that need it are the ones using
pgm_read_*() APIs.
In some cases the header needed to be added in the .cpp since it was
removed from the .h to reduce scope. In those cases the headers were
also reordered.
9 years ago
Lucas De Marchi
1b07dabeb7
Replace prog_char and prog_char_t with char
...
prog_char and prog_char_t are now the same as char on supported
platforms. So, just change all places that use them and prefer char
instead.
AVR-specific places were not changed.
9 years ago
Lucas De Marchi
9eaf7c5660
AP_HAL: add format attribute to panic()
9 years ago
Lucas De Marchi
ad61a93c14
AP_HAL: turn panic() into a variadic method
...
Change the declaration on all HAL implementations so panic() in future
may implement a printf-like interface.
9 years ago
Lucas De Marchi
0b4aa5ac85
AP_HAL: Scheduler: reorder includes
...
Follow the following order for includes:
- Corresponding header file (if exists)
- System headers
- Other ArduPilot library headers
- "Local" headers (from the same library)
9 years ago
Gustavo Jose de Sousa
0456eccca8
AP_HAL: standardize inclusion of libaries headers
...
This commit changes the way libraries headers are included in source files:
- If the header is in the same directory the source belongs to, so the
notation '#include ""' is used with the path relative to the directory
containing the source.
- If the header is outside the directory containing the source, then we use
the notation '#include <>' with the path relative to libraries folder.
Some of the advantages of such approach:
- Only one search path for libraries headers.
- OSs like Windows may have a better lookup time.
10 years ago
Andrew Tridgell
c44ab01be8
AP_HAL: use noreturn attribute on panic
...
should reduce coverity warnings
10 years ago
Andrew Tridgell
df21c6c68d
AP_HAL: support micros64() and millis64() on all platforms
...
this will allow for 64 bit timestamps in DF logs (Peter is working on
that)
10 years ago
Andrew Tridgell
c63540f7b1
AP_HAL: added delay_microseconds_boost()
...
this will be used by wait_for_sample() to boost priority for a short
period at the end of each delay_microseconds()
10 years ago
Andrew Tridgell
7439d34a5d
AP_HAL: add millis64() and micros64() on faster boards
...
this can be used for much simpler scheduling, without any wrap
handling
11 years ago
Andrew Tridgell
3fa2207a2d
AP_HAL: allow for microsecond resolution in scheduler->stop_clock()
...
this makes 400Hz in the replay code possible
11 years ago
Andrew Tridgell
117b77460e
HAL_Linux: added stop_clock hack!
11 years ago
Andrew Tridgell
7e1e10f941
AP_HAL: added time_shift() scheduler API
...
used for log replay
11 years ago
Andrew Tridgell
7ef187fcfd
AP_HAL: added optional set_timer_speed() scheduler API
...
will be used by copter to reduce interrupt load on APM2
11 years ago
Andrew Tridgell
f2de4bb7b0
AP_HAL: implement AP_HAL::MemberProc via FastDelegate.h
...
this provides a more portable way to encapsulate member functions in
variables
12 years ago
Andrew Tridgell
f0f5761e8d
AP_HAL: make timed processes take void *argument
...
this allows the class to be passed in, meaning that drivers that use
register_timer_process() and register_io_process() don't need to use
static members. That results in simpler, easier to read code
12 years ago
Andrew Tridgell
7082e0f8aa
AP_HAL: added hold_in_bootloader parameter to scheduler->reboot()
12 years ago
Andrew Tridgell
af7381e9e0
AP_HAL: added register_io_process()
...
this is used to register a low priority IO task. Used for file IO in
DataFlash_File.cpp
12 years ago
Pat Hickey
7a0f95c11c
AP_HAL: add Scheduler methods in_timerprocess, system_initialize
12 years ago
Pat Hickey
ea2a03344e
AP_HAL Scheduler: remove begin_atomic and end_atomic from api
...
* application-level atomic operations can now only be defined in
terms of suspend/resume_timer_procs
12 years ago
Andrew Tridgell
93040e5725
AP_HAL: removed the defer_timer_process() function
...
this is now unused
12 years ago
Andrew Tridgell
60d3df50ae
AP_HAL: changed delay() to take a uint16_t
...
this allows for up to 32 second delays, and saves a bit of flash space
12 years ago
Pat Hickey
c86004d676
AP_HAL: Add panic method to scheduler
12 years ago
Pat Hickey
592d32ba47
AP_HAL: add reboot to scheduler
12 years ago
Pat Hickey
c9541d3b00
AP_HAL: added begin_atomic and end_atomic to scheduler
12 years ago
Pat Hickey
bae7e4b88e
AP_HAL Scheduler: simplify register_timer_process, min time for delay cb
12 years ago
Pat Hickey
d422ab7806
AP_HAL: Extend Scheduler to support defered timer procs
...
* based on queue_proc from AP_PeriodicProcess
12 years ago
Pat Hickey
6671310399
AP_HAL Scheduler: interface has AP_PeriodicProcess functionality
12 years ago