Skip to content

Commit

Permalink
Fix CI.
Browse files Browse the repository at this point in the history
Signed-off-by: HiFiPhile <[email protected]>
  • Loading branch information
HiFiPhile committed Jan 25, 2025
1 parent 1d984c2 commit adb3c80
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion examples/device/audio_test_multi_rate/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion examples/device/net_lwip_webserver/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/class/audio/audio_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/class/cdc/cdc_rndis_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down
1 change: 1 addition & 0 deletions src/common/tusb_mcu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
14 changes: 8 additions & 6 deletions src/host/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
};
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/portable/sunxi/dcd_sunxi_musb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/portable/synopsys/dwc2/dwc2_stm32.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tusb_option.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
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))

0 comments on commit adb3c80

Please sign in to comment.