Add serial and LED driver

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2519 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2010-01-22 03:08:29 +00:00
parent 31ed8b3e7a
commit 7742fda197
5 changed files with 1457 additions and 7 deletions

View File

@ -1,7 +1,7 @@
############################################################################
# arch/arm/src/sam3u/Make.defs
#
# Copyright (C) 2009 Gregory Nutt. All rights reserved.
# Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# Redistribution and use in source and binary forms, with or without
@ -46,5 +46,5 @@ CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c \
CHIP_ASRCS =
CHIP_CSRCS = sam3u_clockconfig.c sam3u_irq.c sam3u_lowputc.c sam3u_pio.c \
sam3u_start.c sam3u_timerisr.c
sam3u_serial.c sam3u_start.c sam3u_timerisr.c

View File

@ -304,7 +304,7 @@ void sam3u_lowsetup(void)
#endif
/* Configure the console (only) */
#ifdef HAVE_CONSOLE
#if defined(HAVE_CONSOLE) && !defined(CONFIG_SUPPRESS_UART_CONFIG)
/* Reset and disable receiver and transmitter */
putreg32((UART_CR_RSTRX|UART_CR_RSTTX|UART_CR_RXDIS|UART_CR_TXDIS),
@ -316,7 +316,7 @@ void sam3u_lowsetup(void)
/* Set up the mode register */
putreg32(MR_VALUE, AM3U_CONSOLE_BASE+SAM3U_UART_MR_OFFSET);
putreg32(MR_VALUE, SAM3U_CONSOLE_BASE+SAM3U_UART_MR_OFFSET);
/* Configure the console baud */

1450
arch/arm/src/sam3u/sam3u_serial.c Executable file

File diff suppressed because it is too large Load Diff

View File

@ -243,7 +243,7 @@ void stm32_lowsetup(void)
{
#if defined(CONFIG_STM32_USART1) || defined(CONFIG_STM32_USART2) || defined(CONFIG_STM32_USART3)
uint32_t mapr;
#if defined(HAVE_CONSOLE) && !defined(CONFIG_SUPPRESS_USART_CONFIG)
#if defined(HAVE_CONSOLE) && !defined(CONFIG_SUPPRESS_UART_CONFIG)
uint32_t cr;
#endif
@ -332,7 +332,7 @@ void stm32_lowsetup(void)
/* Enable and configure the selected console device */
#if defined(HAVE_CONSOLE) && !defined(CONFIG_SUPPRESS_USART_CONFIG)
#if defined(HAVE_CONSOLE) && !defined(CONFIG_SUPPRESS_UART_CONFIG)
/* Configure CR2 */
cr = getreg32(STM32_CONSOLE_BASE + STM32_USART_CR2_OFFSET);

View File

@ -425,7 +425,7 @@ static inline void up_disableusartint(struct up_dev_s *priv, uint16_t *ie)
static int up_setup(struct uart_dev_s *dev)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
#ifdef CONFIG_SUPPRESS_USART_CONFIG
#ifdef CONFIG_SUPPRESS_UART_CONFIG
uint32_t uartdiv32;
uint32_t mantissa;
uint32_t fraction;