Last change
on this file since 425 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.2 KB
|
Rev | Line | |
---|
[352] | 1 | #ifndef usb_hbth_h
|
---|
| 2 | #define usb_hbth_h
|
---|
| 3 |
|
---|
| 4 | #include <sil.h>
|
---|
| 5 | //#include "devdrv_intc.h"
|
---|
| 6 | #define INTC_ID_USBI0 73
|
---|
| 7 |
|
---|
| 8 | /*
|
---|
| 9 | * USB HOST タスクのための定数
|
---|
| 10 | */
|
---|
| 11 | #define USBHOST_PRIORITY (4)
|
---|
| 12 | #define USBHOST_STACK_SIZE 2048
|
---|
| 13 |
|
---|
[374] | 14 | enum task_event_t {
|
---|
| 15 | TASK_EVENT_START,
|
---|
| 16 | TASK_EVENT_TERMINATE,
|
---|
| 17 | TASK_EVENT_WAKEUP,
|
---|
| 18 | TASK_EVENT_TIMEOUT,
|
---|
| 19 | TASK_EVENT_TICK = 0x80,
|
---|
| 20 | };
|
---|
[352] | 21 |
|
---|
[374] | 22 | struct task_if_t {
|
---|
| 23 | void (*on_start)(struct task_if_t *task, ID tskid);
|
---|
| 24 | void (*on_end)(struct task_if_t *task);
|
---|
| 25 | int (*get_timer)(struct task_if_t *task);
|
---|
| 26 | void (*progress)(struct task_if_t *task, int elapse);
|
---|
| 27 | void (*process)(struct task_if_t *task, enum task_event_t event);
|
---|
| 28 | };
|
---|
| 29 |
|
---|
| 30 | extern struct task_if_t bt_task;
|
---|
| 31 |
|
---|
| 32 | void usbhost_init(ID tskid);
|
---|
| 33 | void usbhost_main(intptr_t exinf);
|
---|
| 34 |
|
---|
[352] | 35 | /*
|
---|
| 36 | * USB割込みハンドラ登録のための定数
|
---|
| 37 | */
|
---|
| 38 | #define INHNO_USB INTC_ID_USBI0 /* 割込みハンドラ番号 */
|
---|
| 39 | #define INTNO_USB INTC_ID_USBI0 /* 割込み番号 */
|
---|
| 40 | #define INTPRI_USB -5 /* 割込み優先度 */
|
---|
| 41 | #define INTATR_USB (TA_EDGE) /* 割込み属性 */
|
---|
| 42 |
|
---|
| 43 | void usb_interrupt_handler(void);
|
---|
| 44 | int bt_usb_hbth_bulk_write(unsigned char *packet, int size);
|
---|
| 45 | int bt_usb_hbth_control_write(unsigned char *packet, int size);
|
---|
| 46 |
|
---|
| 47 | #endif // usb_hbth_h
|
---|
Note:
See
TracBrowser
for help on using the repository browser.