#include "config.h"
#include "lib_mcu/can/can_lib.h"
Go to the source code of this file.
Defines | |
#define | STATUS_MOB_USED 0x01 |
#define | STATUS_MOB_AVAILABLE 0x00 |
Functions | |
void | can_init (void) |
This function configures the bit timing of the CAN controller following the constant definition of CAN_BAUDRATE; clears the Mailbox content and enables the CAN controller. | |
Uchar | can_cmd (st_cmd_t *cmd) |
This function allows to select an action on the CAN bus and to define the CAN message to send or to receive. This function returns a status if the action is accepted or refused. in this case the must be retry by the application. | |
Uchar | can_getstatus (st_cmd_t *cmd) |
This function allows to return if the command is performed or not. In an reception case, all the CAN message is stored in the structure. |
|
Definition at line 21 of file can_lib.c. Referenced by can_cmd(), and can_getstatus(). |
|
Definition at line 20 of file can_lib.c. Referenced by can_cmd(). |
|
This function allows to select an action on the CAN bus and to define the CAN message to send or to receive. This function returns a status if the action is accepted or refused. in this case the must be retry by the application.
Definition at line 40 of file can_lib.c. References CAN_CMD_ACCEPTED, CAN_CMD_REFUSED, st_cmd_t::cmd, CMD_ABORT, CMD_RX, CMD_TX, CMD_TX_REMOTE, st_cmd_t::ctrl, st_cmd_t::dlc, can_id_t::ext, st_cmd_t::handle, st_cmd_t::id, can_ctrl_t::ide, st_cmd_t::pt_data, st_cmd_t::status, STATUS_MOB_AVAILABLE, STATUS_MOB_USED, and can_id_t::std. |
|
This function allows to return if the command is performed or not. In an reception case, all the CAN message is stored in the structure.
Definition at line 94 of file can_lib.c. References CAN_STATUS_COMPLETED, CAN_STATUS_DISABLED, st_cmd_t::ctrl, st_cmd_t::dlc, can_id_t::ext, st_cmd_t::handle, st_cmd_t::id, can_ctrl_t::ide, st_cmd_t::pt_data, can_ctrl_t::rtr, st_cmd_t::status, STATUS_MOB_AVAILABLE, and can_id_t::std. |
|
This function configures the bit timing of the CAN controller following the constant definition of CAN_BAUDRATE; clears the Mailbox content and enables the CAN controller.
|