123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- #ifndef _MEDIACONTROL_H_
- #define _MEDIACONTROL_H_
-
- #include <avr/io.h>
- #include <avr/wdt.h>
- #include <avr/power.h>
- #include <avr/interrupt.h>
- #include <stdbool.h>
- #include <string.h>
- #include "Descriptors.h"
- #include <LUFA/Drivers/Board/Joystick.h>
- #include <LUFA/Drivers/Board/LEDs.h>
- #include <LUFA/Drivers/Board/Buttons.h>
- #include <LUFA/Drivers/USB/USB.h>
- #include <LUFA/Platform/Platform.h>
-
-
- #define LEDMASK_USB_NOTREADY LEDS_LED1
-
- #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
-
- #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
-
- #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
-
-
- typedef struct
- {
- unsigned Play : 1;
- unsigned Pause : 1;
- unsigned FForward : 1;
- unsigned Rewind : 1;
- unsigned NextTrack : 1;
- unsigned PreviousTrack : 1;
- unsigned Stop : 1;
- unsigned PlayPause : 1;
- unsigned Mute : 1;
- unsigned VolumeUp : 1;
- unsigned VolumeDown : 1;
- unsigned RESERVED : 5;
- } ATTR_PACKED USB_MediaReport_Data_t;
-
- void SetupHardware(void);
- void EVENT_USB_Device_Connect(void);
- void EVENT_USB_Device_Disconnect(void);
- void EVENT_USB_Device_ConfigurationChanged(void);
- void EVENT_USB_Device_ControlRequest(void);
- void EVENT_USB_Device_StartOfFrame(void);
- bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
- uint8_t* const ReportID,
- const uint8_t ReportType,
- void* ReportData,
- uint16_t* const ReportSize);
- void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
- const uint8_t ReportID,
- const uint8_t ReportType,
- const void* ReportData,
- const uint16_t ReportSize);
- #endif
|