drivers: counter: add syscall handlers

counter_set_alarm() registers a callback and has been skipped.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2017-10-25 11:59:13 -07:00 committed by Andrew Boie
commit 678314b7b2
3 changed files with 34 additions and 4 deletions

View file

@ -57,7 +57,9 @@ struct counter_driver_api {
* @retval 0 If successful.
* @retval Negative errno code if failure.
*/
static inline int counter_start(struct device *dev)
__syscall int counter_start(struct device *dev);
static inline int _impl_counter_start(struct device *dev)
{
const struct counter_driver_api *api = dev->driver_api;
@ -72,7 +74,9 @@ static inline int counter_start(struct device *dev)
* @retval -ENODEV if the device doesn't support stopping the
* counter.
*/
static inline int counter_stop(struct device *dev)
__syscall int counter_stop(struct device *dev);
static inline int _impl_counter_stop(struct device *dev)
{
const struct counter_driver_api *api = dev->driver_api;
@ -85,7 +89,9 @@ static inline int counter_stop(struct device *dev)
*
* @return 32-bit value
*/
static inline u32_t counter_read(struct device *dev)
__syscall u32_t counter_read(struct device *dev);
static inline u32_t _impl_counter_read(struct device *dev)
{
const struct counter_driver_api *api = dev->driver_api;
@ -129,7 +135,9 @@ static inline int counter_set_alarm(struct device *dev,
* @retval 1 if the counter interrupt is pending.
* @retval 0 if no counter interrupt is pending.
*/
static inline int counter_get_pending_int(struct device *dev)
__syscall int counter_get_pending_int(struct device *dev);
static inline int _impl_counter_get_pending_int(struct device *dev)
{
struct counter_driver_api *api;
@ -145,4 +153,6 @@ static inline int counter_get_pending_int(struct device *dev)
* @}
*/
#include <syscalls/counter.h>
#endif /* __COUNTER_H__ */