diff options
| author | hathach <[email protected]> | 2018-12-05 13:20:25 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-12-05 13:20:25 +0700 |
| commit | a73017fdc23f7bedf38e754cba3a4ffbcf8d4c27 (patch) | |
| tree | 04c68202c20a45318ea61d27fede4bfd12e0beac /doxygen | |
| parent | 6048a3bff48dc588849f83f4088367d20b6bc651 (diff) | |
hal clean up
- replace tusb_hal_int_enable/disable to dcd_int_enable/disable,
hcd_int_enable/disable
- remove tusb_hal_init(), this will be part of dcd_init/hcd_init,
anything beyond dcd/hcd should be inited by bsp
Diffstat (limited to 'doxygen')
| -rw-r--r-- | doxygen/porting.md | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/doxygen/porting.md b/doxygen/porting.md index 00aad6a08..5a464fa6b 100644 --- a/doxygen/porting.md +++ b/doxygen/porting.md @@ -59,19 +59,6 @@ The OPT_OS_NONE option is the only option which requires an MCU specific functio `tusb_hal_millis` is also provided in `hw/bsp/<board name>/board_<board name>.c` because it may vary with MCU use. -### Hardware Abstraction Layer (HAL) -The hardware abstraction layer is a minimal set of abstractions used in both Device and Host USB modes. - -The HAL implementations are located in `src/portable/<vendor>/<chip family>/hal_<chip family>.c`. - -#### tusb_hal_init - -The HAL init is responsible for configuring common settings of USB peripheral such as pad calibration. - -#### tusb_hal_int_enable / tusb_hal_int_disable - -Enables or disables the USB interrupt(s). May be used to prevent concurrency issues when mutating data structures shared between main code and the interrupt handler. - ### Device API After the USB device is setup, the USB device code works by processing events on the main thread (by calling `tusb_task`). These events are queued by the USB interrupt handler. So, there are three parts to the device low-level API: device setup, endpoint setup and interrupt processing. @@ -83,6 +70,10 @@ All of the code for the low-level device API is in `src/portable/<vendor>/<chip ##### dcd_init Initializes the USB peripheral for device mode and enables it. +#### dcd_int_enable / dcd_int_disable + +Enables or disables the USB device interrupt(s). May be used to prevent concurrency issues when mutating data structures shared between main code and the interrupt handler. + ##### dcd_set_address Called when the device is given a new bus address. |
