Last change
on this file since 429 was 374, checked in by coas-nagasima, 5 years ago |
mbed関連を更新
シリアルドライバをmbedのHALを使うよう変更
ファイルディスクリプタの処理を更新
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-chdr;charset=UTF-8
|
File size:
1.1 KB
|
Line | |
---|
1 | #ifndef usb_hbth_h
|
---|
2 | #define usb_hbth_h
|
---|
3 |
|
---|
4 | #include <sil.h>
|
---|
5 | #include "rx630.h"
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * USB HOST タスクのための定数
|
---|
9 | */
|
---|
10 | #define USBHOST_PRIORITY (4)
|
---|
11 | #define USBHOST_STACK_SIZE 2048
|
---|
12 |
|
---|
13 | enum task_event_t {
|
---|
14 | TASK_EVENT_START,
|
---|
15 | TASK_EVENT_TERMINATE,
|
---|
16 | TASK_EVENT_WAKEUP,
|
---|
17 | TASK_EVENT_TIMEOUT,
|
---|
18 | TASK_EVENT_TICK = 0x80,
|
---|
19 | };
|
---|
20 |
|
---|
21 | struct task_if_t {
|
---|
22 | void (*on_start)(struct task_if_t *task, ID tskid);
|
---|
23 | void (*on_end)(struct task_if_t *task);
|
---|
24 | int (*get_timer)(struct task_if_t *task);
|
---|
25 | void (*progress)(struct task_if_t *task, int elapse);
|
---|
26 | void (*process)(struct task_if_t *task, enum task_event_t event);
|
---|
27 | };
|
---|
28 |
|
---|
29 | extern struct task_if_t bt_task;
|
---|
30 |
|
---|
31 | void usbhost_init(ID tskid);
|
---|
32 | void usbhost_main(intptr_t exinf);
|
---|
33 |
|
---|
34 | /*
|
---|
35 | * USB割込みハンドラ登録のための定数
|
---|
36 | */
|
---|
37 | #define INHNO_USB INT_USB0_USBI0 /* 割込みハンドラ番号 */
|
---|
38 | #define INTNO_USB INT_USB0_USBI0 /* 割込み番号 */
|
---|
39 | #define INTPRI_USB -5 /* 割込み優先度 */
|
---|
40 | #define INTATR_USB (TA_EDGE) /* 割込み属性 */
|
---|
41 |
|
---|
42 | void usb_interrupt_handler(void);
|
---|
43 | int bt_usb_hbth_bulk_write(unsigned char *packet, int size);
|
---|
44 | int bt_usb_hbth_control_write(unsigned char *packet, int size);
|
---|
45 |
|
---|
46 | #endif // usb_hbth_h
|
---|
Note:
See
TracBrowser
for help on using the repository browser.