From c928a5050dfc8c2aeb72dfb03494925edf8eea99 Mon Sep 17 00:00:00 2001 From: Andrzej Kaczmarek Date: Tue, 22 May 2018 12:16:19 +0200 Subject: [PATCH] porting: Change ble_npl_callout_reset return value All other APIs return ble_npl_error_t already. --- nimble/include/nimble/nimble_npl.h | 3 ++- porting/npl/dummy/src/npl_os_dummy.c | 2 +- porting/npl/freertos/include/nimble/nimble_npl_os.h | 2 +- porting/npl/freertos/include/nimble/npl_freertos.h | 4 ++-- porting/npl/freertos/src/npl_os_freertos.c | 2 +- porting/npl/mynewt/include/nimble/nimble_npl_os.h | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/nimble/include/nimble/nimble_npl.h b/nimble/include/nimble/nimble_npl.h index 713c3a415..272a0840e 100644 --- a/nimble/include/nimble/nimble_npl.h +++ b/nimble/include/nimble/nimble_npl.h @@ -120,7 +120,8 @@ uint16_t ble_npl_sem_get_count(struct ble_npl_sem *sem); void ble_npl_callout_init(struct ble_npl_callout *co, struct ble_npl_eventq *evq, ble_npl_event_fn *ev_cb, void *ev_arg); -int ble_npl_callout_reset(struct ble_npl_callout *co, ble_npl_time_t ticks); +ble_npl_error_t ble_npl_callout_reset(struct ble_npl_callout *co, + ble_npl_time_t ticks); void ble_npl_callout_stop(struct ble_npl_callout *co); diff --git a/porting/npl/dummy/src/npl_os_dummy.c b/porting/npl/dummy/src/npl_os_dummy.c index 699621aaf..855d9710a 100644 --- a/porting/npl/dummy/src/npl_os_dummy.c +++ b/porting/npl/dummy/src/npl_os_dummy.c @@ -134,7 +134,7 @@ ble_npl_callout_init(struct ble_npl_callout *c, struct ble_npl_eventq *evq, { } -int +ble_npl_error_t ble_npl_callout_reset(struct ble_npl_callout *c, ble_npl_time_t ticks) { return BLE_NPL_ENOENT; diff --git a/porting/npl/freertos/include/nimble/nimble_npl_os.h b/porting/npl/freertos/include/nimble/nimble_npl_os.h index 3a7b83589..c85a60211 100644 --- a/porting/npl/freertos/include/nimble/nimble_npl_os.h +++ b/porting/npl/freertos/include/nimble/nimble_npl_os.h @@ -210,7 +210,7 @@ ble_npl_callout_init(struct ble_npl_callout *co, struct ble_npl_eventq *evq, npl_freertos_callout_init(co, evq, ev_cb, ev_arg); } -static inline int +static inline ble_npl_error_t ble_npl_callout_reset(struct ble_npl_callout *co, ble_npl_time_t ticks) { return npl_freertos_callout_reset(co, ticks); diff --git a/porting/npl/freertos/include/nimble/npl_freertos.h b/porting/npl/freertos/include/nimble/npl_freertos.h index 72f464153..db8784d95 100644 --- a/porting/npl/freertos/include/nimble/npl_freertos.h +++ b/porting/npl/freertos/include/nimble/npl_freertos.h @@ -53,8 +53,8 @@ void npl_freertos_callout_init(struct ble_npl_callout *co, struct ble_npl_eventq *evq, ble_npl_event_fn *ev_cb, void *ev_arg); -int npl_freertos_callout_reset(struct ble_npl_callout *co, - ble_npl_time_t ticks); +ble_npl_error_t npl_freertos_callout_reset(struct ble_npl_callout *co, + ble_npl_time_t ticks); ble_npl_time_t npl_freertos_callout_remaining_ticks(struct ble_npl_callout *co, ble_npl_time_t now); diff --git a/porting/npl/freertos/src/npl_os_freertos.c b/porting/npl/freertos/src/npl_os_freertos.c index 5106ce5ad..eb4eaa227 100644 --- a/porting/npl/freertos/src/npl_os_freertos.c +++ b/porting/npl/freertos/src/npl_os_freertos.c @@ -255,7 +255,7 @@ npl_freertos_callout_init(struct ble_npl_callout *co, struct ble_npl_eventq *evq ble_npl_event_init(&co->ev, ev_cb, ev_arg); } -int +ble_npl_error_t npl_freertos_callout_reset(struct ble_npl_callout *co, ble_npl_time_t ticks) { BaseType_t woken1, woken2, woken3; diff --git a/porting/npl/mynewt/include/nimble/nimble_npl_os.h b/porting/npl/mynewt/include/nimble/nimble_npl_os.h index c53d98814..2f7a79c5d 100644 --- a/porting/npl/mynewt/include/nimble/nimble_npl_os.h +++ b/porting/npl/mynewt/include/nimble/nimble_npl_os.h @@ -198,7 +198,7 @@ ble_npl_callout_init(struct ble_npl_callout *co, struct ble_npl_eventq *evq, os_callout_init(&co->co, &evq->evq, (os_event_fn *)ev_cb, ev_arg); } -static inline int +static inline ble_npl_error_t ble_npl_callout_reset(struct ble_npl_callout *co, ble_npl_time_t ticks) { return os_callout_reset(&co->co, ticks);