forked from mist-devel/mist-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcdc_enumerate.h
34 lines (27 loc) · 1.3 KB
/
cdc_enumerate.h
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
//*----------------------------------------------------------------------------
//* 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 CDC_ENUMERATE_H
#define CDC_ENUMERATE_H
#include <inttypes.h>
#define AT91C_EP_OUT_SIZE 0x40
#define AT91C_EP_OUT 1
#define AT91C_EP_IN_SIZE 0x40
#define AT91C_EP_IN 2
void usb_cdc_open(void);
unsigned char usb_cdc_is_configured(void);
unsigned int usb_cdc_write(const char *pData, unsigned int length);
uint16_t usb_cdc_read(char *pData, uint16_t length);
#define usb_cdc_poll() usb_cdc_is_configured()
#endif // CDC_ENUMERATE_H