Skip to content

Commit 9f54cc1

Browse files
committed
more clean up
1 parent d919f10 commit 9f54cc1

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/class/usbtmc/usbtmc_device.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@ TU_VERIFY_STATIC(USBTMCD_BUFFER_SIZE >= 32u,"USBTMC dev buffer size too small");
154154
static bool handle_devMsgOutStart(uint8_t rhport, void *data, size_t len);
155155
static bool handle_devMsgOut(uint8_t rhport, void *data, size_t len, size_t packetLen);
156156

157+
#ifndef NDEBUG
157158
tu_static uint8_t termChar;
159+
#endif
160+
158161
tu_static uint8_t termCharRequested = false;
159162

160163
#if OSAL_MUTEX_REQUIRED
@@ -442,7 +445,10 @@ static bool handle_devMsgIn(void *data, size_t len)
442445
usbtmc_state.transfer_size_sent = 0u;
443446

444447
termCharRequested = msg->bmTransferAttributes.TermCharEnabled;
448+
449+
#ifndef NDEBUG
445450
termChar = msg->TermChar;
451+
#endif
446452

447453
if(termCharRequested)
448454
TU_VERIFY(usbtmc_state.capabilities->bmDevCapabilities.canEndBulkInOnTermChar);
@@ -511,6 +517,7 @@ bool usbtmcd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint
511517
return true;
512518

513519
case STATE_ABORTING_BULK_OUT:
520+
// Should be stalled by now, shouldn't have received a packet.
514521
return false;
515522

516523
case STATE_TX_REQUESTED:

src/portable/raspberrypi/rp2040/rp2040_usb.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
#define __tusb_irq_path_func(x) x
3737
#endif
3838

39-
#define usb_hw_set hw_set_alias(usb_hw)
40-
#define usb_hw_clear hw_clear_alias(usb_hw)
39+
#define usb_hw_set ((usb_hw_t *) hw_set_alias(usb_hw))
40+
#define usb_hw_clear ((usb_hw_t *) hw_clear_alias(usb_hw))
4141

4242
#define pico_info(...) TU_LOG(2, __VA_ARGS__)
4343
#define pico_trace(...) TU_LOG(3, __VA_ARGS__)

0 commit comments

Comments
 (0)