Commit Graph

9 Commits

Author SHA1 Message Date
Lucas De Marchi 875538ccb5 AP_HAL_Linux: examples: small fixes to BusTest
- Fix char allocation
  - Fix coding style
  - Fix accessing dev->bus_type(): it's a function
2017-04-19 01:13:40 -07:00
hiro2233 0d1d430600 AP_HAL_Linux:examples: Example to test device bus with the new APM API. 2017-04-19 01:05:12 -07:00
Lucas De Marchi b23f7a8be4 AP_HAL_Linux: examples: remove BusTest
This needs to be rewritten using the probe methods.
2016-07-21 16:05:03 -03:00
Lucas De Marchi 9d5fb97819 Global: rename enum SPIDevice to SPIDeviceType
Free the SPIDevice name so to have a consistent name for I2C/SPI device
classes.
2016-02-01 14:18:50 -02:00
Caio Marcelo de Oliveira Filho c95a89411c AP_HAL_Linux: remove unnecessary includes in example 2015-10-21 09:16:09 +11:00
Caio Marcelo de Oliveira Filho 2e464a53c2 AP_HAL: make code not depend on concrete HAL implementations
The switching between different AP_HAL was happening by giving different
definitions of AP_HAL_BOARD_DRIVER, and the programs would use it to
instantiate.

A program or library code would have to explicitly include (and depend)
on the concrete implementation of the HAL, even when using it only via
interface.

The proposed change move this dependency to be link time. There is a
AP_HAL::get_HAL() function that is used by the client code. Each
implementation of HAL provides its own definition of this function,
returning the appropriate concrete instance.

Since this replaces the job of AP_HAL_BOARD_DRIVER, the definition was
removed.

The static variables for PX4 and VRBRAIN were named differently to avoid
shadowing the extern symbol 'hal'.
2015-10-21 09:16:07 +11:00
Gustavo Jose de Sousa 124b750c10 AP_HAL_Linux: 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
Lucas De Marchi cfc2972e51 AP_HAL_Linux: use ARRAY_SIZE macro 2015-07-21 14:24:58 +09:00
Andrew Tridgell dd10cbc976 AP_HAL_Linux: convert example from .pde to .cpp 2015-06-01 17:03:44 +10:00