From fe2959c7e6d314cc44cf5472d20b8ac6d5806b51 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 8 Jun 2011 21:10:47 +0000 Subject: More logic for the AVR port git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3684 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/micropendous3/README.txt | 18 ++++++------- nuttx/configs/micropendous3/include/board.h | 2 ++ nuttx/configs/micropendous3/ostest/defconfig | 38 +++++++++++++++------------- nuttx/configs/micropendous3/src/up_boot.c | 4 +-- 4 files changed, 34 insertions(+), 28 deletions(-) (limited to 'nuttx/configs') diff --git a/nuttx/configs/micropendous3/README.txt b/nuttx/configs/micropendous3/README.txt index 89041a90f..76b1dc1d9 100644 --- a/nuttx/configs/micropendous3/README.txt +++ b/nuttx/configs/micropendous3/README.txt @@ -321,23 +321,23 @@ Micropendous3 Configuration Options CONFIG_AVR_TIMER2=n CONFIG_AVR_TIMER3=n CONFIG_AVR_SPI=n - CONFIG_AVR_UART1=y + CONFIG_AVR_USART1=y CONFIG_AVR_ANACOMP=n CONFIG_AVR_ADC=n CONFIG_AVR_TWI=n AT90USB specific device driver settings - CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the - console and ttys0 (default is the UART0). - CONFIG_UARTn_RXBUFSIZE - Characters are buffered as received. + CONFIG_USARTn_SERIAL_CONSOLE - selects the USARTn for the + console and ttys0 (default is no serial console). + CONFIG_USARTn_RXBUFSIZE - Characters are buffered as received. This specific the size of the receive buffer - CONFIG_UARTn_TXBUFSIZE - Characters are buffered before + CONFIG_USARTn_TXBUFSIZE - Characters are buffered before being sent. This specific the size of the transmit buffer - CONFIG_UARTn_BAUD - The configure BAUD of the UART. Must be - CONFIG_UARTn_BITS - The number of bits. Must be either 7 or 8. - CONFIG_UARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity - CONFIG_UARTn_2STOP - Two stop bits + CONFIG_USARTn_BAUD - The configure BAUD of the USART. Must be + CONFIG_USARTn_BITS - The number of bits. Must be either 7 or 8. + CONFIG_USARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity + CONFIG_USARTn_2STOP - Two stop bits Configurations ^^^^^^^^^^^^^^ diff --git a/nuttx/configs/micropendous3/include/board.h b/nuttx/configs/micropendous3/include/board.h index 5865139d2..9af841c9d 100755 --- a/nuttx/configs/micropendous3/include/board.h +++ b/nuttx/configs/micropendous3/include/board.h @@ -50,6 +50,8 @@ /* Clocking *****************************************************************/ +#define BOARD_CPU_CLOCK 8000000 /* 8MHz */ + /* LED definitions **********************************************************/ #define LED_STARTED 0 diff --git a/nuttx/configs/micropendous3/ostest/defconfig b/nuttx/configs/micropendous3/ostest/defconfig index 17d133550..ffd9852d4 100644 --- a/nuttx/configs/micropendous3/ostest/defconfig +++ b/nuttx/configs/micropendous3/ostest/defconfig @@ -52,6 +52,9 @@ # CONFIG_DRAM_SIZE - Describes the installed DRAM. # CONFIG_DRAM_START - The start address of DRAM (physical) # CONFIG_DRAM_END - Last address+1 of installed RAM +# CONFIG_ARCH_NOINTC - define if the architecture does not +# support an interrupt controller or otherwise cannot support +# APIs like up_enable_irq() and up_disable_irq(). # CONFIG_ARCH_IRQPRIO - The AT90USB supports interrupt prioritization # CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt # stack. If defined, this symbol is the size of the interrupt @@ -80,6 +83,7 @@ CONFIG_BOARD_LOOPSPERMSEC=8079 CONFIG_DRAM_SIZE=(4*1024) CONFIG_DRAM_START=0x800000 CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE) +CONFIG_ARCH_NOINTC=y CONFIG_ARCH_IRQPRIO=n CONFIG_ARCH_INTERRUPTSTACK=n CONFIG_ARCH_STACKDUMP=y @@ -116,7 +120,7 @@ CONFIG_AVR_TIMER1=n CONFIG_AVR_TIMER2=n CONFIG_AVR_TIMER3=n CONFIG_AVR_SPI=n -CONFIG_AVR_UART1=y +CONFIG_AVR_USART1=y CONFIG_AVR_ANACOMP=n CONFIG_AVR_ADC=n CONFIG_AVR_TWI=n @@ -124,24 +128,24 @@ CONFIG_AVR_TWI=n # # AT90USB specific serial device driver settings # -# CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the -# console and ttys0 (default is the UART1). -# CONFIG_UARTn_RXBUFSIZE - Characters are buffered as received. +# CONFIG_USARTn_SERIAL_CONSOLE - selects the USARTn for the +# console and ttys0 (default is the USART1). +# CONFIG_USARTn_RXBUFSIZE - Characters are buffered as received. # This specific the size of the receive buffer -# CONFIG_UARTn_TXBUFSIZE - Characters are buffered before +# CONFIG_USARTn_TXBUFSIZE - Characters are buffered before # being sent. This specific the size of the transmit buffer -# CONFIG_UARTn_BAUD - The configure BAUD of the UART. Must be -# CONFIG_UARTn_BITS - The number of bits. Must be either 7 or 8. -# CONFIG_UARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity -# CONFIG_UARTn_2STOP - Two stop bits -# -CONFIG_UART1_SERIAL_CONSOLE=y -CONFIG_UART1_TXBUFSIZE=256 -CONFIG_UART1_RXBUFSIZE=256 -CONFIG_UART1_BAUD=115200 -CONFIG_UART1_BITS=8 -CONFIG_UART1_PARITY=0 -CONFIG_UART1_2STOP=0 +# CONFIG_USARTn_BAUD - The configure BAUD of the USART. Must be +# CONFIG_USARTn_BITS - The number of bits. Must be either 7 or 8. +# CONFIG_USARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity +# CONFIG_USARTn_2STOP - Two stop bits +# +CONFIG_USART1_SERIAL_CONSOLE=y +CONFIG_USART1_TXBUFSIZE=256 +CONFIG_USART1_RXBUFSIZE=256 +CONFIG_USART1_BAUD=115200 +CONFIG_USART1_BITS=8 +CONFIG_USART1_PARITY=0 +CONFIG_USART1_2STOP=0 # # General build options diff --git a/nuttx/configs/micropendous3/src/up_boot.c b/nuttx/configs/micropendous3/src/up_boot.c index c6e261a45..6c9a879a8 100755 --- a/nuttx/configs/micropendous3/src/up_boot.c +++ b/nuttx/configs/micropendous3/src/up_boot.c @@ -63,7 +63,7 @@ ************************************************************************************/ /************************************************************************************ - * Name: at90usb_boardinitialize + * Name: up_boardinitialize * * Description: * All AT90USB architectures must provide the following entry point. This entry @@ -72,7 +72,7 @@ * ************************************************************************************/ -void at90usb_boardinitialize(void) +void up_boardinitialize(void) { /* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak * function at90usb_spiinitialize() has been brought into the link. -- cgit v1.2.3