Commit Graph

18 Commits

Author SHA1 Message Date
Lucas De Marchi 71e10c9132 AP_HAL_Linux: fix include order
Sort include alphabetically and make them in order:

Main header
system headers
library headers
local headers

While reordering, change a include of endian.h to our sparse-endian.h
which is more reliant to toolchain changes.
2016-05-18 23:05:56 -03:00
Lucas De Marchi 45c6b750f2 AP_HAL_Linux: remove ifdef checks for HAL_BOARD_LINUX
Everything inside libraries/AP_HAL_Linux is for Linux boards, there's
not need to add the ifdefs.
2016-05-18 23:05:56 -03:00
Lucas De Marchi 2ac96b942c AP_HAL_Linux: remove prefix from AP_HAL_Linux classes
We have already a Linux namespace, so there's no need to prefix Linux on
all names.
2015-10-21 10:11:19 +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
Mikhail Avkhimenia 2f0900b0a8 HAL_Linux: add GPIO driver for Raspberry Pi 2014-10-30 13:30:07 +11:00
Andrew Tridgell 6312b9f8c0 HAL_Linux: allow different SPI and GPIO devices on different boards
this fixes the Replay utility, which uses subtype NONE, and will make
it easier to port to new boards
2014-07-14 09:44:37 +10:00
Andrew Tridgell fc8068adfe HAL_Linux: use board subtypes 2014-07-14 09:44:35 +10:00
Víctor Mayoral Vilches 95e0803880 HAL_Linux: Remove panic when invalid pin in GPIO
When a invalid pin is passed as a parameter
the methods return without performing anything
insted of raising a panic.
2014-07-14 09:30:25 +10:00
Siddharth Bharat Purohit d2b5a1cfac HAL_Linux: add HAL_ prefix to GPIO_INPUT 2014-07-14 09:29:45 +10:00
bugobliterator 1f1af0b0ea HAL_Linux: make GPIO code compact and readable
add hal instance to generate scheduler
change gpio/export write method
add gpio struct to LinuxDigitalSource class
change individual gpio banks to one gpio_bank array
2014-07-14 09:29:45 +10:00
bugobliterator fd0685cc01 HAL_Linux: change to mem access method from sysfs access method
This step is taken to reduce the time for gpio access substantially
2014-07-14 09:29:18 +10:00
bugobliterator 96bbe17bd3 HAL_Linux: add support for LinuxDigitalSource in AP_HAL_Linux 2014-07-14 09:29:18 +10:00
bugobliterator 85d10e2ce3 HAL_Linux: add export gpio during direction set if not exported during initialisation 2014-07-14 09:29:08 +10:00
bugobliterator a7ead42f52 HAL_Linux: added initial gpio library 2014-07-14 09:29:08 +10:00
Andrew Tridgell 74ee70d463 HAL_Linux: updates for ERLE board type 2014-07-14 08:52:27 +10:00
Andrew Tridgell a8946a5f31 HAL_Linux: fixed build 2013-12-31 10:28:38 +11:00
Andrew Tridgell 4ba044c441 AP_HAL_Linux: initial Linux AP_HAL 2013-09-28 21:24:01 +10:00