source: rtems/testsuites/samples/hello/init.c @ 506bfc8

5
Last change on this file since 506bfc8 was 506bfc8, checked in by Sebastian Huber <sebastian.huber@…>, on 06/21/16 at 11:30:15

Move printer initialization to separate header

The RTEMS print user need to know nothing about a particular printer
implementation. In particular get rid of the <stdio.h> include which
would be visible via <rtems.h>.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2012.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.org/license/LICENSE.
8 */
9
10#ifdef HAVE_CONFIG_H
11#include "config.h"
12#endif
13
14#include <rtems/printer.h>
15#include <rtems/test.h>
16
17#include <bsp.h> /* for device driver prototypes */
18
19#include <stdio.h>
20#include <stdlib.h>
21
22/* forward declarations to avoid warnings */
23rtems_task Init(rtems_task_argument argument);
24
25const char rtems_test_name[] = "HELLO WORLD";
26rtems_printer rtems_test_printer;
27
28rtems_task Init(
29  rtems_task_argument ignored
30)
31{
32  rtems_print_printer_printf(&rtems_test_printer);
33  rtems_test_begin();
34  printf( "Hello World\n" );
35  rtems_test_end();
36  exit( 0 );
37}
38
39
40/* NOTICE: the clock driver is explicitly disabled */
41#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
42#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
43
44#define CONFIGURE_MAXIMUM_TASKS            1
45#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
46
47#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
48
49#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
50
51#define CONFIGURE_INIT
52#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.