Mercurial > louis > kiibohd-controller
annotate Output/pjrcUSB/arm/usb_dev.h @ 104:e84738d174bc
Moving USB to Output in preparation for additional Output types.
* Initial cli code
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Sun, 19 Jan 2014 16:40:36 -0800 |
parents | |
children | 2c1a9e6ae70e |
rev | line source |
---|---|
104
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
1 #ifndef _usb_dev_h_ |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
2 #define _usb_dev_h_ |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
3 |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
4 // This header is NOT meant to be included when compiling |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
5 // user sketches in Arduino. The low-level functions |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
6 // provided by usb_dev.c are meant to be called only by |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
7 // code which provides higher-level interfaces to the user. |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
8 |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
9 #include "usb_mem.h" |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
10 #include "usb_desc.h" |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
11 |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
12 void usb_init(void); |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
13 uint8_t usb_configured(void); // is the USB port configured |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
14 void usb_isr(void); |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
15 usb_packet_t *usb_rx(uint32_t endpoint); |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
16 uint32_t usb_rx_byte_count(uint32_t endpoint); |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
17 uint32_t usb_tx_byte_count(uint32_t endpoint); |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
18 uint32_t usb_tx_packet_count(uint32_t endpoint); |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
19 void usb_tx(uint32_t endpoint, usb_packet_t *packet); |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
20 void usb_tx_isr(uint32_t endpoint, usb_packet_t *packet); |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
21 |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
22 extern volatile uint8_t usb_configuration; |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
23 |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
24 #ifdef CDC_DATA_INTERFACE |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
25 extern uint8_t usb_cdc_line_coding[7]; |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
26 extern volatile uint8_t usb_cdc_line_rtsdtr; |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
27 extern volatile uint8_t usb_cdc_transmit_flush_timer; |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
28 extern void usb_serial_flush_callback(void); |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
29 #endif |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
30 |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
31 |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
32 #endif |
e84738d174bc
Moving USB to Output in preparation for additional Output types.
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
33 |