Skip to content

Commit 7b6b813

Browse files
committed
Fix CI.
Signed-off-by: HiFiPhile <[email protected]>
1 parent 1d984c2 commit 7b6b813

File tree

9 files changed

+18
-15
lines changed

9 files changed

+18
-15
lines changed

examples/device/net_lwip_webserver/src/tusb_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ extern "C" {
8181
#endif
8282

8383
#ifndef CFG_TUSB_MEM_ALIGN
84-
#define CFG_TUSB_MEM_ALIGN __attribute__((aligned(4)))
84+
#define CFG_TUSB_MEM_ALIGN 4
8585
#endif
8686

8787
// Use different configurations to test all net devices (also due to resource limitations)

src/class/audio/audio_device.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@
111111
#if USE_LINEAR_BUFFER || CFG_TUD_AUDIO_ENABLE_ENCODING
112112
#define IN_SW_BUF_MEM_ATTR TU_ATTR_ALIGNED(4)
113113
#else
114-
#define IN_SW_BUF_MEM_ATTR CFG_TUD_MEM_SECTION CFG_TUD_MEM_ALIGN
114+
#define IN_SW_BUF_MEM_ATTR CFG_TUD_MEM_SECTION
115115
#endif
116116
#if USE_LINEAR_BUFFER || CFG_TUD_AUDIO_ENABLE_DECODING
117117
#define OUT_SW_BUF_MEM_ATTR TU_ATTR_ALIGNED(4)
118118
#else
119-
#define OUT_SW_BUF_MEM_ATTR CFG_TUD_MEM_SECTION CFG_TUD_MEM_ALIGN
119+
#define OUT_SW_BUF_MEM_ATTR CFG_TUD_MEM_SECTION
120120
#endif
121121

122122
// EP IN software buffers and mutexes

src/class/cdc/cdc_rndis_host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
#define RNDIS_MSG_PAYLOAD_MAX (1024*4)
5252

5353
CFG_TUH_MEM_SECTION static uint8_t msg_notification[CFG_TUH_DEVICE_MAX][8];
54-
CFG_TUH_MEM_SECTION CFG_TUH_MEM_ALIGN static uint8_t msg_payload[RNDIS_MSG_PAYLOAD_MAX];
54+
CFG_TUH_MEM_SECTION TU_ATTR_ALIGNED(CFG_TUH_MEM_ALIGN) static uint8_t msg_payload[RNDIS_MSG_PAYLOAD_MAX];
5555

5656
static rndish_data_t rndish_data[CFG_TUH_DEVICE_MAX];
5757

src/common/tusb_mcu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@
225225
#define CFG_TUSB_MEM_DCACHE_LINE_SIZE 32
226226

227227
#elif TU_CHECK_MCU(OPT_MCU_STM32H7)
228+
#include "stm32h7xx.h"
228229
#define TUP_USBIP_DWC2
229230
#define TUP_USBIP_DWC2_STM32
230231

src/host/hub.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ typedef struct
4646
uint8_t ep_in;
4747
uint8_t port_count;
4848

49-
CFG_TUH_MEM_ALIGN uint8_t status_change;
50-
CFG_TUH_MEM_ALIGN hub_port_status_response_t port_status;
51-
CFG_TUH_MEM_ALIGN hub_status_response_t hub_status;
49+
TUH_EPBUF_TYPE_DEF(uint8_t, status_change);
50+
TUH_EPBUF_TYPE_DEF(hub_port_status_response_t, port_status);
51+
TUH_EPBUF_TYPE_DEF(hub_status_response_t, hub_status);
5252
} hub_interface_t;
5353

5454
CFG_TUH_MEM_SECTION static hub_interface_t hub_data[CFG_TUH_HUB];
55-
CFG_TUH_MEM_SECTION CFG_TUH_MEM_ALIGN static uint8_t _hub_buffer[sizeof(descriptor_hub_desc_t)];
55+
CFG_TUD_MEM_SECTION static struct {
56+
TUD_EPBUF_DEF(buf, sizeof(descriptor_hub_desc_t));
57+
} _hub_buffer;
5658

5759
TU_ATTR_ALWAYS_INLINE
5860
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)
271273
.daddr = dev_addr,
272274
.ep_addr = 0,
273275
.setup = &request,
274-
.buffer = _hub_buffer,
276+
.buffer = _hub_buffer.buf,
275277
.complete_cb = config_set_port_power,
276278
.user_data = 0
277279
};
@@ -289,7 +291,7 @@ static void config_set_port_power (tuh_xfer_t* xfer)
289291
hub_interface_t* p_hub = get_itf(daddr);
290292

291293
// only use number of ports in hub descriptor
292-
descriptor_hub_desc_t const* desc_hub = (descriptor_hub_desc_t const*) _hub_buffer;
294+
descriptor_hub_desc_t const* desc_hub = (descriptor_hub_desc_t const*) _hub_buffer.buf;
293295
p_hub->port_count = desc_hub->bNbrPorts;
294296

295297
// May need to GET_STATUS

src/portable/sunxi/dcd_sunxi_musb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ typedef struct TU_ATTR_PACKED
6060

6161
typedef struct
6262
{
63-
CFG_TUD_MEM_ALIGN tusb_control_request_t setup_packet;
63+
TU_ATTR_ALIGNED(CFG_TUD_MEM_ALIGN) tusb_control_request_t setup_packet;
6464
uint16_t remaining_ctrl; /* The number of bytes remaining in data stage of control transfer. */
6565
int8_t status_out;
6666
pipe_state_t pipe0;
@@ -352,7 +352,7 @@ static void USBC_INT_DisableRxEp(u8 ep_index)
352352
* INTERNAL FUNCTION DECLARATION
353353
*------------------------------------------------------------------*/
354354

355-
CFG_TUD_MEM_ALIGN static dcd_data_t _dcd;
355+
TU_ATTR_ALIGNED(CFG_TUD_MEM_ALIGN) static dcd_data_t _dcd;
356356

357357
static inline free_block_t *find_containing_block(free_block_t *beg, free_block_t *end, uint_fast16_t addr)
358358
{

src/portable/synopsys/dwc2/dwc2_stm32.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ TU_ATTR_ALWAYS_INLINE static inline uint32_t round_up_to_cache_line_size(uint32_
304304
}
305305

306306
TU_ATTR_ALWAYS_INLINE static inline bool is_cache_mem(uintptr_t addr) {
307-
for (int i = 0; i < TU_ARRAY_SIZE(uncached_regions); i++) {
307+
for (unsigned int i = 0; i < TU_ARRAY_SIZE(uncached_regions); i++) {
308308
if (addr >= uncached_regions[i].start && addr <= uncached_regions[i].start)
309309
return false;
310310
}

src/tusb_option.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@
408408

409409
#ifndef CFG_TUSB_MEM_DCACHE_LINE_SIZE
410410
#ifndef CFG_TUSB_MEM_DCACHE_LINE_SIZE_DEFAULT
411-
#define CFG_TUSB_MEM_DCACHE_LINE_SIZE_DEFAULT 32
411+
#define CFG_TUSB_MEM_DCACHE_LINE_SIZE_DEFAULT 4
412412
#endif
413413

414414
#define CFG_TUSB_MEM_DCACHE_LINE_SIZE CFG_TUSB_MEM_DCACHE_LINE_SIZE_DEFAULT

test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
if result:
77
if api.init_winusb_device(None, 0xcafe, 0x4020):
88
print("found")
9-
api.control_transfer(UsbSetupPacket(0x00, 0x03, 0x2, 0x04 << 8, 0))
9+
api.control_transfer(UsbSetupPacket(0x00, 0x03, 0x2, 0x04 << 8, 0))

0 commit comments

Comments
 (0)