Open FFBoard
Open source force feedback firmware
Loading...
Searching...
No Matches
rusb2_common.c
Go to the documentation of this file.
1
/*
2
* The MIT License (MIT)
3
*
4
* Copyright (c) 2023 Ha Thach (tinyusb.org)
5
*
6
* Permission is hereby granted, free of charge, to any person obtaining a copy
7
* of this software and associated documentation files (the "Software"), to deal
8
* in the Software without restriction, including without limitation the rights
9
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
* copies of the Software, and to permit persons to whom the Software is
11
* furnished to do so, subject to the following conditions:
12
*
13
* The above copyright notice and this permission notice shall be included in
14
* all copies or substantial portions of the Software.
15
*
16
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
* THE SOFTWARE.
23
*
24
* This file is part of the TinyUSB stack.
25
*/
26
27
#include "
tusb_option.h
"
28
29
#if defined(TUP_USBIP_RUSB2) && (CFG_TUH_ENABLED || CFG_TUD_ENABLED)
30
31
#include "
rusb2_type.h
"
32
33
#if TU_CHECK_MCU(OPT_MCU_RX63X, OPT_MCU_RX65X, OPT_MCU_RX72N)
34
#include "
rusb2_rx.h
"
35
36
#elif TU_CHECK_MCU(OPT_MCU_RAXXX)
37
#include "
rusb2_ra.h
"
38
39
// USBFS_INT_IRQn and USBHS_USB_INT_RESUME_IRQn are generated by FSP
40
rusb2_controller_t
rusb2_controller
[] = {
41
{ .reg_base = R_USB_FS0_BASE, .irqnum = USBFS_INT_IRQn },
42
#ifdef RUSB2_SUPPORT_HIGHSPEED
43
{ .reg_base = R_USB_HS0_BASE, .irqnum = USBHS_USB_INT_RESUME_IRQn },
44
#endif
45
};
46
47
// Application API for setting IRQ number. May throw warnings for missing prototypes.
48
void
tusb_rusb2_set_irqnum
(uint8_t rhport, int32_t irqnum) {
49
rusb2_controller
[rhport].irqnum = irqnum;
50
}
51
52
// void osal_task_delay(uint32_t msec) {
53
// R_BSP_SoftwareDelay(msec, BSP_DELAY_UNITS_MILLISECONDS);
54
// }
55
56
#else
57
#error "Unsupported MCU"
58
#endif
59
60
61
#endif
rusb2_controller
rusb2_controller_t rusb2_controller[]
Definition
rusb2_common.c:40
tusb_rusb2_set_irqnum
void tusb_rusb2_set_irqnum(uint8_t rhport, int32_t irqnum)
Definition
rusb2_common.c:48
rusb2_ra.h
rusb2_rx.h
rusb2_type.h
rusb2_controller_t
Definition
rusb2_ra.h:59
tusb_option.h
Firmware
FFBoard
USB
portable
renesas
rusb2
rusb2_common.c
Generated by
1.13.2