source: multiio/pcmmio/original/README @ 217770e

Last change on this file since 217770e was 217770e, checked in by Joel Sherrill <joel.sherrill@…>, on Dec 14, 2009 at 3:55:14 PM

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

  • Makefile, README, mio_io_rtems.c, pcmmio_commands.h: Add command to benchmark discrete input including message queue send and receive.
  • main_pcmmio_benchmark.c: New file.
  • Property mode set to 100644
File size: 3.0 KB
Line 
1#
2#  $Id$
3#
4
5This is a port of the Winsystems Linux driver to RTEMS.
6
7In general, the goal was to minimize changes to the user level
8library and only replace Linux IO calls to the device driver
9with direct access functions.
10
11The driver uses 4 Classic API Barriers.
12
13--joel sherrill
14
15Issues
16======
17+ The library is not reentrant. The GNU/Linux version uses global variables
18  to track the state of certain variables and access to these is not protected.
19  This design flaw is carried over into the RTEMS version.
20
21+ We want to timestamp samples and the initial code did not do that.  I
22  added this.
23
24New Methods
25===========
26  void pcmmio_initialize(
27    unsigned short _base_port,
28    unsigned short _irq
29  );
30
31  void flush_buffered_ints(void);
32
33  int wait_adc_int_with_timeout(int adc_num, int milliseconds);
34
35  int wait_dac_int_with_timeout(int dac_num, int milliseconds);
36
37  int wait_dio_int_with_timeout(int milliseconds);
38
39  int wait_dio_int_with_timestamp(
40    int                 milliseconds,
41    unsigned long long *timestamp
42  );
43  int dio_get_missed_interrupts(void);
44
45RTEMS Configuration
46===================
47The driver needs:
48
49+ 3 Classic API Barriers
50+ 1 Classic API Message Queue
51  - 1024 buffers of sizeof(din_messsage_t) (should be 12 bytes)
52
53The pcmmio_shell example is probably over configured but is a
54working guide.
55
56RTEMS Shell Commands
57====================
58The following RTEMS Shell configuration aids are defined to assist in
59adding PCMMIO related commands to your shell.
60  CONFIGURE_PCMMIO_ALIASES
61  CONFIGURE_PCMMIO_COMMANDS
62
63pcmmio_din - Read Discrete Inputs
64    pcmmio_din [-i iterations] [-p period] [-v]
65    Where: maximum iterations defaults to 1
66           the period is in milliseconds and defaults to 1000
67
68pcmmio_dout - Write a Discrete Output
69    pcmmio_dout bit value
70    Where: bit must be 0-47
71           value must be 0 or 1
72
73pcmmio_adc - Read Analog Inputs
74    pcmmio_adc [-i iterations] [-p period] [-v]
75    Where: maximum iterations defaults to 1
76           the period is in milliseconds and defaults to 1000
77
78pcmmio_dac - Write Analog Output
79    pcmmio_dac dac voltage
80    pcmmio_dac dac low high step time_per_step maximum_time
81
82    Where: dac must be 0-7
83           voltages and step must be -10V to +10V
84           times are in milliseconds
85
86    First form is a single write.
87    Second form writes a pattern.
88
89pcmmio_irq - Wait for PCMMIO IRQs
90  pcmmio_irq [-i iterations] [-p period] [-v] [-d|-D DAC|-a ADC]
91
92  Where: maximum iterations defaults to 1
93         the period is in milliseconds and defaults to 1000
94         -d enables discrete input irq monitoring
95         -D DAC enables irq monitoring on the DAC channel "DAC"
96         -a ADC enables irq monitoring on the ADC channel "ADC"
97
98  You select one of the three IRQ sources to monitor.
99
100pcmmio_benchmark - Benchmark Discrete Input Interrupt Performance
101
102  pcmmio_benchmarks [-i interrupts] [-v]
103
104  Where: maximum interrupts must be >= 1
105
106Aliases
107  + adc  - alias for pcmmio_adc
108  + dac  - alias for pcmmio_dac
109  + din  - alias for pcmmio_din
110  + dout - alias for pcmmio_dout
Note: See TracBrowser for help on using the repository browser.