Changeset ac0cb2a in mainline for arch/mips32/src/drivers/arc.c


Ignore:
Timestamp:
2005-12-08T00:29:53Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
944b15c
Parents:
9d5e23c
Message:

Added simple support for arc keyboards on mips.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/src/drivers/arc.c

    r9d5e23c rac0cb2a  
    184184       
    185185}
     186
     187/** Try to get character, return character or -1 if not available */
     188int arc_getchar(void)
     189{
     190        char ch;
     191        __u32 count;
     192        long result;
     193
     194        if (arc_entry->getreadstatus(0))
     195                return -1;
     196        result = arc_entry->read(0, &ch, 1, &count);
     197        if (result || count!=1) {
     198                cpu_halt();
     199                return -1;
     200        }
     201        if (ch == '\r')
     202                return '\n';
     203        return ch;
     204}
Note: See TracChangeset for help on using the changeset viewer.