drivers: watchdog: add system calls
wdt_install_timeout() was skipped as it installs an ISR-context callback handler function. The rest are simple wrappers. Added myself as the maintainer of the syscall handlers. WDT subsystem appears to not currently have an owner. Fixes: #21432 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com> Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
b292f7643b
commit
13b8b41676
4 changed files with 46 additions and 4 deletions
|
@ -160,7 +160,9 @@ struct wdt_driver_api {
|
|||
* @retval -ENOTSUP If any of the set options is not supported.
|
||||
* @retval -EBUSY If watchdog instance has been already setup.
|
||||
*/
|
||||
static inline int wdt_setup(struct device *dev, u8_t options)
|
||||
__syscall int wdt_setup(struct device *dev, u8_t options);
|
||||
|
||||
static inline int z_impl_wdt_setup(struct device *dev, u8_t options)
|
||||
{
|
||||
const struct wdt_driver_api *api =
|
||||
(const struct wdt_driver_api *)dev->driver_api;
|
||||
|
@ -181,7 +183,9 @@ static inline int wdt_setup(struct device *dev, u8_t options)
|
|||
* @retval -EFAULT If watchdog instance is not enabled.
|
||||
* @retval -EPERM If watchdog can not be disabled directly by application code.
|
||||
*/
|
||||
static inline int wdt_disable(struct device *dev)
|
||||
__syscall int wdt_disable(struct device *dev);
|
||||
|
||||
static inline int z_impl_wdt_disable(struct device *dev)
|
||||
{
|
||||
const struct wdt_driver_api *api =
|
||||
(const struct wdt_driver_api *)dev->driver_api;
|
||||
|
@ -229,7 +233,9 @@ static inline int wdt_install_timeout(struct device *dev,
|
|||
* @retval 0 If successful.
|
||||
* @retval -EINVAL If there is no installed timeout for supplied channel.
|
||||
*/
|
||||
static inline int wdt_feed(struct device *dev, int channel_id)
|
||||
__syscall int wdt_feed(struct device *dev, int channel_id);
|
||||
|
||||
static inline int z_impl_wdt_feed(struct device *dev, int channel_id)
|
||||
{
|
||||
const struct wdt_driver_api *api =
|
||||
(const struct wdt_driver_api *)dev->driver_api;
|
||||
|
@ -245,4 +251,6 @@ static inline int wdt_feed(struct device *dev, int channel_id)
|
|||
* @}
|
||||
*/
|
||||
|
||||
#include <syscalls/watchdog.h>
|
||||
|
||||
#endif /* _ZEPHYR_WATCHDOG_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue