ardupilot/libraries/AP_HAL_FLYMAPLE
Caio Marcelo de Oliveira Filho efbc7648b1 AP_HAL: create AP_HAL namespace and use for some HAL functionality
For certain basic functionality, there aren't much benefit to be able to
vary the implementation easily at runtime. So instead of using virtual
functions, use regular functions that are "resolved" at link time. The
implementation of such functions is provided per board/platform.

Examples of functions that fit this include: getting the current
time (since boot), panic'ing, getting system information, rebooting.

These functions are less likely to benefit from the indirection provided
by virtual interfaces. For more complex hardware access APIs the
indirection makes more sense and ease the testing (when we have it!).

The idea is that instead of calling

    hal.scheduler->panic("on the streets of london");

now use

    AP_HAL::panic("on the streets of london");

A less important side-effect is that call-site code gets
smaller. Currently the compiler needs to get the hal, get the scheduler
pointer, get the right function pointer in the vtable for that
scheduler. And the call must include an extra parameter ("this"). Now it
will be just a function call, with the address resolved at link time.

This patch introduces the first functions that will be in the namespace,
further patches will implementations for each board and then switch the
call-sites. The extra init() function allow any initial setup needed for
the functions to work.
2015-11-20 12:25:24 +09:00
..
examples AP_HAL_FLYMAPLE: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:11 +11:00
utility AP_HAL_FLYMAPLE: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AnalogIn.cpp Replace use of print_P() with print() 2015-10-30 14:35:21 +09:00
AnalogIn.h AP_HAL_FLYMAPLE: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AnalogSource.cpp AP_HAL_FLYMAPLE: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:11 +11:00
AP_HAL_FLYMAPLE_Namespace.h HAL_FLYMAPLE: removed Console driver 2013-10-05 18:32:46 +10:00
AP_HAL_FLYMAPLE_Private.h HAL_FLYMAPLE: removed Console driver 2013-10-05 18:32:46 +10:00
AP_HAL_FLYMAPLE.h AP_HAL: provide AP_HAL_MAIN() 2015-10-21 09:16:09 +11:00
FlymaplePortingNotes.txt AP_HAL_FLYMAPLE: Add notes to FlymaplePortingNotes.txt re GPS selection. 2014-02-17 05:56:37 +11:00
FlymapleWirish.h AP_HAL_FLYMAPLE: Improved libmaple version detection 2013-10-07 08:41:52 +11:00
GPIO.cpp AP_HAL_FLYMAPLE: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
GPIO.h AP_HAL_FLYMAPLE: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
HAL_FLYMAPLE_Class.cpp AP_HAL_FLYMAPLE: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:11 +11:00
HAL_FLYMAPLE_Class.h AP_HAL_FLYMAPLE: merge init() and run() 2015-10-21 09:16:08 +11:00
I2CDriver.cpp AP_HAL_FLYMAPLE: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
I2CDriver.h AP_HAL_FLYMAPLE: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
RCInput.cpp AP_HAL_FLYMAPLE: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
RCInput.h AP_HAL_FLYMAPLE: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
RCOutput.cpp AP_HAL_FLYMAPLE: remove unused write method 2015-09-29 11:53:44 +09:00
RCOutput.h AP_HAL_FLYMAPLE: remove unused write method 2015-09-29 11:53:44 +09:00
Scheduler.cpp Replace prog_char and prog_char_t with char 2015-10-30 14:35:30 +09:00
Scheduler.h Replace prog_char and prog_char_t with char 2015-10-30 14:35:30 +09:00
Semaphores.cpp Remove use of PSTR 2015-10-30 14:35:04 +09:00
Semaphores.h AP_HAL_FLYMAPLE: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
SPIDriver.cpp AP_HAL_FLYMAPLE: Add support for using SPI devices of the same type. 2015-09-18 09:15:09 +10:00
SPIDriver.h AP_HAL_FLYMAPLE: Add support for using SPI devices of the same type. 2015-09-18 09:15:09 +10:00
Storage.cpp AP_HAL_FLYMAPLE: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
Storage.h AP_HAL_FLYMAPLE: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
system.cpp AP_HAL: create AP_HAL namespace and use for some HAL functionality 2015-11-20 12:25:24 +09:00
UARTDriver.cpp AP_HAL_FLYMAPLE: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
UARTDriver.h AP_HAL_FLYMAPLE: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
Util.h AP_HAL_FLYMAPLE: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00