12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361 |
- #ifndef __HW_UART_H__
- #define __HW_UART_H__
- #define UART_O_DR 0x00000000
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #define UART_O_RSR 0x00000004
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #define UART_O_ECR 0x00000004
-
-
-
-
-
-
-
-
-
- #define UART_O_FR 0x00000018
-
-
-
-
-
-
-
-
-
-
-
-
- #define UART_O_ILPR 0x00000020
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #define UART_O_IBRD 0x00000024
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #define UART_O_FBRD 0x00000028
-
-
-
-
-
-
-
-
-
-
-
- #define UART_O_LCRH 0x0000002C
-
-
-
-
-
-
-
-
-
-
-
- #define UART_O_CTL 0x00000030
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #define UART_O_IFLS 0x00000034
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #define UART_O_IM 0x00000038
-
-
-
-
-
-
-
-
-
-
-
- #define UART_O_RIS 0x0000003C
-
-
-
-
-
-
-
-
-
- #define UART_O_MIS 0x00000040
-
-
-
-
-
-
- #define UART_O_ICR 0x00000044
-
-
-
-
-
-
-
- #define UART_O_DMACTL 0x00000048
-
-
- #define UART_O_LCTL 0x00000090
-
-
-
- #define UART_O_LSS 0x00000094
-
-
-
-
- #define UART_O_LTIM 0x00000098
-
-
-
-
-
-
-
-
-
- #define UART_O_NINEBITADDR 0x000000A4
-
-
-
-
-
-
-
-
-
- #define UART_O_NINEBITAMASK 0x000000A8
-
-
-
-
-
-
-
- #define UART_O_PP 0x00000FC0
-
-
-
- #define UART_O_CC 0x00000FC8
-
-
-
-
-
-
-
-
-
- #define UART_DR_OE 0x00000800
-
-
-
-
- #define UART_DR_OE_M 0x00000800
- #define UART_DR_OE_S 11
- #define UART_DR_BE 0x00000400
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #define UART_DR_BE_M 0x00000400
- #define UART_DR_BE_S 10
- #define UART_DR_PE 0x00000200
-
-
-
-
-
-
-
-
- #define UART_DR_PE_M 0x00000200
- #define UART_DR_PE_S 9
- #define UART_DR_FE 0x00000100
-
-
-
-
- #define UART_DR_FE_M 0x00000100
- #define UART_DR_FE_S 8
- #define UART_DR_DATA_M 0x000000FF
-
-
-
-
-
- #define UART_DR_DATA_S 0
- #define UART_RSR_OE 0x00000008
-
-
-
-
-
-
-
-
-
-
-
-
- #define UART_RSR_OE_M 0x00000008
- #define UART_RSR_OE_S 3
- #define UART_RSR_BE 0x00000004
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #define UART_RSR_BE_M 0x00000004
- #define UART_RSR_BE_S 2
- #define UART_RSR_PE 0x00000002
-
-
-
-
-
-
-
- #define UART_RSR_PE_M 0x00000002
- #define UART_RSR_PE_S 1
- #define UART_RSR_FE 0x00000001
-
-
-
-
-
-
-
-
-
- #define UART_RSR_FE_M 0x00000001
- #define UART_RSR_FE_S 0
- #define UART_ECR_DATA_M 0x000000FF
-
-
-
- #define UART_ECR_DATA_S 0
- #define UART_FR_TXFE 0x00000080
-
-
-
-
-
-
-
-
-
- #define UART_FR_TXFE_M 0x00000080
- #define UART_FR_TXFE_S 7
- #define UART_FR_RXFF 0x00000040
-
-
-
-
-
-
-
-
-
- #define UART_FR_RXFF_M 0x00000040
- #define UART_FR_RXFF_S 6
- #define UART_FR_TXFF 0x00000020
-
-
-
-
-
-
-
-
-
- #define UART_FR_TXFF_M 0x00000020
- #define UART_FR_TXFF_S 5
- #define UART_FR_RXFE 0x00000010
-
-
-
-
-
-
-
-
-
- #define UART_FR_RXFE_M 0x00000010
- #define UART_FR_RXFE_S 4
- #define UART_FR_BUSY 0x00000008
-
-
-
-
-
-
-
-
-
- #define UART_FR_BUSY_M 0x00000008
- #define UART_FR_BUSY_S 3
- #define UART_FR_CTS 0x00000001
-
-
-
- #define UART_FR_CTS_M 0x00000001
- #define UART_FR_CTS_S 0
- #define UART_ILPR_ILPDVSR_M 0x000000FF
-
-
- #define UART_ILPR_ILPDVSR_S 0
- #define UART_IBRD_DIVINT_M 0x0000FFFF
- #define UART_IBRD_DIVINT_S 0
- #define UART_FBRD_DIVFRAC_M 0x0000003F
- #define UART_FBRD_DIVFRAC_S 0
- #define UART_LCRH_SPS 0x00000080
-
-
-
-
-
-
-
-
- #define UART_LCRH_SPS_M 0x00000080
- #define UART_LCRH_SPS_S 7
- #define UART_LCRH_WLEN_M 0x00000060
-
-
-
-
-
- #define UART_LCRH_WLEN_S 5
- #define UART_LCRH_FEN 0x00000010
-
-
-
-
-
- #define UART_LCRH_FEN_M 0x00000010
- #define UART_LCRH_FEN_S 4
- #define UART_LCRH_STP2 0x00000008
-
-
-
-
-
-
- #define UART_LCRH_STP2_M 0x00000008
- #define UART_LCRH_STP2_S 3
- #define UART_LCRH_EPS 0x00000004
-
-
-
-
-
-
-
-
-
- #define UART_LCRH_EPS_M 0x00000004
- #define UART_LCRH_EPS_S 2
- #define UART_LCRH_PEN 0x00000002
-
-
-
-
- #define UART_LCRH_PEN_M 0x00000002
- #define UART_LCRH_PEN_S 1
- #define UART_LCRH_BRK 0x00000001
-
-
-
-
-
-
-
-
- #define UART_LCRH_BRK_M 0x00000001
- #define UART_LCRH_BRK_S 0
- #define UART_CTL_CTSEN 0x00008000
-
-
-
-
-
-
- #define UART_CTL_CTSEN_M 0x00008000
- #define UART_CTL_CTSEN_S 15
- #define UART_CTL_RTSEN 0x00004000
-
-
-
-
-
-
-
-
-
-
-
- #define UART_CTL_RTSEN_M 0x00004000
- #define UART_CTL_RTSEN_S 14
- #define UART_CTL_RXE 0x00000200
-
-
-
-
-
-
-
-
-
- #define UART_CTL_RXE_M 0x00000200
- #define UART_CTL_RXE_S 9
- #define UART_CTL_TXE 0x00000100
-
-
-
-
-
-
-
-
-
- #define UART_CTL_TXE_M 0x00000100
- #define UART_CTL_TXE_S 8
- #define UART_CTL_LBE 0x00000080
-
-
- #define UART_CTL_LBE_M 0x00000080
- #define UART_CTL_LBE_S 7
- #define UART_CTL_LIN 0x00000040
-
-
- #define UART_CTL_LIN_M 0x00000040
- #define UART_CTL_LIN_S 6
- #define UART_CTL_HSE 0x00000020
-
-
-
-
-
-
-
-
-
-
- #define UART_CTL_HSE_M 0x00000020
- #define UART_CTL_HSE_S 5
- #define UART_CTL_EOT 0x00000010
-
-
-
-
-
-
-
-
-
- #define UART_CTL_EOT_M 0x00000010
- #define UART_CTL_EOT_S 4
- #define UART_CTL_SIRLP 0x00000004
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #define UART_CTL_SIRLP_M 0x00000004
- #define UART_CTL_SIRLP_S 2
- #define UART_CTL_SIREN 0x00000002
-
-
-
-
- #define UART_CTL_SIREN_M 0x00000002
- #define UART_CTL_SIREN_S 1
- #define UART_CTL_UARTEN 0x00000001
-
-
-
-
-
-
- #define UART_CTL_UARTEN_M 0x00000001
- #define UART_CTL_UARTEN_S 0
- #define UART_IFLS_RXIFLSEL_M 0x00000038
-
-
-
-
-
-
-
-
- #define UART_IFLS_RXIFLSEL_S 3
- #define UART_IFLS_TXIFLSEL_M 0x00000007
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #define UART_IFLS_TXIFLSEL_S 0
- #define UART_IM_LME5IM 0x00008000
-
-
-
-
-
-
-
- #define UART_IM_LME5IM_M 0x00008000
- #define UART_IM_LME5IM_S 15
- #define UART_IM_LME1IM 0x00004000
-
-
-
-
-
-
-
- #define UART_IM_LME1IM_M 0x00004000
- #define UART_IM_LME1IM_S 14
- #define UART_IM_LMSBIM 0x00002000
-
-
-
-
-
-
-
- #define UART_IM_LMSBIM_M 0x00002000
- #define UART_IM_LMSBIM_S 13
- #define UART_IM_NINEBITIM 0x00001000
-
-
-
-
-
-
-
- #define UART_IM_NINEBITIM_M 0x00001000
- #define UART_IM_NINEBITIM_S 12
- #define UART_IM_OEIM 0x00000400
-
-
-
-
-
-
-
- #define UART_IM_OEIM_M 0x00000400
- #define UART_IM_OEIM_S 10
- #define UART_IM_BEIM 0x00000200
-
-
-
-
-
-
-
- #define UART_IM_BEIM_M 0x00000200
- #define UART_IM_BEIM_S 9
- #define UART_IM_PEIM 0x00000100
-
-
-
-
-
-
-
- #define UART_IM_PEIM_M 0x00000100
- #define UART_IM_PEIM_S 8
- #define UART_IM_FEIM 0x00000080
-
-
-
-
-
-
-
- #define UART_IM_FEIM_M 0x00000080
- #define UART_IM_FEIM_S 7
- #define UART_IM_RTIM 0x00000040
-
-
-
-
-
-
-
- #define UART_IM_RTIM_M 0x00000040
- #define UART_IM_RTIM_S 6
- #define UART_IM_TXIM 0x00000020
-
-
-
-
-
-
-
- #define UART_IM_TXIM_M 0x00000020
- #define UART_IM_TXIM_S 5
- #define UART_IM_RXIM 0x00000010
-
-
-
-
-
-
-
- #define UART_IM_RXIM_M 0x00000010
- #define UART_IM_RXIM_S 4
- #define UART_RIS_LME5RIS 0x00008000
-
-
-
-
-
-
- #define UART_RIS_LME5RIS_M 0x00008000
- #define UART_RIS_LME5RIS_S 15
- #define UART_RIS_LME1RIS 0x00004000
-
-
-
-
-
-
- #define UART_RIS_LME1RIS_M 0x00004000
- #define UART_RIS_LME1RIS_S 14
- #define UART_RIS_LMSBRIS 0x00002000
-
-
-
-
-
- #define UART_RIS_LMSBRIS_M 0x00002000
- #define UART_RIS_LMSBRIS_S 13
- #define UART_RIS_NINEBITRIS 0x00001000
-
-
-
-
-
- #define UART_RIS_NINEBITRIS_M 0x00001000
- #define UART_RIS_NINEBITRIS_S 12
- #define UART_RIS_OERIS 0x00000400
-
-
-
-
-
- #define UART_RIS_OERIS_M 0x00000400
- #define UART_RIS_OERIS_S 10
- #define UART_RIS_BERIS 0x00000200
-
-
-
-
-
- #define UART_RIS_BERIS_M 0x00000200
- #define UART_RIS_BERIS_S 9
- #define UART_RIS_PERIS 0x00000100
-
-
-
-
-
- #define UART_RIS_PERIS_M 0x00000100
- #define UART_RIS_PERIS_S 8
- #define UART_RIS_FERIS 0x00000080
-
-
-
-
-
- #define UART_RIS_FERIS_M 0x00000080
- #define UART_RIS_FERIS_S 7
- #define UART_RIS_RTRIS 0x00000040
-
-
-
-
-
- #define UART_RIS_RTRIS_M 0x00000040
- #define UART_RIS_RTRIS_S 6
- #define UART_RIS_TXRIS 0x00000020
-
-
-
-
-
-
-
-
-
-
-
- #define UART_RIS_TXRIS_M 0x00000020
- #define UART_RIS_TXRIS_S 5
- #define UART_RIS_RXRIS 0x00000010
-
-
-
-
-
-
-
- #define UART_RIS_RXRIS_M 0x00000010
- #define UART_RIS_RXRIS_S 4
- #define UART_MIS_LME5MIS 0x00008000
-
-
-
-
-
-
-
-
- #define UART_MIS_LME5MIS_M 0x00008000
- #define UART_MIS_LME5MIS_S 15
- #define UART_MIS_LME1MIS 0x00004000
-
-
-
-
-
-
-
-
- #define UART_MIS_LME1MIS_M 0x00004000
- #define UART_MIS_LME1MIS_S 14
- #define UART_MIS_LMSBMIS 0x00002000
-
-
-
-
-
-
-
-
- #define UART_MIS_LMSBMIS_M 0x00002000
- #define UART_MIS_LMSBMIS_S 13
- #define UART_MIS_NINEBITMIS 0x00001000
-
-
-
-
-
-
-
- #define UART_MIS_NINEBITMIS_M 0x00001000
- #define UART_MIS_NINEBITMIS_S 12
- #define UART_MIS_OEMIS 0x00000400
-
-
-
-
-
-
-
- #define UART_MIS_OEMIS_M 0x00000400
- #define UART_MIS_OEMIS_S 10
- #define UART_MIS_BEMIS 0x00000200
-
-
-
-
-
-
-
- #define UART_MIS_BEMIS_M 0x00000200
- #define UART_MIS_BEMIS_S 9
- #define UART_MIS_PEMIS 0x00000100
-
-
-
-
-
-
-
- #define UART_MIS_PEMIS_M 0x00000100
- #define UART_MIS_PEMIS_S 8
- #define UART_MIS_FEMIS 0x00000080
-
-
-
-
-
-
-
- #define UART_MIS_FEMIS_M 0x00000080
- #define UART_MIS_FEMIS_S 7
- #define UART_MIS_RTMIS 0x00000040
-
-
-
-
-
-
-
- #define UART_MIS_RTMIS_M 0x00000040
- #define UART_MIS_RTMIS_S 6
- #define UART_MIS_TXMIS 0x00000020
-
-
-
-
-
-
-
-
-
-
-
- #define UART_MIS_TXMIS_M 0x00000020
- #define UART_MIS_TXMIS_S 5
- #define UART_MIS_RXMIS 0x00000010
-
-
-
-
-
-
-
-
- #define UART_MIS_RXMIS_M 0x00000010
- #define UART_MIS_RXMIS_S 4
- #define UART_ICR_LME5IC 0x00008000
-
-
-
-
- #define UART_ICR_LME5IC_M 0x00008000
- #define UART_ICR_LME5IC_S 15
- #define UART_ICR_LME1IC 0x00004000
-
-
-
-
- #define UART_ICR_LME1IC_M 0x00004000
- #define UART_ICR_LME1IC_S 14
- #define UART_ICR_LMSBIC 0x00002000
-
-
-
-
- #define UART_ICR_LMSBIC_M 0x00002000
- #define UART_ICR_LMSBIC_S 13
- #define UART_ICR_NINEBITIC 0x00001000
-
-
-
-
- #define UART_ICR_NINEBITIC_M 0x00001000
- #define UART_ICR_NINEBITIC_S 12
- #define UART_ICR_OEIC 0x00000400
-
-
-
-
- #define UART_ICR_OEIC_M 0x00000400
- #define UART_ICR_OEIC_S 10
- #define UART_ICR_BEIC 0x00000200
-
-
-
-
- #define UART_ICR_BEIC_M 0x00000200
- #define UART_ICR_BEIC_S 9
- #define UART_ICR_PEIC 0x00000100
-
-
-
-
- #define UART_ICR_PEIC_M 0x00000100
- #define UART_ICR_PEIC_S 8
- #define UART_ICR_FEIC 0x00000080
-
-
-
-
- #define UART_ICR_FEIC_M 0x00000080
- #define UART_ICR_FEIC_S 7
- #define UART_ICR_RTIC 0x00000040
-
-
-
-
- #define UART_ICR_RTIC_M 0x00000040
- #define UART_ICR_RTIC_S 6
- #define UART_ICR_TXIC 0x00000020
-
-
-
-
- #define UART_ICR_TXIC_M 0x00000020
- #define UART_ICR_TXIC_S 5
- #define UART_ICR_RXIC 0x00000010
-
-
-
-
- #define UART_ICR_RXIC_M 0x00000010
- #define UART_ICR_RXIC_S 4
- #define UART_DMACTL_DMAERR 0x00000004
-
-
-
-
-
- #define UART_DMACTL_DMAERR_M 0x00000004
- #define UART_DMACTL_DMAERR_S 2
- #define UART_DMACTL_TXDMAE 0x00000002
-
-
-
- #define UART_DMACTL_TXDMAE_M 0x00000002
- #define UART_DMACTL_TXDMAE_S 1
- #define UART_DMACTL_RXDMAE 0x00000001
-
-
-
- #define UART_DMACTL_RXDMAE_M 0x00000001
- #define UART_DMACTL_RXDMAE_S 0
- #define UART_LCTL_BLEN_M 0x00000030
-
-
-
-
-
- #define UART_LCTL_BLEN_S 4
- #define UART_LCTL_MASTER 0x00000001
-
-
- #define UART_LCTL_MASTER_M 0x00000001
- #define UART_LCTL_MASTER_S 0
- #define UART_LSS_TSS_M 0x0000FFFF
-
-
-
-
- #define UART_LSS_TSS_S 0
- #define UART_LTIM_TIMER_M 0x0000FFFF
-
-
- #define UART_LTIM_TIMER_S 0
- #define UART_NINEBITADDR_NINEBITEN \
- 0x00008000
-
-
- #define UART_NINEBITADDR_NINEBITEN_M \
- 0x00008000
- #define UART_NINEBITADDR_NINEBITEN_S 15
- #define UART_NINEBITADDR_ADDR_M 0x000000FF
-
-
-
- #define UART_NINEBITADDR_ADDR_S 0
- #define UART_NINEBITAMASK_RANGE_M \
- 0x0000FF00
-
-
-
-
-
-
- #define UART_NINEBITAMASK_RANGE_S 8
- #define UART_NINEBITAMASK_MASK_M \
- 0x000000FF
-
-
-
-
- #define UART_NINEBITAMASK_MASK_S 0
- #define UART_PP_NB 0x00000002
-
-
-
-
-
-
- #define UART_PP_NB_M 0x00000002
- #define UART_PP_NB_S 1
- #define UART_PP_SC 0x00000001
-
-
-
- #define UART_PP_SC_M 0x00000001
- #define UART_PP_SC_S 0
- #define UART_CC_CS_M 0x00000007
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #define UART_CC_CS_S 0
- #endif
|