source: network-demos/rpc_demo/init.c @ cf5b3fa

4.11network-demos-4-10-branchnetwork-demos-4-8-branchnetwork-demos-4-9-branch
Last change on this file since cf5b3fa was faa85e6, checked in by Joel Sherrill <joel.sherrill@…>, on 06/21/07 at 15:13:05

2007-06-21 Joel Sherrill <joel.sherrill@…>

  • init.c: confdefs.h should be rtems/confdefs.h
  • Property mode set to 100644
File size: 1.7 KB
Line 
1/*
2 * RTEMS configuration/initialization
3 */
4 
5#include <bsp.h>
6#include <rtems/error.h>
7#include <rtems/rtems_bsdnet.h>
8#include <stdio.h>
9
10#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
11#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
12#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
13
14#define STACK_CHECKER_ON 1
15#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
16#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
17#define CONFIGURE_MAXIMUM_USER_EXTENSIONS   2
18#define CONFIGURE_MAXIMUM_SEMAPHORES        20
19#define CONFIGURE_MAXIMUM_TASKS             12
20
21#define CONFIGURE_MICROSECONDS_PER_TICK       20000
22
23#define CONFIGURE_INIT_TASK_PRIORITY    99
24#define CONFIGURE_INIT_TASK_STACK_SIZE  (16*1024)
25#define CONFIGURE_INIT
26
27rtems_task Init(rtems_task_argument argument);
28
29#include <rtems/confdefs.h>
30
31/*
32 * Network configuration
33 */
34#define NETWORK_TASK_PRIORITY   50
35static struct rtems_bsdnet_ifconfig netdriver_config = {
36          RTEMS_BSP_NETWORK_DRIVER_NAME,
37          RTEMS_BSP_NETWORK_DRIVER_ATTACH,
38};
39
40struct rtems_bsdnet_config rtems_bsdnet_config = {
41        &netdriver_config,      /* Network interface */
42        rtems_bsdnet_do_bootp,  /* Use BOOTP to get network configuration */
43        NETWORK_TASK_PRIORITY,  /* Network task priority */
44};
45
46#ifdef SERVER
47#define T(x)            __TXT(x)
48#define __TXT(s)        #s
49static char *av[] = {
50        "RPC client",
51        T(SERVER),
52        "Test Message",
53        NULL
54};
55#else
56static char *av[] = {
57        "RPC server",
58        NULL
59};
60#endif
61static int ac = (sizeof av / sizeof av[0]) - 1;
62
63extern int rtems_main (int argc, char **argv);
64
65rtems_task
66Init (rtems_task_argument ignored)
67{
68        rtems_bsdnet_initialize_network ();
69        rtems_bsdnet_synchronize_ntp (0, 0);
70
71        rtems_main (ac, av);
72        printf ("*** RPC Test Finish ***\n");
73        exit (0);
74}
75
76/*
77 * Dummy portmapper routines
78 */
79pmap_set () { ; }
80pmap_unset () { ; }
Note: See TracBrowser for help on using the repository browser.