initial commit
This commit is contained in:
24
port/moonlight/platform.h
Normal file
24
port/moonlight/platform.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "uart.h"
|
||||
#include "gen/ethmac.h"
|
||||
#include "aclint.h"
|
||||
#include "riscv-csr.h"
|
||||
#include "riscv-traps.h"
|
||||
|
||||
#define PERIPH(TYPE, ADDR) ((volatile TYPE*)(ADDR))
|
||||
#define APB_BASE 0x10000000
|
||||
#define uart PERIPH(uart_t, APB_BASE + 0x01000)
|
||||
#define aclint PERIPH(aclint_t, APB_BASE + 0x30000)
|
||||
#define ethmac0 PERIPH(ethmac_t, 0x18000000)
|
||||
#define ethmac1 PERIPH(ethmac_t, 0x18001000)
|
||||
|
||||
#define UART0_IRQ 16
|
||||
#define TIMER0_IRQ0 17
|
||||
#define TIMER0_IRQ1 18
|
||||
#define QSPI_IRQ 19
|
||||
#define I2S_IRQ 20
|
||||
#define CAM_IRQ 21
|
||||
#define DMA_IRQ 22
|
||||
#define GPIO_ORQ 23
|
||||
#define ETH0_IRQ 24
|
||||
#define ETH1_IRQ 25
|
||||
|
||||
Reference in New Issue
Block a user