device::nic::CAN::avrCANARY Class Reference
The generic driver interface to the avrCAN hardware. More...
#include <avrCANARY.h>
Data Structures | |
class | MOB |
Generic CAN message object. More... | |
Public Member Functions | |
avrCANARY () | |
bool | receive (MOB *mob) |
receives a CAN message in a blocking manner | |
void | receive_blocking (MOB *mob) |
receives a CAN message in a blocking manner | |
void | transmit (MOB &mob) |
transmit a CAN message in a blocking manner | |
void | init () |
void | set_rx_Interrupt (famouso::util::Delegate<> f) |
set the delegate that is called if an interrupt occurs | |
void | rx_interrupts (bool value) |
switch interrupts for the device on or off | |
bool | interrupts () |
get the current state of the interrupt switch for the device | |
Friends | |
void | device::nic::CAN::fireCANARYInterrupt () |
Detailed Description
The generic driver interface to the avrCAN hardware.
At the moment only a basic and very simple CAN driver is implemented. It uses only one message object for receiving and one for sending. The receiving of Mobs is interrupt based and the sending is polling based at the moment. In further more enhanced version the interface may evolve to support and use more features of the hardware. But this version is the working proof of concept.
- Todo:
- Use the supported features of the avr CAN hardware e.g. more message objects, transmit interrupt, ...
Constructor & Destructor Documentation
device::nic::CAN::avrCANARY::avrCANARY | ( | ) | [inline, explicit] |
Member Function Documentation
void device::nic::CAN::avrCANARY::init | ( | ) | [inline] |
bool device::nic::CAN::avrCANARY::interrupts | ( | ) | [inline] |
get the current state of the interrupt switch for the device
bool device::nic::CAN::avrCANARY::receive | ( | MOB * | mob | ) | [inline] |
receives a CAN message in a blocking manner
- Parameters:
-
[out] mob is filled with the arrived message if there was one
References device::nic::CAN::avrCANARY::MOB::data(), device::nic::CAN::avrCANARY::MOB::id(), and device::nic::CAN::avrCANARY::MOB::len().
Referenced by receive_blocking().
void device::nic::CAN::avrCANARY::receive_blocking | ( | MOB * | mob | ) | [inline] |
receives a CAN message in a blocking manner
- Parameters:
-
[out] mob is filled with the arrived message if there was one
References receive().
void device::nic::CAN::avrCANARY::rx_interrupts | ( | bool | value | ) | [inline] |
switch interrupts for the device on or off
void device::nic::CAN::avrCANARY::set_rx_Interrupt | ( | famouso::util::Delegate<> | f | ) | [inline] |
set the delegate that is called if an interrupt occurs
void device::nic::CAN::avrCANARY::transmit | ( | MOB & | mob | ) | [inline] |
transmit a CAN message in a blocking manner
- Parameters:
-
[in] mob is CAN message that will be delivered
References device::nic::CAN::avrCANARY::MOB::data(), device::nic::CAN::avrCANARY::MOB::id(), and device::nic::CAN::avrCANARY::MOB::len().
Friends And Related Function Documentation
void device::nic::CAN::fireCANARYInterrupt | ( | ) | [friend] |
The documentation for this class was generated from the following file:
- include/devices/nic/can/at90can/avrCANARY.h