source: multiio/pcmmio/original/pcmmio_shell.c @ 2e9b49f

Last change on this file since 2e9b49f was 2e9b49f, checked in by Joel Sherrill <joel.sherrill@…>, on Dec 11, 2009 at 8:41:36 PM

2009-12-11 Joel Sherrill <joel.sherrill@…>

  • main_pcmmio_din.c, main_pcmmio_irq.c, pcmmio_shell.c: Report time between discrete in interrupts in microseconds.
  • Property mode set to 100644
File size: 2.6 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2009.
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.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12#include "pcmmio_commands.h"
13
14rtems_task Init(
15  rtems_task_argument ignored
16)
17{
18  /*
19   *  Initialize the PCMMIO module to use IRQ6.  Ours is jumpered for 0x300
20   *  base address.  We use discrete input interrupts so enable all of the
21   *  as edge triggered on 1.
22   */
23  pcmmio_initialize(0x300, 6);
24  enable_dio_interrupt();
25  { int i;
26    for (i=1 ; i<=48 ; i++ )
27      dio_enab_bit_int(i, 1);
28  }
29
30  /*
31   *  Display a herald with some hints on usage
32   */
33  printf(
34    "\n"
35    "\n"
36    "*** Shell Configured with WinSystems PCMMIO Commands ***\n"
37    "Type \"help pcmmio\" for more information\n"
38    "\n"
39  );
40  rtems_shell_init(
41    "SHLL",                          /* task_name */
42    RTEMS_MINIMUM_STACK_SIZE * 4,    /* task_stacksize */
43    100,                             /* task_priority */
44    "/dev/console",                  /* devname */
45    false,                           /* forever */
46    true,                            /* wait */
47    NULL                             /* login */
48  );
49}
50
51/* RTEMS configuration */
52
53#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
54#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
55#ifdef RTEMS_BSP_HAS_IDE_DRIVER
56#define CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
57#endif
58#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
59#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
60
61#define CONFIGURE_MICROSECONDS_PER_TICK     1000
62
63#define CONFIGURE_MAXIMUM_TASKS                  20
64#define CONFIGURE_MAXIMUM_SEMAPHORES             20
65#define CONFIGURE_MAXIMUM_BARRIERS                3
66#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES          1
67#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
68
69/*
70 * discrete in messages are 12 bytes and there are 1024 of them
71 */
72#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
73        CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(1024, 12)
74
75#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
76#define CONFIGURE_EXTRA_TASK_STACKS         (6 * RTEMS_MINIMUM_STACK_SIZE)
77#define CONFIGURE_INIT_TASK_ATTRIBUTES      RTEMS_FLOATING_POINT
78
79#define CONFIGURE_STACK_CHECKER_ENABLED
80#define CONFIGURE_MALLOC_STATISTICS
81
82#define CONFIGURE_INIT
83#include <rtems/confdefs.h>
84
85#define CONFIGURE_SHELL_USER_COMMANDS \
86  CONFIGURE_PCMMIO_COMMANDS
87#define CONFIGURE_SHELL_USER_ALIASES \
88  CONFIGURE_PCMMIO_ALIASES
89
90#define CONFIGURE_SHELL_COMMANDS_INIT
91#define CONFIGURE_SHELL_COMMANDS_ALL
92
93#include <rtems/shellconfig.h>
94
Note: See TracBrowser for help on using the repository browser.