summaryrefslogtreecommitdiff
path: root/openpcd/firmware/src/pcd_enumerate.h
diff options
context:
space:
mode:
Diffstat (limited to 'openpcd/firmware/src/pcd_enumerate.h')
-rw-r--r--openpcd/firmware/src/pcd_enumerate.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/openpcd/firmware/src/pcd_enumerate.h b/openpcd/firmware/src/pcd_enumerate.h
index 31d8f28..d08ba65 100644
--- a/openpcd/firmware/src/pcd_enumerate.h
+++ b/openpcd/firmware/src/pcd_enumerate.h
@@ -17,6 +17,8 @@
#include <sys/types.h>
#include <AT91SAM7.h>
+#include <asm/atomic.h>
+#include "src/openpcd.h"
#define AT91C_EP_OUT 1
#define AT91C_EP_OUT_SIZE 0x40
@@ -24,6 +26,11 @@
#define AT91C_EP_IN_SIZE 0x40
#define AT91C_EP_INT 3
+struct ep_ctx {
+ atomic_t pkts_in_transit;
+ void *ctx;
+};
+
typedef struct _AT91S_CDC
{
@@ -31,14 +38,18 @@ typedef struct _AT91S_CDC
unsigned char currentConfiguration;
unsigned char currentConnection;
unsigned int currentRcvBank;
- void *ep_ctx[4];
+ struct ep_ctx ep[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);
+
+//u_int32_t AT91F_UDP_Write(u_int8_t irq, const unsigned char *pData, u_int32_t length);
+
+extern int udp_refill_ep(int ep, struct req_ctx *rctx);
+extern void udp_unthrottle(void);
#endif // CDC_ENUMERATE_H
personal git repositories of Harald Welte. Your mileage may vary