summaryrefslogtreecommitdiff
path: root/openpcd/firmware/src/pcd_enumerate.h
blob: 31d8f289e16ec122abe0c35e6fe111b29c663510 (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
//*----------------------------------------------------------------------------
//*      ATMEL Microcontroller Software Support  -  ROUSSET  -
//*----------------------------------------------------------------------------
//* The software is delivered "AS IS" without warranty or condition of any
//* kind, either express, implied or statutory. This includes without
//* limitation any warranty or condition with respect to merchantability or
//* fitness for any particular purpose, or against the infringements of
//* intellectual property rights of others.
//*----------------------------------------------------------------------------
//* File Name           : cdc_enumerate.h
//* Object              : Handle CDC enumeration
//*
//* 1.0 Apr 20 200 	: ODi Creation
//*----------------------------------------------------------------------------
#ifndef PCD_ENUMERATE_H
#define PCD_ENUMERATE_H

#include <sys/types.h>
#include <AT91SAM7.h>

#define AT91C_EP_OUT 1
#define AT91C_EP_OUT_SIZE 0x40
#define AT91C_EP_IN  2
#define AT91C_EP_IN_SIZE 0x40
#define AT91C_EP_INT  3


typedef struct _AT91S_CDC
{
	AT91PS_UDP pUdp;
	unsigned char currentConfiguration;
	unsigned char currentConnection;
	unsigned int  currentRcvBank;
	void *ep_ctx[4];
} AT91S_CDC, *AT91PS_CDC;

//* external function description

extern void udp_init(void);
u_int8_t AT91F_UDP_IsConfigured(void);
u_int32_t AT91F_UDP_Write(u_int8_t irq, const unsigned char *pData, u_int32_t length);

#endif // CDC_ENUMERATE_H

personal git repositories of Harald Welte. Your mileage may vary