Commit Graph

37 Commits

Author SHA1 Message Date
Patrick José Pereira 6518d6dc4d AP_HAL_LINUX: Add support for Raspberry Pi 4
The Raspberry Pi 4 uses a new BCM cpu, the BCM2711 with
a peripheral base address of 0xFE000000

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-01-16 08:03:34 +11:00
Patrick José Pereira 6230524636 AP_HAL_Linux: Add navigator board
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-01-16 08:01:54 +11:00
Peter Barker 42c711a5b2 AP_HAL_Linux: remove pointless attach_interrupt override 2018-08-31 08:32:08 +10:00
Peter Barker 8d5a9ead48 AP_HAL_Linux: attach_interrupt now takes a functor
AP_HAL_Linux: add type-safety for interrupt types
2018-08-21 20:34:01 +09:00
Michael du Breuil 0aaa029f9b AP_HAL_Linux: GPIO_RPi: Fix UB when reading a pin
You can't shift by more then the word width
2018-07-11 23:09:52 -07:00
Michael du Breuil 1f7ee55211 AP_HAL_Linux: Remove GPIO::analogPinToDigitalPin() 2018-07-11 23:09:52 -07:00
Georgii Staroselskii 56534b34c5 AP_HAL_Linux: use GPIO_Sysfs for Navio
/boot/config.txt: dtoverlay=navio-rgb should be disabled for this thing
to work, though.
2017-11-17 09:20:55 -08:00
Georgii Staroselskii 5254ee03c2 AP_HAL_Linux: use GPIO_Sysfs for Edge 2017-11-17 09:18:36 -08:00
Georgii Staroselskii 8fcd30c611 AP_HAL_Linux: use GPIO_Sysfs for Navio 2 2017-11-17 09:18:35 -08:00
Staroselskii Georgii 2a99bb0c95 AP_HAL: use Raspberry Pi GPIO and Util classes for Edge
As it's a yet another Raspberry Pi based board, we may reuse the code.
2017-10-20 13:03:08 -07:00
Lucas De Marchi 7ba82ff23a AP_HAL_Linux: remove raspilot
It's not being sold, there are just a few (different) engineering
samples built and there are no plans for this to go forward for people
that were pushing it.
2017-09-12 15:06:19 -07:00
Francisco Ferreira 4398be2275 AP_HAL_Linux: remove URUS 2017-09-11 10:04:11 -07:00
Lucas De Marchi 490841a814 AP_HAL_Linux: add O_CLOEXEC in places missing it
By opening with O_CLOEXEC we make sure we don't leak the file descriptor
when we are exec'ing or calling out subprograms. Right now we currently
don't do it so there's no harm, but it's good practice in Linux to have
it.
2016-11-07 12:37:30 -03:00
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
hiro2233 7000124f6a AP_HAL_Linux: Added URUS Macro for GPIO_RPI and UtilRPI 2016-10-27 11:51:32 -02:00
Martin Evans 6f6112d7c2 AP_HAL_Linux: Add setting for GPIO for Dark board
Just like other RPI-based boards.
2016-10-24 10:00:24 -02:00
Lucas De Marchi 1d9d0a40db AP_HAL_Linux: GPIO: reduce macro and variable scopes
Also change the coding style in a few places.
2016-06-21 12:16:32 -03:00
Lucas De Marchi 0bb86ae498 AP_HAL_Linux: GPIO_RPI: remove unused functions
These functions to use pins as pwm are never used in the codebase, so
remove them.
2016-06-21 12:16:32 -03:00
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
Staroselskii Georgii 7187f26220 AP_HAL_Linux: use Raspberry Pi GPIO for Navio2 2016-02-27 03:06:50 -03:00
Lucas De Marchi 4e883e033f AP_HAL_Linux: GPIO: remove ifdef comment
It just clutters the source code and review process when a new similar
board is added.
2016-01-05 15:34:49 -02:00
Víctor Mayoral Vilches 8ce8045033 HAL_Linux: GPIO, add support for PXFmini 2016-01-05 15:31:43 -02:00
Aaron Wang Shi f437e7a67c AP_HAL_Linux: add GPIO definitions for BH hat 2015-12-21 15:54:31 +11:00
Caio Marcelo de Oliveira Filho 7675913d5b AP_HAL_Linux: use millis/micros/panic functions 2015-11-20 12:31:04 +09:00
Víctor Mayoral Vilches 68c92eab25 AP_HAL_Linux: GPIO, add Erle-Brain 2 2015-11-04 13:58:24 +11: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
Lucas De Marchi fc2a1d27b4 AP_HAL_Linux: fix build for raspilot after Util change
Make sure raspilot also builds after making the Util class common for
RPI-based boards.
2015-09-24 15:31:32 +10:00
Lucas De Marchi 55e1d60b54 AP_HAL_Linux: Use from() method for downcast in Util class 2015-09-24 15:31:32 +10:00
dgrat 15b3717d89 AP_HAL_Linux: Move RPi version check to util class
- Moved the version check functions to util.
 - Removed a redundant version check.
 - Removed redundant version check functions from RCInput.
2015-09-24 13:04:18 +10:00
Andrew Tridgell bf001f19ff HAL_Linux: don't panic on runtime failures 2015-09-14 14:22:16 +10:00
raspilot f057fe3d02 AP_HAL_Linux: added support for raspilot GPIO 2015-09-14 14:22:15 +10: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
Staroselskii Georgii 930aeaf556 AP_HAL_Linux: add RPi version runtime detection 2015-04-14 10:16:25 +10:00
Staroselskii Georgii a55db1c25d AP_HAL_Linux: fixed LinuxGPIO_RPI::read() 2014-11-14 10:28:34 +11:00
Mikhail Avkhimenia 49d3035ee5 HAL_Linux: fix types, remove printfs in GPIO_RPI 2014-11-14 10:28:34 +11:00
Mikhail Avkhimenia 2f0900b0a8 HAL_Linux: add GPIO driver for Raspberry Pi 2014-10-30 13:30:07 +11:00