summaryrefslogtreecommitdiffstats
path: root/led/complex1/main.cc
blob: c29d89379c902766d4601061c3b5dc8ab306e91f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
 *  Starting point for this example.  Can be compiled on RTEMS or Linux.
 */


#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>

extern void doTest(void);

#if defined(__rtems__)
#include <bsp.h>

extern "C" {
  rtems_task Init(
    rtems_task_argument arg
  );
};

rtems_task Init(
  rtems_task_argument arg
)
#else
int main(
  int    argc,
  char **argv
)
#endif
{
#if !defined(BSP_SMALL_MEMORY)
  doTest();
#endif
  exit( 0 );
}

#if defined(__rtems__)
/* RTEMS configuration information */

#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(1)

#define CONFIGURE_RTEMS_INIT_TASKS_TABLE

#if defined(BSP_SMALL_MEMORY)
  #define CONFIGURE_MAXIMUM_TASKS 1
#else
  #define CONFIGURE_MAXIMUM_TASKS 102
  #define CONFIGURE_MAXIMUM_PERIODS  100
  #define CONFIGURE_MAXIMUM_POSIX_THREADS 2
  #define CONFIGURE_EXTRA_TASK_STACKS (32 * 1024)

  #define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
  #define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 20

  #define CONFIGURE_STACK_CHECKER_ENABLED
#endif

#define CONFIGURE_INIT

#include <rtems/confdefs.h>
#endif

/* end of file */