mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-16 23:43:23 +00:00
Fix CI.
Signed-off-by: HiFiPhile <admin@hifiphile.com>
This commit is contained in:
parent
1d984c2829
commit
adb3c808f5
@ -85,7 +85,7 @@ audio_control_range_2_n_t(1) volumeRng[CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX+1];
|
||||
|
||||
|
||||
// Audio test data
|
||||
CFG_TUD_MEM_ALIGN uint8_t test_buffer_audio[CFG_TUD_AUDIO_FUNC_1_EP_IN_SZ_MAX];
|
||||
TU_ATTR_ALIGNED(CFG_TUD_MEM_ALIGN) uint8_t test_buffer_audio[CFG_TUD_AUDIO_FUNC_1_EP_IN_SZ_MAX];
|
||||
uint16_t startVal = 0;
|
||||
|
||||
void led_blinking_task(void);
|
||||
|
@ -81,7 +81,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef CFG_TUSB_MEM_ALIGN
|
||||
#define CFG_TUSB_MEM_ALIGN __attribute__((aligned(4)))
|
||||
#define CFG_TUSB_MEM_ALIGN 4
|
||||
#endif
|
||||
|
||||
// Use different configurations to test all net devices (also due to resource limitations)
|
||||
|
@ -111,12 +111,12 @@
|
||||
#if USE_LINEAR_BUFFER || CFG_TUD_AUDIO_ENABLE_ENCODING
|
||||
#define IN_SW_BUF_MEM_ATTR TU_ATTR_ALIGNED(4)
|
||||
#else
|
||||
#define IN_SW_BUF_MEM_ATTR CFG_TUD_MEM_SECTION CFG_TUD_MEM_ALIGN
|
||||
#define IN_SW_BUF_MEM_ATTR CFG_TUD_MEM_SECTION
|
||||
#endif
|
||||
#if USE_LINEAR_BUFFER || CFG_TUD_AUDIO_ENABLE_DECODING
|
||||
#define OUT_SW_BUF_MEM_ATTR TU_ATTR_ALIGNED(4)
|
||||
#else
|
||||
#define OUT_SW_BUF_MEM_ATTR CFG_TUD_MEM_SECTION CFG_TUD_MEM_ALIGN
|
||||
#define OUT_SW_BUF_MEM_ATTR CFG_TUD_MEM_SECTION
|
||||
#endif
|
||||
|
||||
// EP IN software buffers and mutexes
|
||||
|
@ -51,7 +51,7 @@
|
||||
#define RNDIS_MSG_PAYLOAD_MAX (1024*4)
|
||||
|
||||
CFG_TUH_MEM_SECTION static uint8_t msg_notification[CFG_TUH_DEVICE_MAX][8];
|
||||
CFG_TUH_MEM_SECTION CFG_TUH_MEM_ALIGN static uint8_t msg_payload[RNDIS_MSG_PAYLOAD_MAX];
|
||||
CFG_TUH_MEM_SECTION TU_ATTR_ALIGNED(CFG_TUH_MEM_ALIGN) static uint8_t msg_payload[RNDIS_MSG_PAYLOAD_MAX];
|
||||
|
||||
static rndish_data_t rndish_data[CFG_TUH_DEVICE_MAX];
|
||||
|
||||
|
@ -225,6 +225,7 @@
|
||||
#define CFG_TUSB_MEM_DCACHE_LINE_SIZE 32
|
||||
|
||||
#elif TU_CHECK_MCU(OPT_MCU_STM32H7)
|
||||
#include "stm32h7xx.h"
|
||||
#define TUP_USBIP_DWC2
|
||||
#define TUP_USBIP_DWC2_STM32
|
||||
|
||||
|
@ -46,13 +46,15 @@ typedef struct
|
||||
uint8_t ep_in;
|
||||
uint8_t port_count;
|
||||
|
||||
CFG_TUH_MEM_ALIGN uint8_t status_change;
|
||||
CFG_TUH_MEM_ALIGN hub_port_status_response_t port_status;
|
||||
CFG_TUH_MEM_ALIGN hub_status_response_t hub_status;
|
||||
TUH_EPBUF_TYPE_DEF(uint8_t, status_change);
|
||||
TUH_EPBUF_TYPE_DEF(hub_port_status_response_t, port_status);
|
||||
TUH_EPBUF_TYPE_DEF(hub_status_response_t, hub_status);
|
||||
} hub_interface_t;
|
||||
|
||||
CFG_TUH_MEM_SECTION static hub_interface_t hub_data[CFG_TUH_HUB];
|
||||
CFG_TUH_MEM_SECTION CFG_TUH_MEM_ALIGN static uint8_t _hub_buffer[sizeof(descriptor_hub_desc_t)];
|
||||
CFG_TUD_MEM_SECTION static struct {
|
||||
TUD_EPBUF_DEF(buf, sizeof(descriptor_hub_desc_t));
|
||||
} _hub_buffer;
|
||||
|
||||
TU_ATTR_ALWAYS_INLINE
|
||||
static inline hub_interface_t* get_itf(uint8_t dev_addr)
|
||||
@ -271,7 +273,7 @@ bool hub_set_config(uint8_t dev_addr, uint8_t itf_num)
|
||||
.daddr = dev_addr,
|
||||
.ep_addr = 0,
|
||||
.setup = &request,
|
||||
.buffer = _hub_buffer,
|
||||
.buffer = _hub_buffer.buf,
|
||||
.complete_cb = config_set_port_power,
|
||||
.user_data = 0
|
||||
};
|
||||
@ -289,7 +291,7 @@ static void config_set_port_power (tuh_xfer_t* xfer)
|
||||
hub_interface_t* p_hub = get_itf(daddr);
|
||||
|
||||
// only use number of ports in hub descriptor
|
||||
descriptor_hub_desc_t const* desc_hub = (descriptor_hub_desc_t const*) _hub_buffer;
|
||||
descriptor_hub_desc_t const* desc_hub = (descriptor_hub_desc_t const*) _hub_buffer.buf;
|
||||
p_hub->port_count = desc_hub->bNbrPorts;
|
||||
|
||||
// May need to GET_STATUS
|
||||
|
@ -60,7 +60,7 @@ typedef struct TU_ATTR_PACKED
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CFG_TUD_MEM_ALIGN tusb_control_request_t setup_packet;
|
||||
TU_ATTR_ALIGNED(CFG_TUD_MEM_ALIGN) tusb_control_request_t setup_packet;
|
||||
uint16_t remaining_ctrl; /* The number of bytes remaining in data stage of control transfer. */
|
||||
int8_t status_out;
|
||||
pipe_state_t pipe0;
|
||||
@ -352,7 +352,7 @@ static void USBC_INT_DisableRxEp(u8 ep_index)
|
||||
* INTERNAL FUNCTION DECLARATION
|
||||
*------------------------------------------------------------------*/
|
||||
|
||||
CFG_TUD_MEM_ALIGN static dcd_data_t _dcd;
|
||||
TU_ATTR_ALIGNED(CFG_TUD_MEM_ALIGN) static dcd_data_t _dcd;
|
||||
|
||||
static inline free_block_t *find_containing_block(free_block_t *beg, free_block_t *end, uint_fast16_t addr)
|
||||
{
|
||||
|
@ -304,7 +304,7 @@ TU_ATTR_ALWAYS_INLINE static inline uint32_t round_up_to_cache_line_size(uint32_
|
||||
}
|
||||
|
||||
TU_ATTR_ALWAYS_INLINE static inline bool is_cache_mem(uintptr_t addr) {
|
||||
for (int i = 0; i < TU_ARRAY_SIZE(uncached_regions); i++) {
|
||||
for (unsigned int i = 0; i < TU_ARRAY_SIZE(uncached_regions); i++) {
|
||||
if (addr >= uncached_regions[i].start && addr <= uncached_regions[i].start)
|
||||
return false;
|
||||
}
|
||||
|
@ -408,7 +408,7 @@
|
||||
|
||||
#ifndef CFG_TUSB_MEM_DCACHE_LINE_SIZE
|
||||
#ifndef CFG_TUSB_MEM_DCACHE_LINE_SIZE_DEFAULT
|
||||
#define CFG_TUSB_MEM_DCACHE_LINE_SIZE_DEFAULT 32
|
||||
#define CFG_TUSB_MEM_DCACHE_LINE_SIZE_DEFAULT 4
|
||||
#endif
|
||||
|
||||
#define CFG_TUSB_MEM_DCACHE_LINE_SIZE CFG_TUSB_MEM_DCACHE_LINE_SIZE_DEFAULT
|
||||
|
2
test.py
2
test.py
@ -6,4 +6,4 @@ result = api.list_usb_devices(deviceinterface=True, present=True)
|
||||
if result:
|
||||
if api.init_winusb_device(None, 0xcafe, 0x4020):
|
||||
print("found")
|
||||
api.control_transfer(UsbSetupPacket(0x00, 0x03, 0x2, 0x04 << 8, 0))
|
||||
api.control_transfer(UsbSetupPacket(0x00, 0x03, 0x2, 0x04 << 8, 0))
|
||||
|
Loading…
x
Reference in New Issue
Block a user