mirror of
https://github.com/mon/PocketVoltex.git
synced 2026-09-29 02:08:01 +03:00
45 lines
1.5 KiB
C
45 lines
1.5 KiB
C
#ifndef _POCKETVOLTEX_H_
|
|
#define _POCKETVOLTEX_H_
|
|
|
|
/* Includes: */
|
|
#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/USB/USB.h>
|
|
#include <LUFA/Platform/Platform.h>
|
|
|
|
typedef struct {
|
|
uint8_t state;
|
|
uint8_t lastReport;
|
|
uint8_t debounce;
|
|
} switch_t;
|
|
|
|
/* Function Prototypes: */
|
|
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
|
|
|