5
0
mirror of https://github.com/ArduPilot/ardupilot synced 2025-03-08 22:53:57 -04:00

REAME_AP_HAL: minor fixes

reved date, fixed declaration of console, line wrapping issues
This commit is contained in:
Pat Hickey 2012-09-17 20:24:51 -07:00 committed by Andrew Tridgell
parent e932abb7b5
commit f63fb29d52

View File

@ -4,7 +4,7 @@ Pat Hickey
Galois Inc Galois Inc
11 Sept 2011 17 Sept 2011
-------- --------
Overview Overview
@ -175,7 +175,7 @@ the `AP_HAL` namespace, left off for brevity.)
driver driver
* `Dataflash* dataflash` : Corresponds to ArduPilot `/libraries/DataFlash` * `Dataflash* dataflash` : Corresponds to ArduPilot `/libraries/DataFlash`
driver driver
* `BetterStream* console` : New utility for warning and error reporting * `ConsoleDriver* console` : New utility for warning and error reporting
* `GPIO* gpio` : Corresponds to Arduino core `pinMode`, * `GPIO* gpio` : Corresponds to Arduino core `pinMode`,
`digitalRead`, and `digitalWrite` functionality `digitalRead`, and `digitalWrite` functionality
* `RCInput* rcin` : Corresponds to PPM input side of ArduPilot * `RCInput* rcin` : Corresponds to PPM input side of ArduPilot
@ -337,7 +337,9 @@ in a threaded environment.
AP\_HAL::ConsoleDriver AP\_HAL::ConsoleDriver
---------------------- ----------------------
The `AP_HAL::ConsoleDriver` class is pure virtual and can be found in `/libraries/AP_HAL/Console.h` . It is derived from the `AP_HAL::BetterStream` class. The `AP_HAL::ConsoleDriver` class is pure virtual and can be found in
`/libraries/AP_HAL/Console.h` . It is derived from the `AP_HAL::BetterStream`
class.
In the existing ArduPilot code, there is no unified way to send debugging In the existing ArduPilot code, there is no unified way to send debugging
messages, warnings, and errors to the user. A dedicated Console driver, is messages, warnings, and errors to the user. A dedicated Console driver, is
@ -352,8 +354,13 @@ but right now I'm leaving it open ended.)
the UARTDrivers, but before all other drivers, in `AP_HAL::HAL::init`. the UARTDrivers, but before all other drivers, in `AP_HAL::HAL::init`.
* `void backend_open()` : Start buffering reads and writes to user backend * `void backend_open()` : Start buffering reads and writes to user backend
* `void backend_close()` : Stop buffering reads and writes to user backend * `void backend_close()` : Stop buffering reads and writes to user backend
* `int backend_read(uint8_t *data, int len)` : Read from user backend buffer. Data sent by `write` through the `BetterStream` interface will be available to `backend_read`, modulo oveflowing the internal buffers (undefined behavior). * `int backend_read(uint8_t *data, int len)` : Read from user backend buffer.
* `int backend_write(const uint8_t *data, int len)` : Write to user backend buffer. Written data will be available by `read` through the `BetterStream` interface, modulo overflowing the internal buffers (undefined behavior). Data sent by `write` through the `BetterStream` interface will be available
to `backend_read`, modulo oveflowing the internal buffers (undefined
behavior).
* `int backend_write(const uint8_t *data, int len)` : Write to user backend
buffer. Written data will be available by `read` through the `BetterStream`
interface, modulo overflowing the internal buffers (undefined behavior).
A few implementation guidelines: A few implementation guidelines:
* This is a low assurance data interface: it is more important to maintain the * This is a low assurance data interface: it is more important to maintain the
@ -418,13 +425,19 @@ The following methods are exposed by the `AP_HAL::Scheduler` interface:
delay callback, if registered. delay callback, if registered.
* `uint32_t millis()` : Duplicates Arduino core `millis` * `uint32_t millis()` : Duplicates Arduino core `millis`
* `uint32_t micros()` : Duplicates Arduino core `micros` * `uint32_t micros()` : Duplicates Arduino core `micros`
* `void delay_microseconds(uint16_t us)` : Duplicates Arduino core `delayMicros` * `void delay_microseconds(uint16_t us)` : Duplicates Arduino core
* `void register_delay_callback(AP_HAL::Proc)` : Register a callback to be `delayMicros`
used during calls to `delay`. Callback will be called at a 1ms period. * `void register_delay_callback(AP_HAL::Proc)` : Register a callback
* `void register_timer_process(AP_HAL::TimedProc, uint32_t period_us, uint16_t phase)` : Duplicates `AP_PeriodicProcess::register_process` to be used during calls to `delay`. Callback will be called at a 1ms
* `void register_timer_failsafe(AP_HAL::TimedProc, uint32_t period_us)` : Duplicates `AP_PeriodicProcess::set_failsafe` period.
* `void suspend_timer_procs()` : Duplicates `AP_PeriodicProcess::suspend_timer` * `void register_timer_process(AP_HAL::TimedProc, uint32_t period_us,
* `void resume_timer_procs()` : Duplicates `AP_PeriodicProcess:resume_timer` uint16_t phase)` : Duplicates `AP_PeriodicProcess::register_process`
* `void register_timer_failsafe(AP_HAL::TimedProc,
uint32_t period_us)` : Duplicates `AP_PeriodicProcess::set_failsafe`
* `void suspend_timer_procs()` : Duplicates
`AP_PeriodicProcess::suspend_timer`
* `void resume_timer_procs()` : Duplicates
`AP_PeriodicProcess:resume_timer`
Remaining ArduPilot AVR dependencies Remaining ArduPilot AVR dependencies