Commit Graph

15 Commits

Author SHA1 Message Date
Caio Marcelo de Oliveira Filho e18884a328 AP_HAL_AVR: merge init() and run() 2015-10-21 09:16:08 +11:00
Caio Marcelo de Oliveira Filho 3fe1d86c80 AP_HAL_AVR: implement HAL::run() for APM1 and APM2 2015-10-21 09:16:08 +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 12423814ef AP_HAL_AVR: 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
Julien BERAUD 7275e33e79 AP_HAL: add the possibility to have more than 1 i2c
Bebop drone has 3 i2c
2015-07-10 14:23:17 +10:00
Andrew Tridgell 6c74ca58c3 HAL_AVR: no uartE 2014-02-26 08:19:15 +11:00
Andrew Tridgell 4fb1fdb627 HAL_AVR: added NULL uartD 2013-11-23 19:29:22 +11:00
Andrew Tridgell 7072c52b57 HAL_AVR: removed Console driver 2013-10-05 18:32:12 +10:00
Andrew Tridgell 6aecdb3d7d HAL_AVR: tweak the default serial buffer sizes
this reduces memory fragmentation a lot, saving memory
2013-01-11 11:16:09 +11:00
Pat Hickey 0660873fa7 AP_HAL_AVR: pull-up UART RX lines to fix GPS spoofing (Tridge)
Tridge discovered this bugfix:
https://groups.google.com/d/topic/drones-discuss/aek6LJeYQo8/discussion
2013-01-05 21:03:02 -08:00
Pat Hickey 4c31cc0c2b AP_HAL_AVR: add semaphore to I2CDriver 2013-01-04 16:19:38 -08:00
Pat Hickey b3abe89989 AP_HAL_AVR: add Util stubs 2012-12-20 14:52:37 +11:00
Andrew Tridgell e10e3ee3be AP_HAL: fixed argv declaration to match getopt() 2012-12-20 14:52:29 +11:00
Andrew Tridgell 18824c7ef5 AP_HAL: expose argc/argv in hal.init()
used for SITL port
2012-12-20 14:52:29 +11:00
Pat Hickey 25e597d3b3 AP_HAL_AVR: Refactor APM1 and APM2 instances to use CONFIG_HAL_BOARD 2012-12-20 14:51:37 +11:00