Lines Matching full:dev
34 * @param dev UART device instance.
36 typedef void (*uart_irq_config_func_t)(const struct device *dev);
43 int (*callback_set)(const struct device *dev, uart_callback_t callback, void *user_data);
45 int (*tx)(const struct device *dev, const uint8_t *buf, size_t len, int32_t timeout);
46 int (*tx_abort)(const struct device *dev);
48 int (*rx_enable)(const struct device *dev, uint8_t *buf, size_t len, int32_t timeout);
49 int (*rx_buf_rsp)(const struct device *dev, uint8_t *buf, size_t len);
50 int (*rx_disable)(const struct device *dev);
53 int (*tx_u16)(const struct device *dev, const uint16_t *buf, size_t len, int32_t timeout);
54 int (*rx_enable_u16)(const struct device *dev, uint16_t *buf, size_t len, int32_t timeout);
55 int (*rx_buf_rsp_u16)(const struct device *dev, uint16_t *buf, size_t len);
61 int (*poll_in)(const struct device *dev, unsigned char *p_char);
62 void (*poll_out)(const struct device *dev, unsigned char out_char);
65 int (*poll_in_u16)(const struct device *dev, uint16_t *p_u16);
66 void (*poll_out_u16)(const struct device *dev, uint16_t out_u16);
70 int (*err_check)(const struct device *dev);
74 int (*configure)(const struct device *dev, const struct uart_config *cfg);
75 int (*config_get)(const struct device *dev, struct uart_config *cfg);
81 int (*fifo_fill)(const struct device *dev, const uint8_t *tx_data, int len);
84 int (*fifo_fill_u16)(const struct device *dev, const uint16_t *tx_data, int len);
88 int (*fifo_read)(const struct device *dev, uint8_t *rx_data, const int size);
91 int (*fifo_read_u16)(const struct device *dev, uint16_t *rx_data, const int size);
95 void (*irq_tx_enable)(const struct device *dev);
98 void (*irq_tx_disable)(const struct device *dev);
101 int (*irq_tx_ready)(const struct device *dev);
104 void (*irq_rx_enable)(const struct device *dev);
107 void (*irq_rx_disable)(const struct device *dev);
110 int (*irq_tx_complete)(const struct device *dev);
113 int (*irq_rx_ready)(const struct device *dev);
116 void (*irq_err_enable)(const struct device *dev);
119 void (*irq_err_disable)(const struct device *dev);
122 int (*irq_is_pending)(const struct device *dev);
125 int (*irq_update)(const struct device *dev);
128 void (*irq_callback_set)(const struct device *dev, uart_irq_callback_user_data_t cb,
134 int (*line_ctrl_set)(const struct device *dev, uint32_t ctrl, uint32_t val);
135 int (*line_ctrl_get)(const struct device *dev, uint32_t ctrl, uint32_t *val);
139 int (*drv_cmd)(const struct device *dev, uint32_t cmd, uint32_t p);
143 static inline int z_impl_uart_err_check(const struct device *dev) in z_impl_uart_err_check() argument
145 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_err_check()
151 return api->err_check(dev); in z_impl_uart_err_check()
154 static inline int z_impl_uart_poll_in(const struct device *dev, unsigned char *p_char) in z_impl_uart_poll_in() argument
156 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_poll_in()
162 return api->poll_in(dev, p_char); in z_impl_uart_poll_in()
165 static inline int z_impl_uart_poll_in_u16(const struct device *dev, uint16_t *p_u16) in z_impl_uart_poll_in_u16() argument
168 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_poll_in_u16()
174 return api->poll_in_u16(dev, p_u16); in z_impl_uart_poll_in_u16()
176 ARG_UNUSED(dev); in z_impl_uart_poll_in_u16()
182 static inline void z_impl_uart_poll_out(const struct device *dev, unsigned char out_char) in z_impl_uart_poll_out() argument
184 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_poll_out()
186 api->poll_out(dev, out_char); in z_impl_uart_poll_out()
189 static inline void z_impl_uart_poll_out_u16(const struct device *dev, uint16_t out_u16) in z_impl_uart_poll_out_u16() argument
192 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_poll_out_u16()
194 api->poll_out_u16(dev, out_u16); in z_impl_uart_poll_out_u16()
196 ARG_UNUSED(dev); in z_impl_uart_poll_out_u16()
201 static inline int z_impl_uart_configure(const struct device *dev, const struct uart_config *cfg) in z_impl_uart_configure() argument
204 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_configure()
209 return api->configure(dev, cfg); in z_impl_uart_configure()
211 ARG_UNUSED(dev); in z_impl_uart_configure()
217 static inline int z_impl_uart_config_get(const struct device *dev, struct uart_config *cfg) in z_impl_uart_config_get() argument
220 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_config_get()
226 return api->config_get(dev, cfg); in z_impl_uart_config_get()
228 ARG_UNUSED(dev); in z_impl_uart_config_get()
234 static inline int uart_fifo_fill(const struct device *dev, const uint8_t *tx_data, int size) in uart_fifo_fill() argument
237 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in uart_fifo_fill()
243 return api->fifo_fill(dev, tx_data, size); in uart_fifo_fill()
245 ARG_UNUSED(dev); in uart_fifo_fill()
252 static inline int uart_fifo_fill_u16(const struct device *dev, const uint16_t *tx_data, int size) in uart_fifo_fill_u16() argument
255 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in uart_fifo_fill_u16()
261 return api->fifo_fill_u16(dev, tx_data, size); in uart_fifo_fill_u16()
263 ARG_UNUSED(dev); in uart_fifo_fill_u16()
270 static inline int uart_fifo_read(const struct device *dev, uint8_t *rx_data, const int size) in uart_fifo_read() argument
273 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in uart_fifo_read()
279 return api->fifo_read(dev, rx_data, size); in uart_fifo_read()
281 ARG_UNUSED(dev); in uart_fifo_read()
288 static inline int uart_fifo_read_u16(const struct device *dev, uint16_t *rx_data, const int size) in uart_fifo_read_u16() argument
291 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in uart_fifo_read_u16()
297 return api->fifo_read_u16(dev, rx_data, size); in uart_fifo_read_u16()
299 ARG_UNUSED(dev); in uart_fifo_read_u16()
306 static inline void z_impl_uart_irq_tx_enable(const struct device *dev) in z_impl_uart_irq_tx_enable() argument
309 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_irq_tx_enable()
312 api->irq_tx_enable(dev); in z_impl_uart_irq_tx_enable()
315 ARG_UNUSED(dev); in z_impl_uart_irq_tx_enable()
319 static inline void z_impl_uart_irq_tx_disable(const struct device *dev) in z_impl_uart_irq_tx_disable() argument
322 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_irq_tx_disable()
325 api->irq_tx_disable(dev); in z_impl_uart_irq_tx_disable()
328 ARG_UNUSED(dev); in z_impl_uart_irq_tx_disable()
332 static inline int uart_irq_tx_ready(const struct device *dev) in uart_irq_tx_ready() argument
335 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in uart_irq_tx_ready()
341 return api->irq_tx_ready(dev); in uart_irq_tx_ready()
343 ARG_UNUSED(dev); in uart_irq_tx_ready()
348 static inline void z_impl_uart_irq_rx_enable(const struct device *dev) in z_impl_uart_irq_rx_enable() argument
351 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_irq_rx_enable()
354 api->irq_rx_enable(dev); in z_impl_uart_irq_rx_enable()
357 ARG_UNUSED(dev); in z_impl_uart_irq_rx_enable()
361 static inline void z_impl_uart_irq_rx_disable(const struct device *dev) in z_impl_uart_irq_rx_disable() argument
364 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_irq_rx_disable()
367 api->irq_rx_disable(dev); in z_impl_uart_irq_rx_disable()
370 ARG_UNUSED(dev); in z_impl_uart_irq_rx_disable()
374 static inline int uart_irq_tx_complete(const struct device *dev) in uart_irq_tx_complete() argument
377 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in uart_irq_tx_complete()
382 return api->irq_tx_complete(dev); in uart_irq_tx_complete()
384 ARG_UNUSED(dev); in uart_irq_tx_complete()
389 static inline int uart_irq_rx_ready(const struct device *dev) in uart_irq_rx_ready() argument
392 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in uart_irq_rx_ready()
397 return api->irq_rx_ready(dev); in uart_irq_rx_ready()
399 ARG_UNUSED(dev); in uart_irq_rx_ready()
404 static inline void z_impl_uart_irq_err_enable(const struct device *dev) in z_impl_uart_irq_err_enable() argument
407 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_irq_err_enable()
410 api->irq_err_enable(dev); in z_impl_uart_irq_err_enable()
413 ARG_UNUSED(dev); in z_impl_uart_irq_err_enable()
417 static inline void z_impl_uart_irq_err_disable(const struct device *dev) in z_impl_uart_irq_err_disable() argument
420 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_irq_err_disable()
423 api->irq_err_disable(dev); in z_impl_uart_irq_err_disable()
426 ARG_UNUSED(dev); in z_impl_uart_irq_err_disable()
430 static inline int z_impl_uart_irq_is_pending(const struct device *dev) in z_impl_uart_irq_is_pending() argument
433 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_irq_is_pending()
438 return api->irq_is_pending(dev); in z_impl_uart_irq_is_pending()
440 ARG_UNUSED(dev); in z_impl_uart_irq_is_pending()
445 static inline int z_impl_uart_irq_update(const struct device *dev) in z_impl_uart_irq_update() argument
448 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_irq_update()
453 return api->irq_update(dev); in z_impl_uart_irq_update()
455 ARG_UNUSED(dev); in z_impl_uart_irq_update()
460 static inline int uart_irq_callback_user_data_set(const struct device *dev, in uart_irq_callback_user_data_set() argument
464 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in uart_irq_callback_user_data_set()
467 api->irq_callback_set(dev, cb, user_data); in uart_irq_callback_user_data_set()
473 ARG_UNUSED(dev); in uart_irq_callback_user_data_set()
480 static inline int uart_irq_callback_set(const struct device *dev, uart_irq_callback_user_data_t cb) in uart_irq_callback_set() argument
482 return uart_irq_callback_user_data_set(dev, cb, NULL); in uart_irq_callback_set()
485 static inline int uart_callback_set(const struct device *dev, uart_callback_t callback, in uart_callback_set() argument
489 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in uart_callback_set()
495 return api->callback_set(dev, callback, user_data); in uart_callback_set()
497 ARG_UNUSED(dev); in uart_callback_set()
504 static inline int z_impl_uart_tx(const struct device *dev, const uint8_t *buf, size_t len, in z_impl_uart_tx() argument
509 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_tx()
511 return api->tx(dev, buf, len, timeout); in z_impl_uart_tx()
513 ARG_UNUSED(dev); in z_impl_uart_tx()
521 static inline int z_impl_uart_tx_u16(const struct device *dev, const uint16_t *buf, size_t len, in z_impl_uart_tx_u16() argument
526 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_tx_u16()
528 return api->tx_u16(dev, buf, len, timeout); in z_impl_uart_tx_u16()
530 ARG_UNUSED(dev); in z_impl_uart_tx_u16()
538 static inline int z_impl_uart_tx_abort(const struct device *dev) in z_impl_uart_tx_abort() argument
541 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_tx_abort()
543 return api->tx_abort(dev); in z_impl_uart_tx_abort()
545 ARG_UNUSED(dev); in z_impl_uart_tx_abort()
550 static inline int z_impl_uart_rx_enable(const struct device *dev, uint8_t *buf, size_t len, in z_impl_uart_rx_enable() argument
554 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_rx_enable()
556 return api->rx_enable(dev, buf, len, timeout); in z_impl_uart_rx_enable()
558 ARG_UNUSED(dev); in z_impl_uart_rx_enable()
566 static inline int z_impl_uart_rx_enable_u16(const struct device *dev, uint16_t *buf, size_t len, in z_impl_uart_rx_enable_u16() argument
570 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_rx_enable_u16()
572 return api->rx_enable_u16(dev, buf, len, timeout); in z_impl_uart_rx_enable_u16()
574 ARG_UNUSED(dev); in z_impl_uart_rx_enable_u16()
582 static inline int uart_rx_buf_rsp(const struct device *dev, uint8_t *buf, size_t len) in uart_rx_buf_rsp() argument
585 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in uart_rx_buf_rsp()
587 return api->rx_buf_rsp(dev, buf, len); in uart_rx_buf_rsp()
589 ARG_UNUSED(dev); in uart_rx_buf_rsp()
596 static inline int uart_rx_buf_rsp_u16(const struct device *dev, uint16_t *buf, size_t len) in uart_rx_buf_rsp_u16() argument
599 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in uart_rx_buf_rsp_u16()
601 return api->rx_buf_rsp_u16(dev, buf, len); in uart_rx_buf_rsp_u16()
603 ARG_UNUSED(dev); in uart_rx_buf_rsp_u16()
610 static inline int z_impl_uart_rx_disable(const struct device *dev) in z_impl_uart_rx_disable() argument
613 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_rx_disable()
615 return api->rx_disable(dev); in z_impl_uart_rx_disable()
617 ARG_UNUSED(dev); in z_impl_uart_rx_disable()
622 static inline int z_impl_uart_line_ctrl_set(const struct device *dev, uint32_t ctrl, uint32_t val) in z_impl_uart_line_ctrl_set() argument
625 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_line_ctrl_set()
630 return api->line_ctrl_set(dev, ctrl, val); in z_impl_uart_line_ctrl_set()
632 ARG_UNUSED(dev); in z_impl_uart_line_ctrl_set()
639 static inline int z_impl_uart_line_ctrl_get(const struct device *dev, uint32_t ctrl, uint32_t *val) in z_impl_uart_line_ctrl_get() argument
642 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_line_ctrl_get()
647 return api->line_ctrl_get(dev, ctrl, val); in z_impl_uart_line_ctrl_get()
649 ARG_UNUSED(dev); in z_impl_uart_line_ctrl_get()
656 static inline int z_impl_uart_drv_cmd(const struct device *dev, uint32_t cmd, uint32_t p) in z_impl_uart_drv_cmd() argument
659 const struct uart_driver_api *api = (const struct uart_driver_api *)dev->api; in z_impl_uart_drv_cmd()
664 return api->drv_cmd(dev, cmd, p); in z_impl_uart_drv_cmd()
666 ARG_UNUSED(dev); in z_impl_uart_drv_cmd()