Changeset 541e6d8 in multiio


Ignore:
Timestamp:
Feb 17, 2011, 2:17:15 PM (8 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
master
Children:
6957d53
Parents:
df7e0e5
Message:

2011-02-17 Joel Sherrill <joel.sherrill@…>

  • Makefile: Use ${HOME}
  • main_pcmmio_benchmark.c, main_pcmmio_irq.c: Clean up.
  • mio_io_rtems.c: Set error code in more cases.
Location:
pcmmio/original
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • pcmmio/original/ChangeLog

    rdf7e0e5 r541e6d8  
     12011-02-17      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile: Use ${HOME}
     4        * main_pcmmio_benchmark.c, main_pcmmio_irq.c: Clean up.
     5        * mio_io_rtems.c: Set error code in more cases.
     6
    172011-01-26      Joel Sherrill <joel.sherrill@oarcorp.com>
    28
  • pcmmio/original/Makefile

    rdf7e0e5 r541e6d8  
    33#
    44
    5 RTEMS_MAKEFILE_PATH=/users/joel/centaur/bsp-install/i386-rtems4.10/pc386/
     5RTEMS_MAKEFILE_PATH=${HOME}/centaur/install/i386-rtems4.10/pc386/
    66#
    77#  RTEMS_MAKEFILE_PATH is typically set in an environment variable
  • pcmmio/original/main_pcmmio_benchmark.c

    rdf7e0e5 r541e6d8  
    4141int main_pcmmio_benchmark(int argc, char **argv)
    4242{
    43   int                 milliseconds;
    4443  int                 maximum;
    4544  int                 sc;
     
    5958   * Parse arguments here
    6059   */
    61   milliseconds = 1000;
    6260  maximum = 1;
    6361  verbose = false;
    6462
    6563  memset(&getopt_reent, 0, sizeof(getopt_data));
    66   while ((ch = getopt_r(argc, argv, "i:v:", &getopt_reent)) != -1) {
     64  while ((ch = getopt_r(argc, argv, "i:v", &getopt_reent)) != -1) {
    6765    switch (ch) {
    6866      case 'i': /* maximum interrupts */
     
    9189
    9290  /*
    93    *  Now sample in the loop
     91   *  Now catch interrupts in the loop
    9492   */
    9593  interrupts   = 0;
  • pcmmio/original/main_pcmmio_irq.c

    rdf7e0e5 r541e6d8  
    116116        }
    117117        if ( milliseconds == 0 ) {
    118           printf( "Sampling period (%d) is 0\n", milliseconds );
     118          printf( "Sampling period should not be 0\n" );
    119119          PRINT_USAGE();
    120120          return -1;
     
    182182  }
    183183
     184  /*
     185   *  Set String to print for IRQ source
     186   */
    184187  if ( do_din == true ) {
    185188    irq = "DIN";
     
    189192    irq = "ADC";
    190193  }
    191   if ( maximum != 1 )
     194
     195  /*
     196   * Give some indication of what we are about to do
     197   */
     198  if ( maximum != 1 ) {
    192199    printf(
    193200      "Polling for %s IRQ for %d iterations with %d msec period\n",
     
    196203      milliseconds
    197204    );
     205  }
    198206
    199207  /*
  • pcmmio/original/mio_io_rtems.c

    rdf7e0e5 r541e6d8  
    425425    RTEMS_MILLISECONDS_TO_TICKS(milliseconds)
    426426  );
    427   if ( rc == RTEMS_UNSATISFIED )
    428     return -1;
    429 
    430   if ( rc == RTEMS_TIMEOUT )
    431     return -1;
     427  if ( rc == RTEMS_UNSATISFIED ) {
     428    mio_error_code = MIO_TIMEOUT_ERROR;
     429    return -1;
     430  }
     431
     432  if ( rc == RTEMS_TIMEOUT ) {
     433    mio_error_code = MIO_READ_DATA_FAILURE;
     434    return -1;
     435  }
    432436
    433437  if ( rc != RTEMS_SUCCESSFUL ) {
Note: See TracChangeset for help on using the changeset viewer.