Contiki-NG
usb-arch.h
1#ifndef USB_ARCH_H_0Z52ZDP0H6__
2#define USB_ARCH_H_0Z52ZDP0H6__
3
4#include <contiki-conf.h>
5#include <usb-api.h>
6
7
8/* Includes control endpoint 0 */
9#ifndef USB_MAX_ENDPOINTS
10#define USB_MAX_ENDPOINTS 4
11#endif
12
13#ifndef CTRL_EP_SIZE
14#define CTRL_EP_SIZE 8
15#endif
16
17#ifndef USB_EP1_SIZE
18#define USB_EP1_SIZE 8
19#endif
20#ifndef USB_EP2_SIZE
21#define USB_EP2_SIZE 8
22#endif
23#ifndef USB_EP3_SIZE
24#define USB_EP3_SIZE 8
25#endif
26#ifndef USB_EP4_SIZE
27#define USB_EP4_SIZE 0
28#endif
29#ifndef USB_EP5_SIZE
30#define USB_EP5_SIZE 0
31#endif
32#ifndef USB_EP6_SIZE
33#define USB_EP6_SIZE 0
34#endif
35#ifndef USB_EP7_SIZE
36#define USB_EP7_SIZE 0
37#endif
38
39
40#ifndef MAX_CTRL_DATA
41#define MAX_CTRL_DATA 128
42#endif
43
44void
45usb_arch_setup(void);
46
47void
48usb_arch_setup_control_endpoint(uint8_t addr);
49
50void
51usb_arch_setup_bulk_endpoint(uint8_t addr);
52
53void
54usb_arch_setup_interrupt_endpoint(uint8_t addr);
55
56void
57usb_arch_disable_endpoint(uint8_t addr);
58
59void
60usb_arch_discard_all_buffers(uint8_t addr);
61
62/* Stall a control endpoint. The stall will be cleared when the next
63 SETUP token arrives. */
64void
65usb_arch_control_stall(uint8_t addr);
66
67/* Set or remove a HALT condition on an endpoint */
68void
69usb_arch_halt_endpoint(uint8_t addr, int halt);
70
71void
72usb_arch_set_configuration(uint8_t usb_configuration_value);
73
74uint16_t
75usb_arch_get_ep_status(uint8_t addr);
76
77void
78usb_arch_set_address(uint8_t addr);
79
80
81/* Select what process should be polled when a global event occurs. Intended for the protocol handler. Applications should use usb_set_global_event_process */
82void
83usb_arch_set_global_event_process(struct process *p);
84
85unsigned int
86usb_arch_get_global_events(void);
87
88/* Return true if not all data has been sent to the host */
89int
90usb_arch_send_pending(uint8_t ep_addr);
91
92#endif /* USB_ARCH_H_0Z52ZDP0H6__ */
static uip_ds6_addr_t * addr
Pointer to a nbr cache entry.
Definition: uip-nd6.c:107