drivers: serial: add async API system calls
These were unintentionally omitted. We don't expose callback registration or callback response APIs for security reasons. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
7419f4f46f
commit
a51b125aba
2 changed files with 47 additions and 8 deletions
|
@ -41,6 +41,37 @@ static inline void z_vrfy_uart_poll_out(struct device *dev,
|
|||
}
|
||||
#include <syscalls/uart_poll_out_mrsh.c>
|
||||
|
||||
#ifdef CONFIG_UART_ASYNC_API
|
||||
/* callback_set() excluded as we don't allow ISR callback installation from
|
||||
* user mode
|
||||
*
|
||||
* rx_buf_rsp() excluded as it's designed to be called from ISR callbacks
|
||||
*/
|
||||
|
||||
static inline int z_vrfy_uart_tx(struct device *dev, const u8_t *buf,
|
||||
size_t len, u32_t timeout)
|
||||
{
|
||||
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, tx));
|
||||
Z_OOPS(Z_SYSCALL_MEMORY_READ(buf, len));
|
||||
return z_impl_uart_tx(dev, buf, len, timeout);
|
||||
}
|
||||
#include <syscalls/uart_tx_mrsh.c>
|
||||
|
||||
UART_SIMPLE(tx_abort);
|
||||
#include <syscalls/uart_tx_abort_mrsh.c>
|
||||
|
||||
static inline int z_vrfy_uart_rx_enable(struct device *dev, u8_t *buf,
|
||||
size_t len, u32_t timeout)
|
||||
{
|
||||
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, rx_enable));
|
||||
Z_OOPS(Z_SYSCALL_MEMORY_WRITE(buf, len));
|
||||
return z_impl_uart_rx_enable(dev, buf, len, timeout);
|
||||
}
|
||||
#include <syscalls/uart_rx_enable_mrsh.c>
|
||||
|
||||
UART_SIMPLE(rx_disable);
|
||||
#include <syscalls/uart_rx_disable_mrsh.c>
|
||||
#endif /* CONFIG_UART_ASYNC_API */
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
UART_SIMPLE_VOID(irq_tx_enable)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue