LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Common Class Definitions

Macros

#define MIDI_STANDARD_VELOCITY   64
 
#define MIDI_CHANNEL(channel)   ((channel) - 1)
 

Typedefs

struct {
   USB_Descriptor_Header_t   Header
 
   uint8_t   Subtype
 
   uint16_t   AudioSpecification
 
   uint16_t   TotalLength
 
USB_MIDI_Descriptor_AudioInterface_AS_t
 
struct {
   uint8_t   bLength
 
   uint8_t   bDescriptorType
 
   uint8_t   bDescriptorSubtype
 
   uint16_t   bcdMSC
 
   uint16_t   wTotalLength
 
USB_MIDI_StdDescriptor_AudioInterface_AS_t
 
struct {
   USB_Descriptor_Header_t   Header
 
   uint8_t   Subtype
 
   uint8_t   JackType
 
   uint8_t   JackID
 
   uint8_t   JackStrIndex
 
USB_MIDI_Descriptor_InputJack_t
 
struct {
   uint8_t   bLength
 
   uint8_t   bDescriptorType
 
   uint8_t   bDescriptorSubtype
 
   uint8_t   bJackType
 
   uint8_t   bJackID
 
   uint8_t   iJack
 
USB_MIDI_StdDescriptor_InputJack_t
 
struct {
   USB_Descriptor_Header_t   Header
 
   uint8_t   Subtype
 
   uint8_t   JackType
 
   uint8_t   JackID
 
   uint8_t   NumberOfPins
 
   uint8_t   SourceJackID [1]
 
   uint8_t   SourcePinID [1]
 
   uint8_t   JackStrIndex
 
USB_MIDI_Descriptor_OutputJack_t
 
struct {
   uint8_t   bLength
 
   uint8_t   bDescriptorType
 
   uint8_t   bDescriptorSubtype
 
   uint8_t   bJackType
 
   uint8_t   bJackID
 
   uint8_t   bNrInputPins
 
   uint8_t   baSourceID [1]
 
   uint8_t   baSourcePin [1]
 
   uint8_t   iJack
 
USB_MIDI_StdDescriptor_OutputJack_t
 
struct {
   USB_Descriptor_Header_t   Header
 
   uint8_t   Subtype
 
   uint8_t   TotalEmbeddedJacks
 
   uint8_t   AssociatedJackID [1]
 
USB_MIDI_Descriptor_Jack_Endpoint_t
 
struct {
   uint8_t   bLength
 
   uint8_t   bDescriptorType
 
   uint8_t   bDescriptorSubtype
 
   uint8_t   bNumEmbMIDIJack
 
   uint8_t   bAssocJackID [1]
 
USB_MIDI_StdDescriptor_Jack_Endpoint_t
 
struct {
   unsigned   Command: 4
 
   unsigned   CableNumber: 4
 
   uint8_t   Data1
 
   uint8_t   Data2
 
   uint8_t   Data3
 
MIDI_EventPacket_t
 

Enumerations

enum  MIDI_JackTypes_t { MIDI_JACKTYPE_Embedded = 0x01, MIDI_JACKTYPE_External = 0x02 }
 

MIDI Command Values

#define MIDI_COMMAND_NOTE_ON   0x90
 
#define MIDI_COMMAND_NOTE_OFF   0x80
 

Detailed Description

Module Description

Constants, Types and Enum definitions that are common to both Device and Host modes for the USB MIDI Class.

Macro Definition Documentation

#define MIDI_CHANNEL (   channel)    ((channel) - 1)

Convenience macro. MIDI channels are numbered from 1-10 (natural numbers) however the logical channel addresses are zero-indexed. This converts a natural MIDI channel number into the logical channel address.

Parameters
channelMIDI channel number to address.

Definition at line 81 of file MIDIClassCommon.h.

#define MIDI_COMMAND_NOTE_OFF   0x80

MIDI command for a note off (deactivation) event.

Definition at line 70 of file MIDIClassCommon.h.

#define MIDI_COMMAND_NOTE_ON   0x90

MIDI command for a note on (activation) event.

Definition at line 67 of file MIDIClassCommon.h.

#define MIDI_STANDARD_VELOCITY   64

Standard key press velocity value used for all note events.

Definition at line 74 of file MIDIClassCommon.h.

Typedef Documentation

typedef { ... } MIDI_EventPacket_t

Enumeration Type Documentation

Enum for the possible MIDI jack types in a MIDI device jack descriptor.

Enumerator:
MIDI_JACKTYPE_Embedded 

MIDI class descriptor jack type value for an embedded (logical) MIDI input or output jack.

MIDI_JACKTYPE_External 

MIDI class descriptor jack type value for an external (physical) MIDI input or output jack.

Definition at line 85 of file MIDIClassCommon.h.