SummerCart64/fw/cpu/controller/init.c

18 lines
368 B
C
Raw Normal View History

2021-08-27 21:43:30 +02:00
#include "sys.h"
void init (void) {
DMA->SCR = DMA_SCR_STOP;
USB->SCR = USB_SCR_FLUSH_TX | USB_SCR_FLUSH_TX;
GPIO->ODR = 0;
GPIO->OER = (1 << 0);
CFG->SCR = CFG_SCR_SDRAM_SWITCH;
2021-08-28 04:15:48 +02:00
CFG->DD_OFFSET = DEFAULT_DD_OFFSET;
CFG->SAVE_OFFSET = DEFAULT_SAVE_OFFSET;
2021-08-27 21:43:30 +02:00
while (!(UART->SCR & UART_SCR_TXE));
UART->DR = '$';
}