mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-19 15:40:41 +00:00
fix ci with usbh and unit test
This commit is contained in:
parent
96d2be905b
commit
1e99480ad2
@ -578,9 +578,9 @@ bool tuh_control_xfer (tuh_xfer_t* xfer)
|
|||||||
|
|
||||||
TU_ATTR_ALWAYS_INLINE static inline void _set_control_xfer_stage(uint8_t stage)
|
TU_ATTR_ALWAYS_INLINE static inline void _set_control_xfer_stage(uint8_t stage)
|
||||||
{
|
{
|
||||||
osal_mutex_lock(_usbh_mutex, OSAL_TIMEOUT_WAIT_FOREVER);
|
(void) osal_mutex_lock(_usbh_mutex, OSAL_TIMEOUT_WAIT_FOREVER);
|
||||||
_ctrl_xfer.stage = stage;
|
_ctrl_xfer.stage = stage;
|
||||||
osal_mutex_unlock(_usbh_mutex);
|
(void) osal_mutex_unlock(_usbh_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _xfer_complete(uint8_t daddr, xfer_result_t result)
|
static void _xfer_complete(uint8_t daddr, xfer_result_t result)
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "unity.h"
|
#include "unity.h"
|
||||||
|
|
||||||
// Files to test
|
// Files to test
|
||||||
|
#include "osal/osal.h"
|
||||||
#include "tusb_fifo.h"
|
#include "tusb_fifo.h"
|
||||||
#include "tusb.h"
|
#include "tusb.h"
|
||||||
#include "usbd.h"
|
#include "usbd.h"
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "unity.h"
|
#include "unity.h"
|
||||||
|
|
||||||
// Files to test
|
// Files to test
|
||||||
|
#include "osal/osal.h"
|
||||||
#include "tusb_fifo.h"
|
#include "tusb_fifo.h"
|
||||||
#include "tusb.h"
|
#include "tusb.h"
|
||||||
#include "usbd.h"
|
#include "usbd.h"
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "unity.h"
|
#include "unity.h"
|
||||||
|
|
||||||
|
#include "osal/osal.h"
|
||||||
#include "tusb_fifo.h"
|
#include "tusb_fifo.h"
|
||||||
|
|
||||||
#define FIFO_SIZE 10
|
#define FIFO_SIZE 10
|
||||||
@ -315,4 +317,4 @@ void test_rd_idx_wrap()
|
|||||||
n = tu_fifo_read_n(&ff10, dst, 4);
|
n = tu_fifo_read_n(&ff10, dst, 4);
|
||||||
TEST_ASSERT_EQUAL(n, 2);
|
TEST_ASSERT_EQUAL(n, 2);
|
||||||
TEST_ASSERT_EQUAL(ff10.rd_idx, 6);
|
TEST_ASSERT_EQUAL(ff10.rd_idx, 6);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user