Get specific debugging information
#include <sys/can_dcmd.h> #define CAN_DEVCTL_DEBUG_INFO2 __DIOT(_DCMD_MISC, CAN_CMD_CODE + 102, uint32_t)
Argument | Value |
---|---|
filedes | A file descriptor that you obtained by opening the device |
dcmd | CAN_DEVCTL_DEBUG_INFO2 |
dev_data_ptr | A pointer to a uint32_t |
n_bytes | sizeof(uint32_t) |
dev_info_ptr | NULL |
This command asks the driver to display specific debugging information. This information depends on the driver and the device; see src/hardware/can/board_name/board_namecan.readme in your Board Support Package.
A driver-specific number that affects what information the driver displays.
None.
int ret; unsigned print_debug_all = 1; if( (fd = open( "/dev/can1/rx0", O_RDWR)) == -1 ) { printf("open of %s failed \n", devname); exit(EXIT_FAILURE); } if (EOK != (ret = devctl(fd, CAN_DEVCTL_DEBUG_INFO2, &print_debug_all, sizeof(print_debug_all), NULL))) { fprintf(stderr, "devctl CAN_DEVCTL_DEBUG_INFO: %s\n", strerror(ret)); }