driver: uart: make deprecation effective

Several macros were documented as deprecated but lacked the
infrastructure to produce deprecation warnings.  Add the deprecation
marker, and fix the in-tree references to the deprecated spellings.

Note that one non-deprecated macro should have been deprecated, and
is, referring to a newly added line control bit.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This commit is contained in:
Peter A. Bigot 2019-11-02 10:19:17 -05:00 committed by Kumar Gala
commit a58d8ebaa6
10 changed files with 34 additions and 32 deletions

View file

@ -31,6 +31,7 @@ extern "C" {
/** @brief Line control signals. */
enum uart_line_ctrl {
UART_LINE_CTRL_BAUD_RATE = BIT(0),
UART_LINE_CTRL_RTS = BIT(1),
UART_LINE_CTRL_DTR = BIT(2),
UART_LINE_CTRL_DCD = BIT(3),
@ -157,13 +158,14 @@ enum uart_rx_stop_reason {
UART_BREAK = (1 << 3),
};
/** @brief Backward compatibility defines, deprecated */
#define UART_ERROR_BREAK UART_BREAK
#define LINE_CTRL_BAUD_RATE (1 << 0)
#define LINE_CTRL_RTS UART_LINE_CTRL_RTS
#define LINE_CTRL_DTR UART_LINE_CTRL_DTR
#define LINE_CTRL_DCD UART_LINE_CTRL_DCD
#define LINE_CTRL_DSR UART_LINE_CTRL_DSR
#define UART_ERROR_BREAK __DEPRECATED_MACRO UART_BREAK
#define LINE_CTRL_BAUD_RATE __DEPRECATED_MACRO UART_LINE_CTRL_BAUD_RATE
#define LINE_CTRL_RTS __DEPRECATED_MACRO UART_LINE_CTRL_RTS
#define LINE_CTRL_DTR __DEPRECATED_MACRO UART_LINE_CTRL_DTR
#define LINE_CTRL_DCD __DEPRECATED_MACRO UART_LINE_CTRL_DCD
#define LINE_CTRL_DSR __DEPRECATED_MACRO UART_LINE_CTRL_DSR
/** @brief UART TX event data. */