lp_uart_struct.h 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127
  1. /**
  2. * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #include <stdint.h>
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. /** Group: FIFO Configuration */
  12. /** Type of fifo register
  13. * FIFO data register
  14. */
  15. typedef union {
  16. struct {
  17. /** rxfifo_rd_byte : RO; bitpos: [31:0]; default: 0;
  18. * UART $n accesses FIFO via this register.
  19. */
  20. uint32_t rxfifo_rd_byte:32;
  21. };
  22. uint32_t val;
  23. } lp_uart_fifo_reg_t;
  24. /** Type of mem_conf register
  25. * UART memory power configuration
  26. */
  27. typedef union {
  28. struct {
  29. uint32_t reserved_0:25;
  30. /** mem_force_pd : R/W; bitpos: [25]; default: 0;
  31. * Set this bit to force power down UART memory.
  32. */
  33. uint32_t mem_force_pd:1;
  34. /** mem_force_pu : R/W; bitpos: [26]; default: 0;
  35. * Set this bit to force power up UART memory.
  36. */
  37. uint32_t mem_force_pu:1;
  38. uint32_t reserved_27:5;
  39. };
  40. uint32_t val;
  41. } lp_uart_mem_conf_reg_t;
  42. /** Type of tout_conf_sync register
  43. * UART threshold and allocation configuration
  44. */
  45. typedef union {
  46. struct {
  47. /** rx_tout_en : R/W; bitpos: [0]; default: 0;
  48. * This is the enble bit for uart receiver's timeout function.
  49. */
  50. uint32_t rx_tout_en:1;
  51. /** rx_tout_flow_dis : R/W; bitpos: [1]; default: 0;
  52. * Set this bit to stop accumulating idle_cnt when hardware flow control works.
  53. */
  54. uint32_t rx_tout_flow_dis:1;
  55. /** rx_tout_thrhd : R/W; bitpos: [11:2]; default: 10;
  56. * This register is used to configure the threshold time that receiver takes to
  57. * receive one byte. The rxfifo_tout_int interrupt will be trigger when the receiver
  58. * takes more time to receive one byte with rx_tout_en set to 1.
  59. */
  60. uint32_t rx_tout_thrhd:10;
  61. uint32_t reserved_12:20;
  62. };
  63. uint32_t val;
  64. } lp_uart_tout_conf_sync_reg_t;
  65. /** Group: Interrupt Register */
  66. /** Type of int_raw register
  67. * Raw interrupt status
  68. */
  69. typedef union {
  70. struct {
  71. /** rxfifo_full : R/WTC/SS; bitpos: [0]; default: 0;
  72. * This interrupt raw bit turns to high level when receiver receives more data than
  73. * what rxfifo_full_thrhd specifies.
  74. */
  75. uint32_t rxfifo_full:1;
  76. /** txfifo_empty : R/WTC/SS; bitpos: [1]; default: 1;
  77. * This interrupt raw bit turns to high level when the amount of data in Tx-FIFO is
  78. * less than what txfifo_empty_thrhd specifies .
  79. */
  80. uint32_t txfifo_empty:1;
  81. /** parity_err : R/WTC/SS; bitpos: [2]; default: 0;
  82. * This interrupt raw bit turns to high level when receiver detects a parity error in
  83. * the data.
  84. */
  85. uint32_t parity_err:1;
  86. /** frm_err : R/WTC/SS; bitpos: [3]; default: 0;
  87. * This interrupt raw bit turns to high level when receiver detects a data frame error
  88. * .
  89. */
  90. uint32_t frm_err:1;
  91. /** rxfifo_ovf : R/WTC/SS; bitpos: [4]; default: 0;
  92. * This interrupt raw bit turns to high level when receiver receives more data than
  93. * the FIFO can store.
  94. */
  95. uint32_t rxfifo_ovf:1;
  96. /** dsr_chg : R/WTC/SS; bitpos: [5]; default: 0;
  97. * This interrupt raw bit turns to high level when receiver detects the edge change of
  98. * DSRn signal.
  99. */
  100. uint32_t dsr_chg:1;
  101. /** cts_chg : R/WTC/SS; bitpos: [6]; default: 0;
  102. * This interrupt raw bit turns to high level when receiver detects the edge change of
  103. * CTSn signal.
  104. */
  105. uint32_t cts_chg:1;
  106. /** brk_det : R/WTC/SS; bitpos: [7]; default: 0;
  107. * This interrupt raw bit turns to high level when receiver detects a 0 after the stop
  108. * bit.
  109. */
  110. uint32_t brk_det:1;
  111. /** rxfifo_tout : R/WTC/SS; bitpos: [8]; default: 0;
  112. * This interrupt raw bit turns to high level when receiver takes more time than
  113. * rx_tout_thrhd to receive a byte.
  114. */
  115. uint32_t rxfifo_tout:1;
  116. /** sw_xon : R/WTC/SS; bitpos: [9]; default: 0;
  117. * This interrupt raw bit turns to high level when receiver recevies Xon char when
  118. * uart_sw_flow_con_en is set to 1.
  119. */
  120. uint32_t sw_xon:1;
  121. /** sw_xoff : R/WTC/SS; bitpos: [10]; default: 0;
  122. * This interrupt raw bit turns to high level when receiver receives Xoff char when
  123. * uart_sw_flow_con_en is set to 1.
  124. */
  125. uint32_t sw_xoff:1;
  126. /** glitch_det : R/WTC/SS; bitpos: [11]; default: 0;
  127. * This interrupt raw bit turns to high level when receiver detects a glitch in the
  128. * middle of a start bit.
  129. */
  130. uint32_t glitch_det:1;
  131. /** tx_brk_done : R/WTC/SS; bitpos: [12]; default: 0;
  132. * This interrupt raw bit turns to high level when transmitter completes sending
  133. * NULL characters after all data in Tx-FIFO are sent.
  134. */
  135. uint32_t tx_brk_done:1;
  136. /** tx_brk_idle_done : R/WTC/SS; bitpos: [13]; default: 0;
  137. * This interrupt raw bit turns to high level when transmitter has kept the shortest
  138. * duration after sending the last data.
  139. */
  140. uint32_t tx_brk_idle_done:1;
  141. /** tx_done : R/WTC/SS; bitpos: [14]; default: 0;
  142. * This interrupt raw bit turns to high level when transmitter has send out all data
  143. * in FIFO.
  144. */
  145. uint32_t tx_done:1;
  146. uint32_t reserved_15:3;
  147. /** at_cmd_char_det : R/WTC/SS; bitpos: [18]; default: 0;
  148. * This interrupt raw bit turns to high level when receiver detects the configured
  149. * at_cmd char.
  150. */
  151. uint32_t at_cmd_char_det:1;
  152. /** wakeup : R/WTC/SS; bitpos: [19]; default: 0;
  153. * This interrupt raw bit turns to high level when input rxd edge changes more times
  154. * than what reg_active_threshold specifies in light sleeping mode.
  155. */
  156. uint32_t wakeup:1;
  157. uint32_t reserved_20:12;
  158. };
  159. uint32_t val;
  160. } lp_uart_int_raw_reg_t;
  161. /** Type of int_st register
  162. * Masked interrupt status
  163. */
  164. typedef union {
  165. struct {
  166. /** rxfifo_full : RO; bitpos: [0]; default: 0;
  167. * This is the status bit for rxfifo_full_int_raw when rxfifo_full_int_ena is set to 1.
  168. */
  169. uint32_t rxfifo_full:1;
  170. /** txfifo_empty : RO; bitpos: [1]; default: 0;
  171. * This is the status bit for txfifo_empty_int_raw when txfifo_empty_int_ena is set
  172. * to 1.
  173. */
  174. uint32_t txfifo_empty:1;
  175. /** parity_err : RO; bitpos: [2]; default: 0;
  176. * This is the status bit for parity_err_int_raw when parity_err_int_ena is set to 1.
  177. */
  178. uint32_t parity_err:1;
  179. /** frm_err : RO; bitpos: [3]; default: 0;
  180. * This is the status bit for frm_err_int_raw when frm_err_int_ena is set to 1.
  181. */
  182. uint32_t frm_err:1;
  183. /** rxfifo_ovf : RO; bitpos: [4]; default: 0;
  184. * This is the status bit for rxfifo_ovf_int_raw when rxfifo_ovf_int_ena is set to 1.
  185. */
  186. uint32_t rxfifo_ovf:1;
  187. /** dsr_chg : RO; bitpos: [5]; default: 0;
  188. * This is the status bit for dsr_chg_int_raw when dsr_chg_int_ena is set to 1.
  189. */
  190. uint32_t dsr_chg:1;
  191. /** cts_chg : RO; bitpos: [6]; default: 0;
  192. * This is the status bit for cts_chg_int_raw when cts_chg_int_ena is set to 1.
  193. */
  194. uint32_t cts_chg:1;
  195. /** brk_det : RO; bitpos: [7]; default: 0;
  196. * This is the status bit for brk_det_int_raw when brk_det_int_ena is set to 1.
  197. */
  198. uint32_t brk_det:1;
  199. /** rxfifo_tout : RO; bitpos: [8]; default: 0;
  200. * This is the status bit for rxfifo_tout_int_raw when rxfifo_tout_int_ena is set to 1.
  201. */
  202. uint32_t rxfifo_tout:1;
  203. /** sw_xon : RO; bitpos: [9]; default: 0;
  204. * This is the status bit for sw_xon_int_raw when sw_xon_int_ena is set to 1.
  205. */
  206. uint32_t sw_xon:1;
  207. /** sw_xoff : RO; bitpos: [10]; default: 0;
  208. * This is the status bit for sw_xoff_int_raw when sw_xoff_int_ena is set to 1.
  209. */
  210. uint32_t sw_xoff:1;
  211. /** glitch_det : RO; bitpos: [11]; default: 0;
  212. * This is the status bit for glitch_det_int_raw when glitch_det_int_ena is set to 1.
  213. */
  214. uint32_t glitch_det:1;
  215. /** tx_brk_done : RO; bitpos: [12]; default: 0;
  216. * This is the status bit for tx_brk_done_int_raw when tx_brk_done_int_ena is set to 1.
  217. */
  218. uint32_t tx_brk_done:1;
  219. /** tx_brk_idle_done : RO; bitpos: [13]; default: 0;
  220. * This is the stauts bit for tx_brk_idle_done_int_raw when tx_brk_idle_done_int_ena
  221. * is set to 1.
  222. */
  223. uint32_t tx_brk_idle_done:1;
  224. /** tx_done : RO; bitpos: [14]; default: 0;
  225. * This is the status bit for tx_done_int_raw when tx_done_int_ena is set to 1.
  226. */
  227. uint32_t tx_done:1;
  228. uint32_t reserved_15:3;
  229. /** at_cmd_char_det : RO; bitpos: [18]; default: 0;
  230. * This is the status bit for at_cmd_det_int_raw when at_cmd_char_det_int_ena is set
  231. * to 1.
  232. */
  233. uint32_t at_cmd_char_det:1;
  234. /** wakeup : RO; bitpos: [19]; default: 0;
  235. * This is the status bit for uart_wakeup_int_raw when uart_wakeup_int_ena is set to 1.
  236. */
  237. uint32_t wakeup:1;
  238. uint32_t reserved_20:12;
  239. };
  240. uint32_t val;
  241. } lp_uart_int_st_reg_t;
  242. /** Type of int_ena register
  243. * Interrupt enable bits
  244. */
  245. typedef union {
  246. struct {
  247. /** rxfifo_full : R/W; bitpos: [0]; default: 0;
  248. * This is the enable bit for rxfifo_full_int_st register.
  249. */
  250. uint32_t rxfifo_full:1;
  251. /** txfifo_empty : R/W; bitpos: [1]; default: 0;
  252. * This is the enable bit for txfifo_empty_int_st register.
  253. */
  254. uint32_t txfifo_empty:1;
  255. /** parity_err : R/W; bitpos: [2]; default: 0;
  256. * This is the enable bit for parity_err_int_st register.
  257. */
  258. uint32_t parity_err:1;
  259. /** frm_err : R/W; bitpos: [3]; default: 0;
  260. * This is the enable bit for frm_err_int_st register.
  261. */
  262. uint32_t frm_err:1;
  263. /** rxfifo_ovf : R/W; bitpos: [4]; default: 0;
  264. * This is the enable bit for rxfifo_ovf_int_st register.
  265. */
  266. uint32_t rxfifo_ovf:1;
  267. /** dsr_chg : R/W; bitpos: [5]; default: 0;
  268. * This is the enable bit for dsr_chg_int_st register.
  269. */
  270. uint32_t dsr_chg:1;
  271. /** cts_chg : R/W; bitpos: [6]; default: 0;
  272. * This is the enable bit for cts_chg_int_st register.
  273. */
  274. uint32_t cts_chg:1;
  275. /** brk_det : R/W; bitpos: [7]; default: 0;
  276. * This is the enable bit for brk_det_int_st register.
  277. */
  278. uint32_t brk_det:1;
  279. /** rxfifo_tout : R/W; bitpos: [8]; default: 0;
  280. * This is the enable bit for rxfifo_tout_int_st register.
  281. */
  282. uint32_t rxfifo_tout:1;
  283. /** sw_xon : R/W; bitpos: [9]; default: 0;
  284. * This is the enable bit for sw_xon_int_st register.
  285. */
  286. uint32_t sw_xon:1;
  287. /** sw_xoff : R/W; bitpos: [10]; default: 0;
  288. * This is the enable bit for sw_xoff_int_st register.
  289. */
  290. uint32_t sw_xoff:1;
  291. /** glitch_det : R/W; bitpos: [11]; default: 0;
  292. * This is the enable bit for glitch_det_int_st register.
  293. */
  294. uint32_t glitch_det:1;
  295. /** tx_brk_done : R/W; bitpos: [12]; default: 0;
  296. * This is the enable bit for tx_brk_done_int_st register.
  297. */
  298. uint32_t tx_brk_done:1;
  299. /** tx_brk_idle_done : R/W; bitpos: [13]; default: 0;
  300. * This is the enable bit for tx_brk_idle_done_int_st register.
  301. */
  302. uint32_t tx_brk_idle_done:1;
  303. /** tx_done : R/W; bitpos: [14]; default: 0;
  304. * This is the enable bit for tx_done_int_st register.
  305. */
  306. uint32_t tx_done:1;
  307. uint32_t reserved_15:3;
  308. /** at_cmd_char_det : R/W; bitpos: [18]; default: 0;
  309. * This is the enable bit for at_cmd_char_det_int_st register.
  310. */
  311. uint32_t at_cmd_char_det:1;
  312. /** wakeup : R/W; bitpos: [19]; default: 0;
  313. * This is the enable bit for uart_wakeup_int_st register.
  314. */
  315. uint32_t wakeup:1;
  316. uint32_t reserved_20:12;
  317. };
  318. uint32_t val;
  319. } lp_uart_int_ena_reg_t;
  320. /** Type of int_clr register
  321. * Interrupt clear bits
  322. */
  323. typedef union {
  324. struct {
  325. /** rxfifo_full : WT; bitpos: [0]; default: 0;
  326. * Set this bit to clear the rxfifo_full_int_raw interrupt.
  327. */
  328. uint32_t rxfifo_full:1;
  329. /** txfifo_empty : WT; bitpos: [1]; default: 0;
  330. * Set this bit to clear txfifo_empty_int_raw interrupt.
  331. */
  332. uint32_t txfifo_empty:1;
  333. /** parity_err : WT; bitpos: [2]; default: 0;
  334. * Set this bit to clear parity_err_int_raw interrupt.
  335. */
  336. uint32_t parity_err:1;
  337. /** frm_err : WT; bitpos: [3]; default: 0;
  338. * Set this bit to clear frm_err_int_raw interrupt.
  339. */
  340. uint32_t frm_err:1;
  341. /** rxfifo_ovf : WT; bitpos: [4]; default: 0;
  342. * Set this bit to clear rxfifo_ovf_int_raw interrupt.
  343. */
  344. uint32_t rxfifo_ovf:1;
  345. /** dsr_chg : WT; bitpos: [5]; default: 0;
  346. * Set this bit to clear the dsr_chg_int_raw interrupt.
  347. */
  348. uint32_t dsr_chg:1;
  349. /** cts_chg : WT; bitpos: [6]; default: 0;
  350. * Set this bit to clear the cts_chg_int_raw interrupt.
  351. */
  352. uint32_t cts_chg:1;
  353. /** brk_det : WT; bitpos: [7]; default: 0;
  354. * Set this bit to clear the brk_det_int_raw interrupt.
  355. */
  356. uint32_t brk_det:1;
  357. /** rxfifo_tout : WT; bitpos: [8]; default: 0;
  358. * Set this bit to clear the rxfifo_tout_int_raw interrupt.
  359. */
  360. uint32_t rxfifo_tout:1;
  361. /** sw_xon : WT; bitpos: [9]; default: 0;
  362. * Set this bit to clear the sw_xon_int_raw interrupt.
  363. */
  364. uint32_t sw_xon:1;
  365. /** sw_xoff : WT; bitpos: [10]; default: 0;
  366. * Set this bit to clear the sw_xoff_int_raw interrupt.
  367. */
  368. uint32_t sw_xoff:1;
  369. /** glitch_det : WT; bitpos: [11]; default: 0;
  370. * Set this bit to clear the glitch_det_int_raw interrupt.
  371. */
  372. uint32_t glitch_det:1;
  373. /** tx_brk_done : WT; bitpos: [12]; default: 0;
  374. * Set this bit to clear the tx_brk_done_int_raw interrupt..
  375. */
  376. uint32_t tx_brk_done:1;
  377. /** tx_brk_idle_done : WT; bitpos: [13]; default: 0;
  378. * Set this bit to clear the tx_brk_idle_done_int_raw interrupt.
  379. */
  380. uint32_t tx_brk_idle_done:1;
  381. /** tx_done : WT; bitpos: [14]; default: 0;
  382. * Set this bit to clear the tx_done_int_raw interrupt.
  383. */
  384. uint32_t tx_done:1;
  385. uint32_t reserved_15:3;
  386. /** at_cmd_char_det : WT; bitpos: [18]; default: 0;
  387. * Set this bit to clear the at_cmd_char_det_int_raw interrupt.
  388. */
  389. uint32_t at_cmd_char_det:1;
  390. /** wakeup : WT; bitpos: [19]; default: 0;
  391. * Set this bit to clear the uart_wakeup_int_raw interrupt.
  392. */
  393. uint32_t wakeup:1;
  394. uint32_t reserved_20:12;
  395. };
  396. uint32_t val;
  397. } lp_uart_int_clr_reg_t;
  398. /** Group: Configuration Register */
  399. /** Type of clkdiv_sync register
  400. * Clock divider configuration
  401. */
  402. typedef union {
  403. struct {
  404. /** clkdiv_int : R/W; bitpos: [11:0]; default: 694;
  405. * The integral part of the frequency divider factor.
  406. */
  407. uint32_t clkdiv_int:12;
  408. uint32_t reserved_12:8;
  409. /** clkdiv_frag : R/W; bitpos: [23:20]; default: 0;
  410. * The decimal part of the frequency divider factor.
  411. */
  412. uint32_t clkdiv_frag:4;
  413. uint32_t reserved_24:8;
  414. };
  415. uint32_t val;
  416. } lp_uart_clkdiv_sync_reg_t;
  417. /** Type of rx_filt register
  418. * Rx Filter configuration
  419. */
  420. typedef union {
  421. struct {
  422. /** glitch_filt : R/W; bitpos: [7:0]; default: 8;
  423. * when input pulse width is lower than this value the pulse is ignored.
  424. */
  425. uint32_t glitch_filt:8;
  426. /** glitch_filt_en : R/W; bitpos: [8]; default: 0;
  427. * Set this bit to enable Rx signal filter.
  428. */
  429. uint32_t glitch_filt_en:1;
  430. uint32_t reserved_9:23;
  431. };
  432. uint32_t val;
  433. } lp_uart_rx_filt_reg_t;
  434. /** Type of conf0_sync register
  435. * Configuration register 0
  436. */
  437. typedef union {
  438. struct {
  439. /** parity : R/W; bitpos: [0]; default: 0;
  440. * This register is used to configure the parity check mode.
  441. */
  442. uint32_t parity:1;
  443. /** parity_en : R/W; bitpos: [1]; default: 0;
  444. * Set this bit to enable uart parity check.
  445. */
  446. uint32_t parity_en:1;
  447. /** bit_num : R/W; bitpos: [3:2]; default: 3;
  448. * This register is used to set the length of data.
  449. */
  450. uint32_t bit_num:2;
  451. /** stop_bit_num : R/W; bitpos: [5:4]; default: 1;
  452. * This register is used to set the length of stop bit.
  453. */
  454. uint32_t stop_bit_num:2;
  455. /** txd_brk : R/W; bitpos: [6]; default: 0;
  456. * Set this bit to enbale transmitter to send NULL when the process of sending data
  457. * is done.
  458. */
  459. uint32_t txd_brk:1;
  460. uint32_t reserved_7:5;
  461. /** loopback : R/W; bitpos: [12]; default: 0;
  462. * Set this bit to enable uart loopback test mode.
  463. */
  464. uint32_t loopback:1;
  465. /** tx_flow_en : R/W; bitpos: [13]; default: 0;
  466. * Set this bit to enable flow control function for transmitter.
  467. */
  468. uint32_t tx_flow_en:1;
  469. uint32_t reserved_14:1;
  470. /** rxd_inv : R/W; bitpos: [15]; default: 0;
  471. * Set this bit to inverse the level value of uart rxd signal.
  472. */
  473. uint32_t rxd_inv:1;
  474. /** txd_inv : R/W; bitpos: [16]; default: 0;
  475. * Set this bit to inverse the level value of uart txd signal.
  476. */
  477. uint32_t txd_inv:1;
  478. /** dis_rx_dat_ovf : R/W; bitpos: [17]; default: 0;
  479. * Disable UART Rx data overflow detect.
  480. */
  481. uint32_t dis_rx_dat_ovf:1;
  482. /** err_wr_mask : R/W; bitpos: [18]; default: 0;
  483. * 1'h1: Receiver stops storing data into FIFO when data is wrong. 1'h0: Receiver
  484. * stores the data even if the received data is wrong.
  485. */
  486. uint32_t err_wr_mask:1;
  487. uint32_t reserved_19:1;
  488. /** mem_clk_en : R/W; bitpos: [20]; default: 1;
  489. * UART memory clock gate enable signal.
  490. */
  491. uint32_t mem_clk_en:1;
  492. /** sw_rts : R/W; bitpos: [21]; default: 0;
  493. * This register is used to configure the software rts signal which is used in
  494. * software flow control.
  495. */
  496. uint32_t sw_rts:1;
  497. /** rxfifo_rst : R/W; bitpos: [22]; default: 0;
  498. * Set this bit to reset the uart receive-FIFO.
  499. */
  500. uint32_t rxfifo_rst:1;
  501. /** txfifo_rst : R/W; bitpos: [23]; default: 0;
  502. * Set this bit to reset the uart transmit-FIFO.
  503. */
  504. uint32_t txfifo_rst:1;
  505. uint32_t reserved_24:8;
  506. };
  507. uint32_t val;
  508. } lp_uart_conf0_sync_reg_t;
  509. /** Type of conf1 register
  510. * Configuration register 1
  511. */
  512. typedef union {
  513. struct {
  514. uint32_t reserved_0:3;
  515. /** rxfifo_full_thrhd : R/W; bitpos: [7:3]; default: 12;
  516. * It will produce rxfifo_full_int interrupt when receiver receives more data than
  517. * this register value.
  518. */
  519. uint32_t rxfifo_full_thrhd:5;
  520. uint32_t reserved_8:3;
  521. /** txfifo_empty_thrhd : R/W; bitpos: [15:11]; default: 12;
  522. * It will produce txfifo_empty_int interrupt when the data amount in Tx-FIFO is less
  523. * than this register value.
  524. */
  525. uint32_t txfifo_empty_thrhd:5;
  526. /** cts_inv : R/W; bitpos: [16]; default: 0;
  527. * Set this bit to inverse the level value of uart cts signal.
  528. */
  529. uint32_t cts_inv:1;
  530. /** dsr_inv : R/W; bitpos: [17]; default: 0;
  531. * Set this bit to inverse the level value of uart dsr signal.
  532. */
  533. uint32_t dsr_inv:1;
  534. /** rts_inv : R/W; bitpos: [18]; default: 0;
  535. * Set this bit to inverse the level value of uart rts signal.
  536. */
  537. uint32_t rts_inv:1;
  538. /** dtr_inv : R/W; bitpos: [19]; default: 0;
  539. * Set this bit to inverse the level value of uart dtr signal.
  540. */
  541. uint32_t dtr_inv:1;
  542. /** sw_dtr : R/W; bitpos: [20]; default: 0;
  543. * This register is used to configure the software dtr signal which is used in
  544. * software flow control.
  545. */
  546. uint32_t sw_dtr:1;
  547. /** clk_en : R/W; bitpos: [21]; default: 0;
  548. * 1'h1: Force clock on for register. 1'h0: Support clock only when application writes
  549. * registers.
  550. */
  551. uint32_t clk_en:1;
  552. uint32_t reserved_22:10;
  553. };
  554. uint32_t val;
  555. } lp_uart_conf1_reg_t;
  556. /** Type of hwfc_conf_sync register
  557. * Hardware flow-control configuration
  558. */
  559. typedef union {
  560. struct {
  561. uint32_t reserved_0:3;
  562. /** rx_flow_thrhd : R/W; bitpos: [7:3]; default: 0;
  563. * This register is used to configure the maximum amount of data that can be received
  564. * when hardware flow control works.
  565. */
  566. uint32_t rx_flow_thrhd:5;
  567. /** rx_flow_en : R/W; bitpos: [8]; default: 0;
  568. * This is the flow enable bit for UART receiver.
  569. */
  570. uint32_t rx_flow_en:1;
  571. uint32_t reserved_9:23;
  572. };
  573. uint32_t val;
  574. } lp_uart_hwfc_conf_sync_reg_t;
  575. /** Type of sleep_conf0 register
  576. * UART sleep configure register 0
  577. */
  578. typedef union {
  579. struct {
  580. /** wk_char1 : R/W; bitpos: [7:0]; default: 0;
  581. * This register restores the specified wake up char1 to wake up
  582. */
  583. uint32_t wk_char1:8;
  584. /** wk_char2 : R/W; bitpos: [15:8]; default: 0;
  585. * This register restores the specified wake up char2 to wake up
  586. */
  587. uint32_t wk_char2:8;
  588. /** wk_char3 : R/W; bitpos: [23:16]; default: 0;
  589. * This register restores the specified wake up char3 to wake up
  590. */
  591. uint32_t wk_char3:8;
  592. /** wk_char4 : R/W; bitpos: [31:24]; default: 0;
  593. * This register restores the specified wake up char4 to wake up
  594. */
  595. uint32_t wk_char4:8;
  596. };
  597. uint32_t val;
  598. } lp_uart_sleep_conf0_reg_t;
  599. /** Type of sleep_conf1 register
  600. * UART sleep configure register 1
  601. */
  602. typedef union {
  603. struct {
  604. /** wk_char0 : R/W; bitpos: [7:0]; default: 0;
  605. * This register restores the specified char0 to wake up
  606. */
  607. uint32_t wk_char0:8;
  608. uint32_t reserved_8:24;
  609. };
  610. uint32_t val;
  611. } lp_uart_sleep_conf1_reg_t;
  612. /** Type of sleep_conf2 register
  613. * UART sleep configure register 2
  614. */
  615. typedef union {
  616. struct {
  617. /** active_threshold : R/W; bitpos: [9:0]; default: 240;
  618. * The uart is activated from light sleeping mode when the input rxd edge changes more
  619. * times than this register value.
  620. */
  621. uint32_t active_threshold:10;
  622. uint32_t reserved_10:3;
  623. /** rx_wake_up_thrhd : R/W; bitpos: [17:13]; default: 1;
  624. * In wake up mode 1 this field is used to set the received data number threshold to
  625. * wake up chip.
  626. */
  627. uint32_t rx_wake_up_thrhd:5;
  628. /** wk_char_num : R/W; bitpos: [20:18]; default: 5;
  629. * This register is used to select number of wake up char.
  630. */
  631. uint32_t wk_char_num:3;
  632. /** wk_char_mask : R/W; bitpos: [25:21]; default: 0;
  633. * This register is used to mask wake up char.
  634. */
  635. uint32_t wk_char_mask:5;
  636. /** wk_mode_sel : R/W; bitpos: [27:26]; default: 0;
  637. * This register is used to select wake up mode. 0: RXD toggling to wake up. 1:
  638. * received data number larger than
  639. */
  640. uint32_t wk_mode_sel:2;
  641. uint32_t reserved_28:4;
  642. };
  643. uint32_t val;
  644. } lp_uart_sleep_conf2_reg_t;
  645. /** Type of swfc_conf0_sync register
  646. * Software flow-control character configuration
  647. */
  648. typedef union {
  649. struct {
  650. /** xon_char : R/W; bitpos: [7:0]; default: 17;
  651. * This register stores the Xon flow control char.
  652. */
  653. uint32_t xon_char:8;
  654. /** xoff_char : R/W; bitpos: [15:8]; default: 19;
  655. * This register stores the Xoff flow control char.
  656. */
  657. uint32_t xoff_char:8;
  658. /** xon_xoff_still_send : R/W; bitpos: [16]; default: 0;
  659. * In software flow control mode, UART Tx is disabled once UART Rx receives XOFF. In
  660. * this status, UART Tx can not transmit XOFF even the received data number is larger
  661. * than UART_XOFF_THRESHOLD. Set this bit to enable UART Tx can transmit XON/XOFF when
  662. * UART Tx is disabled.
  663. */
  664. uint32_t xon_xoff_still_send:1;
  665. /** sw_flow_con_en : R/W; bitpos: [17]; default: 0;
  666. * Set this bit to enable software flow control. It is used with register sw_xon or
  667. * sw_xoff.
  668. */
  669. uint32_t sw_flow_con_en:1;
  670. /** xonoff_del : R/W; bitpos: [18]; default: 0;
  671. * Set this bit to remove flow control char from the received data.
  672. */
  673. uint32_t xonoff_del:1;
  674. /** force_xon : R/W; bitpos: [19]; default: 0;
  675. * Set this bit to enable the transmitter to go on sending data.
  676. */
  677. uint32_t force_xon:1;
  678. /** force_xoff : R/W; bitpos: [20]; default: 0;
  679. * Set this bit to stop the transmitter from sending data.
  680. */
  681. uint32_t force_xoff:1;
  682. /** send_xon : R/W/SS/SC; bitpos: [21]; default: 0;
  683. * Set this bit to send Xon char. It is cleared by hardware automatically.
  684. */
  685. uint32_t send_xon:1;
  686. /** send_xoff : R/W/SS/SC; bitpos: [22]; default: 0;
  687. * Set this bit to send Xoff char. It is cleared by hardware automatically.
  688. */
  689. uint32_t send_xoff:1;
  690. uint32_t reserved_23:9;
  691. };
  692. uint32_t val;
  693. } lp_uart_swfc_conf0_sync_reg_t;
  694. /** Type of swfc_conf1 register
  695. * Software flow-control character configuration
  696. */
  697. typedef union {
  698. struct {
  699. uint32_t reserved_0:3;
  700. /** xon_threshold : R/W; bitpos: [7:3]; default: 0;
  701. * When the data amount in Rx-FIFO is less than this register value with
  702. * uart_sw_flow_con_en set to 1 it will send a Xon char.
  703. */
  704. uint32_t xon_threshold:5;
  705. uint32_t reserved_8:3;
  706. /** xoff_threshold : R/W; bitpos: [15:11]; default: 12;
  707. * When the data amount in Rx-FIFO is more than this register value with
  708. * uart_sw_flow_con_en set to 1 it will send a Xoff char.
  709. */
  710. uint32_t xoff_threshold:5;
  711. uint32_t reserved_16:16;
  712. };
  713. uint32_t val;
  714. } lp_uart_swfc_conf1_reg_t;
  715. /** Type of txbrk_conf_sync register
  716. * Tx Break character configuration
  717. */
  718. typedef union {
  719. struct {
  720. /** tx_brk_num : R/W; bitpos: [7:0]; default: 10;
  721. * This register is used to configure the number of 0 to be sent after the process of
  722. * sending data is done. It is active when txd_brk is set to 1.
  723. */
  724. uint32_t tx_brk_num:8;
  725. uint32_t reserved_8:24;
  726. };
  727. uint32_t val;
  728. } lp_uart_txbrk_conf_sync_reg_t;
  729. /** Type of idle_conf_sync register
  730. * Frame-end idle configuration
  731. */
  732. typedef union {
  733. struct {
  734. /** rx_idle_thrhd : R/W; bitpos: [9:0]; default: 256;
  735. * It will produce frame end signal when receiver takes more time to receive one byte
  736. * data than this register value.
  737. */
  738. uint32_t rx_idle_thrhd:10;
  739. /** tx_idle_num : R/W; bitpos: [19:10]; default: 256;
  740. * This register is used to configure the duration time between transfers.
  741. */
  742. uint32_t tx_idle_num:10;
  743. uint32_t reserved_20:12;
  744. };
  745. uint32_t val;
  746. } lp_uart_idle_conf_sync_reg_t;
  747. /** Type of rs485_conf_sync register
  748. * RS485 mode configuration
  749. */
  750. typedef union {
  751. struct {
  752. uint32_t reserved_0:1;
  753. /** dl0_en : R/W; bitpos: [1]; default: 0;
  754. * Set this bit to delay the stop bit by 1 bit.
  755. */
  756. uint32_t dl0_en:1;
  757. /** dl1_en : R/W; bitpos: [2]; default: 0;
  758. * Set this bit to delay the stop bit by 1 bit.
  759. */
  760. uint32_t dl1_en:1;
  761. uint32_t reserved_3:29;
  762. };
  763. uint32_t val;
  764. } lp_uart_rs485_conf_sync_reg_t;
  765. /** Type of clk_conf register
  766. * UART core clock configuration
  767. */
  768. typedef union {
  769. struct {
  770. /** sclk_div_b : R/W; bitpos: [5:0]; default: 0;
  771. * The denominator of the frequency divider factor.
  772. */
  773. uint32_t sclk_div_b:6;
  774. /** sclk_div_a : R/W; bitpos: [11:6]; default: 0;
  775. * The numerator of the frequency divider factor.
  776. */
  777. uint32_t sclk_div_a:6;
  778. /** sclk_div_num : R/W; bitpos: [19:12]; default: 1;
  779. * The integral part of the frequency divider factor.
  780. */
  781. uint32_t sclk_div_num:8;
  782. /** sclk_sel : R/W; bitpos: [21:20]; default: 3;
  783. * UART clock source select. 1: 80Mhz. 2: 8Mhz. 3: XTAL.
  784. */
  785. uint32_t sclk_sel:2;
  786. /** sclk_en : R/W; bitpos: [22]; default: 1;
  787. * Set this bit to enable UART Tx/Rx clock.
  788. */
  789. uint32_t sclk_en:1;
  790. /** rst_core : R/W; bitpos: [23]; default: 0;
  791. * Write 1 then write 0 to this bit to reset UART Tx/Rx.
  792. */
  793. uint32_t rst_core:1;
  794. /** tx_sclk_en : R/W; bitpos: [24]; default: 1;
  795. * Set this bit to enable UART Tx clock.
  796. */
  797. uint32_t tx_sclk_en:1;
  798. /** rx_sclk_en : R/W; bitpos: [25]; default: 1;
  799. * Set this bit to enable UART Rx clock.
  800. */
  801. uint32_t rx_sclk_en:1;
  802. /** tx_rst_core : R/W; bitpos: [26]; default: 0;
  803. * Write 1 then write 0 to this bit to reset UART Tx.
  804. */
  805. uint32_t tx_rst_core:1;
  806. /** rx_rst_core : R/W; bitpos: [27]; default: 0;
  807. * Write 1 then write 0 to this bit to reset UART Rx.
  808. */
  809. uint32_t rx_rst_core:1;
  810. uint32_t reserved_28:4;
  811. };
  812. uint32_t val;
  813. } lp_uart_clk_conf_reg_t;
  814. /** Group: Status Register */
  815. /** Type of status register
  816. * UART status register
  817. */
  818. typedef union {
  819. struct {
  820. uint32_t reserved_0:3;
  821. /** rxfifo_cnt : RO; bitpos: [7:3]; default: 0;
  822. * Stores the byte number of valid data in Rx-FIFO.
  823. */
  824. uint32_t rxfifo_cnt:5;
  825. uint32_t reserved_8:5;
  826. /** dsrn : RO; bitpos: [13]; default: 0;
  827. * The register represent the level value of the internal uart dsr signal.
  828. */
  829. uint32_t dsrn:1;
  830. /** ctsn : RO; bitpos: [14]; default: 1;
  831. * This register represent the level value of the internal uart cts signal.
  832. */
  833. uint32_t ctsn:1;
  834. /** rxd : RO; bitpos: [15]; default: 1;
  835. * This register represent the level value of the internal uart rxd signal.
  836. */
  837. uint32_t rxd:1;
  838. uint32_t reserved_16:3;
  839. /** txfifo_cnt : RO; bitpos: [23:19]; default: 0;
  840. * Stores the byte number of data in Tx-FIFO.
  841. */
  842. uint32_t txfifo_cnt:5;
  843. uint32_t reserved_24:5;
  844. /** dtrn : RO; bitpos: [29]; default: 1;
  845. * This bit represents the level of the internal uart dtr signal.
  846. */
  847. uint32_t dtrn:1;
  848. /** rtsn : RO; bitpos: [30]; default: 1;
  849. * This bit represents the level of the internal uart rts signal.
  850. */
  851. uint32_t rtsn:1;
  852. /** txd : RO; bitpos: [31]; default: 1;
  853. * This bit represents the level of the internal uart txd signal.
  854. */
  855. uint32_t txd:1;
  856. };
  857. uint32_t val;
  858. } lp_uart_status_reg_t;
  859. /** Type of mem_tx_status register
  860. * Tx-SRAM write and read offset address.
  861. */
  862. typedef union {
  863. struct {
  864. uint32_t reserved_0:3;
  865. /** tx_sram_waddr : RO; bitpos: [7:3]; default: 0;
  866. * This register stores the offset write address in Tx-SRAM.
  867. */
  868. uint32_t tx_sram_waddr:5;
  869. uint32_t reserved_8:4;
  870. /** tx_sram_raddr : RO; bitpos: [16:12]; default: 0;
  871. * This register stores the offset read address in Tx-SRAM.
  872. */
  873. uint32_t tx_sram_raddr:5;
  874. uint32_t reserved_17:15;
  875. };
  876. uint32_t val;
  877. } lp_uart_mem_tx_status_reg_t;
  878. /** Type of mem_rx_status register
  879. * Rx-SRAM write and read offset address.
  880. */
  881. typedef union {
  882. struct {
  883. uint32_t reserved_0:3;
  884. /** rx_sram_raddr : RO; bitpos: [7:3]; default: 16;
  885. * This register stores the offset read address in RX-SRAM.
  886. */
  887. uint32_t rx_sram_raddr:5;
  888. uint32_t reserved_8:4;
  889. /** rx_sram_waddr : RO; bitpos: [16:12]; default: 16;
  890. * This register stores the offset write address in Rx-SRAM.
  891. */
  892. uint32_t rx_sram_waddr:5;
  893. uint32_t reserved_17:15;
  894. };
  895. uint32_t val;
  896. } lp_uart_mem_rx_status_reg_t;
  897. /** Type of fsm_status register
  898. * UART transmit and receive status.
  899. */
  900. typedef union {
  901. struct {
  902. /** st_urx_out : RO; bitpos: [3:0]; default: 0;
  903. * This is the status register of receiver.
  904. */
  905. uint32_t st_urx_out:4;
  906. /** st_utx_out : RO; bitpos: [7:4]; default: 0;
  907. * This is the status register of transmitter.
  908. */
  909. uint32_t st_utx_out:4;
  910. uint32_t reserved_8:24;
  911. };
  912. uint32_t val;
  913. } lp_uart_fsm_status_reg_t;
  914. /** Type of afifo_status register
  915. * UART AFIFO Status
  916. */
  917. typedef union {
  918. struct {
  919. /** tx_afifo_full : RO; bitpos: [0]; default: 0;
  920. * Full signal of APB TX AFIFO.
  921. */
  922. uint32_t tx_afifo_full:1;
  923. /** tx_afifo_empty : RO; bitpos: [1]; default: 1;
  924. * Empty signal of APB TX AFIFO.
  925. */
  926. uint32_t tx_afifo_empty:1;
  927. /** rx_afifo_full : RO; bitpos: [2]; default: 0;
  928. * Full signal of APB RX AFIFO.
  929. */
  930. uint32_t rx_afifo_full:1;
  931. /** rx_afifo_empty : RO; bitpos: [3]; default: 1;
  932. * Empty signal of APB RX AFIFO.
  933. */
  934. uint32_t rx_afifo_empty:1;
  935. uint32_t reserved_4:28;
  936. };
  937. uint32_t val;
  938. } lp_uart_afifo_status_reg_t;
  939. /** Group: AT Escape Sequence Selection Configuration */
  940. /** Type of at_cmd_precnt_sync register
  941. * Pre-sequence timing configuration
  942. */
  943. typedef union {
  944. struct {
  945. /** pre_idle_num : R/W; bitpos: [15:0]; default: 2305;
  946. * This register is used to configure the idle duration time before the first at_cmd
  947. * is received by receiver.
  948. */
  949. uint32_t pre_idle_num:16;
  950. uint32_t reserved_16:16;
  951. };
  952. uint32_t val;
  953. } lp_uart_at_cmd_precnt_sync_reg_t;
  954. /** Type of at_cmd_postcnt_sync register
  955. * Post-sequence timing configuration
  956. */
  957. typedef union {
  958. struct {
  959. /** post_idle_num : R/W; bitpos: [15:0]; default: 2305;
  960. * This register is used to configure the duration time between the last at_cmd and
  961. * the next data.
  962. */
  963. uint32_t post_idle_num:16;
  964. uint32_t reserved_16:16;
  965. };
  966. uint32_t val;
  967. } lp_uart_at_cmd_postcnt_sync_reg_t;
  968. /** Type of at_cmd_gaptout_sync register
  969. * Timeout configuration
  970. */
  971. typedef union {
  972. struct {
  973. /** rx_gap_tout : R/W; bitpos: [15:0]; default: 11;
  974. * This register is used to configure the duration time between the at_cmd chars.
  975. */
  976. uint32_t rx_gap_tout:16;
  977. uint32_t reserved_16:16;
  978. };
  979. uint32_t val;
  980. } lp_uart_at_cmd_gaptout_sync_reg_t;
  981. /** Type of at_cmd_char_sync register
  982. * AT escape sequence detection configuration
  983. */
  984. typedef union {
  985. struct {
  986. /** data : R/W; bitpos: [7:0]; default: 43;
  987. * This register is used to configure the content of at_cmd char.
  988. */
  989. uint32_t data:8;
  990. /** char_num : R/W; bitpos: [15:8]; default: 3;
  991. * This register is used to configure the num of continuous at_cmd chars received by
  992. * receiver.
  993. */
  994. uint32_t char_num:8;
  995. uint32_t reserved_16:16;
  996. };
  997. uint32_t val;
  998. } lp_uart_at_cmd_char_sync_reg_t;
  999. /** Group: Version Register */
  1000. /** Type of date register
  1001. * UART Version register
  1002. */
  1003. typedef union {
  1004. struct {
  1005. /** date : R/W; bitpos: [31:0]; default: 35656288;
  1006. * This is the version register.
  1007. */
  1008. uint32_t date:32;
  1009. };
  1010. uint32_t val;
  1011. } lp_uart_date_reg_t;
  1012. /** Type of reg_update register
  1013. * UART Registers Configuration Update register
  1014. */
  1015. typedef union {
  1016. struct {
  1017. /** reg_update : R/W/SC; bitpos: [0]; default: 0;
  1018. * Software write 1 would synchronize registers into UART Core clock domain and would
  1019. * be cleared by hardware after synchronization is done.
  1020. */
  1021. uint32_t reg_update:1;
  1022. uint32_t reserved_1:31;
  1023. };
  1024. uint32_t val;
  1025. } lp_uart_reg_update_reg_t;
  1026. /** Type of id register
  1027. * UART ID register
  1028. */
  1029. typedef union {
  1030. struct {
  1031. /** id : R/W; bitpos: [31:0]; default: 1280;
  1032. * This register is used to configure the uart_id.
  1033. */
  1034. uint32_t id:32;
  1035. };
  1036. uint32_t val;
  1037. } lp_uart_id_reg_t;
  1038. typedef struct lp_uart_dev_t {
  1039. volatile lp_uart_fifo_reg_t fifo;
  1040. volatile lp_uart_int_raw_reg_t int_raw;
  1041. volatile lp_uart_int_st_reg_t int_st;
  1042. volatile lp_uart_int_ena_reg_t int_ena;
  1043. volatile lp_uart_int_clr_reg_t int_clr;
  1044. volatile lp_uart_clkdiv_sync_reg_t clkdiv_sync;
  1045. volatile lp_uart_rx_filt_reg_t rx_filt;
  1046. volatile lp_uart_status_reg_t status;
  1047. volatile lp_uart_conf0_sync_reg_t conf0_sync;
  1048. volatile lp_uart_conf1_reg_t conf1;
  1049. uint32_t reserved_028;
  1050. volatile lp_uart_hwfc_conf_sync_reg_t hwfc_conf_sync;
  1051. volatile lp_uart_sleep_conf0_reg_t sleep_conf0;
  1052. volatile lp_uart_sleep_conf1_reg_t sleep_conf1;
  1053. volatile lp_uart_sleep_conf2_reg_t sleep_conf2;
  1054. volatile lp_uart_swfc_conf0_sync_reg_t swfc_conf0_sync;
  1055. volatile lp_uart_swfc_conf1_reg_t swfc_conf1;
  1056. volatile lp_uart_txbrk_conf_sync_reg_t txbrk_conf_sync;
  1057. volatile lp_uart_idle_conf_sync_reg_t idle_conf_sync;
  1058. volatile lp_uart_rs485_conf_sync_reg_t rs485_conf_sync;
  1059. volatile lp_uart_at_cmd_precnt_sync_reg_t at_cmd_precnt_sync;
  1060. volatile lp_uart_at_cmd_postcnt_sync_reg_t at_cmd_postcnt_sync;
  1061. volatile lp_uart_at_cmd_gaptout_sync_reg_t at_cmd_gaptout_sync;
  1062. volatile lp_uart_at_cmd_char_sync_reg_t at_cmd_char_sync;
  1063. volatile lp_uart_mem_conf_reg_t mem_conf;
  1064. volatile lp_uart_tout_conf_sync_reg_t tout_conf_sync;
  1065. volatile lp_uart_mem_tx_status_reg_t mem_tx_status;
  1066. volatile lp_uart_mem_rx_status_reg_t mem_rx_status;
  1067. volatile lp_uart_fsm_status_reg_t fsm_status;
  1068. uint32_t reserved_074[5];
  1069. volatile lp_uart_clk_conf_reg_t clk_conf;
  1070. volatile lp_uart_date_reg_t date;
  1071. volatile lp_uart_afifo_status_reg_t afifo_status;
  1072. uint32_t reserved_094;
  1073. volatile lp_uart_reg_update_reg_t reg_update;
  1074. volatile lp_uart_id_reg_t id;
  1075. } lp_uart_dev_t;
  1076. // We map the LP_UART instance to the uart_dev_t struct for convinience of using the same HAL/LL. See soc/uart_struct.h
  1077. // extern lp_uart_dev_t LP_UART;
  1078. #ifndef __cplusplus
  1079. _Static_assert(sizeof(lp_uart_dev_t) == 0xa0, "Invalid size of lp_uart_dev_t structure");
  1080. #endif
  1081. #ifdef __cplusplus
  1082. }
  1083. #endif