Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Modify the variable 'nyx_device_callback' typedef to 'nyx_device_call…

…back_function_t' to indicate it is a typedef for function pointer
  • Loading branch information...
commit c72f900efe023c0f4abcadde86c30bf2924d8fe6 1 parent 8febffc
Gayathri Srinivasan authored
View
2  include/nyx/client/nyx_battery.h
@@ -60,7 +60,7 @@ NYX_API_EXPORT nyx_error_t nyx_battery_query_battery_status(nyx_device_handle_t
* @return error code (NYX_ERROR_NONE if operation is successful
*
*/
-NYX_API_EXPORT nyx_error_t nyx_battery_register_battery_status_callback(nyx_device_handle_t handle, nyx_device_callback callback_func, void *context);
+NYX_API_EXPORT nyx_error_t nyx_battery_register_battery_status_callback(nyx_device_handle_t handle, nyx_device_callback_function_t callback_func, void *context);
/**
View
4 include/nyx/client/nyx_charger.h
@@ -65,7 +65,7 @@ NYX_API_EXPORT nyx_error_t nyx_charger_query_charger_status(nyx_device_handle_t
*
*/
-NYX_API_EXPORT nyx_error_t nyx_charger_register_charger_status_callback(nyx_device_handle_t handle, nyx_device_callback callback_func, void *context);
+NYX_API_EXPORT nyx_error_t nyx_charger_register_charger_status_callback(nyx_device_handle_t handle, nyx_device_callback_function_t callback_func, void *context);
/**
@@ -101,7 +101,7 @@ NYX_API_EXPORT nyx_error_t nyx_charger_disable_charging(nyx_device_handle_t hand
* @return error code (NYX_ERROR_NONE if operation is successful)
*
*/
-NYX_API_EXPORT nyx_error_t nyx_charger_register_state_change_callback(nyx_device_handle_t handle, nyx_device_callback callback_func, void *context);
+NYX_API_EXPORT nyx_error_t nyx_charger_register_state_change_callback(nyx_device_handle_t handle, nyx_device_callback_function_t callback_func, void *context);
/**
* @brief Query charging event.
View
2  include/nyx/client/nyx_firmware_update.h
@@ -115,7 +115,7 @@ NYX_API_EXPORT nyx_error_t nyx_firmware_update_release_available_versions_iterat
* @return error code (NYX_ERROR_NONE if operation is successful)
*
*/
-NYX_API_EXPORT nyx_error_t nyx_firmware_update_flash(nyx_device_handle_t handle, nyx_firmware_version_info_handle_t version, bool force, int32_t* fd_out_ptr, nyx_device_callback done_callback, void* context);
+NYX_API_EXPORT nyx_error_t nyx_firmware_update_flash(nyx_device_handle_t handle, nyx_firmware_version_info_handle_t version, bool force, int32_t* fd_out_ptr, nyx_device_callback_function_t done_callback, void* context);
/** @} */
View
4 include/nyx/client/nyx_system.h
@@ -54,7 +54,7 @@ extern "C" {
*
*/
-NYX_API_EXPORT nyx_error_t nyx_system_set_alarm(nyx_device_handle_t handle, time_t time, nyx_device_callback callback_func, void *context);
+NYX_API_EXPORT nyx_error_t nyx_system_set_alarm(nyx_device_handle_t handle, time_t time, nyx_device_callback_function_t callback_func, void *context);
/**
* @brief Query RTC time for next alarm.
@@ -171,7 +171,7 @@ NYX_API_EXPORT nyx_error_t nyx_system_get_msm_state(nyx_device_handle_t handle,
*
*/
-NYX_API_EXPORT nyx_error_t nyx_system_register_msm_change_callback(nyx_device_handle_t handle, nyx_device_callback callback_func, void *context);
+NYX_API_EXPORT nyx_error_t nyx_system_register_msm_change_callback(nyx_device_handle_t handle, nyx_device_callback_function_t callback_func, void *context);
/**
* @brief Erase partition.
View
4 include/nyx/common/nyx_device.h
@@ -115,7 +115,7 @@ typedef struct nyx_device_iterator* nyx_device_iterator_handle_t;
/**
* Defines the possible statuses of a worker thread.
*
- * This status is passed as a parameter to the callback function (@ref nyx_device_callback).
+ * This status is passed as a parameter to the callback function (@ref nyx_device_callback_function_t).
*/
typedef enum {
NYX_CALLBACK_STATUS_UNDEFINED = 0, /**< Status of worker thread is unknown */
@@ -130,7 +130,7 @@ typedef enum {
/**
* Typedef that defines the function signature for a callback routine.
*/
-typedef void (*nyx_device_callback)(nyx_device_handle_t, nyx_callback_status_t, void*);
+typedef void (*nyx_device_callback_function_t)(nyx_device_handle_t, nyx_callback_status_t, void*);
/**
* Defines all valid poll rates for sensors.
View
2  include/nyx/common/nyx_led_controller_common.h
@@ -72,7 +72,7 @@ typedef struct {
struct {
int32_t brightness_lcd;
int32_t brightness_keypad;
- nyx_device_callback callback;
+ nyx_device_callback_function_t callback;
void* callback_context;
} backlight;
View
12 include/nyx/module/nyx_device_internal.h
@@ -166,14 +166,14 @@ typedef nyx_error_t (*nyx_haptics_cancel_function_t)(nyx_device_t*, int32_t);
typedef nyx_error_t (*nyx_haptics_cancel_all_function_t)(nyx_device_t*);
typedef nyx_error_t (*nyx_charger_query_charger_status_function_t)(nyx_device_t*, nyx_charger_status_t *);
-typedef nyx_error_t (*nyx_charger_register_charger_status_callback_function_t)(nyx_device_t*, nyx_device_callback,void *context);
+typedef nyx_error_t (*nyx_charger_register_charger_status_callback_function_t)(nyx_device_t*, nyx_device_callback_function_t,void *context);
typedef nyx_error_t (*nyx_charger_enable_charging_function_t)(nyx_device_t*, nyx_charger_status_t *);
typedef nyx_error_t (*nyx_charger_disable_charging_function_t)(nyx_device_t*, nyx_charger_status_t *);
-typedef nyx_error_t (*nyx_charger_register_state_change_callback_function_t)(nyx_device_t* ,nyx_device_callback, void *context);
+typedef nyx_error_t (*nyx_charger_register_state_change_callback_function_t)(nyx_device_t* ,nyx_device_callback_function_t, void *context);
typedef nyx_error_t (*nyx_charger_query_charger_event_function_t)(nyx_device_t*, nyx_charger_event_t *);
typedef nyx_error_t (*nyx_battery_query_battery_status_function_t)(nyx_device_t*, nyx_battery_status_t *);
-typedef nyx_error_t (*nyx_battery_register_battery_status_callback_function_t)(nyx_device_t*, nyx_device_callback, void *context);
+typedef nyx_error_t (*nyx_battery_register_battery_status_callback_function_t)(nyx_device_t*, nyx_device_callback_function_t, void *context);
typedef nyx_error_t (*nyx_battery_authenticate_battery_function_t)(nyx_device_t *, bool *);
typedef nyx_error_t (*nyx_battery_get_ctia_parameters_function_t)(nyx_device_t *, nyx_battery_ctia_t *);
typedef nyx_error_t (*nyx_battery_set_wakeup_percentage_function_t)(nyx_device_t *, int32_t);
@@ -181,9 +181,9 @@ typedef nyx_error_t (*nyx_firmware_update_query_current_version_function_t)(nyx_
typedef nyx_error_t (*nyx_firmware_update_get_available_versions_iterator_function_t)(nyx_device_t*, nyx_firmware_update_iterator_handle_t*);
typedef nyx_error_t (*nyx_firmware_update_get_next_available_version_function_t)(nyx_device_t*, nyx_firmware_update_iterator_handle_t, nyx_firmware_version_info_handle_t*);
typedef nyx_error_t (*nyx_firmware_update_release_available_versions_iterator_function_t)(nyx_device_t*, nyx_firmware_update_iterator_handle_t);
-typedef nyx_error_t (*nyx_firmware_update_flash_function_t)(nyx_device_t*, nyx_firmware_version_info_handle_t, bool, int32_t*, nyx_device_callback, void*);
+typedef nyx_error_t (*nyx_firmware_update_flash_function_t)(nyx_device_t*, nyx_firmware_version_info_handle_t, bool, int32_t*, nyx_device_callback_function_t, void*);
-typedef nyx_error_t (*nyx_system_set_alarm_function_t)(nyx_device_t *, time_t, nyx_device_callback, void *);
+typedef nyx_error_t (*nyx_system_set_alarm_function_t)(nyx_device_t *, time_t, nyx_device_callback_function_t, void *);
typedef nyx_error_t (*nyx_system_query_next_alarm_function_t)(nyx_device_t *, time_t *);
typedef nyx_error_t (*nyx_system_query_rtc_time_function_t)(nyx_device_t *, time_t *);
typedef nyx_error_t (*nyx_system_suspend_function_t)(nyx_device_t *, bool *);
@@ -191,7 +191,7 @@ typedef nyx_error_t (*nyx_system_shutdown_function_t)(nyx_device_t *, nyx_system
typedef nyx_error_t (*nyx_system_reboot_function_t)(nyx_device_t *, nyx_system_shutdown_type_t);
typedef nyx_error_t (*nyx_system_set_msm_mode_function_t)(nyx_device_t *, nyx_system_msm_action_t, nyx_system_msm_return_code_t*);
typedef nyx_error_t (*nyx_system_get_msm_state_function_t)(nyx_device_t *,nyx_system_msm_state_t*);
-typedef nyx_error_t (*nyx_system_register_msm_change_callback_function_t)(nyx_device_t *, nyx_device_callback, void *);
+typedef nyx_error_t (*nyx_system_register_msm_change_callback_function_t)(nyx_device_t *, nyx_device_callback_function_t, void *);
typedef nyx_error_t (*nyx_system_erase_partition_function_t)(nyx_device_t *, nyx_system_erase_type_t, const char *);
typedef nyx_error_t (*nyx_bearing_get_location_function_t)(nyx_device_t*, nyx_sensor_bearing_location_t*);
View
2  include/nyx/module/nyx_utils.h
@@ -32,7 +32,7 @@
void nyx_utils_write_value (char* path, int32_t val);
int32_t nyx_utils_read_value (char* path);
-nyx_error_t nyx_utils_async_callback (nyx_device_t* device_in_ptr, nyx_device_callback callback,
+nyx_error_t nyx_utils_async_callback (nyx_device_t* device_in_ptr, nyx_device_callback_function_t callback,
nyx_callback_status_t status,void* context);
#endif /* _NYX_UTILS_H_ */
View
2  src/device/nyx_battery_impl.c
@@ -30,7 +30,7 @@ nyx_error_t nyx_battery_query_battery_status(nyx_device_handle_t handle, nyx_bat
nyx_execute_return_function(battery_query_battery_status, BATTERY, QUERY_BATTERY_STATUS, handle, status);
}
-nyx_error_t nyx_battery_register_battery_status_callback(nyx_device_handle_t handle, nyx_device_callback callback_func, void *context)
+nyx_error_t nyx_battery_register_battery_status_callback(nyx_device_handle_t handle, nyx_device_callback_function_t callback_func, void *context)
{
nyx_execute_return_function(battery_register_battery_status_callback, BATTERY, REGISTER_BATTERY_STATUS_CALLBACK, handle, callback_func, context);
}
View
4 src/device/nyx_charger_impl.c
@@ -34,7 +34,7 @@ nyx_error_t nyx_charger_query_charger_status(nyx_device_handle_t handle, nyx_cha
nyx_execute_return_function(charger_query_charger_status, CHARGER, QUERY_CHARGER_STATUS, handle, status);
}
-nyx_error_t nyx_charger_register_charger_status_callback(nyx_device_handle_t handle, nyx_device_callback callback_func, void *context)
+nyx_error_t nyx_charger_register_charger_status_callback(nyx_device_handle_t handle, nyx_device_callback_function_t callback_func, void *context)
{
nyx_execute_return_function(charger_register_charger_status_callback, CHARGER, REGISTER_CHARGER_STATUS_CALLBACK, handle, callback_func, context);
}
@@ -49,7 +49,7 @@ nyx_error_t nyx_charger_disable_charging(nyx_device_handle_t handle, nyx_charger
nyx_execute_return_function(charger_disable_charging, CHARGER, DISABLE_CHARGING, handle, status);
}
-nyx_error_t nyx_charger_register_state_change_callback(nyx_device_handle_t handle, nyx_device_callback callback_func, void *context)
+nyx_error_t nyx_charger_register_state_change_callback(nyx_device_handle_t handle, nyx_device_callback_function_t callback_func, void *context)
{
nyx_execute_return_function(charger_register_state_change_callback, CHARGER, REGISTER_STATE_CHANGE_CALLBACK, handle, callback_func, context);
}
View
2  src/device/nyx_firmware_update_impl.c
@@ -48,7 +48,7 @@ nyx_error_t nyx_firmware_update_release_available_versions_iterator(nyx_device_h
nyx_execute_return_function(firmware_update_release_available_versions_iterator, FIRMWARE_UPDATE, RELEASE_AVAILABLE_VERSIONS_ITERATOR, handle, iterator);
}
-nyx_error_t nyx_firmware_update_flash(nyx_device_handle_t handle, nyx_firmware_version_info_handle_t version, bool force, int32_t* fd_out_ptr, nyx_device_callback done_callback, void* context)
+nyx_error_t nyx_firmware_update_flash(nyx_device_handle_t handle, nyx_firmware_version_info_handle_t version, bool force, int32_t* fd_out_ptr, nyx_device_callback_function_t done_callback, void* context)
{
nyx_execute_return_function(firmware_update_flash, FIRMWARE_UPDATE, FLASH, handle, version, force, fd_out_ptr, done_callback, context);
}
View
4 src/device/nyx_system_impl.c
@@ -30,7 +30,7 @@
#include <nyx/nyx_module.h>
-nyx_error_t nyx_system_set_alarm(nyx_device_handle_t handle, time_t time, nyx_device_callback callback_func, void *context)
+nyx_error_t nyx_system_set_alarm(nyx_device_handle_t handle, time_t time, nyx_device_callback_function_t callback_func, void *context)
{
nyx_execute_return_function(system_set_alarm, SYSTEM, SET_ALARM, handle, time, callback_func, context);
}
@@ -70,7 +70,7 @@ nyx_error_t nyx_system_get_msm_state(nyx_device_handle_t handle, nyx_system_msm_
nyx_execute_return_function(system_get_msm_state, SYSTEM, GET_MSM_STATE, handle, state);
}
-nyx_error_t nyx_system_register_msm_change_callback(nyx_device_handle_t handle, nyx_device_callback callback_func, void *context)
+nyx_error_t nyx_system_register_msm_change_callback(nyx_device_handle_t handle, nyx_device_callback_function_t callback_func, void *context)
{
nyx_execute_return_function(system_register_msm_change_callback, SYSTEM, REGISTER_MSM_CHANGE_CALLBACK, handle, callback_func, context);
}
View
4 src/utils/nyx_async.c
@@ -32,7 +32,7 @@
struct callback_data {
nyx_device_t* device_ptr;
- nyx_device_callback callback;
+ nyx_device_callback_function_t callback;
nyx_callback_status_t status;
void* context;
};
@@ -47,7 +47,7 @@ static void *callback_thread (void *ptr)
return NULL;
}
-nyx_error_t nyx_utils_async_callback (nyx_device_t* device_in_ptr, nyx_device_callback callback, nyx_callback_status_t status, void* context)
+nyx_error_t nyx_utils_async_callback (nyx_device_t* device_in_ptr, nyx_device_callback_function_t callback, nyx_callback_status_t status, void* context)
{
if (NULL == device_in_ptr) {
nyx_warn ("%s: device pointer is null, no device to use in call", __FUNCTION__);
Please sign in to comment.
Something went wrong with that request. Please try again.