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
Lucas De Marchi
302252d096
AP_HAL_Empty: remove unused write method
2015-09-29 11:53:42 +09:00
mirkix
07d50b5fbb
AP_HAL_Empty: Add support for using SPI devices of the same type.
2015-09-18 09:15:09 +10:00
Gustavo Jose de Sousa
4e27d19107
AP_HAL_Empty: SPI: adapt to the new signature of transaction()
...
A default behaviour was added here.
2015-09-01 20:26:05 +10:00
Gustavo Jose de Sousa
ca5afbfdc9
AP_HAL_Empty: 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
c44ab01be8
AP_HAL: use noreturn attribute on panic
...
should reduce coverity warnings
2015-06-08 21:09:08 +10:00
Andrew Tridgell
379b130d0a
AP_HAL_Empty: convert example from .pde to .cpp
2015-06-01 17:03:37 +10:00
Andrew Tridgell
40e3b422b5
HAL_SITL: rename HAL_AVR_SITL to HAL_SITL
...
it is nothing to do with the original AVR emulation now
2015-05-05 09:45:54 +10:00
Andrew Tridgell
6450c84987
HAL_Empty: added dummy millis64() and micros64()
2014-08-20 07:59:21 +10:00
Andrew Tridgell
8e15b4db0d
HAL_Empty: fixed example build
2014-08-13 22:12:00 +10:00
Andrew Tridgell
d40d0f6aec
AP_HAL: removed old storage type read/write functions
...
not needed any more
2014-08-13 18:46:44 +10:00
Andrew Tridgell
e137bf26ef
HAL_Empty: avoid some float conversion warnings
2014-07-08 20:27:13 +10:00
Andrew Tridgell
7ceb14bec0
HAL_Empty: make I2C ops fail
2014-07-08 15:08:18 +10:00
Andrew Tridgell
6eee2421cc
AP_HAL: removed RCInput valid_channels() and added new_input() and num_channels()
...
the valid_channels() method was inconsistently implemented between
boards, and served two quite different purposes. It is clearer as two
functions
2014-03-25 14:39:41 +11:00
Andrew Tridgell
58d5454d65
HAL_Empty: no uartE
2014-02-26 08:19:18 +11:00
Andrew Tridgell
1849db7074
AP_HAL: added board_voltage AnalogIn method
...
this makes it easier to get the board voltage from any library,
without having to allocate another analog channel object
2014-02-14 21:25:38 +11:00
Andrew Tridgell
87cc95dd7f
AP_HAL: removed unused enable_mask and disable_mask functions
2014-01-16 17:16:17 +11:00
Andrew Tridgell
5e980a5b49
HAL_EMPTY: added uartD
2013-11-23 19:29:22 +11:00
Andrew Tridgell
8b254f2947
HAL_EMPTY: prevent valgrind errors
...
zero I2C transfers
2013-11-23 18:50:55 +11:00
Andrew Tridgell
8e7d9bb464
HAL_Empty: removed Console driver
2013-10-05 18:32:35 +10:00
Andrew Tridgell
a8c97f99d1
HAL_Empty: implement a dummy buffered write
2013-10-03 12:21:08 +10:00
Andrew Tridgell
a2b879493d
HAL_Empty: updates for AP_HAL::MemberProc
2013-09-30 20:56:15 +10:00
Andrew Tridgell
6bc4a830ac
HAL_Empty: updates for new scheduler API
2013-09-28 21:24:02 +10:00
Andrew Tridgell
21010104e6
AP_HAL_Empty: added register_io_process()
2013-09-22 16:02:05 +10:00
Andrew Tridgell
d0bb998352
AP_HAL_Empty: updates for new API
2013-09-22 12:21:54 +10:00
Andrew Tridgell
4c1925b578
AP_HAL_Empty: convert to new AP_HAL printf
2013-09-21 13:29:22 +10:00
Andrew Tridgell
cf633e4d79
AP_HAL: convert to unix file format
2013-09-19 16:26:14 +10:00
Andrew Tridgell
a5b29f44d5
AP_HAL: added hal.gpio->usb_connected() function
...
this replaces the USB_MUX_PIN on APM2, and works on PX4 and FMUv2
2013-09-19 16:23:40 +10:00
Andrew Tridgell
a587b1140a
AP_HAL: added voltage_latest() interface
...
this will be used for reading the 5V rail
2013-09-12 13:23:04 +10:00
Andrew Tridgell
7082e0f8aa
AP_HAL: added hold_in_bootloader parameter to scheduler->reboot()
2013-09-04 11:58:13 +10:00
Randy Mackay
ac36a09747
AP_HAL: add toggle to GPIO
2013-08-30 13:01:34 +10:00
phokur
b00e5d95c9
Update AnalogIn.cpp
...
Fixed AnalogIn.cpp:42: undefined references
Full error msgs:
/cygdrive/c/MAVPRO~1/ardupilot/libraries/AP_HAL_Empty/AnalogIn.cpp:42: undefined reference to `Empty::EmptyAnalogSource::set_stop_pin(unsigned char)'
/cygdrive/c/MAVPRO~1/ardupilot/libraries/AP_HAL_Empty/AnalogIn.cpp:42: undefined reference to `Empty::EmptyAnalogSource::set_settle_time(unsigned short)'
2013-06-26 23:22:08 -10:00
Andrew Tridgell
2316c3bd11
AP_HAL: make storage->write_block() take a const pointer
2013-06-04 14:02:13 +10:00
Andrew Tridgell
a5b20b4dfc
AP_HAL: removed scaling factor on analog sources
...
these are not use anymore, as voltage_average() is used instead
2013-05-13 15:29:42 +10:00
Andrew Tridgell
589b8cdb58
AP_HAL: added voltage_average_ratiometric() call to AnalogIn
...
this is for ratiometric sensors such as the 3DR airspeed sensor and
the Maxbotix analog sonar
2013-05-13 15:12:43 +10:00
Andrew Tridgell
5d80a5619d
HAL_Empty: add new API functions
2013-05-03 09:45:19 +10:00
Randy Mackay
bbbd90c430
AP_HAL: rename RCInput's valid() fn to valid_channels
2013-04-29 15:05:53 +09:00
Andrew Tridgell
eb6c66af7e
AP_HAL: added gpio->analogPinToDigitalPin() API
2013-03-22 12:31:14 +11:00
Andrew Tridgell
b1c27407a2
AP_HAL: added voltage_average() interface to AnalogIn
...
returns voltage in Volts, using averaged reading over samples.
Where possible this should be auto-scaled against a known reference
voltage
2013-03-03 16:16:01 +11:00