diff options
| author | hathach <[email protected]> | 2018-03-13 16:30:53 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-03-13 16:30:53 +0700 |
| commit | ffca1f5e64b2206c2f006a7912c27ae3ee0f9d26 (patch) | |
| tree | 67dcd91b51ca7995a32745fee3bb5ce50f3de940 /tinyusb | |
| parent | 2435abb0a8496361fb08cdaa4234e9d205add186 (diff) | |
working on nrf52
Diffstat (limited to 'tinyusb')
| -rw-r--r-- | tinyusb/osal/osal_none.h | 6 | ||||
| -rw-r--r-- | tinyusb/tusb.c | 8 | ||||
| -rw-r--r-- | tinyusb/tusb_dcd.h | 3 | ||||
| -rw-r--r-- | tinyusb/tusb_hal.h | 11 |
4 files changed, 7 insertions, 21 deletions
diff --git a/tinyusb/osal/osal_none.h b/tinyusb/osal/osal_none.h index 229c51b99..f640c470a 100644 --- a/tinyusb/osal/osal_none.h +++ b/tinyusb/osal/osal_none.h @@ -204,11 +204,11 @@ static inline void osal_queue_flush(osal_queue_t const queue_hdl) else\
return TUSB_ERROR_OSAL_WAITING;\
} else{\
- /*TODO mutex lock tusb_hal_init_disable */\
+ /*TODO mutex lock tusb_hal_int_disable */\
memcpy(p_data, queue_hdl->buffer + (queue_hdl->rd_idx * queue_hdl->item_size), queue_hdl->item_size);\
queue_hdl->rd_idx = (queue_hdl->rd_idx + 1) % queue_hdl->depth;\
queue_hdl->count--;\
- /*TODO mutex unlock tusb_hal_init_enable */\
+ /*TODO mutex unlock tusb_hal_int_enable */\
*(p_error) = TUSB_ERROR_NONE;\
}\
}while(0)
@@ -258,7 +258,7 @@ static inline void osal_semaphore_reset(osal_semaphore_t sem_hdl) else\
return TUSB_ERROR_OSAL_WAITING;\
} else{\
- if (sem_hdl->count) sem_hdl->count--; /*TODO mutex tusb_hal_init_disable consideration*/\
+ if (sem_hdl->count) sem_hdl->count--; /*TODO mutex tusb_hal_int_disable consideration*/\
*(p_error) = TUSB_ERROR_NONE;\
}\
}while(0)
diff --git a/tinyusb/tusb.c b/tinyusb/tusb.c index b9af2092f..29f1ade95 100644 --- a/tinyusb/tusb.c +++ b/tinyusb/tusb.c @@ -52,14 +52,6 @@ tusb_error_t tusb_init(void) ASSERT_STATUS ( usbd_init() ); // device stack init
#endif
-#if (TUSB_CFG_CONTROLLER_0_MODE)
- tusb_hal_init_enable(0);
-#endif
-
-#if (TUSB_CFG_CONTROLLER_1_MODE)
- tusb_hal_init_enable(1);
-#endif
-
return TUSB_ERROR_NONE;
}
diff --git a/tinyusb/tusb_dcd.h b/tinyusb/tusb_dcd.h index 8776c3348..084ab04b5 100644 --- a/tinyusb/tusb_dcd.h +++ b/tinyusb/tusb_dcd.h @@ -43,8 +43,7 @@ #ifndef _TUSB_DCD_H_
#define _TUSB_DCD_H_
-#include <stdint.h>
-#include <stdbool.h>
+#include "common/tusb_common.h"
#ifdef __cplusplus
extern "C" {
diff --git a/tinyusb/tusb_hal.h b/tinyusb/tusb_hal.h index b36cb29f3..b85763cd4 100644 --- a/tinyusb/tusb_hal.h +++ b/tinyusb/tusb_hal.h @@ -46,12 +46,7 @@ extern "C" { //--------------------------------------------------------------------+
// INCLUDES
//--------------------------------------------------------------------+
-#include "tusb_option.h"
-#include <stdbool.h>
-#include <stdint.h>
-
-#include "common/tusb_errors.h"
-#include "common/compiler/compiler.h"
+#include "common/tusb_common.h"
//--------------------------------------------------------------------+
// HAL API
@@ -73,12 +68,12 @@ bool tusb_hal_init(void); /** \brief Enable USB Interrupt on a specific USB Controller
* \param[in] port is a zero-based index to identify USB controller's ID
*/
-void tusb_hal_init_enable(uint8_t port);
+void tusb_hal_int_enable(uint8_t port);
/** \brief Disable USB Interrupt on a specific USB Controller
* \param[in] port is a zero-based index to identify USB controller's ID
*/
-void tusb_hal_init_disable(uint8_t port);
+void tusb_hal_int_disable(uint8_t port);
uint32_t tusb_hal_tick_get(void);
|
