[rtems commit] PR2028: Milkymist USB: forward MIDI messages.

Gedare Bloom gedare at rtems.org
Wed Feb 29 16:16:13 UTC 2012


Hi,

I attempted my first push to rtems.git today and it appears the email
generation failed. I do see my push succeeded to the repo. Do I need
to configure something on my end, or is there some server-side
problem?

-Gedare

On Wed, Feb 29, 2012 at 11:12 AM,  <rtems-vc-owner at rtems.org> wrote:
> The rtems-vc mailing list is only for receiving automated messages
> from the RTEMS source code revision system.  No other posting is
> allowed.
>
> All discussions regarding patches, changes, etc. to RTEMS take place
> on the rtems-devel at rtems.org mailing list.
>
> In many email clients, hitting reply instead of reply all is
> sufficient to do this.
>
>
>
> ---------- Forwarded message ----------
> From: gedare at rtems.org
> To: rtems-vc at rtems.org
> Cc:
> Date: Wed, 29 Feb 2012 10:12:46 -0600
> Subject: [rtems commit] PR2028: Milkymist USB: forward MIDI messages.
> Module:    rtems
> Branch:    master
> Commit:    f7bb9f922dcebeca62fd13e4e7256f0de5296e23
> Changeset: http://git.rtems.org/rtems/commit/?id=f7bb9f922dcebeca62fd13e4e7256f0de5296e23
>
> Author:    Werner Almesberger <werner at almesberger.net>
> Date:      Wed Feb 29 11:08:44 2012 -0500
>
> PR2028: Milkymist USB: forward MIDI messages.
>
> Forward MIDI messages from the softusb controller to the application.
>
> Signed-off-by: Gedare Bloom <gedare at rtems.org>
>
> ---
>
>  .../libbsp/lm32/shared/milkymist_usbinput/comloc.h |    2 ++
>  .../lm32/shared/milkymist_usbinput/usbinput.c      |   10 ++++++++++
>  2 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/c/src/lib/libbsp/lm32/shared/milkymist_usbinput/comloc.h b/c/src/lib/libbsp/lm32/shared/milkymist_usbinput/comloc.h
> index 538022b..40362b3 100644
> --- a/c/src/lib/libbsp/lm32/shared/milkymist_usbinput/comloc.h
> +++ b/c/src/lib/libbsp/lm32/shared/milkymist_usbinput/comloc.h
> @@ -22,5 +22,7 @@
>  #define COMLOC_MEVT(offset) COMLOCV(MM_SOFTUSB_DMEM_BASE+0x1102+offset)
>  #define COMLOC_KEVT_PRODUCE    COMLOCV(MM_SOFTUSB_DMEM_BASE+0x1142)
>  #define COMLOC_KEVT(offset)    COMLOCV(MM_SOFTUSB_DMEM_BASE+0x1143+offset)
> +#define COMLOC_MIDI_PRODUCE    COMLOCV(MM_SOFTUSB_DMEM_BASE+0x1183)
> +#define COMLOC_MIDI(offset)    COMLOCV(MM_SOFTUSB_DMEM_BASE+0x1184+offset)
>
>  #endif /* __COMLOC_H_ */
> diff --git a/c/src/lib/libbsp/lm32/shared/milkymist_usbinput/usbinput.c b/c/src/lib/libbsp/lm32/shared/milkymist_usbinput/usbinput.c
> index 022d730..6931748 100644
> --- a/c/src/lib/libbsp/lm32/shared/milkymist_usbinput/usbinput.c
> +++ b/c/src/lib/libbsp/lm32/shared/milkymist_usbinput/usbinput.c
> @@ -35,6 +35,7 @@ static const unsigned char input_firmware[] = {
>
>  static int mouse_consume;
>  static int keyboard_consume;
> +static int midi_consume;
>
>  static rtems_id event_q;
>
> @@ -58,6 +59,14 @@ static rtems_isr interrupt_handler(rtems_vector_number n)
>     rtems_message_queue_send(event_q, msg, 8);
>     keyboard_consume = (keyboard_consume + 1) & 0x07;
>   }
> +
> +  while(midi_consume != COMLOC_MIDI_PRODUCE) {
> +    for(i=0;i<3;i++)
> +      msg[i] = COMLOC_MIDI(4*midi_consume+i+1);
> +    rtems_message_queue_send(event_q, msg, 3);
> +    midi_consume = (midi_consume + 1) & 0x0f;
> +  }
> +
>  }
>
>  rtems_device_driver usbinput_initialize(
> @@ -87,6 +96,7 @@ rtems_device_driver usbinput_initialize(
>
>   mouse_consume = 0;
>   keyboard_consume = 0;
> +  midi_consume = 0;
>
>   sc = rtems_io_register_name(DEVICE_NAME, major, 0);
>   RTEMS_CHECK_SC(sc, "create USB input device");
>
>




More information about the devel mailing list