LPC11C24 doc comments

This commit is contained in:
Pavel Kirienko 2014-07-15 15:24:29 +04:00
parent 1cfd2a2f84
commit e42da1f9ae
2 changed files with 17 additions and 2 deletions

View File

@ -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,

View File

@ -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();
};