generalize renesas LINK core driver

create local register access struct and move mcu specific code
	in preparation of support for other mcu families that use the LINK usb core

Signed-off-by: Rafael Silva <rafaelsilva@ajtec.pt>
This commit is contained in:
Rafael Silva
2022-03-09 11:52:39 +00:00
parent dcadbf3364
commit 03777f4a46
6 changed files with 2034 additions and 488 deletions

View File

@@ -248,6 +248,11 @@ void board_init(void)
IEN(ICU,GROUPBL0) = 1;
EN(SCI5, TEI5) = 1;
/* Enable USB0 */
SYSTEM.PRCR.WORD = SYSTEM_PRCR_PRKEY | SYSTEM_PRCR_PRC1;
MSTP(USB0) = 0;
SYSTEM.PRCR.WORD = SYSTEM_PRCR_PRKEY;
/* setup USBI0 interrupt. */
IR(USB0, USBI0) = 0;
IPR(USB0, USBI0) = IRQ_PRIORITY_USBI0;