Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/portable/renesas/rusb2/dcd_rusb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ static dcd_data_t _dcd;
// - Pipes 3 to 5: Bulk
// - Pipes 6 to 9: Interrupt
//
// Note: for small mcu such as
// - RA2A1: only pipe 4-7 are available, and no support for ISO
// Note: for small mcu which only support device mode
// only pipe 4-7 are available, and no support for ISO
static unsigned find_pipe(unsigned xfer_type) {
#if defined(BSP_MCU_GROUP_RA2A1)
#ifdef RUSB2_RA_USBFS_DEVICE_ONLY
const uint8_t pipe_idx_arr[4][2] = {
{ 0, 0 }, // Control
{ 0, 0 }, // Isochronous not supported
Expand Down
4 changes: 4 additions & 0 deletions src/portable/renesas/rusb2/hcd_rusb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

#if CFG_TUH_ENABLED && defined(TUP_USBIP_RUSB2)

#ifdef RUSB2_RA_USBFS_DEVICE_ONLY
#error "Host mode not supported for this device"
#endif

#include "host/hcd.h"
#include "host/usbh.h"
#include "rusb2_common.h"
Expand Down
4 changes: 2 additions & 2 deletions src/portable/renesas/rusb2/rusb2_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#elif TU_CHECK_MCU(OPT_MCU_RAXXX)
#include "rusb2_ra.h"

// Hack for D0FIFO definitions on RA Cortex-M23
#if defined(RENESAS_CORTEX_M23)
// Hack for D0FIFO definitions on RA with usb device support only
#ifdef RUSB2_RA_USBFS_DEVICE_ONLY
#define D0FIFO CFIFO
#define D0FIFOSEL CFIFOSEL
#define D0FIFOSEL_b CFIFOSEL_b
Expand Down
4 changes: 4 additions & 0 deletions src/portable/renesas/rusb2/rusb2_ra.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ extern "C" {
//
//--------------------------------------------------------------------+

#if defined(BSP_MCU_GROUP_RA2A1) || defined(BSP_MCU_GROUP_RA2L2) || defined(BSP_MCU_GROUP_RA4E2) || defined(BSP_MCU_GROUP_RA6E2) || defined(BSP_MCU_GROUP_RA6T3)
#define RUSB2_RA_USBFS_DEVICE_ONLY
#endif

typedef struct {
uint32_t reg_base;
int32_t irqnum;
Expand Down
Loading