Esempio n. 1
0
void __ISR(_EXTERNAL_0_VECTOR, ipl1) INT0Interrupt(void) {
    //tft_fillScreen(ILI9340_BLACK); //240x320 vertical display
//w    count++;

    // clear interrupt flag
    mINT0ClearIntFlag();
}
Esempio n. 2
0
//------------------------------PMP Handler-------------------------------------
void __ISR(_EXTERNAL_0_VECTOR, IPL6) GetSlaveData(void){
    unsigned char pitch, vel;
    PMPMasterRead();
    pitch = mPMPMasterReadByte();
    
    vel = mPMPMasterReadByte();

    if(!USBHandleBusy(USBTxHandle))
    {
        midiData.Val = 0;   //must set all unused values to 0

        midiData.CableNumber = 0;
        midiData.CodeIndexNumber = MIDI_CIN_NOTE_ON;
        midiData.DATA_0 = 0x90;                     //Note on
        midiData.DATA_1 = pitch + 60;               //pitch
        midiData.DATA_2 = vel;                      //velocity

        USBTxHandle = USBTxOnePacket(MIDI_EP,(BYTE*)&midiData,4);
    }

    mINT0ClearIntFlag();
}