mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
fomu: csr: add version with next_ev register
The Fomu bitstream now includes a `USB_NEXT_EV` register to indicate which is the next logical event to process. Add this register to the CSR definition. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
913032ae1d
commit
77cf0b5bfd
@ -1,5 +1,5 @@
|
||||
//--------------------------------------------------------------------------------
|
||||
// Auto-generated by Migen (f4fcd10) & LiteX (1425a68d) on 2019-10-30 21:48:57
|
||||
// Auto-generated by Migen (f4fcd10) & LiteX (1425a68d) on 2019-11-01 12:04:21
|
||||
//--------------------------------------------------------------------------------
|
||||
#ifndef __GENERATED_CSR_H
|
||||
#define __GENERATED_CSR_H
|
||||
@ -362,31 +362,45 @@ static inline void usb_address_write(unsigned char value) {
|
||||
}
|
||||
#define CSR_USB_ADDRESS_ADDR_OFFSET 0
|
||||
#define CSR_USB_ADDRESS_ADDR_SIZE 7
|
||||
#define CSR_USB_SETUP_DATA_ADDR 0xe0004808L
|
||||
#define CSR_USB_NEXT_EV_ADDR 0xe0004808L
|
||||
#define CSR_USB_NEXT_EV_SIZE 1
|
||||
static inline unsigned char usb_next_ev_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004808L);
|
||||
return r;
|
||||
}
|
||||
#define CSR_USB_NEXT_EV_IN_OFFSET 0
|
||||
#define CSR_USB_NEXT_EV_IN_SIZE 1
|
||||
#define CSR_USB_NEXT_EV_OUT_OFFSET 1
|
||||
#define CSR_USB_NEXT_EV_OUT_SIZE 1
|
||||
#define CSR_USB_NEXT_EV_SETUP_OFFSET 2
|
||||
#define CSR_USB_NEXT_EV_SETUP_SIZE 1
|
||||
#define CSR_USB_NEXT_EV_RESET_OFFSET 3
|
||||
#define CSR_USB_NEXT_EV_RESET_SIZE 1
|
||||
#define CSR_USB_SETUP_DATA_ADDR 0xe000480cL
|
||||
#define CSR_USB_SETUP_DATA_SIZE 1
|
||||
static inline unsigned char usb_setup_data_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004808L);
|
||||
unsigned char r = csr_readl(0xe000480cL);
|
||||
return r;
|
||||
}
|
||||
#define CSR_USB_SETUP_DATA_DATA_OFFSET 0
|
||||
#define CSR_USB_SETUP_DATA_DATA_SIZE 8
|
||||
#define CSR_USB_SETUP_CTRL_ADDR 0xe000480cL
|
||||
#define CSR_USB_SETUP_CTRL_ADDR 0xe0004810L
|
||||
#define CSR_USB_SETUP_CTRL_SIZE 1
|
||||
static inline unsigned char usb_setup_ctrl_read(void) {
|
||||
unsigned char r = csr_readl(0xe000480cL);
|
||||
unsigned char r = csr_readl(0xe0004810L);
|
||||
return r;
|
||||
}
|
||||
static inline void usb_setup_ctrl_write(unsigned char value) {
|
||||
csr_writel(value, 0xe000480cL);
|
||||
csr_writel(value, 0xe0004810L);
|
||||
}
|
||||
#define CSR_USB_SETUP_CTRL_ACK_OFFSET 1
|
||||
#define CSR_USB_SETUP_CTRL_ACK_SIZE 1
|
||||
#define CSR_USB_SETUP_CTRL_RESET_OFFSET 5
|
||||
#define CSR_USB_SETUP_CTRL_RESET_SIZE 1
|
||||
#define CSR_USB_SETUP_STATUS_ADDR 0xe0004810L
|
||||
#define CSR_USB_SETUP_STATUS_ADDR 0xe0004814L
|
||||
#define CSR_USB_SETUP_STATUS_SIZE 1
|
||||
static inline unsigned char usb_setup_status_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004810L);
|
||||
unsigned char r = csr_readl(0xe0004814L);
|
||||
return r;
|
||||
}
|
||||
#define CSR_USB_SETUP_STATUS_EPNO_OFFSET 0
|
||||
@ -399,63 +413,63 @@ static inline unsigned char usb_setup_status_read(void) {
|
||||
#define CSR_USB_SETUP_STATUS_IS_IN_SIZE 1
|
||||
#define CSR_USB_SETUP_STATUS_DATA_OFFSET 7
|
||||
#define CSR_USB_SETUP_STATUS_DATA_SIZE 1
|
||||
#define CSR_USB_SETUP_EV_STATUS_ADDR 0xe0004814L
|
||||
#define CSR_USB_SETUP_EV_STATUS_ADDR 0xe0004818L
|
||||
#define CSR_USB_SETUP_EV_STATUS_SIZE 1
|
||||
static inline unsigned char usb_setup_ev_status_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004814L);
|
||||
return r;
|
||||
}
|
||||
static inline void usb_setup_ev_status_write(unsigned char value) {
|
||||
csr_writel(value, 0xe0004814L);
|
||||
}
|
||||
#define CSR_USB_SETUP_EV_PENDING_ADDR 0xe0004818L
|
||||
#define CSR_USB_SETUP_EV_PENDING_SIZE 1
|
||||
static inline unsigned char usb_setup_ev_pending_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004818L);
|
||||
return r;
|
||||
}
|
||||
static inline void usb_setup_ev_pending_write(unsigned char value) {
|
||||
static inline void usb_setup_ev_status_write(unsigned char value) {
|
||||
csr_writel(value, 0xe0004818L);
|
||||
}
|
||||
#define CSR_USB_SETUP_EV_ENABLE_ADDR 0xe000481cL
|
||||
#define CSR_USB_SETUP_EV_ENABLE_SIZE 1
|
||||
static inline unsigned char usb_setup_ev_enable_read(void) {
|
||||
#define CSR_USB_SETUP_EV_PENDING_ADDR 0xe000481cL
|
||||
#define CSR_USB_SETUP_EV_PENDING_SIZE 1
|
||||
static inline unsigned char usb_setup_ev_pending_read(void) {
|
||||
unsigned char r = csr_readl(0xe000481cL);
|
||||
return r;
|
||||
}
|
||||
static inline void usb_setup_ev_enable_write(unsigned char value) {
|
||||
static inline void usb_setup_ev_pending_write(unsigned char value) {
|
||||
csr_writel(value, 0xe000481cL);
|
||||
}
|
||||
#define CSR_USB_IN_DATA_ADDR 0xe0004820L
|
||||
#define CSR_USB_IN_DATA_SIZE 1
|
||||
static inline unsigned char usb_in_data_read(void) {
|
||||
#define CSR_USB_SETUP_EV_ENABLE_ADDR 0xe0004820L
|
||||
#define CSR_USB_SETUP_EV_ENABLE_SIZE 1
|
||||
static inline unsigned char usb_setup_ev_enable_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004820L);
|
||||
return r;
|
||||
}
|
||||
static inline void usb_in_data_write(unsigned char value) {
|
||||
static inline void usb_setup_ev_enable_write(unsigned char value) {
|
||||
csr_writel(value, 0xe0004820L);
|
||||
}
|
||||
#define CSR_USB_IN_DATA_DATA_OFFSET 0
|
||||
#define CSR_USB_IN_DATA_DATA_SIZE 8
|
||||
#define CSR_USB_IN_CTRL_ADDR 0xe0004824L
|
||||
#define CSR_USB_IN_CTRL_SIZE 1
|
||||
static inline unsigned char usb_in_ctrl_read(void) {
|
||||
#define CSR_USB_IN_DATA_ADDR 0xe0004824L
|
||||
#define CSR_USB_IN_DATA_SIZE 1
|
||||
static inline unsigned char usb_in_data_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004824L);
|
||||
return r;
|
||||
}
|
||||
static inline void usb_in_ctrl_write(unsigned char value) {
|
||||
static inline void usb_in_data_write(unsigned char value) {
|
||||
csr_writel(value, 0xe0004824L);
|
||||
}
|
||||
#define CSR_USB_IN_DATA_DATA_OFFSET 0
|
||||
#define CSR_USB_IN_DATA_DATA_SIZE 8
|
||||
#define CSR_USB_IN_CTRL_ADDR 0xe0004828L
|
||||
#define CSR_USB_IN_CTRL_SIZE 1
|
||||
static inline unsigned char usb_in_ctrl_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004828L);
|
||||
return r;
|
||||
}
|
||||
static inline void usb_in_ctrl_write(unsigned char value) {
|
||||
csr_writel(value, 0xe0004828L);
|
||||
}
|
||||
#define CSR_USB_IN_CTRL_EPNO_OFFSET 0
|
||||
#define CSR_USB_IN_CTRL_EPNO_SIZE 4
|
||||
#define CSR_USB_IN_CTRL_RESET_OFFSET 5
|
||||
#define CSR_USB_IN_CTRL_RESET_SIZE 1
|
||||
#define CSR_USB_IN_CTRL_STALL_OFFSET 6
|
||||
#define CSR_USB_IN_CTRL_STALL_SIZE 1
|
||||
#define CSR_USB_IN_STATUS_ADDR 0xe0004828L
|
||||
#define CSR_USB_IN_STATUS_ADDR 0xe000482cL
|
||||
#define CSR_USB_IN_STATUS_SIZE 1
|
||||
static inline unsigned char usb_in_status_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004828L);
|
||||
unsigned char r = csr_readl(0xe000482cL);
|
||||
return r;
|
||||
}
|
||||
#define CSR_USB_IN_STATUS_IDLE_OFFSET 0
|
||||
@ -464,49 +478,49 @@ static inline unsigned char usb_in_status_read(void) {
|
||||
#define CSR_USB_IN_STATUS_HAVE_SIZE 1
|
||||
#define CSR_USB_IN_STATUS_PEND_OFFSET 5
|
||||
#define CSR_USB_IN_STATUS_PEND_SIZE 1
|
||||
#define CSR_USB_IN_EV_STATUS_ADDR 0xe000482cL
|
||||
#define CSR_USB_IN_EV_STATUS_ADDR 0xe0004830L
|
||||
#define CSR_USB_IN_EV_STATUS_SIZE 1
|
||||
static inline unsigned char usb_in_ev_status_read(void) {
|
||||
unsigned char r = csr_readl(0xe000482cL);
|
||||
return r;
|
||||
}
|
||||
static inline void usb_in_ev_status_write(unsigned char value) {
|
||||
csr_writel(value, 0xe000482cL);
|
||||
}
|
||||
#define CSR_USB_IN_EV_PENDING_ADDR 0xe0004830L
|
||||
#define CSR_USB_IN_EV_PENDING_SIZE 1
|
||||
static inline unsigned char usb_in_ev_pending_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004830L);
|
||||
return r;
|
||||
}
|
||||
static inline void usb_in_ev_pending_write(unsigned char value) {
|
||||
static inline void usb_in_ev_status_write(unsigned char value) {
|
||||
csr_writel(value, 0xe0004830L);
|
||||
}
|
||||
#define CSR_USB_IN_EV_ENABLE_ADDR 0xe0004834L
|
||||
#define CSR_USB_IN_EV_ENABLE_SIZE 1
|
||||
static inline unsigned char usb_in_ev_enable_read(void) {
|
||||
#define CSR_USB_IN_EV_PENDING_ADDR 0xe0004834L
|
||||
#define CSR_USB_IN_EV_PENDING_SIZE 1
|
||||
static inline unsigned char usb_in_ev_pending_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004834L);
|
||||
return r;
|
||||
}
|
||||
static inline void usb_in_ev_enable_write(unsigned char value) {
|
||||
static inline void usb_in_ev_pending_write(unsigned char value) {
|
||||
csr_writel(value, 0xe0004834L);
|
||||
}
|
||||
#define CSR_USB_OUT_DATA_ADDR 0xe0004838L
|
||||
#define CSR_USB_IN_EV_ENABLE_ADDR 0xe0004838L
|
||||
#define CSR_USB_IN_EV_ENABLE_SIZE 1
|
||||
static inline unsigned char usb_in_ev_enable_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004838L);
|
||||
return r;
|
||||
}
|
||||
static inline void usb_in_ev_enable_write(unsigned char value) {
|
||||
csr_writel(value, 0xe0004838L);
|
||||
}
|
||||
#define CSR_USB_OUT_DATA_ADDR 0xe000483cL
|
||||
#define CSR_USB_OUT_DATA_SIZE 1
|
||||
static inline unsigned char usb_out_data_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004838L);
|
||||
unsigned char r = csr_readl(0xe000483cL);
|
||||
return r;
|
||||
}
|
||||
#define CSR_USB_OUT_DATA_DATA_OFFSET 0
|
||||
#define CSR_USB_OUT_DATA_DATA_SIZE 8
|
||||
#define CSR_USB_OUT_CTRL_ADDR 0xe000483cL
|
||||
#define CSR_USB_OUT_CTRL_ADDR 0xe0004840L
|
||||
#define CSR_USB_OUT_CTRL_SIZE 1
|
||||
static inline unsigned char usb_out_ctrl_read(void) {
|
||||
unsigned char r = csr_readl(0xe000483cL);
|
||||
unsigned char r = csr_readl(0xe0004840L);
|
||||
return r;
|
||||
}
|
||||
static inline void usb_out_ctrl_write(unsigned char value) {
|
||||
csr_writel(value, 0xe000483cL);
|
||||
csr_writel(value, 0xe0004840L);
|
||||
}
|
||||
#define CSR_USB_OUT_CTRL_EPNO_OFFSET 0
|
||||
#define CSR_USB_OUT_CTRL_EPNO_SIZE 4
|
||||
@ -516,10 +530,10 @@ static inline void usb_out_ctrl_write(unsigned char value) {
|
||||
#define CSR_USB_OUT_CTRL_RESET_SIZE 1
|
||||
#define CSR_USB_OUT_CTRL_STALL_OFFSET 6
|
||||
#define CSR_USB_OUT_CTRL_STALL_SIZE 1
|
||||
#define CSR_USB_OUT_STATUS_ADDR 0xe0004840L
|
||||
#define CSR_USB_OUT_STATUS_ADDR 0xe0004844L
|
||||
#define CSR_USB_OUT_STATUS_SIZE 1
|
||||
static inline unsigned char usb_out_status_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004840L);
|
||||
unsigned char r = csr_readl(0xe0004844L);
|
||||
return r;
|
||||
}
|
||||
#define CSR_USB_OUT_STATUS_EPNO_OFFSET 0
|
||||
@ -528,43 +542,43 @@ static inline unsigned char usb_out_status_read(void) {
|
||||
#define CSR_USB_OUT_STATUS_HAVE_SIZE 1
|
||||
#define CSR_USB_OUT_STATUS_PEND_OFFSET 5
|
||||
#define CSR_USB_OUT_STATUS_PEND_SIZE 1
|
||||
#define CSR_USB_OUT_EV_STATUS_ADDR 0xe0004844L
|
||||
#define CSR_USB_OUT_EV_STATUS_ADDR 0xe0004848L
|
||||
#define CSR_USB_OUT_EV_STATUS_SIZE 1
|
||||
static inline unsigned char usb_out_ev_status_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004844L);
|
||||
return r;
|
||||
}
|
||||
static inline void usb_out_ev_status_write(unsigned char value) {
|
||||
csr_writel(value, 0xe0004844L);
|
||||
}
|
||||
#define CSR_USB_OUT_EV_PENDING_ADDR 0xe0004848L
|
||||
#define CSR_USB_OUT_EV_PENDING_SIZE 1
|
||||
static inline unsigned char usb_out_ev_pending_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004848L);
|
||||
return r;
|
||||
}
|
||||
static inline void usb_out_ev_pending_write(unsigned char value) {
|
||||
static inline void usb_out_ev_status_write(unsigned char value) {
|
||||
csr_writel(value, 0xe0004848L);
|
||||
}
|
||||
#define CSR_USB_OUT_EV_ENABLE_ADDR 0xe000484cL
|
||||
#define CSR_USB_OUT_EV_ENABLE_SIZE 1
|
||||
static inline unsigned char usb_out_ev_enable_read(void) {
|
||||
#define CSR_USB_OUT_EV_PENDING_ADDR 0xe000484cL
|
||||
#define CSR_USB_OUT_EV_PENDING_SIZE 1
|
||||
static inline unsigned char usb_out_ev_pending_read(void) {
|
||||
unsigned char r = csr_readl(0xe000484cL);
|
||||
return r;
|
||||
}
|
||||
static inline void usb_out_ev_enable_write(unsigned char value) {
|
||||
static inline void usb_out_ev_pending_write(unsigned char value) {
|
||||
csr_writel(value, 0xe000484cL);
|
||||
}
|
||||
#define CSR_USB_OUT_ENABLE_STATUS_ADDR 0xe0004850L
|
||||
#define CSR_USB_OUT_ENABLE_STATUS_SIZE 1
|
||||
static inline unsigned char usb_out_enable_status_read(void) {
|
||||
#define CSR_USB_OUT_EV_ENABLE_ADDR 0xe0004850L
|
||||
#define CSR_USB_OUT_EV_ENABLE_SIZE 1
|
||||
static inline unsigned char usb_out_ev_enable_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004850L);
|
||||
return r;
|
||||
}
|
||||
#define CSR_USB_OUT_STALL_STATUS_ADDR 0xe0004854L
|
||||
static inline void usb_out_ev_enable_write(unsigned char value) {
|
||||
csr_writel(value, 0xe0004850L);
|
||||
}
|
||||
#define CSR_USB_OUT_ENABLE_STATUS_ADDR 0xe0004854L
|
||||
#define CSR_USB_OUT_ENABLE_STATUS_SIZE 1
|
||||
static inline unsigned char usb_out_enable_status_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004854L);
|
||||
return r;
|
||||
}
|
||||
#define CSR_USB_OUT_STALL_STATUS_ADDR 0xe0004858L
|
||||
#define CSR_USB_OUT_STALL_STATUS_SIZE 1
|
||||
static inline unsigned char usb_out_stall_status_read(void) {
|
||||
unsigned char r = csr_readl(0xe0004854L);
|
||||
unsigned char r = csr_readl(0xe0004858L);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user