diff options
| author | hathach <[email protected]> | 2012-11-29 15:35:59 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2012-11-29 15:35:59 +0700 |
| commit | 360b28b44fa2ad7973f06c7f048a66a68e6cb90f (patch) | |
| tree | a80ef4f6ba6282faa2fd13cc18689667f47626e9 /tinyusb/tusb.c | |
| parent | 382cd30be2e3069a490977e1a492783188a02da0 (diff) | |
add more doxygen docs
start to use TUSB_Error_t
Diffstat (limited to 'tinyusb/tusb.c')
| -rw-r--r-- | tinyusb/tusb.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tinyusb/tusb.c b/tinyusb/tusb.c index c503876cb..f4acc7ab6 100644 --- a/tinyusb/tusb.c +++ b/tinyusb/tusb.c @@ -37,11 +37,7 @@ #include "tusb.h" -#ifdef CFG_TUSB_DEVICE - #include "device/dcd.h" -#endif - -ErrorCode_t tusb_init(void) +TUSB_Error_t tusb_init(void) { /* HARDWARE INIT */ @@ -55,8 +51,13 @@ ErrorCode_t tusb_init(void) LPC_IOCON->PIO0_6 &= ~0x07; LPC_IOCON->PIO0_6 |= (0x01<<0); /* Secondary function SoftConn */ +#ifdef CFG_TUSB_HOST + ASSERT_ERROR( hcd_init() ); +#endif + #ifdef CFG_TUSB_DEVICE - dcd_init(); + ASSERT_ERROR( dcd_init() ); #endif + return LPC_OK; } |
