Changeset f619250 in rtems


Ignore:
Timestamp:
Oct 27, 2013, 6:13:47 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
f074a4d
Parents:
7ad725f2
Message:

bsps: Add simple console output char

Location:
c/src/lib/libbsp
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/realview-pbx-a9/Makefile.am

    r7ad725f2 rf619250  
    114114libbsp_a_SOURCES += ../../shared/console_select.c
    115115libbsp_a_SOURCES += ../../shared/console_write.c
     116libbsp_a_SOURCES += ../../shared/console-output-char.c
    116117libbsp_a_SOURCES += ../../shared/get-serial-mouse-ps2.c
    117118libbsp_a_SOURCES += ../shared/arm-pl011.c
  • c/src/lib/libbsp/arm/realview-pbx-a9/console/console-config.c

    r7ad725f2 rf619250  
    6464unsigned long Console_Configuration_Count =
    6565  RTEMS_ARRAY_SIZE(Console_Configuration_Ports);
    66 
    67 static void output_char(char c)
    68 {
    69   int minor = (int) Console_Port_Minor;
    70   const console_tbl *ct = Console_Port_Tbl != NULL ?
    71     Console_Port_Tbl[minor] : &Console_Configuration_Ports[minor];
    72   const console_fns *cf = ct->pDeviceFns;
    73 
    74   if (c == '\n') {
    75     (*cf->deviceWritePolled)(minor, '\r');
    76   }
    77 
    78   (*cf->deviceWritePolled)(minor, c);
    79 }
    80 
    81 static void output_char_init(char c)
    82 {
    83   if (Console_Port_Tbl == NULL) {
    84     int minor = (int) Console_Port_Minor;
    85     const console_fns *cf = Console_Configuration_Ports[minor].pDeviceFns;
    86 
    87     (*cf->deviceInitialize)(minor);
    88   }
    89 
    90   BSP_output_char = output_char;
    91   output_char(c);
    92 }
    93 
    94 BSP_output_char_function_type BSP_output_char = output_char_init;
    95 
    96 BSP_polling_getchar_function_type BSP_poll_char = NULL;
Note: See TracChangeset for help on using the changeset viewer.