Commit Graph

43 Commits

Author SHA1 Message Date
Peter Barker 68652867e1 AP_HAL: make in_main_thread public, pure and virtual 2017-09-19 09:40:11 +10:00
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.
2017-08-03 20:25:14 -07:00
Lucas De Marchi dbd074b250 AP_HAL: remove register_timer_process with extra arg 2017-08-02 08:00:53 -07:00
Eugene Shamaev 9b98c304c4 AP_HAL: top level HAL definitions for CAN bus driver 2017-04-10 21:31:07 +01:00
Lucas De Marchi dbf2aedf1e AP_HAL: replace header guard with pragma once 2016-02-18 14:52:34 -02:00
Lucas De Marchi 9aa49cda93 Global: remove system_initializing() from scheduler
This is not used anymore.
2016-02-12 23:42:34 -02:00
Julien BERAUD d5c4917bcd AP_HAL: add default support for timesliced timers
To keep compatibility
2016-01-18 16:57:48 -02:00
Lucas De Marchi 036eb21c09 AP_HAL: remove init() method with unused argument 2015-12-02 14:49:12 -02:00
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.
2015-12-02 14:21:58 -02:00
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.
2015-11-20 12:36:00 +09:00
Caio Marcelo de Oliveira Filho a348424551 AP_HAL: remove unused function
This was used by APM1/2 that were removed.
2015-11-18 11:50:56 +09:00
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.
2015-10-30 14:35:32 +09:00
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.
2015-10-30 14:35:30 +09:00
Lucas De Marchi 9eaf7c5660 AP_HAL: add format attribute to panic() 2015-10-24 14:26:36 +11:00
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.
2015-10-24 14:26:35 +11:00
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)
2015-10-24 14:26:35 +11:00
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.
2015-08-11 16:28:43 +10:00
Andrew Tridgell c44ab01be8 AP_HAL: use noreturn attribute on panic
should reduce coverity warnings
2015-06-08 21:09:08 +10:00
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)
2015-04-30 12:17:34 +10:00
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()
2015-02-16 11:52:37 +11:00
Andrew Tridgell 7439d34a5d AP_HAL: add millis64() and micros64() on faster boards
this can be used for much simpler scheduling, without any wrap
handling
2014-08-20 07:55:19 +10:00
Andrew Tridgell 3fa2207a2d AP_HAL: allow for microsecond resolution in scheduler->stop_clock()
this makes 400Hz in the replay code possible
2014-02-26 19:33:39 +11:00
Andrew Tridgell 117b77460e HAL_Linux: added stop_clock hack! 2014-02-15 05:28:08 +11:00
Andrew Tridgell 7e1e10f941 AP_HAL: added time_shift() scheduler API
used for log replay
2013-12-30 14:35:09 +11:00
Andrew Tridgell 7ef187fcfd AP_HAL: added optional set_timer_speed() scheduler API
will be used by copter to reduce interrupt load on APM2
2013-10-13 11:03:35 +09:00
Andrew Tridgell f2de4bb7b0 AP_HAL: implement AP_HAL::MemberProc via FastDelegate.h
this provides a more portable way to encapsulate member functions in
variables
2013-09-30 20:51:13 +10:00
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
2013-09-28 21:24:02 +10:00
Andrew Tridgell 7082e0f8aa AP_HAL: added hold_in_bootloader parameter to scheduler->reboot() 2013-09-04 11:58:13 +10:00
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
2013-04-17 21:33:50 +10:00
Pat Hickey 7a0f95c11c AP_HAL: add Scheduler methods in_timerprocess, system_initialize 2013-01-10 14:07:43 -08:00
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
2013-01-03 17:33:14 -08:00
Andrew Tridgell 93040e5725 AP_HAL: removed the defer_timer_process() function
this is now unused
2012-12-21 20:01:42 +11:00
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
2012-12-20 14:53:23 +11:00
Pat Hickey c86004d676 AP_HAL: Add panic method to scheduler 2012-12-20 14:52:31 +11:00
Pat Hickey 592d32ba47 AP_HAL: add reboot to scheduler 2012-12-20 14:51:32 +11:00
Pat Hickey c9541d3b00 AP_HAL: added begin_atomic and end_atomic to scheduler 2012-12-20 14:51:29 +11:00
Pat Hickey bae7e4b88e AP_HAL Scheduler: simplify register_timer_process, min time for delay cb 2012-12-20 14:51:27 +11:00
Pat Hickey d422ab7806 AP_HAL: Extend Scheduler to support defered timer procs
* based on queue_proc from AP_PeriodicProcess
2012-12-20 14:51:26 +11:00
Pat Hickey 6671310399 AP_HAL Scheduler: interface has AP_PeriodicProcess functionality 2012-12-20 14:51:22 +11:00
Pat Hickey 187571cca9 AP_HAL Scheduler fixes & AP_HAL_AVR Scheduler changed to match 2012-12-20 14:51:22 +11:00
Pat Hickey 2adfc4fbc5 AP_HAL Scheduler add method register_delay_callback (unimplemented) 2012-12-20 14:51:22 +11:00
Pat Hickey 1d89419059 AP_HAL: Scheduler should use stdint types, conform names 2012-12-20 14:51:22 +11:00
Pat Hickey ea8242ace1 AP_HAL: Add scheduler interface, move Arduino init code to implementation 2012-12-20 14:51:19 +11:00