Add hello configuratin for AVR
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3699 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
55cab11847
commit
22e2c3dd6a
@ -56,7 +56,7 @@
|
||||
* Private Definitions
|
||||
******************************************************************************/
|
||||
|
||||
/* Baud rate settings for normal and double speed settings */
|
||||
/* Baud rate settings for normal and double speed modes */
|
||||
|
||||
#define AVR_NORMAL_UBRR1 \
|
||||
((((BOARD_CPU_CLOCK / 16) + (CONFIG_USART1_BAUD / 2)) / (CONFIG_USART1_BAUD)) - 1)
|
||||
@ -100,13 +100,20 @@
|
||||
# define AVR_UBRR1 AVR_DBLSPEED_UBRR1
|
||||
# define UART1_DOUBLE_SPEED 1
|
||||
# endif
|
||||
#else
|
||||
#elif BOARD_CPU_CLOCK <= 16000000
|
||||
# if CONFIG_USART1_BAUD <= 38400
|
||||
# define AVR_UBRR1 AVR_NORMAL_UBRR1
|
||||
# else
|
||||
# define AVR_UBRR1 AVR_DBLSPEED_UBRR1
|
||||
# define UART1_DOUBLE_SPEED 1
|
||||
# endif
|
||||
#else
|
||||
# if CONFIG_USART1_BAUD <= 57600
|
||||
# define AVR_UBRR1 AVR_NORMAL_UBRR1
|
||||
# else
|
||||
# define AVR_UBRR1 AVR_DBLSPEED_UBRR1
|
||||
# define UART1_DOUBLE_SPEED 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -55,7 +55,7 @@
|
||||
* Private Definitions
|
||||
******************************************************************************/
|
||||
|
||||
/* USART0 Baud rate settings for normal and double speed settings */
|
||||
/* USART0 Baud rate settings for normal and double speed modes */
|
||||
|
||||
#define AVR_NORMAL_UBRR0 \
|
||||
(((((BOARD_CPU_CLOCK / 16) + (CONFIG_USART0_BAUD / 2)) / (CONFIG_USART0_BAUD)) - 1)
|
||||
@ -99,16 +99,23 @@
|
||||
# define AVR_UBRR0 AVR_DBLSPEED_UBRR0
|
||||
# define UART0_DOUBLE_SPEED 1
|
||||
# endif
|
||||
#else
|
||||
#elif BOARD_CPU_CLOCK <= 16000000
|
||||
# if CONFIG_USART0_BAUD <= 38400
|
||||
# define AVR_UBRR0 AVR_NORMAL_UBRR0
|
||||
# else
|
||||
# define AVR_UBRR0 AVR_DBLSPEED_UBRR0
|
||||
# define UART0_DOUBLE_SPEED 1
|
||||
# endif
|
||||
#else
|
||||
# if CONFIG_USART0_BAUD <= 57600
|
||||
# define AVR_UBRR0 AVR_NORMAL_UBRR0
|
||||
# else
|
||||
# define AVR_UBRR0 AVR_DBLSPEED_UBRR0
|
||||
# define UART0_DOUBLE_SPEED 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* USART1 Baud rate settings for normal and double speed settings */
|
||||
/* USART1 Baud rate settings for normal and double speed modes */
|
||||
|
||||
#define AVR_NORMAL_UBRR1 \
|
||||
((((BOARD_CPU_CLOCK / 16) + (CONFIG_USART1_BAUD / 2)) / (CONFIG_USART1_BAUD)) - 1)
|
||||
@ -152,13 +159,20 @@
|
||||
# define AVR_UBRR1 AVR_DBLSPEED_UBRR1
|
||||
# define UART1_DOUBLE_SPEED 1
|
||||
# endif
|
||||
#else
|
||||
#elif BOARD_CPU_CLOCK <= 16000000
|
||||
# if CONFIG_USART1_BAUD <= 38400
|
||||
# define AVR_UBRR1 AVR_NORMAL_UBRR1
|
||||
# else
|
||||
# define AVR_UBRR1 AVR_DBLSPEED_UBRR1
|
||||
# define UART1_DOUBLE_SPEED 1
|
||||
# endif
|
||||
#else
|
||||
# if CONFIG_USART1_BAUD <= 57600
|
||||
# define AVR_UBRR1 AVR_NORMAL_UBRR1
|
||||
# else
|
||||
# define AVR_UBRR1 AVR_DBLSPEED_UBRR1
|
||||
# define UART1_DOUBLE_SPEED 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -123,28 +123,28 @@ static inline void up_registerdump(void)
|
||||
|
||||
if (current_regs)
|
||||
{
|
||||
lldbg("R%d: %02x %02x %02x %02x %02x %02x %02x %02x\n",
|
||||
lldbg("R%02d: %02x %02x %02x %02x %02x %02x %02x %02x\n",
|
||||
0,
|
||||
current_regs[REG_R0], current_regs[REG_R1],
|
||||
current_regs[REG_R2], current_regs[REG_R3],
|
||||
current_regs[REG_R4], current_regs[REG_R5],
|
||||
current_regs[REG_R6], current_regs[REG_R7]);
|
||||
|
||||
lldbg("R%d: %02x %02x %02x %02x %02x %02x %02x %02x\n",
|
||||
lldbg("R%02d: %02x %02x %02x %02x %02x %02x %02x %02x\n",
|
||||
8,
|
||||
current_regs[REG_R8], current_regs[REG_R9],
|
||||
current_regs[REG_R10], current_regs[REG_R11],
|
||||
current_regs[REG_R12], current_regs[REG_R13],
|
||||
current_regs[REG_R14], current_regs[REG_R15]);
|
||||
|
||||
lldbg("R%d: %02x %02x %02x %02x %02x %02x %02x %02x\n",
|
||||
lldbg("R%02d: %02x %02x %02x %02x %02x %02x %02x %02x\n",
|
||||
16,
|
||||
current_regs[REG_R16], current_regs[REG_R17],
|
||||
current_regs[REG_R18], current_regs[REG_R19],
|
||||
current_regs[REG_R20], current_regs[REG_R21],
|
||||
current_regs[REG_R22], current_regs[REG_R23]);
|
||||
|
||||
lldbg("R%d: %02x %02x %02x %02x %02x %02x %02x %02x\n",
|
||||
lldbg("R%02d: %02x %02x %02x %02x %02x %02x %02x %02x\n",
|
||||
24,
|
||||
current_regs[REG_R24], current_regs[REG_R25],
|
||||
current_regs[REG_R26], current_regs[REG_R27],
|
||||
@ -192,7 +192,7 @@ void up_dumpstate(void)
|
||||
|
||||
/* Get the limits on the interrupt stack memory */
|
||||
|
||||
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||
#if CONFIG_ARCH_INTERRUPTSTACK > 0
|
||||
istackbase = (uint16_t)&g_intstackbase;
|
||||
istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user