Changeset f7bb9f9 in rtems


Ignore:
Timestamp:
Feb 29, 2012, 4:08:44 PM (7 years ago)
Author:
Werner Almesberger <werner@…>
Branches:
4.11, master
Children:
396b80e
Parents:
19d18f23
git-author:
Werner Almesberger <werner@…> (02/29/12 16:08:44)
git-committer:
Gedare Bloom <gedare@…> (02/29/12 16:08:44)
Message:

PR2028: Milkymist USB: forward MIDI messages.

Forward MIDI messages from the softusb controller to the application.

Signed-off-by: Gedare Bloom <gedare@…>

Location:
c/src/lib/libbsp/lm32/shared/milkymist_usbinput
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/lm32/shared/milkymist_usbinput/comloc.h

    r19d18f23 rf7bb9f9  
    2323#define COMLOC_KEVT_PRODUCE     COMLOCV(MM_SOFTUSB_DMEM_BASE+0x1142)
    2424#define COMLOC_KEVT(offset)     COMLOCV(MM_SOFTUSB_DMEM_BASE+0x1143+offset)
     25#define COMLOC_MIDI_PRODUCE     COMLOCV(MM_SOFTUSB_DMEM_BASE+0x1183)
     26#define COMLOC_MIDI(offset)     COMLOCV(MM_SOFTUSB_DMEM_BASE+0x1184+offset)
    2527
    2628#endif /* __COMLOC_H_ */
  • c/src/lib/libbsp/lm32/shared/milkymist_usbinput/usbinput.c

    r19d18f23 rf7bb9f9  
    3636static int mouse_consume;
    3737static int keyboard_consume;
     38static int midi_consume;
    3839
    3940static rtems_id event_q;
     
    5960    keyboard_consume = (keyboard_consume + 1) & 0x07;
    6061  }
     62
     63  while(midi_consume != COMLOC_MIDI_PRODUCE) {
     64    for(i=0;i<3;i++)
     65      msg[i] = COMLOC_MIDI(4*midi_consume+i+1);
     66    rtems_message_queue_send(event_q, msg, 3);
     67    midi_consume = (midi_consume + 1) & 0x0f;
     68  }
     69
    6170}
    6271
     
    8897  mouse_consume = 0;
    8998  keyboard_consume = 0;
     99  midi_consume = 0;
    90100
    91101  sc = rtems_io_register_name(DEVICE_NAME, major, 0);
Note: See TracChangeset for help on using the changeset viewer.