blob: 9876f142fcb1710766c675a3a6e089583a8f0090 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
/*
*/
#include "USBMidiTransport.h"
#include <util/delay.h>
/** LUFA MIDI Class driver interface configuration and state information. This structure is
* passed to all MIDI Class driver functions, so that multiple instances of the same class
* within a device can be differentiated from one another.
*/
volatile uint8_t myMidiChannel=DEFAULT_MIDI_CHANNEL;
volatile uint8_t myMidiDevice=DEFAULT_MIDI_DEVICE;
volatile uint8_t myMidiCable=DEFAULT_MIDI_CABLE;
volatile uint8_t myMidiID[]={ARDUINO_MMA_VENDOR_1 ,ARDUINO_MMA_VENDOR_2,ARDUINO_MMA_VENDOR_3};
volatile uint8_t mySysexBuffer[MAX_SYSEX_SIZE];
volatile uint8_t mySysexBufferIndex;
/** Main program entry point. This routine contains the overall program flow, including initial
* setup of all components and the main program loop.
*/
void initBlinkingLights(void);
void initBlinkingLights(void){
DDRB=0xff;
PORTB=0x0f;
_delay_ms(1000) ;
PORTB=0xf0;
_delay_ms(1500) ;
PORTB=0x0f;
_delay_ms(1000) ;
PORTB=0xcc;
_delay_ms(1500) ;
PORTB=0xff;
_delay_ms(1000) ;
PORTB=0x00;
_delay_ms(1500) ;
}
int main(void)
{
initBlinkingLights();
InitializeUSBMidi();
for (;;)
{
USBMidiEventAvailable();
}
}
|