Source file: /~heha/ewa/Ofen/prozess.zip/avr/o1/usb.h

#pragma once
#include <avr/io.h>
#include <avr/pgmspace.h>	// PSTR

typedef unsigned char byte;
typedef unsigned short word;
typedef unsigned long dword;
#define F(s) (PSTR(s)+0x8000)		// Flash-String, bspw. F("Hallo")
#define FP(s) (((const byte*)s)+0x8000)	// Flash-Pointer, bspw. const PROGMEM char k[]="Welt"; const char*p=FP(k); 
#define elemof(x) (sizeof(x)/sizeof(*(x)))
#define NOINIT __attribute__((section(".noinit")))

// Funktionen von usb.cpp (allgemein)
void usbInit();
void usbPoll();

void onEp0GetReport(byte reportID);
void onEp0SetReport(byte reportID);

void usbEp0Recv(byte*data, word len);
void usbEp0Send(const void*data, word len);
void usbEp1Send(const void*data, byte len);
void usbEp3Send(const void*data, byte len);

static const byte MAXPID = 4;
static const byte MAXSTEP = 20;
static const byte NETZFREQ = 50;
static const word COOKIESIZE = 256;
static const word HISTLEN = 1800;
// Cookies und History fressen RAM. TODO: In Flash verlagern
static const word KONSTLEN = 17;
Detected encoding: ASCII (7 bit)2