mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 14:23:34 +08:00
LPC11C24 doc comments
This commit is contained in:
@@ -8,7 +8,11 @@
|
|||||||
|
|
||||||
namespace uavcan_lpc11c24
|
namespace uavcan_lpc11c24
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* This class implements CAN driver interface for libuavcan.
|
||||||
|
* No configuration needed other than CAN baudrate.
|
||||||
|
* This class is a singleton.
|
||||||
|
*/
|
||||||
class CanDriver
|
class CanDriver
|
||||||
: public uavcan::ICanDriver
|
: public uavcan::ICanDriver
|
||||||
, public uavcan::ICanIface
|
, public uavcan::ICanIface
|
||||||
@@ -19,13 +23,25 @@ class CanDriver
|
|||||||
CanDriver() { }
|
CanDriver() { }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* Returns the singleton reference.
|
||||||
|
* No other copies can be created.
|
||||||
|
*/
|
||||||
static CanDriver& instance() { return self; }
|
static CanDriver& instance() { return self; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns negative value if the requested baudrate can't be used.
|
||||||
|
* Returns zero if OK.
|
||||||
|
*/
|
||||||
int init(uavcan::uint32_t baudrate);
|
int init(uavcan::uint32_t baudrate);
|
||||||
|
|
||||||
bool hasReadyRx() const;
|
bool hasReadyRx() const;
|
||||||
bool hasEmptyTx() const;
|
bool hasEmptyTx() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method will return true only if there was any CAN bus activity since previous call of this method.
|
||||||
|
* This is intended to be used for LED iface activity indicators.
|
||||||
|
*/
|
||||||
bool hadActivity();
|
bool hadActivity();
|
||||||
|
|
||||||
virtual uavcan::int16_t send(const uavcan::CanFrame& frame, uavcan::MonotonicTime tx_deadline,
|
virtual uavcan::int16_t send(const uavcan::CanFrame& frame, uavcan::MonotonicTime tx_deadline,
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ class SystemClock : public uavcan::ISystemClock, uavcan::Noncopyable
|
|||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Calls clock::init() as needed.
|
* Calls clock::init() as needed.
|
||||||
* This function is thread safe.
|
|
||||||
*/
|
*/
|
||||||
static SystemClock& instance();
|
static SystemClock& instance();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user