diff options
| author | Ha Thach <[email protected]> | 2022-02-26 14:34:18 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-02-26 14:34:18 +0700 |
| commit | 244154e08760dcdcc469bde03df63a898c55ec8b (patch) | |
| tree | f02ed548c7a84013f7f9dc5453fea4bbf9c9c649 /src/portable | |
| parent | 5b7a01ba79f7a048ddea3b5dedf187746cd21225 (diff) | |
| parent | 5414cf275ba48c4b01a245dd9d18a52966e7c313 (diff) | |
Merge pull request #1311 from Wini-Buh/CCRX_Ext
Solve problems with CCRX toolchain
Diffstat (limited to 'src/portable')
| -rw-r--r-- | src/portable/renesas/usba/dcd_usba.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/portable/renesas/usba/dcd_usba.c b/src/portable/renesas/usba/dcd_usba.c index eb3541af4..330f65348 100644 --- a/src/portable/renesas/usba/dcd_usba.c +++ b/src/portable/renesas/usba/dcd_usba.c @@ -494,7 +494,11 @@ static bool process_pipe_xfer(int buffer_type, uint8_t ep_addr, void* buffer, ui while (USB0.D0FIFOSEL.BIT.CURPIPE) ; /* if CURPIPE bits changes, check written value */ } } else { +#if defined(__CCRX__) + __evenaccess volatile reg_pipetre_t *pt = get_pipetre(num); +#else volatile reg_pipetre_t *pt = get_pipetre(num); +#endif if (pt) { const unsigned mps = edpt_max_packet_size(num); volatile uint16_t *ctr = get_pipectr(num); @@ -715,11 +719,11 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * ep_desc) *ctr = 0; unsigned cfg = (dir << 4) | epn; if (xfer == TUSB_XFER_BULK) { - cfg |= USB_PIPECFG_BULK | USB_PIPECFG_SHTNAK | USB_PIPECFG_DBLB; + cfg |= (USB_PIPECFG_BULK | USB_PIPECFG_SHTNAK | USB_PIPECFG_DBLB); } else if (xfer == TUSB_XFER_INTERRUPT) { cfg |= USB_PIPECFG_INT; } else { - cfg |= USB_PIPECFG_ISO | USB_PIPECFG_DBLB; + cfg |= (USB_PIPECFG_ISO | USB_PIPECFG_DBLB); } USB0.PIPECFG.WORD = cfg; USB0.BRDYSTS.WORD = 0x1FFu ^ TU_BIT(num); |
