/* This function sends a DevRev command to the device and receives its response.  */
uint8_t sha204m_dev_rev(struct sha204_dev_rev_parameters *args)
/* This function sends a DevRev command to the device and receives its response.  */
uint8_t sha204m_dev_rev(struct sha204_dev_rev_parameters *args)
{
	if (!args->tx_buffer || !args->rx_buffer)
		return SHA204_BAD_PARAM;
	args->tx_buffer[SHA204_COUNT_IDX] = DEVREV_COUNT;
	args->tx_buffer[SHA204_OPCODE_IDX] = SHA204_DEVREV;
	args->tx_buffer[DEVREV_PARAM1_IDX] =
	args->tx_buffer[DEVREV_PARAM2_IDX] =
	args->tx_buffer[DEVREV_PARAM2_IDX + 1] = 0;
	struct sha204_send_and_receive_parameters comm_parameters = {
		.tx_buffer = args->tx_buffer,
		.rx_buffer = args->rx_buffer,
		.rx_size = DEVREV_RSP_SIZE,
		.poll_delay = DEVREV_DELAY,
		.poll_timeout = DEVREV_EXEC_MAX - DEVREV_DELAY
	};
	return sha204c_send_and_receive(&comm_parameters);
}