You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
896 B
34 lines
896 B
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- |
|
|
|
#ifndef __AP_HAL_AVR_SITL_CONSOLE_DRIVER_H__ |
|
#define __AP_HAL_AVR_SITL_CONSOLE_DRIVER_H__ |
|
|
|
#include <stdlib.h> |
|
|
|
#include <AP_HAL.h> |
|
#include "AP_HAL_AVR_SITL_Namespace.h" |
|
|
|
class AVR_SITL::SITLConsoleDriver : public AP_HAL::ConsoleDriver { |
|
public: |
|
SITLConsoleDriver(); |
|
void init(void* baseuartdriver); |
|
void backend_open(); |
|
void backend_close(); |
|
size_t backend_read(uint8_t *data, size_t len); |
|
size_t backend_write(const uint8_t *data, size_t len); |
|
|
|
/* Implementations of Stream virtual methods */ |
|
int16_t available(); |
|
int16_t txspace(); |
|
int16_t read(); |
|
|
|
/* Implementations of Print virtual methods */ |
|
size_t write(uint8_t c); |
|
size_t write(const uint8_t *buffer, size_t size); |
|
|
|
private: |
|
AP_HAL::UARTDriver* _base_uart; |
|
}; |
|
|
|
#endif // __AP_HAL_AVR_CONSOLE_DRIVER_H__ |
|
|
|
|