Changeset a9485d7b in rtems


Ignore:
Timestamp:
May 20, 2010, 1:10:56 PM (9 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.10, 4.11, master
Children:
4c4974e
Parents:
eec7aaab
Message:

2010-05-20 Sebastian Huber <sebastian.huber@…>

  • Makefile.am, preinstall.am, include/bsp.h, startup/bspstart.c: Use shared output character implementation.
Location:
c/src/lib/libbsp/arm/lpc24xx
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/lpc24xx/ChangeLog

    reec7aaab ra9485d7b  
     12010-05-20      Sebastian Huber <sebastian.huber@embedded-brains.de>
     2
     3        * Makefile.am, preinstall.am, include/bsp.h, startup/bspstart.c: Use
     4        shared output character implementation.
     5
    162010-05-20      Sebastian Huber <sebastian.huber@embedded-brains.de>
    27
  • c/src/lib/libbsp/arm/lpc24xx/Makefile.am

    reec7aaab ra9485d7b  
    3333include_bsp_HEADERS += ../../shared/include/irq-info.h
    3434include_bsp_HEADERS += ../../shared/include/stackalloc.h
     35include_bsp_HEADERS += ../../shared/include/uart-output-char.h
    3536include_bsp_HEADERS += ../../shared/tod.h
    3637include_bsp_HEADERS += ../shared/include/linker-symbols.h
     
    8990        ../../shared/sbrk.c \
    9091        ../../shared/src/stackalloc.c \
     92        ../../shared/src/uart-output-char.c \
    9193        ../shared/abort/simple_abort.c
    9294
  • c/src/lib/libbsp/arm/lpc24xx/include/bsp.h

    reec7aaab ra9485d7b  
    8888void *bsp_idle_thread(uintptr_t ignored);
    8989
     90#define BSP_CONSOLE_UART_BASE 0xe000c000
     91
    9092/** @} */
    9193
  • c/src/lib/libbsp/arm/lpc24xx/preinstall.am

    reec7aaab ra9485d7b  
    7575PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/stackalloc.h
    7676
     77$(PROJECT_INCLUDE)/bsp/uart-output-char.h: ../../shared/include/uart-output-char.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     78        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/uart-output-char.h
     79PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/uart-output-char.h
     80
    7781$(PROJECT_INCLUDE)/bsp/tod.h: ../../shared/tod.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
    7882        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/tod.h
  • c/src/lib/libbsp/arm/lpc24xx/startup/bspstart.c

    reec7aaab ra9485d7b  
    3030#include <bsp/stackalloc.h>
    3131#include <bsp/system-clocks.h>
     32#include <bsp/uart-output-char.h>
    3233
    3334#ifdef LPC24XX_HEAP_EXTEND
     
    7374    lpc24xx_module_enable(LPC24XX_MODULE_UART_0, LPC24XX_MODULE_CCLK);
    7475    lpc24xx_io_config(LPC24XX_MODULE_UART_0, LPC24XX_CONFIG_CONSOLE);
    75     U0LCR = 0;
    76     U0IER = 0;
    77     U0LCR = 0x80;
    78     U0DLL = lpc24xx_cclk() / 16 / LPC24XX_UART_BAUD;
    79     U0DLM = 0;
    80     U0LCR = 0x03;
    81     U0FCR = 0x07;
     76    BSP_CONSOLE_UART_INIT(lpc24xx_cclk() / 16 / LPC24XX_UART_BAUD);
    8277  #endif
    8378
     
    112107  #endif
    113108}
    114 
    115 #define ULSR_THRE 0x00000020U
    116 
    117 static void lpc24xx_BSP_output_char(char c)
    118 {
    119   while (IS_FLAG_CLEARED(U0LSR, ULSR_THRE)) {
    120     /* Wait */
    121   }
    122   U0THR = c;
    123 
    124   if (c == '\n') {
    125     while (IS_FLAG_CLEARED(U0LSR, ULSR_THRE)) {
    126       /* Wait */
    127     }
    128     U0THR = '\r';
    129   }
    130 }
    131 
    132 BSP_output_char_function_type BSP_output_char = lpc24xx_BSP_output_char;
Note: See TracChangeset for help on using the changeset viewer.