source: network-demos/tftpTest/init.c @ 5c663c0

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

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

  • init.c: Replace CONFIGURE_TEST_XXX with CONFIGURE_APPLICATION_XXX.
  • Property mode set to 100644
File size: 1.7 KB
Line 
1/*
2 * RTEMS configuration/initialization
3 *
4 * This program may be distributed and used for any purpose.
5 * I ask only that you:
6 *      1. Leave this author information intact.
7 *      2. Document any changes you make.
8 *
9 * W. Eric Norum
10 * Saskatchewan Accelerator Laboratory
11 * University of Saskatchewan
12 * Saskatoon, Saskatchewan, CANADA
13 * eric@skatter.usask.ca
14 *
15 *  $Id$
16 */
17
18#include <bsp.h>
19#include <rtems/tftp.h>
20
21#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
22#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
23#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
24#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
25#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
26
27#define CONFIGURE_EXECUTIVE_RAM_SIZE    (512*1024)
28#define CONFIGURE_MAXIMUM_SEMAPHORES    20
29#define CONFIGURE_MAXIMUM_TASKS         20
30
31#define CONFIGURE_MICROSECONDS_PER_TICK 10000
32
33#define CONFIGURE_INIT_TASK_STACK_SIZE  (10*1024)
34#define CONFIGURE_INIT_TASK_PRIORITY    100
35#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \
36                                           RTEMS_NO_TIMESLICE | \
37                                           RTEMS_NO_ASR | \
38                                           RTEMS_INTERRUPT_LEVEL(0))
39
40#define CONFIGURE_INIT
41rtems_task Init (rtems_task_argument argument);
42
43#include <confdefs.h>
44
45#include <stdio.h>
46#include <rtems/rtems_bsdnet.h>
47#include <netinet/in.h>
48#include <arpa/inet.h>
49#include "../networkconfig.h"
50
51void testTFTP (const char *hostname, const char *filename);
52
53/*
54 * RTEMS Startup Task
55 */
56rtems_task
57Init (rtems_task_argument ignored)
58{
59        const char *hostname, *filename;
60
61        rtems_bsdnet_initialize_network ();
62        rtems_bsdnet_initialize_tftp_filesystem ();
63
64        hostname = RTEMS_TFTP_TEST_HOST_NAME;
65        filename = RTEMS_TFTP_TEST_FILE_NAME;
66
67        testTFTP (hostname, filename);
68        exit (0);
69}
Note: See TracBrowser for help on using the repository browser.