summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2021-05-27 19:44:10 +0700
committerGitHub <[email protected]>2021-05-27 19:44:10 +0700
commit81d238bd463c694af6ef31015107c0727805c7c7 (patch)
tree3fe4e811be63d83f8c47cc49ca6f048bd5904f4a /src/device
parent4e2684f23aacfd9a08046c2a60da50bd1af09a27 (diff)
parent7c66c5121b862443aacf7eadbef45153a3fa3060 (diff)
Merge pull request #854 from hathach/more-housekeeping
More housekeeping
Diffstat (limited to 'src/device')
-rw-r--r--src/device/dcd.h1
-rw-r--r--src/device/usbd.c2
-rw-r--r--src/device/usbd.h4
-rw-r--r--src/device/usbd_pvt.h4
4 files changed, 6 insertions, 5 deletions
diff --git a/src/device/dcd.h b/src/device/dcd.h
index 71e88054c..e17c62d4e 100644
--- a/src/device/dcd.h
+++ b/src/device/dcd.h
@@ -28,6 +28,7 @@
#define _TUSB_DCD_H_
#include "common/tusb_common.h"
+#include "osal/osal.h"
#include "common/tusb_fifo.h"
#ifdef __cplusplus
diff --git a/src/device/usbd.c b/src/device/usbd.c
index 8454a2951..71c5d4e6c 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -1271,7 +1271,7 @@ bool usbd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t
// bytes should be written and second to keep the return value free to give back a boolean
// success message. If total_bytes is too big, the FIFO will copy only what is available
// into the USB buffer!
-bool usbd_edpt_iso_xfer(uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes)
+bool usbd_edpt_xfer_fifo(uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes)
{
uint8_t const epnum = tu_edpt_number(ep_addr);
uint8_t const dir = tu_edpt_dir(ep_addr);
diff --git a/src/device/usbd.h b/src/device/usbd.h
index 53519c4de..3857295d7 100644
--- a/src/device/usbd.h
+++ b/src/device/usbd.h
@@ -70,8 +70,8 @@ bool tud_mounted(void);
bool tud_suspended(void);
// Check if device is ready to transfer
-TU_ATTR_ALWAYS_INLINE
-static inline bool tud_ready(void)
+TU_ATTR_ALWAYS_INLINE static inline
+bool tud_ready(void)
{
return tud_mounted() && !tud_suspended();
}
diff --git a/src/device/usbd_pvt.h b/src/device/usbd_pvt.h
index 44310f022..65fdadf51 100644
--- a/src/device/usbd_pvt.h
+++ b/src/device/usbd_pvt.h
@@ -73,7 +73,7 @@ void usbd_edpt_close(uint8_t rhport, uint8_t ep_addr);
bool usbd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes);
// Submit a usb ISO transfer by use of a FIFO (ring buffer) - all bytes in FIFO get transmitted
-bool usbd_edpt_iso_xfer(uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes);
+bool usbd_edpt_xfer_fifo(uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes);
// Claim an endpoint before submitting a transfer.
// If caller does not make any transfer, it must release endpoint for others.
@@ -94,7 +94,7 @@ void usbd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr);
// Check if endpoint is stalled
bool usbd_edpt_stalled(uint8_t rhport, uint8_t ep_addr);
-static inline
+TU_ATTR_ALWAYS_INLINE static inline
bool usbd_edpt_ready(uint8_t rhport, uint8_t ep_addr)
{
return !usbd_edpt_busy(rhport, ep_addr) && !usbd_edpt_stalled(rhport, ep_addr);