can_drvr_funcs_t

The libcan callback functions structure

Synopsis:

#include <hw/libcan.h>

typedef struct _can_drvr_funcs_t
{
    void    (*transmit)     (CANDEV *cdev);
    int     (*devctl)       (CANDEV *cdev, io_devctl_t *msg);
    void    (*transmit_raw) (CANDEV *cdev, CAN_MSG msg);
    void    (*receive_raw)  (CANDEV *cdev, CAN_MSG msg, uint32_t is_blocking);
    CANDEV* (*event_handler)(void* const hdl, const int code);
} can_drvr_funcs_t;

Description:

The can_drvr_funcs_t structure contains pointers to the hardware-specific CAN callback functions. The can_resmgr_init() function points to this structure.

The members include:

transmit

Called by the CAN resource manager to indicate that a message should be transmitted.

io_devctl_t

Called by the CAN resource manager when a client calls one of the CAN_DEVCTL_* commands using the canctl command line utility or devctl() function.

event_handler

Called by the CAN resource manager in response to the interrupt registered with the can_resmgr_attach_intr() function.

transmit_raw

Unused; set to NULL.

receive_raw

Unused; set to NULL.

Page updated: