Ignore:
Timestamp:
2013-12-30T21:08:04Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6576019
Parents:
09772f4
Message:

ohci: Convert defines to enum

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/hw_struct/completion_codes.h

    r09772f4 r1a0006d  
    3737#include <errno.h>
    3838
    39 #define CC_NOERROR (0x0)
    40 #define CC_CRC (0x1)
    41 #define CC_BITSTUFF (0x2)
    42 #define CC_TOGGLE (0x3)
    43 #define CC_STALL (0x4)
    44 #define CC_NORESPONSE (0x5)
    45 #define CC_PIDFAIL (0x6)
    46 #define CC_PIDUNEXPECTED (0x7)
    47 #define CC_DATAOVERRRUN (0x8)
    48 #define CC_DATAUNDERRRUN (0x9)
    49 #define CC_BUFFEROVERRRUN (0xc)
    50 #define CC_BUFFERUNDERRUN (0xd)
    51 #define CC_NOACCESS1 (0xe)
    52 #define CC_NOACCESS2 (0xf)
     39enum {
     40        CC_NOERROR = 0x0,
     41        CC_CRC = 0x1,
     42        CC_BITSTUFF = 0x2,
     43        CC_TOGGLE = 0x3,
     44        CC_STALL = 0x4,
     45        CC_NORESPONSE = 0x5,
     46        CC_PIDFAIL = 0x6,
     47        CC_PIDUNEXPECTED = 0x7,
     48        CC_DATAOVERRRUN = 0x8,
     49        CC_DATAUNDERRRUN = 0x9,
     50        CC_BUFFEROVERRRUN = 0xc,
     51        CC_BUFFERUNDERRUN = 0xd,
     52        CC_NOACCESS1 = 0xe,
     53        CC_NOACCESS2 = 0xf,
     54};
    5355
    54 inline static int cc_to_rc(int cc)
     56inline static unsigned cc_to_rc(unsigned cc)
    5557{
    5658        switch (cc) {
Note: See TracChangeset for help on using the changeset viewer.