123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802 |
- #ifndef __HW_USB_H__
- #define __HW_USB_H__
- #define USB_ADDR 0x40089000
- #define USB_POW 0x40089004
-
- #define USB_IIF 0x40089008
-
- #define USB_OIF 0x40089010
-
- #define USB_CIF 0x40089018
- #define USB_IIE 0x4008901C
-
- #define USB_OIE 0x40089024
-
- #define USB_CIE 0x4008902C
-
- #define USB_FRML 0x40089030
- #define USB_FRMH 0x40089034
- #define USB_INDEX 0x40089038
-
-
- #define USB_CTRL 0x4008903C
- #define USB_MAXI 0x40089040
-
-
- #define USB_CS0_CSIL 0x40089044
-
-
-
-
- #define USB_CSIH 0x40089048
-
-
- #define USB_MAXO 0x4008904C
-
-
- #define USB_CSOL 0x40089050
-
-
- #define USB_CSOH 0x40089054
-
-
- #define USB_CNT0_CNTL 0x40089058
-
-
-
-
-
- #define USB_CNTH 0x4008905C
-
-
-
- #define USB_F0 0x40089080
- #define USB_F1 0x40089088
- #define USB_F2 0x40089090
- #define USB_F3 0x40089098
- #define USB_F4 0x400890A0
- #define USB_F5 0x400890A8
- #define USB_ADDR_UPDATE 0x00000080
-
-
-
-
- #define USB_ADDR_UPDATE_M 0x00000080
- #define USB_ADDR_UPDATE_S 7
- #define USB_ADDR_USBADDR_M 0x0000007F
-
-
-
- #define USB_ADDR_USBADDR_S 0
- #define USB_POW_ISOWAITSOF 0x00000080
-
-
-
-
-
-
-
-
- #define USB_POW_ISOWAITSOF_M 0x00000080
- #define USB_POW_ISOWAITSOF_S 7
- #define USB_POW_RST 0x00000008
-
- #define USB_POW_RST_M 0x00000008
- #define USB_POW_RST_S 3
- #define USB_POW_RESUME 0x00000004
-
-
-
-
-
-
-
- #define USB_POW_RESUME_M 0x00000004
- #define USB_POW_RESUME_S 2
- #define USB_POW_SUSPEND 0x00000002
-
-
-
-
-
-
- #define USB_POW_SUSPEND_M 0x00000002
- #define USB_POW_SUSPEND_S 1
- #define USB_POW_SUSPENDEN 0x00000001
-
- #define USB_POW_SUSPENDEN_M 0x00000001
- #define USB_POW_SUSPENDEN_S 0
- #define USB_IIF_INEP5IF 0x00000020
-
- #define USB_IIF_INEP5IF_M 0x00000020
- #define USB_IIF_INEP5IF_S 5
- #define USB_IIF_INEP4IF 0x00000010
-
- #define USB_IIF_INEP4IF_M 0x00000010
- #define USB_IIF_INEP4IF_S 4
- #define USB_IIF_INEP3IF 0x00000008
-
- #define USB_IIF_INEP3IF_M 0x00000008
- #define USB_IIF_INEP3IF_S 3
- #define USB_IIF_INEP2IF 0x00000004
-
- #define USB_IIF_INEP2IF_M 0x00000004
- #define USB_IIF_INEP2IF_S 2
- #define USB_IIF_INEP1IF 0x00000002
-
- #define USB_IIF_INEP1IF_M 0x00000002
- #define USB_IIF_INEP1IF_S 1
- #define USB_IIF_EP0IF 0x00000001
-
- #define USB_IIF_EP0IF_M 0x00000001
- #define USB_IIF_EP0IF_S 0
- #define USB_OIF_OUTEP5IF 0x00000020
-
- #define USB_OIF_OUTEP5IF_M 0x00000020
- #define USB_OIF_OUTEP5IF_S 5
- #define USB_OIF_OUTEP4IF 0x00000010
-
- #define USB_OIF_OUTEP4IF_M 0x00000010
- #define USB_OIF_OUTEP4IF_S 4
- #define USB_OIF_OUTEP3IF 0x00000008
-
- #define USB_OIF_OUTEP3IF_M 0x00000008
- #define USB_OIF_OUTEP3IF_S 3
- #define USB_OIF_OUTEP2IF 0x00000004
-
- #define USB_OIF_OUTEP2IF_M 0x00000004
- #define USB_OIF_OUTEP2IF_S 2
- #define USB_OIF_OUTEP1IF 0x00000002
-
- #define USB_OIF_OUTEP1IF_M 0x00000002
- #define USB_OIF_OUTEP1IF_S 1
- #define USB_CIF_SOFIF 0x00000008
-
- #define USB_CIF_SOFIF_M 0x00000008
- #define USB_CIF_SOFIF_S 3
- #define USB_CIF_RSTIF 0x00000004
-
- #define USB_CIF_RSTIF_M 0x00000004
- #define USB_CIF_RSTIF_S 2
- #define USB_CIF_RESUMEIF 0x00000002
-
- #define USB_CIF_RESUMEIF_M 0x00000002
- #define USB_CIF_RESUMEIF_S 1
- #define USB_CIF_SUSPENDIF 0x00000001
-
- #define USB_CIF_SUSPENDIF_M 0x00000001
- #define USB_CIF_SUSPENDIF_S 0
- #define USB_IIE_INEP5IE 0x00000020
-
-
- #define USB_IIE_INEP5IE_M 0x00000020
- #define USB_IIE_INEP5IE_S 5
- #define USB_IIE_INEP4IE 0x00000010
-
-
- #define USB_IIE_INEP4IE_M 0x00000010
- #define USB_IIE_INEP4IE_S 4
- #define USB_IIE_INEP3IE 0x00000008
-
-
- #define USB_IIE_INEP3IE_M 0x00000008
- #define USB_IIE_INEP3IE_S 3
- #define USB_IIE_INEP2IE 0x00000004
-
-
- #define USB_IIE_INEP2IE_M 0x00000004
- #define USB_IIE_INEP2IE_S 2
- #define USB_IIE_INEP1IE 0x00000002
-
-
- #define USB_IIE_INEP1IE_M 0x00000002
- #define USB_IIE_INEP1IE_S 1
- #define USB_IIE_EP0IE 0x00000001
-
-
- #define USB_IIE_EP0IE_M 0x00000001
- #define USB_IIE_EP0IE_S 0
- #define USB_OIE_reserved8_M 0x000000C0
- #define USB_OIE_reserved8_S 6
- #define USB_OIE_OUTEP5IE 0x00000020
-
-
- #define USB_OIE_OUTEP5IE_M 0x00000020
- #define USB_OIE_OUTEP5IE_S 5
- #define USB_OIE_OUTEP4IE 0x00000010
-
-
- #define USB_OIE_OUTEP4IE_M 0x00000010
- #define USB_OIE_OUTEP4IE_S 4
- #define USB_OIE_OUTEP3IE 0x00000008
-
-
- #define USB_OIE_OUTEP3IE_M 0x00000008
- #define USB_OIE_OUTEP3IE_S 3
- #define USB_OIE_OUTEP2IE 0x00000004
-
-
- #define USB_OIE_OUTEP2IE_M 0x00000004
- #define USB_OIE_OUTEP2IE_S 2
- #define USB_OIE_OUTEP1IE 0x00000002
-
-
- #define USB_OIE_OUTEP1IE_M 0x00000002
- #define USB_OIE_OUTEP1IE_S 1
- #define USB_CIE_SOFIE 0x00000008
-
-
- #define USB_CIE_SOFIE_M 0x00000008
- #define USB_CIE_SOFIE_S 3
- #define USB_CIE_RSTIE 0x00000004
-
-
- #define USB_CIE_RSTIE_M 0x00000004
- #define USB_CIE_RSTIE_S 2
- #define USB_CIE_RESUMEIE 0x00000002
-
-
- #define USB_CIE_RESUMEIE_M 0x00000002
- #define USB_CIE_RESUMEIE_S 1
- #define USB_CIE_SUSPENDIE 0x00000001
-
-
- #define USB_CIE_SUSPENDIE_M 0x00000001
- #define USB_CIE_SUSPENDIE_S 0
- #define USB_FRML_FRAMEL_M 0x000000FF
-
-
-
- #define USB_FRML_FRAMEL_S 0
- #define USB_FRMH_FRAMEH_M 0x00000007
-
-
-
- #define USB_FRMH_FRAMEH_S 0
- #define USB_INDEX_USBINDEX_M 0x0000000F
-
-
-
-
-
-
-
-
- #define USB_INDEX_USBINDEX_S 0
- #define USB_CTRL_PLLLOCKED 0x00000080
-
-
- #define USB_CTRL_PLLLOCKED_M 0x00000080
- #define USB_CTRL_PLLLOCKED_S 7
- #define USB_CTRL_PLLEN 0x00000002
-
-
-
-
-
-
-
-
-
-
-
- #define USB_CTRL_PLLEN_M 0x00000002
- #define USB_CTRL_PLLEN_S 1
- #define USB_CTRL_USBEN 0x00000001
-
-
- #define USB_CTRL_USBEN_M 0x00000001
- #define USB_CTRL_USBEN_S 0
- #define USB_MAXI_USBMAXI_M 0x000000FF
-
-
-
-
-
-
-
- #define USB_MAXI_USBMAXI_S 0
- #define USB_CS0_CSIL_CLROUTPKTRDY_or_CLRDATATOG \
- 0x00000040
-
-
-
-
-
-
-
- #define USB_CS0_CSIL_CLROUTPKTRDY_or_CLRDATATOG_M \
- 0x00000040
- #define USB_CS0_CSIL_CLROUTPKTRDY_or_CLRDATATOG_S 6
- #define USB_CS0_CSIL_SENDSTALL_or_SENTSTALL \
- 0x00000020
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #define USB_CS0_CSIL_SENDSTALL_or_SENTSTALL_M \
- 0x00000020
- #define USB_CS0_CSIL_SENDSTALL_or_SENTSTALL_S 5
- #define USB_CS0_CSIL_SETUPEND_or_SENDSTALL \
- 0x00000010
-
-
-
-
-
-
-
-
-
-
-
-
-
- #define USB_CS0_CSIL_SETUPEND_or_SENDSTALL_M \
- 0x00000010
- #define USB_CS0_CSIL_SETUPEND_or_SENDSTALL_S 4
- #define USB_CS0_CSIL_DATAEND_or_FLUSHPACKET \
- 0x00000008
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #define USB_CS0_CSIL_DATAEND_or_FLUSHPACKET_M \
- 0x00000008
- #define USB_CS0_CSIL_DATAEND_or_FLUSHPACKET_S 3
- #define USB_CS0_CSIL_SENTSTALL_or_UNDERRUN \
- 0x00000004
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #define USB_CS0_CSIL_SENTSTALL_or_UNDERRUN_M \
- 0x00000004
- #define USB_CS0_CSIL_SENTSTALL_or_UNDERRUN_S 2
- #define USB_CS0_CSIL_INPKTRDY_or_PKTPRESENT \
- 0x00000002
-
-
-
-
-
-
-
-
-
-
-
- #define USB_CS0_CSIL_INPKTRDY_or_PKTPRESENT_M \
- 0x00000002
- #define USB_CS0_CSIL_INPKTRDY_or_PKTPRESENT_S 1
- #define USB_CS0_CSIL_OUTPKTRDY_or_INPKTRDY \
- 0x00000001
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #define USB_CS0_CSIL_OUTPKTRDY_or_INPKTRDY_M \
- 0x00000001
- #define USB_CS0_CSIL_OUTPKTRDY_or_INPKTRDY_S 0
- #define USB_CSIH_AUTISET 0x00000080
-
-
-
-
-
-
-
-
-
- #define USB_CSIH_AUTISET_M 0x00000080
- #define USB_CSIH_AUTISET_S 7
- #define USB_CSIH_ISO 0x00000040
-
- #define USB_CSIH_ISO_M 0x00000040
- #define USB_CSIH_ISO_S 6
- #define USB_CSIH_FORCEDATATOG 0x00000008
-
-
-
-
-
-
-
-
- #define USB_CSIH_FORCEDATATOG_M 0x00000008
- #define USB_CSIH_FORCEDATATOG_S 3
- #define USB_CSIH_INDBLBUF 0x00000001
-
-
-
- #define USB_CSIH_INDBLBUF_M 0x00000001
- #define USB_CSIH_INDBLBUF_S 0
- #define USB_MAXO_USBMAXO_M 0x000000FF
-
-
-
-
-
-
-
- #define USB_MAXO_USBMAXO_S 0
- #define USB_CSOL_CLRDATATOG 0x00000080
-
- #define USB_CSOL_CLRDATATOG_M 0x00000080
- #define USB_CSOL_CLRDATATOG_S 7
- #define USB_CSOL_SENTSTALL 0x00000040
-
-
-
-
- #define USB_CSOL_SENTSTALL_M 0x00000040
- #define USB_CSOL_SENTSTALL_S 6
- #define USB_CSOL_SENDSTALL 0x00000020
-
-
-
-
- #define USB_CSOL_SENDSTALL_M 0x00000020
- #define USB_CSOL_SENDSTALL_S 5
- #define USB_CSOL_FLUSHPACKET 0x00000010
-
-
-
-
-
-
- #define USB_CSOL_FLUSHPACKET_M 0x00000010
- #define USB_CSOL_FLUSHPACKET_S 4
- #define USB_CSOL_DATAERROR 0x00000008
-
-
-
-
-
-
- #define USB_CSOL_DATAERROR_M 0x00000008
- #define USB_CSOL_DATAERROR_S 3
- #define USB_CSOL_OVERRUN 0x00000004
-
-
-
-
- #define USB_CSOL_OVERRUN_M 0x00000004
- #define USB_CSOL_OVERRUN_S 2
- #define USB_CSOL_FIFOFULL 0x00000002
-
-
- #define USB_CSOL_FIFOFULL_M 0x00000002
- #define USB_CSOL_FIFOFULL_S 1
- #define USB_CSOL_OUTPKTRDY 0x00000001
-
-
-
-
-
-
- #define USB_CSOL_OUTPKTRDY_M 0x00000001
- #define USB_CSOL_OUTPKTRDY_S 0
- #define USB_CSOH_AUTOCLEAR 0x00000080
-
-
-
-
-
-
-
-
-
- #define USB_CSOH_AUTOCLEAR_M 0x00000080
- #define USB_CSOH_AUTOCLEAR_S 7
- #define USB_CSOH_ISO 0x00000040
-
- #define USB_CSOH_ISO_M 0x00000040
- #define USB_CSOH_ISO_S 6
- #define USB_CSOH_OUTDBLBUF 0x00000001
-
-
-
- #define USB_CSOH_OUTDBLBUF_M 0x00000001
- #define USB_CSOH_OUTDBLBUF_S 0
- #define USB_CNT0_CNTL_FIFOCNT_or_FIFOCNTL_M \
- 0x000000FF
-
-
-
-
-
-
-
-
-
-
- #define USB_CNT0_CNTL_FIFOCNT_or_FIFOCNTL_S 0
- #define USB_CNTH_FIFOCNTH_M 0x00000007
-
-
-
-
- #define USB_CNTH_FIFOCNTH_S 0
- #define USB_F0_USBF0_M 0x000000FF
-
-
-
-
-
-
-
- #define USB_F0_USBF0_S 0
- #define USB_F1_USBF1_M 0x000000FF
-
-
-
-
- #define USB_F1_USBF1_S 0
- #define USB_F2_USBF2_M 0x000000FF
-
-
-
-
- #define USB_F2_USBF2_S 0
- #define USB_F3_USBF3_M 0x000000FF
-
-
-
-
- #define USB_F3_USBF3_S 0
- #define USB_F4_USBF4_M 0x000000FF
-
-
-
-
- #define USB_F4_USBF4_S 0
- #define USB_F5_USBF5_M 0x000000FF
-
-
-
-
- #define USB_F5_USBF5_S 0
- #endif
|