reverted un-related file changes
This commit is contained in:
@@ -203,7 +203,7 @@ uint8_t rdwr10_validate_cmd(msc_cbw_t const* cbw)
|
||||
//--------------------------------------------------------------------+
|
||||
// Debug
|
||||
//--------------------------------------------------------------------+
|
||||
#if CFG_TUSB_DEBUG >= 2
|
||||
#if CFG_TUSB_DEBUG >= CFG_TUD_MSC_LOG_LEVEL
|
||||
|
||||
TU_ATTR_UNUSED tu_static tu_lookup_entry_t const _msc_scsi_cmd_lookup[] =
|
||||
{
|
||||
|
@@ -369,6 +369,8 @@ typedef struct TU_ATTR_PACKED {
|
||||
uint8_t bCopyProtect;
|
||||
} tusb_desc_video_format_uncompressed_t;
|
||||
|
||||
TU_VERIFY_STATIC(sizeof(tusb_desc_video_format_uncompressed_t) == 27, "size is not correct");
|
||||
|
||||
// Uncompressed payload specs: 3.1.2 frame descriptor
|
||||
#define tusb_desc_video_frame_uncompressed_nint_t(_nint) \
|
||||
struct TU_ATTR_PACKED { \
|
||||
@@ -382,7 +384,7 @@ typedef struct TU_ATTR_PACKED {
|
||||
uint32_t dwMinBitRate; \
|
||||
uint32_t dwMaxBitRate; \
|
||||
uint32_t dwMaxVideoFrameBufferSize; /* deprecated in 1.5 */ \
|
||||
uint32_t dwDefaultFrameInterval; \
|
||||
uint32_t dwDefaultFrameInterval; /* 100ns unit */\
|
||||
uint8_t bFrameIntervalType; \
|
||||
uint32_t dwFrameInterval[_nint]; \
|
||||
}
|
||||
@@ -414,6 +416,8 @@ typedef struct TU_ATTR_PACKED {
|
||||
uint8_t bCopyProtect;
|
||||
} tusb_desc_video_format_mjpeg_t;
|
||||
|
||||
TU_VERIFY_STATIC(sizeof(tusb_desc_video_format_mjpeg_t) == 11, "size is not correct");
|
||||
|
||||
// MJPEG payload specs: 3.1.2 frame descriptor (same as uncompressed)
|
||||
typedef tusb_desc_video_frame_uncompressed_t tusb_desc_video_frame_mjpeg_t;
|
||||
typedef tusb_desc_video_frame_uncompressed_1int_t tusb_desc_video_frame_mjpeg_1int_t;
|
||||
|
@@ -60,6 +60,7 @@ void tu_print_mem(void const *buf, uint32_t count, uint8_t indent);
|
||||
|
||||
static inline void tu_print_buf(uint8_t const* buf, uint32_t bufsize) {
|
||||
for(uint32_t i=0; i<bufsize; i++) tu_printf("%02X ", buf[i]);
|
||||
tu_printf("\r\n");
|
||||
}
|
||||
|
||||
// Log with Level
|
||||
@@ -76,7 +77,7 @@ static inline void tu_print_buf(uint8_t const* buf, uint32_t bufsize) {
|
||||
#define TU_LOG1_MEM tu_print_mem
|
||||
#define TU_LOG1_BUF(_x, _n) tu_print_buf((uint8_t const*)(_x), _n)
|
||||
#define TU_LOG1_INT(_x) tu_printf(#_x " = %ld\r\n", (unsigned long) (_x) )
|
||||
#define TU_LOG1_HEX(_x) tu_printf(#_x " = %lX\r\n", (unsigned long) (_x) )
|
||||
#define TU_LOG1_HEX(_x) tu_printf(#_x " = 0x%lX\r\n", (unsigned long) (_x) )
|
||||
|
||||
// Log Level 2: Warn
|
||||
#if CFG_TUSB_DEBUG >= 2
|
||||
|
@@ -224,6 +224,7 @@ static void _ff_push_n(tu_fifo_t* f, void const * app_buf, uint16_t n, uint16_t
|
||||
if (wrap_bytes > 0) _ff_push_const_addr(ff_buf, app_buf, wrap_bytes);
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -35,7 +35,11 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define TU_LOG_USBH(...) TU_LOG(CFG_TUH_LOG_LEVEL, __VA_ARGS__)
|
||||
#define TU_LOG_USBH(...) TU_LOG(CFG_TUH_LOG_LEVEL, __VA_ARGS__)
|
||||
#define TU_LOG_MEM_USBH(...) TU_LOG_MEM(CFG_TUH_LOG_LEVEL, __VA_ARGS__)
|
||||
#define TU_LOG_BUF_USBH(...) TU_LOG_BUF(CFG_TUH_LOG_LEVEL, __VA_ARGS__)
|
||||
#define TU_LOG_INT_USBH(...) TU_LOG_INT(CFG_TUH_LOG_LEVEL, __VA_ARGS__)
|
||||
#define TU_LOG_HEX_USBH(...) TU_LOG_HEX(CFG_TUH_LOG_LEVEL, __VA_ARGS__)
|
||||
|
||||
enum {
|
||||
USBH_EPSIZE_BULK_MAX = (TUH_OPT_HIGH_SPEED ? TUSB_EPSIZE_BULK_HS : TUSB_EPSIZE_BULK_FS)
|
||||
|
@@ -653,7 +653,11 @@ void dcd_int_handler(uint8_t rhport)
|
||||
if (NRF_USBD->EPOUTEN & USBD_EPOUTEN_ISOOUT_Msk)
|
||||
{
|
||||
iso_enabled = true;
|
||||
xact_out_dma(EP_ISO_NUM);
|
||||
// Transfer from endpoint to RAM only if data is not corrupted
|
||||
if ((int_status & USBD_INTEN_USBEVENT_Msk) == 0 ||
|
||||
(NRF_USBD->EVENTCAUSE & USBD_EVENTCAUSE_ISOOUTCRC_Msk) == 0) {
|
||||
xact_out_dma(EP_ISO_NUM);
|
||||
}
|
||||
}
|
||||
|
||||
// ISOIN: Notify client that data was transferred
|
||||
@@ -683,7 +687,7 @@ void dcd_int_handler(uint8_t rhport)
|
||||
{
|
||||
TU_LOG(3, "EVENTCAUSE = 0x%04lX\r\n", NRF_USBD->EVENTCAUSE);
|
||||
|
||||
enum { EVT_CAUSE_MASK = USBD_EVENTCAUSE_SUSPEND_Msk | USBD_EVENTCAUSE_RESUME_Msk | USBD_EVENTCAUSE_USBWUALLOWED_Msk };
|
||||
enum { EVT_CAUSE_MASK = USBD_EVENTCAUSE_SUSPEND_Msk | USBD_EVENTCAUSE_RESUME_Msk | USBD_EVENTCAUSE_USBWUALLOWED_Msk | USBD_EVENTCAUSE_ISOOUTCRC_Msk };
|
||||
uint32_t const evt_cause = NRF_USBD->EVENTCAUSE & EVT_CAUSE_MASK;
|
||||
NRF_USBD->EVENTCAUSE = evt_cause; // clear interrupt
|
||||
|
||||
|
@@ -83,7 +83,7 @@ typedef struct TU_ATTR_ALIGNED(16)
|
||||
volatile uint32_t condition_code : 4;
|
||||
|
||||
// Word 1
|
||||
volatile uint8_t* current_buffer_pointer;
|
||||
uint8_t* volatile current_buffer_pointer;
|
||||
|
||||
// Word 2 : next TD
|
||||
volatile uint32_t next;
|
||||
|
Reference in New Issue
Block a user