Changeset 818edbd in rtems


Ignore:
Timestamp:
Jul 2, 2013, 1:16:33 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
6009da1
Parents:
d91d50f
git-author:
Sebastian Huber <sebastian.huber@…> (07/02/13 13:16:33)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/05/13 14:01:04)
Message:

bsp/mpc55xx: Update due to API changes

Termios notifies now the driver about an inactive transmit with the
length argument set to zero.

Location:
c/src/lib/libbsp/powerpc/mpc55xxevb/console
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-esci.c

    rd91d50f r818edbd  
    329329static int mpc55xx_esci_write(int minor, const char *out, size_t n)
    330330{
    331   mpc55xx_esci_context *self = console_generic_get_context(minor);
    332   rtems_interrupt_level level;
    333 
    334   rtems_interrupt_disable(level);
    335   self->regs->DR.B.D = out [0];
    336   self->transmit_in_progress = true;
    337   rtems_interrupt_enable(level);
     331  if (n > 0) {
     332    mpc55xx_esci_context *self = console_generic_get_context(minor);
     333
     334    self->regs->DR.B.D = out [0];
     335    self->transmit_in_progress = true;
     336  }
    338337
    339338  return 0;
  • c/src/lib/libbsp/powerpc/mpc55xxevb/console/console-linflex.c

    rd91d50f r818edbd  
    390390static int mpc55xx_linflex_write(int minor, const char *out, size_t n)
    391391{
    392   mpc55xx_linflex_context *self = console_generic_get_context(minor);
    393   volatile LINFLEX_tag *regs = self->regs;
    394   rtems_interrupt_level level;
    395 
    396   rtems_interrupt_disable(level);
    397 
    398   regs->BDRL.B.DATA0 = out [0];
    399   self->transmit_in_progress = true;
    400   /* TODO: send more then one byte */
    401 
    402   rtems_interrupt_enable(level);
     392  if (n > 0) {
     393    mpc55xx_linflex_context *self = console_generic_get_context(minor);
     394    volatile LINFLEX_tag *regs = self->regs;
     395
     396    regs->BDRL.B.DATA0 = out [0];
     397    self->transmit_in_progress = true;
     398    /* TODO: send more then one byte */
     399  }
    403400
    404401  return 0;
Note: See TracChangeset for help on using the changeset viewer.