mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
LPC11C24 doc comments
This commit is contained in:
parent
1cfd2a2f84
commit
e42da1f9ae
@ -8,7 +8,11 @@
|
||||
|
||||
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
|
||||
: public uavcan::ICanDriver
|
||||
, public uavcan::ICanIface
|
||||
@ -19,13 +23,25 @@ class CanDriver
|
||||
CanDriver() { }
|
||||
|
||||
public:
|
||||
/**
|
||||
* Returns the singleton reference.
|
||||
* No other copies can be created.
|
||||
*/
|
||||
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);
|
||||
|
||||
bool hasReadyRx() 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();
|
||||
|
||||
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:
|
||||
/**
|
||||
* Calls clock::init() as needed.
|
||||
* This function is thread safe.
|
||||
*/
|
||||
static SystemClock& instance();
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user