• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  *
15  * Description: Provides v151 sio register operation api \n
16  *
17  * History: \n
18  * 2023-03-07, Create file. \n
19  */
20 #ifndef HAL_SIO_V151_REGS_OP_H
21 #define HAL_SIO_V151_REGS_OP_H
22 
23 #include <stdint.h>
24 #include "hal_sio_v151_regs_def.h"
25 #include "sio_porting.h"
26 
27 #ifdef __cplusplus
28 #if __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31 #endif /* __cplusplus */
32 
33 /**
34  * @defgroup drivers_hal_sio_v151_regs_op SIO V151 Regs Operation
35  * @ingroup  drivers_hal_sio
36  * @{
37  */
38 extern uintptr_t g_hal_sio_regs[I2S_MAX_NUMBER];
39 #define sios_v151_regs(bus) ((sio_v151_regs_t *)g_hal_sio_regs[bus])
40 
41 /**
42  * @brief  Init the sio which will set the base address of registers.
43  */
44 void hal_sio_v151_regs_init(sio_bus_t bus);
45 
46 /**
47  * @brief  Deinit the sio which will clear the base address of registers.
48  */
49 void hal_sio_v151_regs_deinit(sio_bus_t bus);
50 
51 /**
52  * @brief  Get the value of @ref sio_v151_version_data.loop.
53  * @param  [in]  bus The index of sio. @ref sio_bus_t
54  * @return The value of @ref sio_v151_version_data.loop.
55  */
hal_sio_v151_version_get_loop(sio_bus_t bus)56 static inline uint32_t hal_sio_v151_version_get_loop(sio_bus_t bus)
57 {
58     sio_v151_version_data_t version;
59     version.d32 = sios_v151_regs(bus)->version;
60     return version.b.loop;
61 }
62 
63 /**
64  * @brief  Set the value of @ref sio_v151_version_data.loop.
65  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
66  * @param  [in]  val The value of @ref sio_v151_version_data.loop.
67  */
hal_sio_v151_version_set_loop(sio_bus_t bus,uint32_t val)68 static inline void hal_sio_v151_version_set_loop(sio_bus_t bus, uint32_t val)
69 {
70     sio_v151_version_data_t version;
71     version.d32 = sios_v151_regs(bus)->version;
72     version.b.loop = val;
73     sios_v151_regs(bus)->version = version.d32;
74 }
75 
76 /**
77  * @brief  Get the value of @ref sio_v151_mode_data.mode.
78  * @param  [in]  bus The index of sio. @ref sio_bus_t
79  * @return The value of @ref sio_v151_mode_data.mode.
80  */
hal_sio_v151_mode_get_mode(sio_bus_t bus)81 static inline uint32_t hal_sio_v151_mode_get_mode(sio_bus_t bus)
82 {
83     sio_v151_mode_data_t mode;
84     mode.d32 = sios_v151_regs(bus)->mode;
85     return mode.b.mode;
86 }
87 
88 /**
89  * @brief  Set the value of @ref sio_v151_mode_data.mode.
90  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
91  * @param  [in]  val The value of @ref sio_v151_mode_data.mode.
92  */
hal_sio_v151_mode_set_mode(sio_bus_t bus,uint32_t val)93 static inline void hal_sio_v151_mode_set_mode(sio_bus_t bus, uint32_t val)
94 {
95     sio_v151_mode_data_t mode;
96     mode.d32 = sios_v151_regs(bus)->mode;
97     mode.b.mode = val;
98     sios_v151_regs(bus)->mode = mode.d32;
99 }
100 
101 /**
102  * @brief  Get the value of @ref sio_v151_mode_data.pcm_mode.
103  * @param  [in]  bus The index of sio. @ref sio_bus_t
104  * @return The value of @ref sio_v151_mode_data.pcm_mode.
105  */
hal_sio_v151_mode_get_pcm_mode(sio_bus_t bus)106 static inline uint32_t hal_sio_v151_mode_get_pcm_mode(sio_bus_t bus)
107 {
108     sio_v151_mode_data_t mode;
109     mode.d32 = sios_v151_regs(bus)->mode;
110     return mode.b.pcm_mode;
111 }
112 
113 /**
114  * @brief  Set the value of @ref sio_v151_mode_data.pcm_mode.
115  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
116  * @param  [in]  val The value of @ref sio_v151_mode_data.pcm_mode.
117  */
hal_sio_v151_mode_set_pcm_mode(sio_bus_t bus,uint32_t val)118 static inline void hal_sio_v151_mode_set_pcm_mode(sio_bus_t bus, uint32_t val)
119 {
120     sio_v151_mode_data_t mode;
121     mode.d32 = sios_v151_regs(bus)->mode;
122     mode.b.pcm_mode = val;
123     sios_v151_regs(bus)->mode = mode.d32;
124 }
125 
126 /**
127  * @brief  Get the value of @ref sio_v151_mode_data.rxws_select.
128  * @param  [in]  bus The index of sio. @ref sio_bus_t
129  * @return The value of @ref sio_v151_mode_data.rxws_select.
130  */
hal_sio_v151_mode_get_rxws_select(sio_bus_t bus)131 static inline uint32_t hal_sio_v151_mode_get_rxws_select(sio_bus_t bus)
132 {
133     sio_v151_mode_data_t mode;
134     mode.d32 = sios_v151_regs(bus)->mode;
135     return mode.b.rxws_select;
136 }
137 
138 /**
139  * @brief  Get the value of @ref sio_v151_mode_data.ext_rec_en.
140  * @param  [in]  bus The index of sio. @ref sio_bus_t
141  * @return The value of @ref sio_v151_mode_data.ext_rec_en.
142  */
hal_sio_v151_mode_get_ext_rec_en(sio_bus_t bus)143 static inline uint32_t hal_sio_v151_mode_get_ext_rec_en(sio_bus_t bus)
144 {
145     sio_v151_mode_data_t mode;
146     mode.d32 = sios_v151_regs(bus)->mode;
147     return mode.b.ext_rec_en;
148 }
149 
150 /**
151  * @brief  Set the value of @ref sio_v151_mode_data.ext_rec_en.
152  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
153  * @param  [in]  val The value of @ref sio_v151_mode_data.ext_rec_en.
154  */
hal_sio_v151_mode_set_ext_rec_en(sio_bus_t bus,uint32_t val)155 static inline void hal_sio_v151_mode_set_ext_rec_en(sio_bus_t bus, uint32_t val)
156 {
157     sio_v151_mode_data_t mode;
158     mode.d32 = sios_v151_regs(bus)->mode;
159     mode.b.ext_rec_en = val;
160     sios_v151_regs(bus)->mode = mode.d32;
161 }
162 
163 /**
164  * @brief  Get the value of @ref sio_v151_mode_data.chn_num.
165  * @param  [in]  bus The index of sio. @ref sio_bus_t
166  * @return The value of @ref sio_v151_mode_data.chn_num.
167  */
hal_sio_v151_mode_get_chn_num(sio_bus_t bus)168 static inline uint32_t hal_sio_v151_mode_get_chn_num(sio_bus_t bus)
169 {
170     sio_v151_mode_data_t mode;
171     mode.d32 = sios_v151_regs(bus)->mode;
172     return mode.b.chn_num;
173 }
174 
175 /**
176  * @brief  Set the value of @ref sio_v151_mode_data.chn_num.
177  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
178  * @param  [in]  val The value of @ref sio_v151_mode_data.chn_num.
179  */
hal_sio_v151_mode_set_chn_num(sio_bus_t bus,uint32_t val)180 static inline void hal_sio_v151_mode_set_chn_num(sio_bus_t bus, uint32_t val)
181 {
182     sio_v151_mode_data_t mode;
183     mode.d32 = sios_v151_regs(bus)->mode;
184     mode.b.chn_num = val;
185     sios_v151_regs(bus)->mode = mode.d32;
186 }
187 
188 /**
189  * @brief  Get the value of @ref sio_v151_mode_data.clk_edge.
190  * @param  [in]  bus The index of sio. @ref sio_bus_t
191  * @return The value of @ref sio_v151_mode_data.clk_edge.
192  */
hal_sio_v151_mode_get_clk_edge(sio_bus_t bus)193 static inline uint32_t hal_sio_v151_mode_get_clk_edge(sio_bus_t bus)
194 {
195     sio_v151_mode_data_t mode;
196     mode.d32 = sios_v151_regs(bus)->mode;
197     return mode.b.clk_edge;
198 }
199 
200 /**
201  * @brief  Set the value of @ref sio_v151_mode_data.clk_edge.
202  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
203  * @param  [in]  val The value of @ref sio_v151_mode_data.clk_edge.
204  */
hal_sio_v151_mode_set_clk_edge(sio_bus_t bus,uint32_t val)205 static inline void hal_sio_v151_mode_set_clk_edge(sio_bus_t bus, uint32_t val)
206 {
207     sio_v151_mode_data_t mode;
208     mode.d32 = sios_v151_regs(bus)->mode;
209     mode.b.clk_edge = val;
210     sios_v151_regs(bus)->mode = mode.d32;
211 }
212 
213 /**
214  * @brief  Get the value of @ref sio_v151_mode_data.cfg_i2s_ms_mode_sel.
215  * @param  [in]  bus The index of sio. @ref sio_bus_t
216  * @return The value of @ref sio_v151_mode_data.cfg_i2s_ms_mode_sel.
217  */
hal_sio_v151_mode_get_cfg_i2s_ms_mode_sel(sio_bus_t bus)218 static inline uint32_t hal_sio_v151_mode_get_cfg_i2s_ms_mode_sel(sio_bus_t bus)
219 {
220     sio_v151_mode_data_t mode;
221     mode.d32 = sios_v151_regs(bus)->mode;
222     return mode.b.cfg_i2s_ms_mode_sel;
223 }
224 
225 /**
226  * @brief  Set the value of @ref sio_v151_mode_data.cfg_i2s_ms_mode_sel.
227  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
228  * @param  [in]  val The value of @ref sio_v151_mode_data.cfg_i2s_ms_mode_sel.
229  */
hal_sio_v151_mode_set_cfg_i2s_ms_mode_sel(sio_bus_t bus,uint32_t val)230 static inline void hal_sio_v151_mode_set_cfg_i2s_ms_mode_sel(sio_bus_t bus, uint32_t val)
231 {
232     sio_v151_mode_data_t mode;
233     mode.d32 = sios_v151_regs(bus)->mode;
234     mode.b.cfg_i2s_ms_mode_sel = val;
235     sios_v151_regs(bus)->mode = mode.d32;
236 }
237 
238 /**
239  * @brief  Set the value of @ref sio_v151_intstatus_data.rx_intr.
240  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
241  * @return The value of @ref sio_v151_intstatus_data.rx_intr.
242  */
hal_sio_v151_intstatus_get_rx_intr(sio_bus_t bus)243 static inline uint32_t hal_sio_v151_intstatus_get_rx_intr(sio_bus_t bus)
244 {
245     sio_v151_intstatus_data_t intstatus;
246     intstatus.d32 = sios_v151_regs(bus)->intstatus;
247     return intstatus.b.rx_intr;
248 }
249 
250 /**
251  * @brief  Set the value of @ref sio_v151_intstatus_data.tx_intr.
252  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
253  * @return The value of @ref sio_v151_intstatus_data.tx_intr.
254  */
hal_sio_v151_intstatus_get_tx_intr(sio_bus_t bus)255 static inline uint32_t hal_sio_v151_intstatus_get_tx_intr(sio_bus_t bus)
256 {
257     sio_v151_intstatus_data_t intstatus;
258     intstatus.d32 = sios_v151_regs(bus)->intstatus;
259     return intstatus.b.tx_intr;
260 }
261 
262 /**
263  * @brief  Set the value of @ref sio_v151_intstatus_data.rx_right_fifo_over.
264  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
265  * @return The value of @ref sio_v151_intstatus_data.rx_right_fifo_over.
266  */
hal_sio_v151_intstatus_get_rx_right_fifo_over(sio_bus_t bus)267 static inline uint32_t hal_sio_v151_intstatus_get_rx_right_fifo_over(sio_bus_t bus)
268 {
269     sio_v151_intstatus_data_t intstatus;
270     intstatus.d32 = sios_v151_regs(bus)->intstatus;
271     return intstatus.b.rx_right_fifo_over;
272 }
273 
274 /**
275  * @brief  Set the value of @ref sio_v151_intstatus_data.rx_left_fifo_over.
276  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
277  * @return The value of @ref sio_v151_intstatus_data.rx_left_fifo_over.
278  */
hal_sio_v151_intstatus_get_rx_left_fifo_over(sio_bus_t bus)279 static inline uint32_t hal_sio_v151_intstatus_get_rx_left_fifo_over(sio_bus_t bus)
280 {
281     sio_v151_intstatus_data_t intstatus;
282     intstatus.d32 = sios_v151_regs(bus)->intstatus;
283     return intstatus.b.rx_left_fifo_over;
284 }
285 
286 /**
287  * @brief  Set the value of @ref sio_v151_intstatus_data.tx_right_fifo_under.
288  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
289  * @return The value of @ref sio_v151_intstatus_data.tx_right_fifo_under.
290  */
hal_sio_v151_intstatus_get_tx_right_fifo_under(sio_bus_t bus)291 static inline uint32_t hal_sio_v151_intstatus_get_tx_right_fifo_under(sio_bus_t bus)
292 {
293     sio_v151_intstatus_data_t intstatus;
294     intstatus.d32 = sios_v151_regs(bus)->intstatus;
295     return intstatus.b.tx_right_fifo_under;
296 }
297 
298 /**
299  * @brief  Set the value of @ref sio_v151_intstatus_data.tx_left_fifo_under.
300  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
301  * @return The value of @ref sio_v151_intstatus_data.tx_left_fifo_under.
302  */
hal_sio_v151_intstatus_get_tx_left_fifo_under(sio_bus_t bus)303 static inline uint32_t hal_sio_v151_intstatus_get_tx_left_fifo_under(sio_bus_t bus)
304 {
305     sio_v151_intstatus_data_t intstatus;
306     intstatus.d32 = sios_v151_regs(bus)->intstatus;
307     return intstatus.b.tx_left_fifo_under;
308 }
309 
310 /**
311  * @brief  Set the value of @ref sio_v151_intclr_data.rx_intr.
312  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
313  * @param  [in]  val The value of @ref sio_v151_intclr_data.rx_intr.
314  */
hal_sio_v151_intclr_set_rx_intr(sio_bus_t bus,uint32_t val)315 static inline void hal_sio_v151_intclr_set_rx_intr(sio_bus_t bus, uint32_t val)
316 {
317     sio_v151_intclr_data_t intclr;
318     intclr.d32 = sios_v151_regs(bus)->intclr;
319     intclr.b.rx_intr = val;
320     sios_v151_regs(bus)->intclr = intclr.d32;
321 }
322 
323 /**
324  * @brief  Set the value of @ref sio_v151_intclr_data.tx_intr.
325  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
326  * @param  [in]  val The value of @ref sio_v151_intclr_data.tx_intr.
327  */
hal_sio_v151_intclr_set_tx_intr(sio_bus_t bus,uint32_t val)328 static inline void hal_sio_v151_intclr_set_tx_intr(sio_bus_t bus, uint32_t val)
329 {
330     sio_v151_intclr_data_t intclr;
331     intclr.d32 = sios_v151_regs(bus)->intclr;
332     intclr.b.tx_intr = val;
333     sios_v151_regs(bus)->intclr = intclr.d32;
334 }
335 
336 /**
337  * @brief  Set the value of @ref sio_v151_intclr_data.rx_right_fifo_over.
338  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
339  * @param  [in]  val The value of @ref sio_v151_intclr_data.rx_right_fifo_over.
340  */
hal_sio_v151_intclr_set_rx_right_fifo_over(sio_bus_t bus,uint32_t val)341 static inline void hal_sio_v151_intclr_set_rx_right_fifo_over(sio_bus_t bus, uint32_t val)
342 {
343     sio_v151_intclr_data_t intclr;
344     intclr.d32 = sios_v151_regs(bus)->intclr;
345     intclr.b.rx_right_fifo_over = val;
346     sios_v151_regs(bus)->intclr = intclr.d32;
347 }
348 
349 /**
350  * @brief  Set the value of @ref sio_v151_intclr_data.rx_left_fifo_over.
351  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
352  * @param  [in]  val The value of @ref sio_v151_intclr_data.rx_left_fifo_over.
353  */
hal_sio_v151_intclr_set_rx_left_fifo_over(sio_bus_t bus,uint32_t val)354 static inline void hal_sio_v151_intclr_set_rx_left_fifo_over(sio_bus_t bus, uint32_t val)
355 {
356     sio_v151_intclr_data_t intclr;
357     intclr.d32 = sios_v151_regs(bus)->intclr;
358     intclr.b.rx_left_fifo_over = val;
359     sios_v151_regs(bus)->intclr = intclr.d32;
360 }
361 
362 /**
363  * @brief  Set the value of @ref sio_v151_intclr_data.tx_right_fifo_under.
364  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
365  * @param  [in]  val The value of @ref sio_v151_intclr_data.tx_right_fifo_under.
366  */
hal_sio_v151_intclr_set_tx_right_fifo_under(sio_bus_t bus,uint32_t val)367 static inline void hal_sio_v151_intclr_set_tx_right_fifo_under(sio_bus_t bus, uint32_t val)
368 {
369     sio_v151_intclr_data_t intclr;
370     intclr.d32 = sios_v151_regs(bus)->intclr;
371     intclr.b.tx_right_fifo_under = val;
372     sios_v151_regs(bus)->intclr = intclr.d32;
373 }
374 
375 /**
376  * @brief  Set the value of @ref sio_v151_intclr_data.tx_left_fifo_under.
377  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
378  * @param  [in]  val The value of @ref sio_v151_intclr_data.tx_left_fifo_under.
379  */
hal_sio_v151_intclr_set_tx_left_fifo_under(sio_bus_t bus,uint32_t val)380 static inline void hal_sio_v151_intclr_set_tx_left_fifo_under(sio_bus_t bus, uint32_t val)
381 {
382     sio_v151_intclr_data_t intclr;
383     intclr.d32 = sios_v151_regs(bus)->intclr;
384     intclr.b.tx_left_fifo_under = val;
385     sios_v151_regs(bus)->intclr = intclr.d32;
386 }
387 
388 /**
389  * @brief  Set the value of @ref sio_v151_i2s_left_xd_data.tx_left_data.
390  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
391  * @param  [in]  val The value of @ref sio_v151_i2s_left_xd_data.tx_left_data.
392  */
hal_sio_v151_i2s_left_xd_set_tx_left_data(sio_bus_t bus,uint32_t val)393 static inline void hal_sio_v151_i2s_left_xd_set_tx_left_data(sio_bus_t bus, uint32_t val)
394 {
395     sio_v151_i2s_left_xd_data_t i2s_left_xd;
396     i2s_left_xd.d32 = sios_v151_regs(bus)->left_tx;
397     i2s_left_xd.b.tx_left_data = val;
398     sios_v151_regs(bus)->left_tx = i2s_left_xd.d32;
399 }
400 
401 /**
402  * @brief  Set the value of @ref sio_v151_i2s_right_xd_data.tx_right_data.
403  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
404  * @param  [in]  val The value of @ref sio_v151_i2s_right_xd_data.tx_right_data.
405  */
hal_sio_v151_i2s_right_xd_set_tx_right_data(sio_bus_t bus,uint32_t val)406 static inline void hal_sio_v151_i2s_right_xd_set_tx_right_data(sio_bus_t bus, uint32_t val)
407 {
408     sio_v151_i2s_right_xd_data_t i2s_right_xd;
409     i2s_right_xd.d32 = sios_v151_regs(bus)->right_tx;
410     i2s_right_xd.b.tx_right_data = val;
411     sios_v151_regs(bus)->right_tx = i2s_right_xd.d32;
412 }
413 
414 /**
415  * @brief Get the value of @ref sio_v151_i2s_left_rd_data.rx_left_data.
416  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
417  * @return The value of @ref sio_v151_i2s_left_rd_data.rx_left_data.
418  */
hal_sio_v151_i2s_left_rd_get_rx_left_data(sio_bus_t bus)419 static inline uint32_t hal_sio_v151_i2s_left_rd_get_rx_left_data(sio_bus_t bus)
420 {
421     sio_v151_i2s_left_rd_data_t i2s_left_rd;
422     i2s_left_rd.d32 = sios_v151_regs(bus)->left_rx;
423     return i2s_left_rd.b.rx_left_data;
424 }
425 
426 /**
427  * @brief Get the value of @ref sio_v151_i2s_right_rd_data.rx_right_data.
428  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
429  * @return The value of @ref sio_v151_i2s_right_rd_data.rx_right_data.
430  */
hal_sio_v151_i2s_right_rd_get_rx_right_data(sio_bus_t bus)431 static inline uint32_t hal_sio_v151_i2s_right_rd_get_rx_right_data(sio_bus_t bus)
432 {
433     sio_v151_i2s_right_rd_data_t i2s_right_rd;
434     i2s_right_rd.d32 = sios_v151_regs(bus)->right_rx;
435     return i2s_right_rd.b.rx_right_data;
436 }
437 
438 /**
439  * @brief Get the value of @ref sio_v151_ct_set_data.tx_data_merge_en.
440  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
441  * @return The value of @ref sio_v151_ct_set_data.tx_data_merge_en.
442  */
hal_sio_v151_ct_set_get_tx_data_merge_en(sio_bus_t bus)443 static inline uint32_t hal_sio_v151_ct_set_get_tx_data_merge_en(sio_bus_t bus)
444 {
445     sio_v151_ct_set_data_t ct_set;
446     ct_set.d32 = sios_v151_regs(bus)->ct_set;
447     return ct_set.b.tx_data_merge_en;
448 }
449 
450 /**
451  * @brief  Set the value of @ref sio_v151_ct_set_data.tx_data_merge_en.
452  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
453  * @param  [in]  val The value of @ref sio_v151_ct_set_data.tx_data_merge_en.
454  */
hal_sio_v151_ct_set_set_tx_data_merge_en(sio_bus_t bus,uint32_t val)455 static inline void hal_sio_v151_ct_set_set_tx_data_merge_en(sio_bus_t bus, uint32_t val)
456 {
457     sio_v151_ct_set_data_t ct_set;
458     ct_set.d32 = sios_v151_regs(bus)->ct_set;
459     ct_set.b.tx_data_merge_en = val;
460     sios_v151_regs(bus)->ct_set = ct_set.d32;
461 }
462 
463 /**
464  * @brief Get the value of @ref sio_v151_ct_set_data.rx_data_merge_en.
465  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
466  * @return The value of @ref sio_v151_ct_set_data.rx_data_merge_en.
467  */
hal_sio_v151_ct_set_get_rx_data_merge_en(sio_bus_t bus)468 static inline uint32_t hal_sio_v151_ct_set_get_rx_data_merge_en(sio_bus_t bus)
469 {
470     sio_v151_ct_set_data_t ct_set;
471     ct_set.d32 = sios_v151_regs(bus)->ct_set;
472     return ct_set.b.rx_data_merge_en;
473 }
474 
475 /**
476  * @brief  Set the value of @ref sio_v151_ct_set_data.rx_data_merge_en.
477  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
478  * @param  [in]  val The value of @ref sio_v151_ct_set_data.rx_data_merge_en.
479  */
hal_sio_v151_ct_set_set_rx_data_merge_en(sio_bus_t bus,uint32_t val)480 static inline void hal_sio_v151_ct_set_set_rx_data_merge_en(sio_bus_t bus, uint32_t val)
481 {
482     sio_v151_ct_set_data_t ct_set;
483     ct_set.d32 = sios_v151_regs(bus)->ct_set;
484     ct_set.b.rx_data_merge_en = val;
485     sios_v151_regs(bus)->ct_set = ct_set.d32;
486 }
487 
488 /**
489  * @brief Get the value of @ref sio_v151_ct_set_data.tx_fifo_disable.
490  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
491  * @return The value of @ref sio_v151_ct_set_data.tx_fifo_disable.
492  */
hal_sio_v151_ct_set_get_tx_fifo_disable(sio_bus_t bus)493 static inline uint32_t hal_sio_v151_ct_set_get_tx_fifo_disable(sio_bus_t bus)
494 {
495     sio_v151_ct_set_data_t ct_set;
496     ct_set.d32 = sios_v151_regs(bus)->ct_set;
497     return ct_set.b.tx_fifo_disable;
498 }
499 
500 /**
501  * @brief  Set the value of @ref sio_v151_ct_set_data.tx_fifo_disable.
502  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
503  * @param  [in]  val The value of @ref sio_v151_ct_set_data.tx_fifo_disable.
504  */
hal_sio_v151_ct_set_set_tx_fifo_disable(sio_bus_t bus,uint32_t val)505 static inline void hal_sio_v151_ct_set_set_tx_fifo_disable(sio_bus_t bus, uint32_t val)
506 {
507     sio_v151_ct_set_data_t ct_set;
508     ct_set.d32 = sios_v151_regs(bus)->ct_set;
509     ct_set.b.tx_fifo_disable = val;
510     sios_v151_regs(bus)->ct_set = ct_set.d32;
511 }
512 
513 /**
514  * @brief Get the value of @ref sio_v151_ct_set_data.rx_fifo_disable.
515  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
516  * @return The value of @ref sio_v151_ct_set_data.rx_fifo_disable.
517  */
hal_sio_v151_ct_set_get_rx_fifo_disable(sio_bus_t bus)518 static inline uint32_t hal_sio_v151_ct_set_get_rx_fifo_disable(sio_bus_t bus)
519 {
520     sio_v151_ct_set_data_t ct_set;
521     ct_set.d32 = sios_v151_regs(bus)->ct_set;
522     return ct_set.b.rx_fifo_disable;
523 }
524 
525 /**
526  * @brief  Set the value of @ref sio_v151_ct_set_data.rx_fifo_disable.
527  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
528  * @param  [in]  val The value of @ref sio_v151_ct_set_data.rx_fifo_disable.
529  */
hal_sio_v151_ct_set_set_rx_fifo_disable(sio_bus_t bus,uint32_t val)530 static inline void hal_sio_v151_ct_set_set_rx_fifo_disable(sio_bus_t bus, uint32_t val)
531 {
532     sio_v151_ct_set_data_t ct_set;
533     ct_set.d32 = sios_v151_regs(bus)->ct_set;
534     ct_set.b.rx_fifo_disable = val;
535     sios_v151_regs(bus)->ct_set = ct_set.d32;
536 }
537 
538 /**
539  * @brief Get the value of @ref sio_v151_ct_set_data.tx_enable.
540  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
541  * @return The value of @ref sio_v151_ct_set_data.tx_enable.
542  */
hal_sio_v151_ct_set_get_tx_enable(sio_bus_t bus)543 static inline uint32_t hal_sio_v151_ct_set_get_tx_enable(sio_bus_t bus)
544 {
545     sio_v151_ct_set_data_t ct_set;
546     ct_set.d32 = sios_v151_regs(bus)->ct_set;
547     return ct_set.b.tx_enable;
548 }
549 
550 /**
551  * @brief  Set the value of @ref sio_v151_ct_set_data.tx_enable.
552  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
553  * @param  [in]  val The value of @ref sio_v151_ct_set_data.tx_enable.
554  */
hal_sio_v151_ct_set_set_tx_enable(sio_bus_t bus,uint32_t val)555 static inline void hal_sio_v151_ct_set_set_tx_enable(sio_bus_t bus, uint32_t val)
556 {
557     sio_v151_ct_set_data_t ct_set;
558     ct_set.d32 = sios_v151_regs(bus)->ct_set;
559     ct_set.b.tx_enable = val;
560     sios_v151_regs(bus)->ct_set = ct_set.d32;
561 }
562 
563 /**
564  * @brief Get the value of @ref sio_v151_ct_set_data.rx_enable.
565  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
566  * @return The value of @ref sio_v151_ct_set_data.rx_enable.
567  */
hal_sio_v151_ct_set_get_rx_enable(sio_bus_t bus)568 static inline uint32_t hal_sio_v151_ct_set_get_rx_enable(sio_bus_t bus)
569 {
570     sio_v151_ct_set_data_t ct_set;
571     ct_set.d32 = sios_v151_regs(bus)->ct_set;
572     return ct_set.b.rx_enable;
573 }
574 
575 /**
576  * @brief  Set the value of @ref sio_v151_ct_set_data.rx_enable.
577  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
578  * @param  [in]  val The value of @ref sio_v151_ct_set_data.rx_enable.
579  */
hal_sio_v151_ct_set_set_rx_enable(sio_bus_t bus,uint32_t val)580 static inline void hal_sio_v151_ct_set_set_rx_enable(sio_bus_t bus, uint32_t val)
581 {
582     sio_v151_ct_set_data_t ct_set;
583     ct_set.d32 = sios_v151_regs(bus)->ct_set;
584     ct_set.b.rx_enable = val;
585     sios_v151_regs(bus)->ct_set = ct_set.d32;
586 }
587 
588 /**
589  * @brief Get the value of @ref sio_v151_ct_set_data.intr_en.
590  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
591  * @return The value of @ref sio_v151_ct_set_data.intr_en.
592  */
hal_sio_v151_ct_set_get_intr_en(sio_bus_t bus)593 static inline uint32_t hal_sio_v151_ct_set_get_intr_en(sio_bus_t bus)
594 {
595     sio_v151_ct_set_data_t ct_set;
596     ct_set.d32 = sios_v151_regs(bus)->ct_set;
597     return ct_set.b.intr_en;
598 }
599 
600 /**
601  * @brief  Set the value of @ref sio_v151_ct_set_data.intr_en.
602  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
603  * @param  [in]  val The value of @ref sio_v151_ct_set_data.intr_en.
604  */
hal_sio_v151_ct_set_set_intr_en(sio_bus_t bus,uint32_t val)605 static inline void hal_sio_v151_ct_set_set_intr_en(sio_bus_t bus, uint32_t val)
606 {
607     sio_v151_ct_set_data_t ct_set;
608     ct_set.d32 = sios_v151_regs(bus)->ct_set;
609     ct_set.b.intr_en = val;
610     sios_v151_regs(bus)->ct_set = ct_set.d32;
611 }
612 
613 /**
614  * @brief  Get the value of @ref sio_v151_ct_set_data.rst_n.
615  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
616  * @return The value of @ref sio_v151_ct_set_data.rst_n.
617  */
hal_sio_v151_ct_set_get_rst_n(sio_bus_t bus)618 static inline uint32_t hal_sio_v151_ct_set_get_rst_n(sio_bus_t bus)
619 {
620     sio_v151_ct_set_data_t ct_set;
621     ct_set.d32 = sios_v151_regs(bus)->ct_set;
622     return ct_set.b.rst_n;
623 }
624 
625 /**
626  * @brief  Set the value of @ref sio_v151_ct_set_data.rst_n.
627  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
628  * @param  [in]  val The value of @ref sio_v151_ct_set_data.rst_n.
629  */
hal_sio_v151_ct_set_set_rst_n(sio_bus_t bus,uint32_t val)630 static inline void hal_sio_v151_ct_set_set_rst_n(sio_bus_t bus, uint32_t val)
631 {
632     sio_v151_ct_set_data_t ct_set;
633     ct_set.d32 = sios_v151_regs(bus)->ct_set;
634     ct_set.b.rst_n = val;
635     sios_v151_regs(bus)->ct_set = ct_set.d32;
636 }
637 
638 /**
639  * @brief  Set the value of @ref sio_v151_ct_clr_data.tx_data_merge_en.
640  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
641  * @param  [in]  val The value of @ref sio_v151_ct_clr_data.tx_data_merge_en.
642  */
hal_sio_v151_ct_clr_set_tx_data_merge_en(sio_bus_t bus,uint32_t val)643 static inline void hal_sio_v151_ct_clr_set_tx_data_merge_en(sio_bus_t bus, uint32_t val)
644 {
645     sio_v151_ct_clr_data_t ct_clr;
646     ct_clr.d32 = sios_v151_regs(bus)->ct_clr;
647     ct_clr.b.tx_data_merge_en = val;
648     sios_v151_regs(bus)->ct_clr = ct_clr.d32;
649 }
650 
651 /**
652  * @brief Get the value of @ref sio_v151_ct_clr_data.rx_data_merge_en.
653  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
654  * @return The value of @ref sio_v151_ct_clr_data.rx_data_merge_en.
655  */
hal_sio_v151_ct_clr_get_rx_data_merge_en(sio_bus_t bus)656 static inline uint32_t hal_sio_v151_ct_clr_get_rx_data_merge_en(sio_bus_t bus)
657 {
658     sio_v151_ct_clr_data_t ct_clr;
659     ct_clr.d32 = sios_v151_regs(bus)->ct_clr;
660     return ct_clr.b.rx_data_merge_en;
661 }
662 
663 /**
664  * @brief  Set the value of @ref sio_v151_ct_clr_data.rx_data_merge_en.
665  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
666  * @param  [in]  val The value of @ref sio_v151_ct_clr_data.rx_data_merge_en.
667  */
hal_sio_v151_ct_clr_set_rx_data_merge_en(sio_bus_t bus,uint32_t val)668 static inline void hal_sio_v151_ct_clr_set_rx_data_merge_en(sio_bus_t bus, uint32_t val)
669 {
670     sio_v151_ct_clr_data_t ct_clr;
671     ct_clr.d32 = sios_v151_regs(bus)->ct_clr;
672     ct_clr.b.rx_data_merge_en = val;
673     sios_v151_regs(bus)->ct_clr = ct_clr.d32;
674 }
675 
676 /**
677  * @brief Get the value of @ref sio_v151_ct_clr_data.tx_fifo_disable.
678  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
679  * @return The value of @ref sio_v151_ct_clr_data.tx_fifo_disable.
680  */
hal_sio_v151_ct_clr_get_tx_fifo_disable(sio_bus_t bus)681 static inline uint32_t hal_sio_v151_ct_clr_get_tx_fifo_disable(sio_bus_t bus)
682 {
683     sio_v151_ct_clr_data_t ct_clr;
684     ct_clr.d32 = sios_v151_regs(bus)->ct_clr;
685     return ct_clr.b.tx_fifo_disable;
686 }
687 
688 /**
689  * @brief  Set the value of @ref sio_v151_ct_clr_data.tx_fifo_disable.
690  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
691  * @param  [in]  val The value of @ref sio_v151_ct_clr_data.tx_fifo_disable.
692  */
hal_sio_v151_ct_clr_set_tx_fifo_disable(sio_bus_t bus,uint32_t val)693 static inline void hal_sio_v151_ct_clr_set_tx_fifo_disable(sio_bus_t bus, uint32_t val)
694 {
695     sio_v151_ct_clr_data_t ct_clr;
696     ct_clr.d32 = sios_v151_regs(bus)->ct_clr;
697     ct_clr.b.tx_fifo_disable = val;
698     sios_v151_regs(bus)->ct_clr = ct_clr.d32;
699 }
700 
701 /**
702  * @brief Get the value of @ref sio_v151_ct_clr_data.rx_fifo_disable.
703  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
704  * @return The value of @ref sio_v151_ct_clr_data.rx_fifo_disable.
705  */
hal_sio_v151_ct_clr_get_rx_fifo_disable(sio_bus_t bus)706 static inline uint32_t hal_sio_v151_ct_clr_get_rx_fifo_disable(sio_bus_t bus)
707 {
708     sio_v151_ct_clr_data_t ct_clr;
709     ct_clr.d32 = sios_v151_regs(bus)->ct_clr;
710     return ct_clr.b.rx_fifo_disable;
711 }
712 
713 /**
714  * @brief  Set the value of @ref sio_v151_ct_clr_data.rx_fifo_disable.
715  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
716  * @param  [in]  val The value of @ref sio_v151_ct_clr_data.rx_fifo_disable.
717  */
hal_sio_v151_ct_clr_set_rx_fifo_disable(sio_bus_t bus,uint32_t val)718 static inline void hal_sio_v151_ct_clr_set_rx_fifo_disable(sio_bus_t bus, uint32_t val)
719 {
720     sio_v151_ct_clr_data_t ct_clr;
721     ct_clr.d32 = sios_v151_regs(bus)->ct_clr;
722     ct_clr.b.rx_fifo_disable = val;
723     sios_v151_regs(bus)->ct_clr = ct_clr.d32;
724 }
725 
726 /**
727  * @brief Get the value of @ref sio_v151_ct_clr_data.tx_enable.
728  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
729  * @return The value of @ref sio_v151_ct_clr_data.tx_enable.
730  */
hal_sio_v151_ct_clr_get_tx_enable(sio_bus_t bus)731 static inline uint32_t hal_sio_v151_ct_clr_get_tx_enable(sio_bus_t bus)
732 {
733     sio_v151_ct_clr_data_t ct_clr;
734     ct_clr.d32 = sios_v151_regs(bus)->ct_clr;
735     return ct_clr.b.tx_enable;
736 }
737 
738 /**
739  * @brief  Set the value of @ref sio_v151_ct_clr_data.tx_enable.
740  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
741  * @param  [in]  val The value of @ref sio_v151_ct_clr_data.tx_enable.
742  */
hal_sio_v151_ct_clr_set_tx_enable(sio_bus_t bus,uint32_t val)743 static inline void hal_sio_v151_ct_clr_set_tx_enable(sio_bus_t bus, uint32_t val)
744 {
745     sio_v151_ct_clr_data_t ct_clr;
746     ct_clr.d32 = sios_v151_regs(bus)->ct_clr;
747     ct_clr.b.tx_enable = val;
748     sios_v151_regs(bus)->ct_clr = ct_clr.d32;
749 }
750 
751 /**
752  * @brief Get the value of @ref sio_v151_ct_clr_data.rx_enable.
753  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
754  * @return The value of @ref sio_v151_ct_clr_data.rx_enable.
755  */
hal_sio_v151_ct_clr_get_rx_enable(sio_bus_t bus)756 static inline uint32_t hal_sio_v151_ct_clr_get_rx_enable(sio_bus_t bus)
757 {
758     sio_v151_ct_clr_data_t ct_clr;
759     ct_clr.d32 = sios_v151_regs(bus)->ct_clr;
760     return ct_clr.b.rx_enable;
761 }
762 
763 /**
764  * @brief  Set the value of @ref sio_v151_ct_clr_data.rx_enable.
765  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
766  * @param  [in]  val The value of @ref sio_v151_ct_clr_data.rx_enable.
767  */
hal_sio_v151_ct_clr_set_rx_enable(sio_bus_t bus,uint32_t val)768 static inline void hal_sio_v151_ct_clr_set_rx_enable(sio_bus_t bus, uint32_t val)
769 {
770     sio_v151_ct_clr_data_t ct_clr;
771     ct_clr.d32 = sios_v151_regs(bus)->ct_clr;
772     ct_clr.b.rx_enable = val;
773     sios_v151_regs(bus)->ct_clr = ct_clr.d32;
774 }
775 
776 /**
777  * @brief  Set the value of @ref sio_v151_ct_clr_data.intr_en.
778  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
779  * @param  [in]  val The value of @ref sio_v151_ct_clr_data.intr_en.
780  */
hal_sio_v151_ct_clr_set_intr_en(sio_bus_t bus,uint32_t val)781 static inline void hal_sio_v151_ct_clr_set_intr_en(sio_bus_t bus, uint32_t val)
782 {
783     sio_v151_ct_clr_data_t ct_clr;
784     ct_clr.d32 = sios_v151_regs(bus)->ct_clr;
785     ct_clr.b.intr_en = val;
786     sios_v151_regs(bus)->ct_clr = ct_clr.d32;
787 }
788 
789 /**
790  * @brief Get the value of @ref sio_v151_ct_clr_data.intr_en.
791  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
792  * @return The value of @ref sio_v151_ct_clr_data.intr_en.
793  */
hal_sio_v151_ct_clr_get_intr_en(sio_bus_t bus)794 static inline uint32_t hal_sio_v151_ct_clr_get_intr_en(sio_bus_t bus)
795 {
796     sio_v151_ct_clr_data_t ct_clr;
797     ct_clr.d32 = sios_v151_regs(bus)->ct_clr;
798     return ct_clr.b.intr_en;
799 }
800 
801 /**
802  * @brief  Set the value of @ref sio_v151_ct_clr_data.rst_n.
803  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
804  * @param  [in]  val The value of @ref sio_v151_ct_clr_data.rst_n.
805  */
hal_sio_v151_ct_clr_set_rst_n(sio_bus_t bus,uint32_t val)806 static inline void hal_sio_v151_ct_clr_set_rst_n(sio_bus_t bus, uint32_t val)
807 {
808     sio_v151_ct_clr_data_t ct_clr;
809     ct_clr.d32 = sios_v151_regs(bus)->ct_clr;
810     ct_clr.b.rst_n = val;
811     sios_v151_regs(bus)->ct_clr = ct_clr.d32;
812 }
813 
814 /**
815  * @brief Get the value of @ref sio_v151_fifo_threshold_data.rx_fifo_threshold.
816  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
817  * @return The value of @ref sio_v151_fifo_threshold_data.rx_fifo_threshold.
818  */
hal_sio_v151_fifo_threshold_get_rx_fifo_threshold(sio_bus_t bus)819 static inline uint32_t hal_sio_v151_fifo_threshold_get_rx_fifo_threshold(sio_bus_t bus)
820 {
821     sio_v151_fifo_threshold_data_t fifo_threshold;
822     fifo_threshold.d32 = sios_v151_regs(bus)->fifo_threshold;
823     return fifo_threshold.b.rx_fifo_threshold;
824 }
825 
826 /**
827  * @brief  Set the value of @ref sio_v151_fifo_threshold_data.rx_fifo_threshold.
828  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
829  * @param  [in]  val The value of @ref sio_v151_fifo_threshold_data.rx_fifo_threshold.
830  */
hal_sio_v151_fifo_threshold_set_rx_fifo_threshold(sio_bus_t bus,uint32_t val)831 static inline void hal_sio_v151_fifo_threshold_set_rx_fifo_threshold(sio_bus_t bus, uint32_t val)
832 {
833     sio_v151_fifo_threshold_data_t fifo_threshold;
834     fifo_threshold.d32 = sios_v151_regs(bus)->fifo_threshold;
835     fifo_threshold.b.rx_fifo_threshold = val;
836     sios_v151_regs(bus)->fifo_threshold = fifo_threshold.d32;
837 }
838 
839 /**
840  * @brief Get the value of @ref sio_v151_fifo_threshold_data.tx_fifo_threshold.
841  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
842  * @return The value of @ref sio_v151_fifo_threshold_data.tx_fifo_threshold.
843  */
hal_sio_v151_fifo_threshold_get_tx_fifo_threshold(sio_bus_t bus)844 static inline uint32_t hal_sio_v151_fifo_threshold_get_tx_fifo_threshold(sio_bus_t bus)
845 {
846     sio_v151_fifo_threshold_data_t fifo_threshold;
847     fifo_threshold.d32 = sios_v151_regs(bus)->fifo_threshold;
848     return fifo_threshold.b.tx_fifo_threshold;
849 }
850 
851 /**
852  * @brief  Set the value of @ref sio_v151_fifo_threshold_data.tx_fifo_threshold.
853  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
854  * @param  [in]  val The value of @ref sio_v151_fifo_threshold_data.tx_fifo_threshold.
855  */
hal_sio_v151_fifo_threshold_set_tx_fifo_threshold(sio_bus_t bus,uint32_t val)856 static inline void hal_sio_v151_fifo_threshold_set_tx_fifo_threshold(sio_bus_t bus, uint32_t val)
857 {
858     sio_v151_fifo_threshold_data_t fifo_threshold;
859     fifo_threshold.d32 = sios_v151_regs(bus)->fifo_threshold;
860     fifo_threshold.b.tx_fifo_threshold = val;
861     sios_v151_regs(bus)->fifo_threshold = fifo_threshold.d32;
862 }
863 
864 /**
865  * @brief Get the value of @ref sio_v151_rx_sta_data.rx_left_depth.
866  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
867  * @return The value of @ref sio_v151_rx_sta_data.rx_left_depth.
868  */
hal_sio_v151_rx_sta_get_rx_left_depth(sio_bus_t bus)869 static inline uint32_t hal_sio_v151_rx_sta_get_rx_left_depth(sio_bus_t bus)
870 {
871     sio_v151_rx_sta_data_t rx_sta;
872     rx_sta.d32 = sios_v151_regs(bus)->rx_sta;
873     return rx_sta.b.rx_left_depth;
874 }
875 
876 /**
877  * @brief Get the value of @ref sio_v151_rx_sta_data.rx_right_depth.
878  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
879  * @return The value of @ref sio_v151_rx_sta_data.rx_right_depth.
880  */
hal_sio_v151_rx_sta_get_rx_right_depth(sio_bus_t bus)881 static inline uint32_t hal_sio_v151_rx_sta_get_rx_right_depth(sio_bus_t bus)
882 {
883     sio_v151_rx_sta_data_t rx_sta;
884     rx_sta.d32 = sios_v151_regs(bus)->rx_sta;
885     return rx_sta.b.rx_right_depth;
886 }
887 
888 /**
889  * @brief Get the value of @ref sio_v151_tx_sta_data.tx_left_depth.
890  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
891  * @return The value of @ref sio_v151_tx_sta_data.tx_left_depth.
892  */
hal_sio_v151_tx_sta_get_tx_left_depth(sio_bus_t bus)893 static inline uint32_t hal_sio_v151_tx_sta_get_tx_left_depth(sio_bus_t bus)
894 {
895     sio_v151_tx_sta_data_t tx_sta;
896     tx_sta.d32 = sios_v151_regs(bus)->tx_sta;
897     return tx_sta.b.tx_left_depth;
898 }
899 
900 /**
901  * @brief  Set the value of @ref sio_v151_tx_sta_data.tx_left_depth.
902  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
903  * @param  [in]  val The value of @ref sio_v151_tx_sta_data.tx_left_depth.
904  */
hal_sio_v151_tx_sta_set_tx_left_depth(sio_bus_t bus,uint32_t val)905 static inline void hal_sio_v151_tx_sta_set_tx_left_depth(sio_bus_t bus, uint32_t val)
906 {
907     sio_v151_tx_sta_data_t tx_sta;
908     tx_sta.d32 = sios_v151_regs(bus)->tx_sta;
909     tx_sta.b.tx_left_depth = val;
910     sios_v151_regs(bus)->tx_sta = tx_sta.d32;
911 }
912 
913 /**
914  * @brief Get the value of @ref sio_v151_tx_sta_data.tx_right_depth.
915  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
916  * @return The value of @ref sio_v151_tx_sta_data.tx_right_depth.
917  */
hal_sio_v151_tx_sta_get_tx_right_depth(sio_bus_t bus)918 static inline uint32_t hal_sio_v151_tx_sta_get_tx_right_depth(sio_bus_t bus)
919 {
920     sio_v151_tx_sta_data_t tx_sta;
921     tx_sta.d32 = sios_v151_regs(bus)->tx_sta;
922     return tx_sta.b.tx_right_depth;
923 }
924 
925 /**
926  * @brief  Set the value of @ref sio_v151_tx_sta_data.tx_right_depth.
927  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
928  * @param  [in]  val The value of @ref sio_v151_tx_sta_data.tx_right_depth.
929  */
hal_sio_v151_tx_sta_set_tx_right_depth(sio_bus_t bus,uint32_t val)930 static inline void hal_sio_v151_tx_sta_set_tx_right_depth(sio_bus_t bus, uint32_t val)
931 {
932     sio_v151_tx_sta_data_t tx_sta;
933     tx_sta.d32 = sios_v151_regs(bus)->tx_sta;
934     tx_sta.b.tx_right_depth = val;
935     sios_v151_regs(bus)->tx_sta = tx_sta.d32;
936 }
937 
938 /**
939  * @brief Get the value of @ref sio_v151_data_width_set_data.tx_mode.
940  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
941  * @return The value of @ref sio_v151_data_width_set_data.tx_mode.
942  */
hal_sio_v151_data_width_get_tx_mode(sio_bus_t bus)943 static inline uint32_t hal_sio_v151_data_width_get_tx_mode(sio_bus_t bus)
944 {
945     sio_v151_data_width_set_data_t data_width_set;
946     data_width_set.d32 = sios_v151_regs(bus)->data_width_set;
947     return data_width_set.b.tx_mode;
948 }
949 
950 /**
951  * @brief  Set the value of @ref sio_v151_data_width_set_data.tx_mode.
952  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
953  * @param  [in]  val The value of @ref sio_v151_data_width_set_data.tx_mode.
954  */
hal_sio_v151_data_width_set_tx_mode(sio_bus_t bus,uint32_t val)955 static inline void hal_sio_v151_data_width_set_tx_mode(sio_bus_t bus, uint32_t val)
956 {
957     sio_v151_data_width_set_data_t data_width_set;
958     data_width_set.d32 = sios_v151_regs(bus)->data_width_set;
959     data_width_set.b.tx_mode = val;
960     sios_v151_regs(bus)->data_width_set = data_width_set.d32;
961 }
962 
963 /**
964  * @brief Get the value of @ref sio_v151_data_width_set_data.rx_mode.
965  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
966  * @return The value of @ref sio_v151_data_width_set_data.rx_mode.
967  */
hal_sio_v151_data_width_get_rx_mode(sio_bus_t bus)968 static inline uint32_t hal_sio_v151_data_width_get_rx_mode(sio_bus_t bus)
969 {
970     sio_v151_data_width_set_data_t data_width_set;
971     data_width_set.d32 = sios_v151_regs(bus)->data_width_set;
972     return data_width_set.b.rx_mode;
973 }
974 
975 /**
976  * @brief  Set the value of @ref sio_v151_data_width_set_data.rx_mode.
977  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
978  * @param  [in]  val The value of @ref sio_v151_data_width_set_data.rx_mode.
979  */
hal_sio_v151_data_width_set_rx_mode(sio_bus_t bus,uint32_t val)980 static inline void hal_sio_v151_data_width_set_rx_mode(sio_bus_t bus, uint32_t val)
981 {
982     sio_v151_data_width_set_data_t data_width_set;
983     data_width_set.d32 = sios_v151_regs(bus)->data_width_set;
984     data_width_set.b.rx_mode = val;
985     sios_v151_regs(bus)->data_width_set = data_width_set.d32;
986 }
987 
988 /**
989  * @brief Get the value of @ref sio_v151_i2s_start_pos_data.start_post_read.
990  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
991  * @return The value of @ref sio_v151_i2s_start_pos_data.start_post_read.
992  */
hal_sio_v151_start_pos_get_read(sio_bus_t bus)993 static inline uint32_t hal_sio_v151_start_pos_get_read(sio_bus_t bus)
994 {
995     sio_v151_i2s_start_pos_data_t start_pos;
996     start_pos.d32 = sios_v151_regs(bus)->i2s_start_pos;
997     return start_pos.b.start_post_read;
998 }
999 
1000 /**
1001  * @brief  Set the value of @ref sio_v151_i2s_start_pos_data.start_post_read.
1002  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1003  * @param  [in]  val The value of @ref sio_v151_i2s_start_pos_data.start_post_read.
1004  */
hal_sio_v151_start_pos_set_read(sio_bus_t bus,uint32_t val)1005 static inline void hal_sio_v151_start_pos_set_read(sio_bus_t bus, uint32_t val)
1006 {
1007     sio_v151_i2s_start_pos_data_t start_pos;
1008     start_pos.d32 = sios_v151_regs(bus)->i2s_start_pos;
1009     start_pos.b.start_post_read = val;
1010     sios_v151_regs(bus)->i2s_start_pos = start_pos.d32;
1011 }
1012 
1013 /**
1014  * @brief Get the value of @ref sio_v151_i2s_start_pos_data.start_pos_write.
1015  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1016  * @return The value of @ref sio_v151_i2s_start_pos_data.start_pos_write.
1017  */
hal_sio_v151_start_pos_get_write(sio_bus_t bus)1018 static inline uint32_t hal_sio_v151_start_pos_get_write(sio_bus_t bus)
1019 {
1020     sio_v151_i2s_start_pos_data_t start_pos;
1021     start_pos.d32 = sios_v151_regs(bus)->i2s_start_pos;
1022     return start_pos.b.start_pos_write;
1023 }
1024 
1025 /**
1026  * @brief  Set the value of @ref sio_v151_i2s_start_pos_data.start_pos_write.
1027  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1028  * @param  [in]  val The value of @ref sio_v151_i2s_start_pos_data.start_pos_write.
1029  */
hal_sio_v151_start_pos_set_write(sio_bus_t bus,uint32_t val)1030 static inline void hal_sio_v151_start_pos_set_write(sio_bus_t bus, uint32_t val)
1031 {
1032     sio_v151_i2s_start_pos_data_t start_pos;
1033     start_pos.d32 = sios_v151_regs(bus)->i2s_start_pos;
1034     start_pos.b.start_pos_write = val;
1035     sios_v151_regs(bus)->i2s_start_pos = start_pos.d32;
1036 }
1037 
1038 /**
1039  * @brief Get the value of @ref sio_v151_pos_flag_data.start_post_read.
1040  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1041  * @return The value of @ref sio_v151_pos_flag_data.start_post_read.
1042  */
hal_sio_v151_pos_flag_get_read(sio_bus_t bus)1043 static inline uint32_t hal_sio_v151_pos_flag_get_read(sio_bus_t bus)
1044 {
1045     sio_v151_pos_flag_data_t pos_flag;
1046     pos_flag.d32 = sios_v151_regs(bus)->i2s_pos_flag;
1047     return pos_flag.b.start_post_read;
1048 }
1049 
1050 /**
1051  * @brief  Set the value of @ref sio_v151_pos_flag_data.start_post_read.
1052  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1053  * @param  [in]  val The value of @ref sio_v151_pos_flag_data.start_post_read.
1054  */
hal_sio_v151_pos_flag_set_read(sio_bus_t bus,uint32_t val)1055 static inline void hal_sio_v151_pos_flag_set_read(sio_bus_t bus, uint32_t val)
1056 {
1057     sio_v151_pos_flag_data_t pos_flag;
1058     pos_flag.d32 = sios_v151_regs(bus)->i2s_pos_flag;
1059     pos_flag.b.start_post_read = val;
1060     sios_v151_regs(bus)->i2s_pos_flag = pos_flag.d32;
1061 }
1062 
1063 /**
1064  * @brief Get the value of @ref sio_v151_pos_flag_data.start_pos_write.
1065  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1066  * @return The value of @ref sio_v151_pos_flag_data.start_pos_write.
1067  */
hal_sio_v151_pos_flag_get_write(sio_bus_t bus)1068 static inline uint32_t hal_sio_v151_pos_flag_get_write(sio_bus_t bus)
1069 {
1070     sio_v151_pos_flag_data_t pos_flag;
1071     pos_flag.d32 = sios_v151_regs(bus)->i2s_pos_flag;
1072     return pos_flag.b.start_pos_write;
1073 }
1074 
1075 /**
1076  * @brief  Set the value of @ref sio_v151_pos_flag_data.start_pos_write.
1077  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1078  * @param  [in]  val The value of @ref sio_v151_pos_flag_data.start_pos_write.
1079  */
hal_sio_v151_pos_flag_set_write(sio_bus_t bus,uint32_t val)1080 static inline void hal_sio_v151_pos_flag_set_write(sio_bus_t bus, uint32_t val)
1081 {
1082     sio_v151_pos_flag_data_t pos_flag;
1083     pos_flag.d32 = sios_v151_regs(bus)->i2s_pos_flag;
1084     pos_flag.b.start_pos_write = val;
1085     sios_v151_regs(bus)->i2s_pos_flag = pos_flag.d32;
1086 }
1087 
1088 /**
1089  * @brief Get the value of @ref sio_v151_signed_ext_data.signed_ext_en.
1090  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1091  * @return The value of @ref sio_v151_signed_ext_data.signed_ext_en.
1092  */
hal_sio_v151_signed_ext_get_en(sio_bus_t bus)1093 static inline uint32_t hal_sio_v151_signed_ext_get_en(sio_bus_t bus)
1094 {
1095     sio_v151_signed_ext_data_t signed_ext;
1096     signed_ext.d32 = sios_v151_regs(bus)->signed_ext;
1097     return signed_ext.b.signed_ext_en;
1098 }
1099 
1100 /**
1101  * @brief Set the value of @ref sio_v151_signed_ext_data.signed_ext_en.
1102  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1103  * @param  [in]  val The value of @ref sio_v151_signed_ext_data.signed_ext_en.
1104  */
hal_sio_v151_signed_ext_set_en(sio_bus_t bus,uint32_t val)1105 static inline void hal_sio_v151_signed_ext_set_en(sio_bus_t bus, uint32_t val)
1106 {
1107     sio_v151_signed_ext_data_t signed_ext;
1108     signed_ext.d32 = sios_v151_regs(bus)->signed_ext;
1109     signed_ext.b.signed_ext_en = val;
1110     sios_v151_regs(bus)->signed_ext = signed_ext.d32;
1111 }
1112 
1113 /**
1114  * @brief Get the value of @ref sio_v151_i2s_pos_merge_en_data.merge_en.
1115  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1116  * @return The value of @ref sio_v151_i2s_pos_merge_en_data.merge_en.
1117  */
hal_sio_v151_pos_merge_get_en(sio_bus_t bus)1118 static inline uint32_t hal_sio_v151_pos_merge_get_en(sio_bus_t bus)
1119 {
1120     sio_v151_i2s_pos_merge_en_data_t pos_merge;
1121     pos_merge.d32 = sios_v151_regs(bus)->i2s_pos_merge_en;
1122     return pos_merge.b.merge_en;
1123 }
1124 
1125 /**
1126  * @brief Set the value of @ref sio_v151_i2s_pos_merge_en_data.merge_en.
1127  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1128  * @param  [in]  val The value of @ref sio_v151_i2s_pos_merge_en_data.merge_en.
1129  */
hal_sio_v151_pos_merge_set_en(sio_bus_t bus,uint32_t val)1130 static inline void hal_sio_v151_pos_merge_set_en(sio_bus_t bus, uint32_t val)
1131 {
1132     sio_v151_i2s_pos_merge_en_data_t pos_merge;
1133     pos_merge.d32 = sios_v151_regs(bus)->i2s_pos_merge_en;
1134     pos_merge.b.merge_en = val;
1135     sios_v151_regs(bus)->i2s_pos_merge_en = pos_merge.d32;
1136 }
1137 
1138 /**
1139  * @brief Get the value of @ref sio_v151_i2s_crg_data.i2s_bclk_div_en.
1140  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1141  * @return The value of @ref sio_v151_i2s_crg_data.i2s_bclk_div_en.
1142  */
hal_sio_v151_i2s_crg_get_bclk_div_en(sio_bus_t bus)1143 static inline uint32_t hal_sio_v151_i2s_crg_get_bclk_div_en(sio_bus_t bus)
1144 {
1145     sio_v151_i2s_crg_data_t i2s_crg;
1146     i2s_crg.d32 = sios_v151_regs(bus)->i2s_crg;
1147     return i2s_crg.b.i2s_bclk_div_en;
1148 }
1149 
1150 /**
1151  * @brief Set the value of @ref sio_v151_i2s_crg_data.i2s_bclk_div_en.
1152  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1153  * @param  [in]  val The value of @ref sio_v151_i2s_crg_data.i2s_bclk_div_en.
1154  */
hal_sio_v151_i2s_crg_set_bclk_div_en(sio_bus_t bus,uint32_t val)1155 static inline void hal_sio_v151_i2s_crg_set_bclk_div_en(sio_bus_t bus, uint32_t val)
1156 {
1157     sio_v151_i2s_crg_data_t i2s_crg;
1158     i2s_crg.d32 = sios_v151_regs(bus)->i2s_crg;
1159     i2s_crg.b.i2s_bclk_div_en = val;
1160     sios_v151_regs(bus)->i2s_crg = i2s_crg.d32;
1161 }
1162 
1163 /**
1164  * @brief Get the value of @ref sio_v151_i2s_crg_data.i2s_crg_clken.
1165  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1166  * @return The value of @ref sio_v151_i2s_crg_data.i2s_crg_clken.
1167  */
hal_sio_v151_i2s_crg_get_crg_clken(sio_bus_t bus)1168 static inline uint32_t hal_sio_v151_i2s_crg_get_crg_clken(sio_bus_t bus)
1169 {
1170     sio_v151_i2s_crg_data_t i2s_crg;
1171     i2s_crg.d32 = sios_v151_regs(bus)->i2s_crg;
1172     return i2s_crg.b.i2s_crg_clken;
1173 }
1174 
1175 /**
1176  * @brief Set the value of @ref sio_v151_i2s_crg_data.i2s_crg_clken.
1177  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1178  * @param  [in]  val The value of @ref sio_v151_i2s_crg_data.i2s_crg_clken.
1179  */
hal_sio_v151_i2s_crg_set_crg_clken(sio_bus_t bus,uint32_t val)1180 static inline void hal_sio_v151_i2s_crg_set_crg_clken(sio_bus_t bus, uint32_t val)
1181 {
1182     sio_v151_i2s_crg_data_t i2s_crg;
1183     i2s_crg.d32 = sios_v151_regs(bus)->i2s_crg;
1184     i2s_crg.b.i2s_crg_clken = val;
1185     sios_v151_regs(bus)->i2s_crg = i2s_crg.d32;
1186 }
1187 
1188 /**
1189  * @brief Get the value of @ref sio_v151_i2s_crg_data.i2s_bclk_sel.
1190  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1191  * @return The value of @ref sio_v151_i2s_crg_data.i2s_bclk_sel.
1192  */
hal_sio_v151_i2s_crg_get_bclk_sel(sio_bus_t bus)1193 static inline uint32_t hal_sio_v151_i2s_crg_get_bclk_sel(sio_bus_t bus)
1194 {
1195     sio_v151_i2s_crg_data_t i2s_crg;
1196     i2s_crg.d32 = sios_v151_regs(bus)->i2s_crg;
1197     return i2s_crg.b.i2s_bclk_sel;
1198 }
1199 
1200 /**
1201  * @brief Set the value of @ref sio_v151_i2s_crg_data.i2s_bclk_sel.
1202  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1203  * @param  [in]  val The value of @ref sio_v151_i2s_crg_data.i2s_bclk_sel.
1204  */
hal_sio_v151_i2s_crg_set_bclk_sel(sio_bus_t bus,uint32_t val)1205 static inline void hal_sio_v151_i2s_crg_set_bclk_sel(sio_bus_t bus, uint32_t val)
1206 {
1207     sio_v151_i2s_crg_data_t i2s_crg;
1208     i2s_crg.d32 = sios_v151_regs(bus)->i2s_crg;
1209     i2s_crg.b.i2s_bclk_sel = val;
1210     sios_v151_regs(bus)->i2s_crg = i2s_crg.d32;
1211 }
1212 
1213 /**
1214  * @brief Get the value of @ref sio_v151_i2s_crg_data.i2s_fs_sel.
1215  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1216  * @return The value of @ref sio_v151_i2s_crg_data.i2s_fs_sel.
1217  */
hal_sio_v151_i2s_crg_get_fs_sel(sio_bus_t bus)1218 static inline uint32_t hal_sio_v151_i2s_crg_get_fs_sel(sio_bus_t bus)
1219 {
1220     sio_v151_i2s_crg_data_t i2s_crg;
1221     i2s_crg.d32 = sios_v151_regs(bus)->i2s_crg;
1222     return i2s_crg.b.i2s_fs_sel;
1223 }
1224 
1225 /**
1226  * @brief Set the value of @ref sio_v151_i2s_crg_data.i2s_fs_sel.
1227  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1228  * @param  [in]  val The value of @ref sio_v151_i2s_crg_data.i2s_fs_sel.
1229  */
hal_sio_v151_i2s_crg_set_fs_sel(sio_bus_t bus,uint32_t val)1230 static inline void hal_sio_v151_i2s_crg_set_fs_sel(sio_bus_t bus, uint32_t val)
1231 {
1232     sio_v151_i2s_crg_data_t i2s_crg;
1233     i2s_crg.d32 = sios_v151_regs(bus)->i2s_crg;
1234     i2s_crg.b.i2s_fs_sel = val;
1235     sios_v151_regs(bus)->i2s_crg = i2s_crg.d32;
1236 }
1237 
1238 /**
1239  * @brief Get the value of @ref sio_v151_i2s_bclk_div_num_data.bclk_div_num.
1240  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1241  * @return The value of @ref sio_v151_i2s_bclk_div_num_data.bclk_div_num.
1242  */
hal_sio_v151_bclk_div_num_get_num(sio_bus_t bus)1243 static inline uint32_t hal_sio_v151_bclk_div_num_get_num(sio_bus_t bus)
1244 {
1245     sio_v151_i2s_bclk_div_num_data_t i2s_bclk;
1246     i2s_bclk.d32 = sios_v151_regs(bus)->i2s_bclk_div_num;
1247     return i2s_bclk.b.bclk_div_num;
1248 }
1249 
1250 /**
1251  * @brief Set the value of @ref sio_v151_i2s_bclk_div_num_data.bclk_div_num.
1252  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1253  * @param  [in]  val The value of @ref sio_v151_i2s_bclk_div_num_data.bclk_div_num.
1254  */
hal_sio_v151_bclk_div_num_set_num(sio_bus_t bus,uint32_t val)1255 static inline void hal_sio_v151_bclk_div_num_set_num(sio_bus_t bus, uint32_t val)
1256 {
1257     sio_v151_i2s_bclk_div_num_data_t i2s_bclk;
1258     i2s_bclk.d32 = sios_v151_regs(bus)->i2s_bclk_div_num;
1259     i2s_bclk.b.bclk_div_num = val;
1260     sios_v151_regs(bus)->i2s_bclk_div_num = i2s_bclk.d32;
1261 }
1262 
1263 /**
1264  * @brief Get the value of @ref sio_v151_i2s_fs_div_num_data.fs_div_num.
1265  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1266  * @return The value of @ref sio_v151_i2s_fs_div_num_data.fs_div_num.
1267  */
hal_sio_v151_fs_div_num_get_num(sio_bus_t bus)1268 static inline uint32_t hal_sio_v151_fs_div_num_get_num(sio_bus_t bus)
1269 {
1270     sio_v151_i2s_fs_div_num_data_t i2s_fs;
1271     i2s_fs.d32 = sios_v151_regs(bus)->i2s_fs_div_num;
1272     return i2s_fs.b.fs_div_num;
1273 }
1274 
1275 /**
1276  * @brief Set the value of @ref sio_v151_i2s_fs_div_num_data.fs_div_num.
1277  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1278  * @param  [in]  val The value of @ref sio_v151_i2s_fs_div_num_data.fs_div_num.
1279  */
hal_sio_v151_fs_div_num_set_num(sio_bus_t bus,uint32_t val)1280 static inline void hal_sio_v151_fs_div_num_set_num(sio_bus_t bus, uint32_t val)
1281 {
1282     sio_v151_i2s_fs_div_num_data_t i2s_fs;
1283     i2s_fs.d32 = sios_v151_regs(bus)->i2s_fs_div_num;
1284     i2s_fs.b.fs_div_num = val;
1285     sios_v151_regs(bus)->i2s_fs_div_num = i2s_fs.d32;
1286 }
1287 
1288 /**
1289  * @brief Get the value of @ref sio_v151_i2s_fs_div_ratio_num_data.fs_div_ratio_num.
1290  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1291  * @return The value of @ref sio_v151_i2s_fs_div_ratio_num_data.fs_div_ratio_num.
1292  */
hal_sio_v151_fs_div_ratio_num_get_num(sio_bus_t bus)1293 static inline uint32_t hal_sio_v151_fs_div_ratio_num_get_num(sio_bus_t bus)
1294 {
1295     sio_v151_i2s_fs_div_ratio_num_data_t i2s_fs;
1296     i2s_fs.d32 = sios_v151_regs(bus)->i2s_fs_div_ratio_num;
1297     return i2s_fs.b.fs_div_ratio_num;
1298 }
1299 
1300 /**
1301  * @brief Set the value of @ref sio_v151_i2s_fs_div_ratio_num_data.fs_div_ratio_num.
1302  * @param  [in]  bus The index of sio. @ref sio_bus_t @ref sio_bus_t.
1303  * @param  [in]  val The value of @ref sio_v151_i2s_fs_div_ratio_num_data.fs_div_ratio_num.
1304  */
hal_sio_v151_fs_div_ratio_num_set_num(sio_bus_t bus,uint32_t val)1305 static inline void hal_sio_v151_fs_div_ratio_num_set_num(sio_bus_t bus, uint32_t val)
1306 {
1307     sio_v151_i2s_fs_div_ratio_num_data_t i2s_fs;
1308     i2s_fs.d32 = sios_v151_regs(bus)->i2s_fs_div_ratio_num;
1309     i2s_fs.b.fs_div_ratio_num = val;
1310     sios_v151_regs(bus)->i2s_fs_div_ratio_num = i2s_fs.d32;
1311 }
1312 
hal_sio_fifo_threshold_set_tx_fifo_threshold(sio_bus_t bus,uint32_t val)1313 static inline void hal_sio_fifo_threshold_set_tx_fifo_threshold(sio_bus_t bus, uint32_t val)
1314 {
1315     uint32_t threshold = sios_v151_regs(bus)->fifo_threshold;
1316     threshold = (threshold & 0xff00);
1317     threshold = (threshold | (val & 0xff));
1318     sios_v151_regs(bus)->fifo_threshold = threshold;
1319 }
1320 
1321 #define SIO_RX_FIFO_SHIFT_MASK 8
1322 
hal_sio_fifo_threshold_set_rx_fifo_threshold(sio_bus_t bus,uint32_t val)1323 static inline void hal_sio_fifo_threshold_set_rx_fifo_threshold(sio_bus_t bus, uint32_t val)
1324 {
1325     uint32_t threshold = sios_v151_regs(bus)->fifo_threshold;
1326     threshold = (threshold & 0xff);
1327     threshold = (threshold | ((val & 0xff) << SIO_RX_FIFO_SHIFT_MASK));
1328     sios_v151_regs(bus)->fifo_threshold = threshold;
1329 }
1330 
hal_sio_set_intmask(sio_bus_t bus,uint32_t mask)1331 static inline void hal_sio_set_intmask(sio_bus_t bus, uint32_t mask)
1332 {
1333     sios_v151_regs(bus)->intmask = mask;
1334 }
1335 
hal_sio_get_merge_rx_data(sio_bus_t bus)1336 static inline uint32_t hal_sio_get_merge_rx_data(sio_bus_t bus)
1337 {
1338     uint32_t i2s_rd;
1339     i2s_rd = sios_v151_regs(bus)->i2s_dual_rx_chn;
1340     return i2s_rd;
1341 }
1342 
1343 /**
1344  * @}
1345  */
1346 
1347 #ifdef __cplusplus
1348 #if __cplusplus
1349 }
1350 #endif /* __cplusplus */
1351 #endif /* __cplusplus */
1352 
1353 #endif