RTEMS
5.1
|
CAN controller for the mbed lpc1768 board. More...
#include <rtems/status-checks.h>
#include <bsp/irq.h>
#include <bsp/can.h>
#include <bsp/can-defs.h>
#include <bsp/mbed-pinmap.h>
#include <string.h>
Functions | |
rtems_status_code | can_close (const lpc176x_can_number minor) |
Closes the passed CAN device and shut it down. More... | |
rtems_status_code | can_open (const lpc176x_can_number minor, can_freq freq) |
Opens CAN device. More... | |
rtems_status_code | can_read (const lpc176x_can_number minor, can_message *message) |
Reads the CAN device. More... | |
rtems_status_code | can_write (const lpc176x_can_number minor, const can_message *const message) |
Writes the passed CAN message into the selected CAN device. More... | |
rtems_status_code | can_register_isr (const lpc176x_can_number number, const can_irq_type type, const lpc176x_can_isr isr) |
Registers an isr in the driver vector, and enables the interrupt in the device. More... | |
rtems_status_code | create_can_message (can_message *const msg, const int _id, const char *const _data, const char _len) |
Creates a CAN message. More... | |
Variables | |
lpc176x_can_isr_vector | isr_vector |
Vector of isr for the can_driver . | |
can_acceptance_filter *const | acceptance_filter_device |
The CAN acceptance filter. More... | |
CAN controller for the mbed lpc1768 board.
rtems_status_code can_close | ( | lpc176x_can_number | minor | ) |
Closes the passed CAN device and shut it down.
minor | The device to close. |
rtems_status_code can_open | ( | lpc176x_can_number | minor, |
can_freq | freq | ||
) |
Opens CAN device.
It enables the module and gives it a clock, sets the pins, disables the interrupts, sets the frequency and bypasses the acceptance filter.
minor | The device to open. |
freq | The desired frequency. |
rtems_status_code can_read | ( | const lpc176x_can_number | minor, |
can_message * | message | ||
) |
Reads the CAN device.
minor | The CAN device to read. |
message | The read message. |
rtems_status_code can_register_isr | ( | const lpc176x_can_number | number, |
const can_irq_type | type, | ||
const lpc176x_can_isr | isr | ||
) |
Registers an isr in the driver vector, and enables the interrupt in the device.
number | The CAN device to set |
type | The interrupt type. |
isr | The isr to register. |
rtems_status_code can_write | ( | const lpc176x_can_number | minor, |
const can_message *const | message | ||
) |
Writes the passed CAN message into the selected CAN device.
minor | The device to write. |
message | The message to write. |
rtems_status_code create_can_message | ( | can_message *const | msg, |
const int | _id, | ||
const char *const | _data, | ||
const char | _len | ||
) |
Creates a CAN message.
[long description]
msg | The created message. |
_id | The can id for the message. |
_data | The data of the message. |
_len | The length of the message. |
can_acceptance_filter* const acceptance_filter_device |
The CAN acceptance filter.