/* Get data size in bytes based on the payload option of a message. */
uint8_t can_ctrl_message_size(struct can_ctrl_dev *dev, enum can_ctrl_fifo_plsize pls)
/* Get data size in bytes based on the payload option of a message. */
uint8_t can_ctrl_message_size(struct can_ctrl_dev *dev, enum can_ctrl_fifo_plsize pls)
{
	switch(pls) {
	case DATA_BYTES_8:
		return 8;
	case DATA_BYTES_12:
		return 12;
	case DATA_BYTES_16:
		return 16;
	case DATA_BYTES_20:
		return 20;
	case DATA_BYTES_24:
		return 24;
	case DATA_BYTES_32:
		return 32;
	case DATA_BYTES_48:
		return 48;
	case DATA_BYTES_64:
		return 64;
	default:
		return 0;
	}
}