1 /***************************************************************************//**
\r
3 * @brief Provide stdio retargeting configuration parameters.
\r
5 *******************************************************************************
\r
7 * <b>(C) Copyright 2014 Silicon Labs, http://www.silabs.com</b>
\r
8 *******************************************************************************
\r
10 * This file is licensed under the Silabs License Agreement. See the file
\r
11 * "Silabs_License_Agreement.txt" for details. Before using this software for
\r
12 * any purpose, you must agree to the terms of that agreement.
\r
14 ******************************************************************************/
\r
16 #ifndef __RETARGETSERIALCONFIG_H
\r
17 #define __RETARGETSERIALCONFIG_H
\r
19 /* Override if needed with commandline parameter -DRETARGET_xxx */
\r
21 #if !defined(RETARGET_USART1) && !defined(RETARGET_LEUART0)
\r
22 #define RETARGET_USART1 /* Use USART1 by default. */
\r
25 #if defined(RETARGET_USART1)
\r
26 #define RETARGET_IRQ_NAME USART1_RX_IRQHandler /* USART IRQ Handler */
\r
27 #define RETARGET_CLK cmuClock_USART1 /* HFPER Clock */
\r
28 #define RETARGET_IRQn USART1_RX_IRQn /* IRQ number */
\r
29 #define RETARGET_UART USART1 /* USART instance */
\r
30 #define RETARGET_TX USART_Tx /* Set TX to USART_Tx */
\r
31 #define RETARGET_RX USART_Rx /* Set RX to USART_Rx */
\r
32 #define RETARGET_LOCATION USART_ROUTE_LOCATION_LOC1 /* Location of of the USART I/O pins */
\r
33 #define RETARGET_TXPORT gpioPortD /* USART transmission port */
\r
34 #define RETARGET_TXPIN 0 /* USART transmission pin */
\r
35 #define RETARGET_RXPORT gpioPortD /* USART reception port */
\r
36 #define RETARGET_RXPIN 1 /* USART reception pin */
\r
37 #define RETARGET_USART 1 /* Includes em_usart.h */
\r
38 #define RETARGET_PERIPHERAL_ENABLE()
\r
40 #elif defined(RETARGET_LEUART0)
\r
41 #define RETARGET_IRQ_NAME LEUART0_IRQHandler /* LEUART IRQ Handler */
\r
42 #define RETARGET_CLK cmuClock_LEUART0 /* LFB Clock */
\r
43 #define RETARGET_IRQn LEUART0_IRQn /* IRQ number */
\r
44 #define RETARGET_UART LEUART0 /* LEUART instance */
\r
45 #define RETARGET_TX LEUART_Tx /* Set TX to LEUART_Tx */
\r
46 #define RETARGET_RX LEUART_Rx /* Set RX to LEUART_Rx */
\r
47 #define RETARGET_TXPORT gpioPortD /* LEUART transmission port */
\r
48 #define RETARGET_TXPIN 4 /* LEUART transmission pin */
\r
49 #define RETARGET_RXPORT gpioPortD /* LEUART reception port */
\r
50 #define RETARGET_RXPIN 5 /* LEUART reception pin */
\r
51 #define RETARGET_LOCATION LEUART_ROUTE_LOCATION_LOC0 /* Location of of the LEUART I/O pins */
\r
52 #define RETARGET_LEUART 1 /* Includes em_leuart.h */
\r
53 #define RETARGET_PERIPHERAL_ENABLE()
\r
56 #error "Illegal USART/LEUART selection."
\r