5
Last change
on this file since c344e58 was
c344e58,
checked in by Sebastian Huber <sebastian.huber@…>, on 02/02/20 at 10:00:54
|
Use RTEMS_SYSINIT_ORDER_LAST_BUT_5
Use RTEMS_SYSINIT_ORDER_LAST_BUT_5 instead of RTEMS_SYSINIT_ORDER_LAST
to allow applications and support functions to place system
initialization handlers behind the standard handlers.
Update #3838.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | /* |
---|
2 | * Copyright (c) 2016 embedded brains GmbH. All rights reserved. |
---|
3 | * |
---|
4 | * embedded brains GmbH |
---|
5 | * Dornierstr. 4 |
---|
6 | * 82178 Puchheim |
---|
7 | * Germany |
---|
8 | * <rtems@embedded-brains.de> |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.rtems.org/license/LICENSE. |
---|
13 | */ |
---|
14 | |
---|
15 | #include <rtems/bspIo.h> |
---|
16 | #include <rtems/sysinit.h> |
---|
17 | |
---|
18 | #include <bsp/atsam-clock-config.h> |
---|
19 | #include <chip.h> |
---|
20 | #include <include/dbg_console.h> |
---|
21 | |
---|
22 | static void atsam_debug_console_out(char c) |
---|
23 | { |
---|
24 | DBG_PutChar((uint8_t) c); |
---|
25 | } |
---|
26 | |
---|
27 | static void atsam_debug_console_init(void) |
---|
28 | { |
---|
29 | DBG_Configure(115200, BOARD_MCK); |
---|
30 | BSP_output_char = atsam_debug_console_out; |
---|
31 | } |
---|
32 | |
---|
33 | static void atsam_debug_console_early_init(char c) |
---|
34 | { |
---|
35 | atsam_debug_console_init(); |
---|
36 | atsam_debug_console_out(c); |
---|
37 | } |
---|
38 | |
---|
39 | static int atsam_debug_console_in(void) |
---|
40 | { |
---|
41 | return (int) DBG_GetChar(); |
---|
42 | } |
---|
43 | |
---|
44 | BSP_output_char_function_type BSP_output_char = atsam_debug_console_early_init; |
---|
45 | |
---|
46 | BSP_polling_getchar_function_type BSP_poll_char = atsam_debug_console_in; |
---|
47 | |
---|
48 | RTEMS_SYSINIT_ITEM( |
---|
49 | atsam_debug_console_init, |
---|
50 | RTEMS_SYSINIT_BSP_START, |
---|
51 | RTEMS_SYSINIT_ORDER_LAST_BUT_5 |
---|
52 | ); |
---|
Note: See
TracBrowser
for help on using the repository browser.