#pragma once
typedef unsigned char byte;
//typedef unsigned short ushort;
//typedef unsigned long ulong;
register byte usbCfg asm("r2");
// Bit 0: Konfiguriert ja/nein
// Bit 1: Remote Wakeup ja/nein
// Bit 6: Flash = Quelle für Deskriptordaten (sonst RAM)
// Bit 7: EEPROM = Quelle
void usbPoll();
// Daten von EP0 abholen
// Adressraum von <addr> je nach Bit 6 und 7 von usbCfg
void usbEp0Send(const void*addr, int len);
// Daten an EP0 senden
// Adressraum stets RAM
int usbEp0Recv(void*addr, int len);
void onEp0GetReport(int wValue);
void onEp0SetReport(int wValue);
bool usbEp1Send(const void*);
bool usbEp2Recv(void*);
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <avr/interrupt.h>
#define NOINIT __attribute__((section(".noinit")))
/*
#define HID_GET_REPORT 1
#define HID_SET_REPORT 9
*/
Detected encoding: ANSI (CP1252) | 4
|
|