ardupilot/libraries/AP_HAL_PX4
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/simple build: removed all nocore.inoflag files 2015-11-16 08:05:17 +11:00
AnalogIn.cpp AP_HAL_PX4: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AnalogIn.h AP_HAL_PX4: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_HAL_PX4_Namespace.h HAL_PX4: added hal.i2c support on PX4 boards 2015-09-08 16:46:52 +10:00
AP_HAL_PX4.h AP_HAL: provide AP_HAL_MAIN() 2015-10-21 09:16:09 +11:00
GPIO.cpp AP_HAL_PX4: remove unused var 2015-08-25 13:51:21 +09:00
GPIO.h AP_HAL_PX4: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
HAL_PX4_Class.cpp AP_HAL_PX4: merge init() and run() 2015-10-21 09:16:08 +11:00
HAL_PX4_Class.h AP_HAL_PX4: merge init() and run() 2015-10-21 09:16:08 +11:00
I2CDriver.cpp HAL_PX4: added hal.i2c support on PX4 boards 2015-09-08 16:46:52 +10:00
I2CDriver.h HAL_PX4: added hal.i2c support on PX4 boards 2015-09-08 16:46:52 +10:00
NSHShellStream.cpp AP_HAL_PX4: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
px4_param.cpp AP_HAL_PX4: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
RCInput.cpp AP_HAL_PX4: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
RCInput.h AP_HAL_PX4: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
RCOutput.cpp AP_HAL_PX4: remove unused write method 2015-09-29 11:53:49 +09:00
RCOutput.h AP_HAL_PX4: remove unused write method 2015-09-29 11:53:49 +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
Storage.cpp AP_HAL_PX4: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
Storage.h AP_HAL_PX4: 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 HAL_PX4: Rework support for FLOW_CONTROL_AUTO. 2015-08-19 15:21:10 +10:00
UARTDriver.h HAL_PX4: Rework support for FLOW_CONTROL_AUTO. 2015-08-19 15:21:10 +10:00
Util.cpp HAL_PX4: make available_memory() uint32_t 2015-11-05 16:09:00 +11:00
Util.h HAL_PX4: make available_memory() uint32_t 2015-11-05 16:09:00 +11:00