Commit 86592e97 authored by Tobias Svehagen's avatar Tobias Svehagen Committed by Anas Nashif
Browse files

usb: cdc_acm: Fix compiler warning



Compiler warns about unused function when CONFIG_UART_LINE_CTRL is not
set.

Signed-off-by: default avatarTobias Svehagen <tobias.svehagen@gmail.com>
parent 146580e5
Loading
Loading
Loading
Loading
+17 −17
Original line number Diff line number Diff line
@@ -466,23 +466,6 @@ static void cdc_interface_config(struct usb_desc_header *head,
#endif
}

/**
 * @brief Set the baud rate
 *
 * This routine set the given baud rate for the UART.
 *
 * @param dev             CDC ACM device struct.
 * @param baudrate        Baud rate.
 *
 * @return N/A.
 */
static void cdc_acm_baudrate_set(struct device *dev, u32_t baudrate)
{
	struct cdc_acm_dev_data_t * const dev_data = DEV_DATA(dev);

	dev_data->line_coding.dwDTERate = sys_cpu_to_le32(baudrate);
}

/**
 * @brief Call the IRQ function callback.
 *
@@ -746,6 +729,23 @@ static void cdc_acm_irq_callback_set(struct device *dev,

#ifdef CONFIG_UART_LINE_CTRL

/**
 * @brief Set the baud rate
 *
 * This routine set the given baud rate for the UART.
 *
 * @param dev             CDC ACM device struct.
 * @param baudrate        Baud rate.
 *
 * @return N/A.
 */
static void cdc_acm_baudrate_set(struct device *dev, u32_t baudrate)
{
	struct cdc_acm_dev_data_t * const dev_data = DEV_DATA(dev);

	dev_data->line_coding.dwDTERate = sys_cpu_to_le32(baudrate);
}

/**
 * @brief Send serial line state notification to the Host
 *