mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
Basic UART/console functionality
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1697 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -48,7 +48,26 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Definitions
|
* Definitions
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
|
/* Clock settings */
|
||||||
|
|
||||||
|
#define IMX_SYS_CLK_FREQ 16780000
|
||||||
|
#define IMX_SYSPLL_CLK_FREQ 16000000
|
||||||
|
#define IMX_PERCLK1_FREQ 96000000
|
||||||
|
|
||||||
|
/* MPCTL */
|
||||||
|
|
||||||
|
#define IMX_MPCTL0_VALUE 0x04632410 /* For 150MHz MCU PLL clock */
|
||||||
|
#define IMX_MPCTL0_VALUE 0x03AA11B9 /* For 150 MHz ARM clock with 32.768 KHz crystal */
|
||||||
|
|
||||||
|
/* SPCTL */
|
||||||
|
|
||||||
|
#define IMX_SPCTL0_VALUE 0x07AA16A6; /* For 96MHz peripheral clock with 32.768 KHz crystal */
|
||||||
|
|
||||||
|
/* PDCR */
|
||||||
|
|
||||||
|
#define IMX_PCDR_VALUE 0x00000055
|
||||||
|
|
||||||
/* LED definitions ******************************************************************/
|
/* LED definitions ******************************************************************/
|
||||||
|
|
||||||
/* The MX1ADS has only one usable LED: Port A, bit 2 */
|
/* The MX1ADS has only one usable LED: Port A, bit 2 */
|
||||||
|
|||||||
@@ -76,8 +76,10 @@ CONFIG_ARCH_STACKDUMP=y
|
|||||||
#
|
#
|
||||||
# IMX specific device driver settings
|
# IMX specific device driver settings
|
||||||
#
|
#
|
||||||
|
# CONFIG_UARTn_DISABLE - select to disable all support for
|
||||||
|
# the UART
|
||||||
# CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the
|
# CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the
|
||||||
# console and ttys0 (default is the UART0).
|
# console and ttys0 (default is the UART1).
|
||||||
# CONFIG_UARTn_RXBUFSIZE - Characters are buffered as received.
|
# CONFIG_UARTn_RXBUFSIZE - Characters are buffered as received.
|
||||||
# This specific the size of the receive buffer
|
# This specific the size of the receive buffer
|
||||||
# CONFIG_UARTn_TXBUFSIZE - Characters are buffered before
|
# CONFIG_UARTn_TXBUFSIZE - Characters are buffered before
|
||||||
@@ -87,27 +89,30 @@ CONFIG_ARCH_STACKDUMP=y
|
|||||||
# CONFIG_UARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity
|
# CONFIG_UARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity
|
||||||
# CONFIG_UARTn_2STOP - Two stop bits
|
# CONFIG_UARTn_2STOP - Two stop bits
|
||||||
#
|
#
|
||||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
CONFIG_UART1_DISABLE=n
|
||||||
CONFIG_UART1_SERIAL_CONSOLE=n
|
CONFIG_UART2_DISABLE=y
|
||||||
|
CONFIG_UART3_DISABLE=y
|
||||||
|
CONFIG_UART1_SERIAL_CONSOLE=y
|
||||||
CONFIG_UART2_SERIAL_CONSOLE=n
|
CONFIG_UART2_SERIAL_CONSOLE=n
|
||||||
CONFIG_UART0_TXBUFSIZE=256
|
CONFIG_UART3_SERIAL_CONSOLE=n
|
||||||
CONFIG_UART1_TXBUFSIZE=256
|
CONFIG_UART1_TXBUFSIZE=256
|
||||||
CONFIG_UART2_TXBUFSIZE=256
|
CONFIG_UART2_TXBUFSIZE=256
|
||||||
CONFIG_UART0_RXBUFSIZE=256
|
CONFIG_UART3_TXBUFSIZE=256
|
||||||
CONFIG_UART1_RXBUFSIZE=256
|
CONFIG_UART1_RXBUFSIZE=256
|
||||||
CONFIG_UART2_RXBUFSIZE=256
|
CONFIG_UART2_RXBUFSIZE=256
|
||||||
CONFIG_UART0_BAUD=115200
|
CONFIG_UART3_RXBUFSIZE=256
|
||||||
CONFIG_UART1_BAUD=115200
|
CONFIG_UART1_BAUD=115200
|
||||||
CONFIG_UART2_BAUD=115200
|
CONFIG_UART2_BAUD=115200
|
||||||
CONFIG_UART0_BITS=8
|
CONFIG_UART3_BAUD=115200
|
||||||
CONFIG_UART1_BITS=8
|
CONFIG_UART1_BITS=8
|
||||||
CONFIG_UART2_BITS=8
|
CONFIG_UART2_BITS=8
|
||||||
CONFIG_UART0_PARITY=0
|
CONFIG_UART3_BITS=8
|
||||||
CONFIG_UART1_PARITY=0
|
CONFIG_UART1_PARITY=0
|
||||||
CONFIG_UART2_PARITY=0
|
CONFIG_UART2_PARITY=0
|
||||||
CONFIG_UART0_2STOP=0
|
CONFIG_UART3_PARITY=0
|
||||||
CONFIG_UART1_2STOP=0
|
CONFIG_UART1_2STOP=0
|
||||||
CONFIG_UART2_2STOP=0
|
CONFIG_UART2_2STOP=0
|
||||||
|
CONFIG_UART3_2STOP=0
|
||||||
|
|
||||||
#
|
#
|
||||||
# General build options
|
# General build options
|
||||||
|
|||||||
@@ -54,22 +54,6 @@
|
|||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: imx_ledon
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static inline void imx_ledon(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: imx_ledoff
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static void imx_ledoff(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Funtions
|
* Public Funtions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
Reference in New Issue
Block a user