summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-03-10 17:58:39 +0700
committerhathach <[email protected]>2021-03-10 17:58:39 +0700
commita397353916db36d925f5aec654fc66d5ca09f427 (patch)
tree64058a36905c754b6db49443870c97418053c839
parente864bda6272485a33398ebf0f139607bf244f237 (diff)
fix ci build with rp2040
-rw-r--r--src/common/tusb_fifo.h2
-rw-r--r--src/device/dcd.h5
-rw-r--r--src/osal/osal_pico.h4
-rw-r--r--src/portable/raspberrypi/rp2040/dcd_rp2040.c3
4 files changed, 8 insertions, 6 deletions
diff --git a/src/common/tusb_fifo.h b/src/common/tusb_fifo.h
index 0276c8044..62ee942d2 100644
--- a/src/common/tusb_fifo.h
+++ b/src/common/tusb_fifo.h
@@ -109,7 +109,7 @@ static inline void tu_fifo_config_mutex(tu_fifo_t *f, tu_fifo_mutex_t write_mute
bool tu_fifo_write (tu_fifo_t* f, void const * p_data);
uint16_t tu_fifo_write_n (tu_fifo_t* f, void const * p_data, uint16_t n);
-uint16_t tu_fifo_write_n_const_addr (tu_fifo_t* f, const void * data, uint16_t n);
+uint16_t tu_fifo_write_n_const_addr (tu_fifo_t* f, const void * data, uint16_t n);
bool tu_fifo_read (tu_fifo_t* f, void * p_buffer);
uint16_t tu_fifo_read_n (tu_fifo_t* f, void * p_buffer, uint16_t n);
diff --git a/src/device/dcd.h b/src/device/dcd.h
index 89f8760d0..1e5b3ff1e 100644
--- a/src/device/dcd.h
+++ b/src/device/dcd.h
@@ -134,8 +134,9 @@ void dcd_edpt_close (uint8_t rhport, uint8_t ep_addr) TU_ATTR_WEAK;
// Submit a transfer, When complete dcd_event_xfer_complete() is invoked to notify the stack
bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes);
-// Submit an ISO transfer, When complete dcd_event_xfer_complete() is invoked to notify the stack
-bool dcd_edpt_xfer_fifo (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes);
+// Submit an transfer using fifo, When complete dcd_event_xfer_complete() is invoked to notify the stack
+// This API is optional, may be useful for register-based for transferring data.
+bool dcd_edpt_xfer_fifo (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes) TU_ATTR_WEAK;
// Stall endpoint
void dcd_edpt_stall (uint8_t rhport, uint8_t ep_addr);
diff --git a/src/osal/osal_pico.h b/src/osal/osal_pico.h
index c277af271..bae1217eb 100644
--- a/src/osal/osal_pico.h
+++ b/src/osal/osal_pico.h
@@ -143,7 +143,7 @@ static inline bool osal_queue_receive(osal_queue_t qhdl, void* data)
// TODO: revisit... docs say that mutexes are never used from IRQ context,
// however osal_queue_recieve may be. therefore my assumption is that
// the fifo mutex is not populated for queues used from an IRQ context
- assert(!qhdl->ff.mutex);
+ //assert(!qhdl->ff.mutex);
_osal_q_lock(qhdl);
bool success = tu_fifo_read(&qhdl->ff, data);
@@ -157,7 +157,7 @@ static inline bool osal_queue_send(osal_queue_t qhdl, void const * data, bool in
// TODO: revisit... docs say that mutexes are never used from IRQ context,
// however osal_queue_recieve may be. therefore my assumption is that
// the fifo mutex is not populated for queues used from an IRQ context
- assert(!qhdl->ff.mutex);
+ //assert(!qhdl->ff.mutex);
_osal_q_lock(qhdl);
bool success = tu_fifo_write(&qhdl->ff, data);
diff --git a/src/portable/raspberrypi/rp2040/dcd_rp2040.c b/src/portable/raspberrypi/rp2040/dcd_rp2040.c
index f844a0c65..7731078b5 100644
--- a/src/portable/raspberrypi/rp2040/dcd_rp2040.c
+++ b/src/portable/raspberrypi/rp2040/dcd_rp2040.c
@@ -35,7 +35,8 @@
#include "pico/fix/rp2040_usb_device_enumeration.h"
#endif
-
+#include "osal/osal.h"
+#include "common/tusb_fifo.h"
#include "device/dcd.h"
/*------------------------------------------------------------------*/