Commit Graph

115 Commits

Author SHA1 Message Date
Peter Barker 9b9ec4db40 AP_HAL_Empty: attach_interrupt now takes a functor
AP_HAL_Empty: add type-safety for interrupt types
2018-08-21 20:34:01 +09:00
Michael du Breuil f4b1d530c1 AP_HAL_Empty: Remove GPIO::analogPinToDigitalPin() 2018-07-11 23:09:52 -07:00
Andrew Tridgell 4ff57bd512 HAL_Empty: support uartG 2018-06-29 08:17:38 +10:00
Michael du Breuil dbd852bbb6 AP_HAL_Empty: Remove timer process suspension interface 2018-06-06 07:16:58 +10:00
Michael du Breuil 45a13c868b AP_HAL_Empty: Remove RC overrides 2018-06-05 09:51:09 +10:00
Michael du Breuil b192c1c094 AP_HAL_Empty: Remove set_overrides() method 2018-05-11 12:13:39 +01:00
Peter Barker ae56cbc302 AP_HAL_Empty: move delay callback handling to base HAL Scheduler class 2018-05-09 16:15:38 +10:00
Andrew Tridgell 5e19183e90 HAL_Empty: fixed I2C get_device() interface 2018-01-15 11:46:02 +11:00
Lucas De Marchi 5ea1784838 global: remove AP_HAL::in_timerprocess()
This is not used and in the only places it would make sense would be
internally to the scheduler so remove it.
2017-08-03 20:25:14 -07:00
Julien Beraud c08587fb09 AP_HAL_Empty: adapt to new api
Removed gyro_cb in HAL interface
Added 2 new methods
2017-01-23 21:23:16 +11: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
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Andrew Tridgell 1d6e4673da HAL_Empty: add cork() and push() for RCOutput 2016-10-13 10:00:04 +11:00
Lucas De Marchi e1ab44f4a3 Global: remove get_fd() from Device API
This was there for compatibility with I2CDriver and SPIDriver. We don't
use them anymore so we can remove the compat method.
2016-08-29 10:27:36 -03:00
Murilo Belluzzo 077e03678f Global: Adapt Stream class to be used with Ringbuffer 2016-08-03 01:44:02 -03:00
Lucas De Marchi 7669d54265 AP_HAL_Empty: update Device interface 2016-07-30 00:55:27 -03:00
Lucas De Marchi dc91dfb446 AP_HAL_Empty: remove SPIDriver
SPIDevice now controls all accesses to SPI bus.
2016-07-29 15:01:15 -03:00
Lucas De Marchi 9fda608d4a AP_HAL_Empty: SPIDevice: implement fullduplex transfer 2016-07-29 15:01:14 -03:00
Lucas De Marchi 3eb0a48d59 AP_HAL_Empty: remove I2CDriver
I2CDevice now serves for the same purpose.
2016-07-28 18:08:56 -03:00
Lucas De Marchi 5ef1568137 AP_HAL_Empty: fix sitl
Sitl or anyone using AP_HAL_Empty implementation doesn't have any
I2CDevice, so it's pointless to return an empty one.
2016-07-14 17:32:32 -03:00
Ricardo de Almeida Gonzaga 00b1915034 AP_HAL_Empty: Fix typos 2016-05-13 19:20:06 -03:00
Andrew Tridgell a78e23d6fb HAL_Empty: added uartF 2016-04-20 09:39:49 +10:00
Lucas De Marchi 2bed317c6c AP_HAL_Empty: replace header guard with pragma once 2016-02-18 14:52:34 -02:00
Lucas De Marchi cb40444bf8 AP_HAL_Empty: implement SPIDevice 2016-02-16 19:49:09 -02:00
Lucas De Marchi a117c22c34 AP_HAL_Empty: add I2CDevice 2016-02-16 19:49:08 -02:00
Lucas De Marchi 2b61eaf9f2 Global: remove {begin,end}_atomic from scheduler
These are never used and largely not implemented.
2016-02-12 23:42:34 -02:00
Lucas De Marchi 9aa49cda93 Global: remove system_initializing() from scheduler
This is not used anymore.
2016-02-12 23:42:34 -02: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
Andrew Tridgell a73039d515 HAL_Empty: use 5V voltage for HAL_EMPTY
this makes bringup easier for new boards (allows arming checks to
pass)
2015-12-20 17:55:40 +11:00
Andrew Tridgell 9fe25f9c71 HAL_Empty: fixed I2CDriver for use in Linux subtypes 2015-12-20 16:52:20 +11:00
Lucas De Marchi e825eb12f5 AP_HAL_Empty: follow coding style
- Add some spaces
 - Use pragma once
 - Remove ; from method implementation
 - Remove unneeded return
2015-12-18 17:56:04 +11:00
Lucas De Marchi b3a751a199 AP_HAL_Empty: sort include headers 2015-12-18 17:56:03 +11:00
Julien BERAUD d14f4104ea AP_HAL_Empty: add support for OpticalFlow
Void driver
2015-12-18 17:56:03 +11:00
Lucas De Marchi 4f012b2b32 AP_HAL_Empty: sort namespace classes 2015-12-08 11:12:14 +11:00
Lucas De Marchi 2ffb08b9ca AP_HAL_Empty: remove prefix from classes
Like was done for AP_HAL_Linux in 2ac96b9 ("AP_HAL_Linux: remove prefix
from AP_HAL_Linux classes"), remove the "Empty" prefix from class names
since we are already inside the Empty namespace.
2015-12-08 11:12:14 +11:00
Lucas De Marchi 00f17466a8 AP_HAL_Empty: use init() method without arguments
Override the init() method from parent class that doesn't have a
parameter since it's not used here.
2015-12-02 14:49:11 -02:00
Caio Marcelo de Oliveira Filho ee542aac8b AP_HAL_Empty: Remove unused extern declaration for HALs
These are "left-overs" from how things worked before commit
"AP_HAL: make code not depend on concrete HAL
implementations". The real declaration now lives inside get_HAL() function.

Use the opportunitiy to change the files to use "#pragma once".
2015-11-20 16:30:45 +09:00
Caio Marcelo de Oliveira Filho 420dfc7ce2 AP_HAL_Empty: remove unused functions 2015-11-20 12:36:10 +09:00
Lucas De Marchi 1b07dabeb7 Replace prog_char and prog_char_t with char
prog_char and prog_char_t are now the same as char on supported
platforms. So, just change all places that use them and prefer char
instead.

AVR-specific places were not changed.
2015-10-30 14:35:30 +09:00
Lucas De Marchi 20c6ffc5e3 Replace use of UARTDriver::printf_P() with UARTDriver::printf()
This also starts to show warnings on places that were already using
wrong printf format strings.
2015-10-30 14:35:25 +09:00
Lucas De Marchi 7ceffb1e2b Replace use of vprintf_P() with vprintf() 2015-10-30 14:35:23 +09:00
Lucas De Marchi 9eaf7c5660 AP_HAL: add format attribute to panic() 2015-10-24 14:26:36 +11:00
Lucas De Marchi e2d1fab863 AP_HAL_Empty: Scheduler: implement variadic version of panic() 2015-10-24 14:26:36 +11:00
Lucas De Marchi ad61a93c14 AP_HAL: turn panic() into a variadic method
Change the declaration on all HAL implementations so panic() in future
may implement a printf-like interface.
2015-10-24 14:26:35 +11:00
Caio Marcelo de Oliveira Filho 75add595a0 AP_HAL_Empty: remove empty example
There are hello world examples elsewhere, and a bit misleading. It
doesn't test the Empty implementation, but the current board
implementation.
2015-10-21 09:16:12 +11:00
Caio Marcelo de Oliveira Filho 19b4ca60c4 AP_HAL: provide AP_HAL_MAIN()
Move the macros to a single place and reduce the variations not based on
board, but based on

- The name of the entry-point function, specified by AP_MAIN;
- Whether it contains argc/argv arguments or not.

The goal here is that programs (vehicles and examples) don't need to
include all possible boards to define a main function. Further patches
will change the programs.
2015-10-21 09:16:09 +11:00
Caio Marcelo de Oliveira Filho 0c837326b5 AP_HAL_Empty: merge init() and run() 2015-10-21 09:16:08 +11:00
Caio Marcelo de Oliveira Filho 346ab77c27 AP_HAL_Empty: implement HAL::run() 2015-10-21 09:16:07 +11:00
Caio Marcelo de Oliveira Filho ec52df991c build: compile only the HAL files needed by the board
Instead of requiring every program to specify the HAL related modules,
let the build system do it (in practice everything we compiled depended
on HAL anyway). This allow including only the necessary files in the
compilation.
2015-10-21 09:16:07 +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