APM:Libraries
|
#include <USBDriver.h>
Public Member Functions | |
USBDriver (bool usb) | |
void | begin (uint32_t b) |
void | begin (uint32_t b, uint16_t rxS, uint16_t txS) |
void | end () |
bool | is_initialized () |
void | set_blocking_writes (bool blocking) |
bool | tx_pending () |
void | flush () |
uint32_t | available () override |
uint32_t | txspace () override |
int16_t | read () override |
size_t | write (uint8_t c) |
size_t | write (const uint8_t *buffer, size_t size) |
Public Member Functions inherited from AP_HAL::UARTDriver | |
UARTDriver () | |
virtual bool | lock_port (uint32_t key) |
virtual size_t | write_locked (const uint8_t *buffer, size_t size, uint32_t key) |
virtual void | set_flow_control (enum flow_control flow_control_setting) |
virtual enum flow_control | get_flow_control (void) |
virtual void | configure_parity (uint8_t v) |
virtual void | set_stop_bits (int n) |
virtual bool | set_unbuffered_writes (bool on) |
virtual bool | wait_timeout (uint16_t n, uint32_t timeout_ms) |
virtual void | _timer_tick (void) |
virtual uint64_t | receive_time_constraint_us (uint16_t nbytes) |
Public Member Functions inherited from AP_HAL::BetterStream | |
virtual void | printf (const char *,...) FMT_PRINTF(2 |
virtual void virtual void | vprintf (const char *, va_list) |
void | print (const char *str) |
void | println (const char *str) |
size_t | write (const char *str) |
Private Attributes | |
bool | _initialized |
bool | _blocking |
Additional Inherited Members | |
Public Types inherited from AP_HAL::UARTDriver | |
enum | flow_control { FLOW_CONTROL_DISABLE =0, FLOW_CONTROL_ENABLE =1, FLOW_CONTROL_AUTO =2 } |
Definition at line 21 of file USBDriver.h.
USBDriver::USBDriver | ( | bool | usb | ) |
Definition at line 32 of file USBDriver.cpp.
|
overridevirtual |
Implements AP_HAL::BetterStream.
Definition at line 48 of file USBDriver.cpp.
Referenced by flush(), and read().
|
virtual |
Implements AP_HAL::UARTDriver.
Definition at line 38 of file USBDriver.cpp.
|
inlinevirtual |
Extended port open method
Allows for both opening with specified buffer sizes, and re-opening to adjust a subset of the port's settings.
baud | Selects the speed that the port will be configured to. If zero, the port speed is left unchanged. |
rxSpace | Sets the receive buffer size for the port. If zero then the buffer size is left unchanged if the port is open, or set to ::_default_rx_buffer_size if it is currently closed. |
txSpace | Sets the transmit buffer size for the port. If zero then the buffer size is left unchanged if the port is open, or set to ::_default_tx_buffer_size if it is currently closed. |
Implements AP_HAL::UARTDriver.
Definition at line 26 of file USBDriver.h.
Referenced by begin().
|
inlinevirtual |
Implements AP_HAL::UARTDriver.
Definition at line 28 of file USBDriver.h.
|
inlinevirtual |
Implements AP_HAL::UARTDriver.
Definition at line 33 of file USBDriver.h.
|
inlinevirtual |
Implements AP_HAL::UARTDriver.
Definition at line 29 of file USBDriver.h.
|
overridevirtual |
Implements AP_HAL::BetterStream.
Definition at line 56 of file USBDriver.cpp.
Referenced by flush().
|
inlinevirtual |
Implements AP_HAL::UARTDriver.
Definition at line 30 of file USBDriver.h.
|
inlinevirtual |
Implements AP_HAL::UARTDriver.
Definition at line 31 of file USBDriver.h.
|
overridevirtual |
Implements AP_HAL::BetterStream.
Definition at line 53 of file USBDriver.cpp.
Referenced by flush().
|
virtual |
Implements AP_HAL::BetterStream.
Definition at line 65 of file USBDriver.cpp.
Referenced by flush().
|
virtual |
Reimplemented from AP_HAL::BetterStream.
Definition at line 70 of file USBDriver.cpp.
|
private |
Definition at line 44 of file USBDriver.h.
Referenced by set_blocking_writes(), and write().
|
private |
Definition at line 43 of file USBDriver.h.
Referenced by begin(), and is_initialized().