Andrew Tridgell
0ca82d5e3c
AP_HAL: added set_system_clock() API
11 years ago
Randy Mackay
443023bbbf
AP_HAL: add ignore_errors to I2C driver
11 years ago
Andrew Tridgell
7ef187fcfd
AP_HAL: added optional set_timer_speed() scheduler API
...
will be used by copter to reduce interrupt load on APM2
11 years ago
Andrew Tridgell
5ccf8409b4
AP_HAL: added an optional spi.set_bus_speed() API
...
this will be used by MPU6000 on APM2 to change speed after init
11 years ago
Andrew Tridgell
9f24c45502
AP_HAL: removed separate Console class
...
the idea of a separate console class was never really used, and just
added confusion in a HAL port. It also consumes some much needed ram
and flash space on APM2
12 years ago
Andrew Tridgell
34a328f66d
AP_HAL: added safety_switch_state() function in hal.util
...
will be used by copter to check safety switch is set
12 years ago
Andrew Tridgell
efe1e01700
AP_HAL: require a buffer write() function in all ports
...
this makes a sufficient performance difference that it is worth it
12 years ago
Andrew Tridgell
f2de4bb7b0
AP_HAL: implement AP_HAL::MemberProc via FastDelegate.h
...
this provides a more portable way to encapsulate member functions in
variables
12 years ago
Andrew Tridgell
f0f5761e8d
AP_HAL: make timed processes take void *argument
...
this allows the class to be passed in, meaning that drivers that use
register_timer_process() and register_io_process() don't need to use
static members. That results in simpler, easier to read code
12 years ago
Andrew Tridgell
296417a228
AP_HAL: added AP_HAL_LINUX define
12 years ago
Andrew Tridgell
60f3a8b6cf
AP_HAL: removed SMACCM support
12 years ago
Mike McCauley
ec5425578e
AP_HAL: Added Flymaple board
12 years ago
Andrew Tridgell
0e9aef7e52
AP_HAL: changed base defines for print()
...
this avoids a conflict with wirish from libmaple
12 years ago
Andrew Tridgell
87bb3bc5dc
AP_HAL: added AP_HAL_PX4 define
12 years ago
Andrew Tridgell
928e06f52c
AP_HAL: use fabs() in print
...
fixes build on Arduino
12 years ago
Andrew Tridgell
d46f5f6943
AP_HAL: implement betterstream functions in AP_HAL
...
this gives more consistancy between ports
12 years ago
Andrew Tridgell
0d662c52b3
AP_HAL: fixed length return from snprintf
12 years ago
Andrew Tridgell
0063f1fad8
AP_HAL: added Util.cpp
...
common printf functions
12 years ago
Andrew Tridgell
85b3f0d18d
AP_HAL: expanded printf test suite
12 years ago
Andrew Tridgell
60122f9877
AP_HAL: moved printf implementation from AP_HAL_AVR to AP_HAL
...
this gives a common printf implementation on all boards, which
simplifies testing, and also simplifies porting to new boards
12 years ago
Andrew Tridgell
4ad4b60fbc
HAL: added Printf test sketch
...
for testing new non-asm printf code
12 years ago
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
12 years ago
Andrew Tridgell
a587b1140a
AP_HAL: added voltage_latest() interface
...
this will be used for reading the 5V rail
12 years ago
Andrew Tridgell
7082e0f8aa
AP_HAL: added hold_in_bootloader parameter to scheduler->reboot()
12 years ago
Andrew Tridgell
97b7130bb9
libraries: update license header to GPLv3
...
we switched to GPLv3 a long time ago, but neglected to update the
per-file license headers
12 years ago
Randy Mackay
ac36a09747
AP_HAL: add toggle to GPIO
12 years ago
Andrew Tridgell
ef5a42fabc
AP_HAL: added RCOutput example sketch
...
useful for testing all 14 channels via APM API
12 years ago
Tobias
d3ea88e8c7
AP_HAL: resolved -Woverloaded-virtual warning
...
the function:
virtual size_t AP_HAL::Print::write(const uint8_t *buffer, size_t size);
was hidden in all derived classes by their
virtual size_t write(uint8_t) = 0; implementations.
To solve this, a non-virtual write(const uint8_t *, size_t) that calls a
virtual write_implementation was added.
This isn't necessary atm, because the derived classes don't call
write(const uint8_t *, size_t), BUT this decreases the apm2-quad Program
size by 40 bytes :D and removes warnings.
12 years ago
Andrew Tridgell
2316c3bd11
AP_HAL: make storage->write_block() take a const pointer
12 years ago
Andrew Tridgell
a5b20b4dfc
AP_HAL: removed scaling factor on analog sources
...
these are not use anymore, as voltage_average() is used instead
12 years ago
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
12 years ago
Andrew Tridgell
0b6cfc7294
AP_HAL: added set_stop_pin() and set_settle_time() interfaces to analogin
...
this is for multiple sonars on one vehicle, to prevent them
interfering with each other
12 years ago
Andrew Tridgell
500497f5fa
AP_HAL: update AnalogIn test to show the first 16 pins
12 years ago
Randy Mackay
bbbd90c430
AP_HAL: rename RCInput's valid() fn to valid_channels
12 years ago
Andrew Tridgell
3b0250b414
AP_HAL: define RC_12
...
we have 12 channels on PX4FMU+PX4IO
12 years ago
Andrew Tridgell
af7381e9e0
AP_HAL: added register_io_process()
...
this is used to register a low priority IO task. Used for file IO in
DataFlash_File.cpp
12 years ago
Andrew Tridgell
eb6c66af7e
AP_HAL: added gpio->analogPinToDigitalPin() API
12 years ago
Andrew Tridgell
7681f3b639
AP_HAL: update AnalogIn example to show voltages not raw values
12 years ago
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
12 years ago
Andrew Tridgell
8ed2f7d21c
AnalogIn: run the example sketch a bit slower
...
5Hz is plenty
12 years ago
Andrew Tridgell
5a55fd9a2f
AP_HAL: added HAL_BOARD_NAME define
12 years ago
Andrew Tridgell
a3ef58ac92
AP_HAL: moved AnalogIn example to generic examples
...
it is not AVR specific anymore
12 years ago
Andrew Tridgell
70f7cde9b8
AP_HAL: added run_debug_shell() hal.util method
12 years ago
Andrew Tridgell
76092eb590
AP_HAL: remove unused peek() interface from UART drivers
...
this is a bit tricky to implement on some platforms, and is unused
anyway
12 years ago
James Bielman
4fa7bb1486
Add AVR compatibility header for missing math.h definitions.
...
- Define float versions of math functions to the double versions
on AVR (eg. #define sinf sin).
- These macros appear to be missing in older versions of avr-libs.
- Include AP_Math.h rather than math.h to get these definitions.
12 years ago
James Bielman
5631f865b2
Update floating point calculations to use floats instead of doubles.
...
- Allows use of hardware floating point on the Cortex-M4.
- Added "f" suffix to floating point literals.
- Call floating point versions of stdlib math functions.
12 years ago
Andrew Tridgell
2ce18f588b
AP_HAL: added AP_HAL_Macros.h
...
this adds a define for constexpr, allowing code to build either with
or without -std=gnu++0x
12 years ago
Andrew Tridgell
6415f00ce3
AP_HAL: added a bulk transfer() method
...
very useful for dataflash
12 years ago
Pat Hickey
7a0f95c11c
AP_HAL: add Scheduler methods in_timerprocess, system_initialize
12 years ago
Andrew Tridgell
e76c77e86a
AP_HAL: mark semaphore take operations as WARN_IF_UNUSED
...
this prevents common bugs
12 years ago