ardupilot/libraries/AP_HAL_Linux/SPIUARTDriver.h
Lucas De Marchi f36e8d9c05 AP_HAL_Linux: remove AP_HAL_Linux_Namespace header
This centralized namespace header encourages centralizing things on
umbrella headers that are a pain to maintain. Force each part of
AP_HAL_Linux to include what is used.

While at it, do some whitespace cleanups and minor changes to adhere to
coding style.
2016-07-29 20:25:03 -03:00

29 lines
480 B
C++

#pragma once
#include "AP_HAL_Linux.h"
#include "UARTDriver.h"
namespace Linux {
class SPIUARTDriver : public UARTDriver {
public:
SPIUARTDriver();
void begin(uint32_t b, uint16_t rxS, uint16_t txS);
void _timer_tick(void);
protected:
int _write_fd(const uint8_t *buf, uint16_t n);
int _read_fd(uint8_t *buf, uint16_t n);
AP_HAL::OwnPtr<AP_HAL::SPIDevice> _dev;
uint8_t *_buffer;
uint32_t _last_update_timestamp;
bool _external;
};
}