From: Yunhee Seo Date: Fri, 29 Nov 2024 06:33:07 +0000 (+0900) Subject: Add detailed description for hal-api-device APIs X-Git-Tag: accepted/tizen/unified/20241210.105101^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=053c86baccaef8f36de4966faabfc0de507df021;p=platform%2Fhal%2Fapi%2Fdevice.git Add detailed description for hal-api-device APIs Before requests HAL ACR process, there were omitted standard description. To keep ACR format, APIs and data structure descriptions are adeed. This includes all submodule description of the hal-api-device. Change-Id: I1c65561f2e025a2a8b2426989ea1e9a3420f8d57 Signed-off-by: Yunhee Seo --- diff --git a/include/hal-device-battery-interface-1.h b/include/hal-device-battery-interface-1.h index 630ea07..c424a9d 100644 --- a/include/hal-device-battery-interface-1.h +++ b/include/hal-device-battery-interface-1.h @@ -29,13 +29,14 @@ extern "C" { * @{ */ +/** + * @brief Structure for Battery functions. + * @since HAL_MODULE_DEVICE_BATTERY 1.0 + */ typedef struct _hal_backend_device_battery_funcs { - /* Register battery event */ - int (*register_changed_event)(hal_device_battery_updated_cb updated_cb, void *data); - void (*unregister_changed_event)(hal_device_battery_updated_cb updated_cb); - - /* Get current states */ - int (*get_current_state)(hal_device_battery_updated_cb updated_cb, void *data); + int (*register_changed_event)(hal_device_battery_updated_cb updated_cb, void *data); /**< Register battery event */ + void (*unregister_changed_event)(hal_device_battery_updated_cb updated_cb); /**< Unregister battery event */ + int (*get_current_state)(hal_device_battery_updated_cb updated_cb, void *data); /**< Get current states, it operates synchronously */ } hal_backend_device_battery_funcs; /** diff --git a/include/hal-device-battery-types.h b/include/hal-device-battery-types.h index 492ad64..cce72a8 100644 --- a/include/hal-device-battery-types.h +++ b/include/hal-device-battery-types.h @@ -28,41 +28,41 @@ extern "C" { */ /** - * @brief Enumeration for battery power source type. + * @brief Enumeration for Battery power source type. * @since HAL_MODULE_DEVICE_BATTERY 1.0 */ typedef enum { - HAL_DEVICE_BATTERY_POWER_SOURCE_NONE = 0, - HAL_DEVICE_BATTERY_POWER_SOURCE_AC, - HAL_DEVICE_BATTERY_POWER_SOURCE_USB, - HAL_DEVICE_BATTERY_POWER_SOURCE_WIRELESS, + HAL_DEVICE_BATTERY_POWER_SOURCE_NONE = 0, /**< power source type None */ + HAL_DEVICE_BATTERY_POWER_SOURCE_AC, /**< power source type Ac */ + HAL_DEVICE_BATTERY_POWER_SOURCE_USB, /**< power source type Usb */ + HAL_DEVICE_BATTERY_POWER_SOURCE_WIRELESS, /**< power source type Wireless */ } hal_device_battery_power_source_type_e; /** - * @brief Structure for battery information data. + * @brief Structure for Battery information data. * @since HAL_MODULE_DEVICE_BATTERY 1.0 */ typedef struct { - char *name; /**< The name of the battery (Since HAL_MODULE_DEVICE_BATTERY 1.0) */ - char *status; /**< The current state of the battery (Since HAL_MODULE_DEVICE_BATTERY 1.0) */ - char *health; /**< The overall condition of the battery (Since HAL_MODULE_DEVICE_BATTERY 1.0) */ - hal_device_battery_power_source_type_e power_source; /**< The source of power being supplied (Since HAL_MODULE_DEVICE_BATTERY 1.0) */ + char *name; /**< The name of the battery */ + char *status; /**< The current state of the battery */ + char *health; /**< The overall condition of the battery */ + hal_device_battery_power_source_type_e power_source; /**< The source of power being supplied */ int online; /**< This indicates whether the device is currently - receiving power from an external source. (Since HAL_MODULE_DEVICE_BATTERY 1.0) */ + receiving power from an external source. */ int present; /**< This indicates whether there is a battery inside the system physically, - with 1 indicating it is connected and 0 otherwise. (Since HAL_MODULE_DEVICE_BATTERY 1.0) */ - int capacity; /**< The remaining capacity of the battery (Since HAL_MODULE_DEVICE_BATTERY 1.0) */ + with 1 indicating it is connected and 0 otherwise. */ + int capacity; /**< The remaining capacity of the battery */ - int current_now; /**< The amount of current being consumed by the device at the moment (Since HAL_MODULE_DEVICE_BATTERY 1.0) */ - int current_average; /**< The average amount of current consumed by the device over time (Since HAL_MODULE_DEVICE_BATTERY 1.0) */ - int voltage_now; /**< The current voltage level of the battery (Since HAL_MODULE_DEVICE_BATTERY 1.0) */ - int voltage_average; /**< The average voltage level of the battery over time (Since HAL_MODULE_DEVICE_BATTERY 1.0) */ - int temperature; /**< The current temperature of the battery (Since HAL_MODULE_DEVICE_BATTERY 1.0) */ + int current_now; /**< The amount of current being consumed by the device at the moment */ + int current_average; /**< The average amount of current consumed by the device over time */ + int voltage_now; /**< The current voltage level of the battery */ + int voltage_average; /**< The average voltage level of the battery over time */ + int temperature; /**< The current temperature of the battery */ } hal_device_battery_info_s; /** - * @brief Called when a battery information is handled. + * @brief Called when a Battery information is handled. * @since HAL_MODULE_DEVICE_BATTERY 1.0 * @param[out] info Battery information * @param[out] user_data User data passed diff --git a/include/hal-device-bezel-interface-1.h b/include/hal-device-bezel-interface-1.h index 2d38fb0..a6f2b29 100644 --- a/include/hal-device-bezel-interface-1.h +++ b/include/hal-device-bezel-interface-1.h @@ -29,17 +29,17 @@ extern "C" { * @{ */ +/** + * @brief Structure for Bezel functions. + * @since HAL_MODULE_DEVICE_BEZEL 1.0 + */ typedef struct _hal_backend_device_bezel_funcs { - /* Control hardware bezel state */ - int (*get_state)(hal_device_bezel_state_e *state); - int (*set_state)(hal_device_bezel_state_e state); - /* Control software bezel state */ - int (*get_sw_state)(hal_device_bezel_state_e *state); - int (*set_sw_state)(hal_device_bezel_state_e state); - - /* Control bezel vibration state */ - int (*get_vib_state)(hal_device_bezel_vib_state_e *state); - int (*set_vib_state)(hal_device_bezel_vib_state_e state); + int (*get_state)(hal_device_bezel_state_e *state); /**< Get hardware bezel state */ + int (*set_state)(hal_device_bezel_state_e state); /**< Set hardware bezel state */ + int (*get_sw_state)(hal_device_bezel_state_e *state); /**< Get software bezel state */ + int (*set_sw_state)(hal_device_bezel_state_e state); /**< Set software bezel state */ + int (*get_vib_state)(hal_device_bezel_vib_state_e *state); /**< Get bezel vibration state */ + int (*set_vib_state)(hal_device_bezel_vib_state_e state); /**< Set bezel vibration state */ } hal_backend_device_bezel_funcs; /** diff --git a/include/hal-device-bezel-types.h b/include/hal-device-bezel-types.h index b15f60f..61230ff 100644 --- a/include/hal-device-bezel-types.h +++ b/include/hal-device-bezel-types.h @@ -28,23 +28,23 @@ extern "C" { */ /** - * @brief Enumeration for bezel state. + * @brief Enumeration for Bezel state. * @since HAL_MODULE_DEVICE_BEZEL 1.0 */ typedef enum { - HAL_DEVICE_BEZEL_TURNOFF = 0, - HAL_DEVICE_BEZEL_TURNON, + HAL_DEVICE_BEZEL_TURNOFF = 0, /**< bezel state Turnoff */ + HAL_DEVICE_BEZEL_TURNON, /**< bezel state Turnon */ } hal_device_bezel_state_e; /** - * @brief Enumeration for bezel vibration state. + * @brief Enumeration for Bezel vibration state. * @since HAL_MODULE_DEVICE_BEZEL 1.0 */ typedef enum { - HAL_DEVICE_BEZEL_VIB_NONE = 0, - HAL_DEVICE_BEZEL_VIB_LIGHT, - HAL_DEVICE_BEZEL_VIB_MEDIUM, - HAL_DEVICE_BEZEL_VIB_STRONG, + HAL_DEVICE_BEZEL_VIB_NONE = 0, /**< bezel vibration state None */ + HAL_DEVICE_BEZEL_VIB_LIGHT, /**< bezel vibration state Light */ + HAL_DEVICE_BEZEL_VIB_MEDIUM, /**< bezel vibration state Medium */ + HAL_DEVICE_BEZEL_VIB_STRONG, /**< bezel vibration state Strong */ } hal_device_bezel_vib_state_e; /** diff --git a/include/hal-device-board-interface-1.h b/include/hal-device-board-interface-1.h index a2f4765..c58242d 100644 --- a/include/hal-device-board-interface-1.h +++ b/include/hal-device-board-interface-1.h @@ -27,32 +27,30 @@ extern "C" { * @{ */ +/** + * @brief Structure for Board functions. + * @since HAL_MODULE_DEVICE_BOARD 1.0 + */ typedef struct _hal_backend_device_board_funcs { - /* Serial number of this device */ - int (*get_device_serial_number)(char *buffer, const int max_len); - int (*get_device_revision)(int *revision); - - int (*set_boot_success)(void); - int (*clear_boot_mode)(void); - int (*get_boot_mode)(char *buffer, const int max_len); - int (*get_boot_reason)(char *buffer, const int max_len); - - int (*get_current_partition)(char *partition_ab); - int (*switch_partition)(char partition_ab); - int (*set_partition_ab_cloned)(void); - int (*clear_partition_ab_cloned)(void); - int (*get_partition_ab_cloned)(int *cloned); - int (*set_partition_status)(char partition_ab, const char *status); - int (*get_partition_status)(char partition_ab, char *buffer, const int max_len); - - int (*set_upgrade_progress_status)(int status); - int (*get_upgrade_progress_status)(int *status); - - int (*set_upgrade_state)(char *state); - int (*get_upgrade_state)(char *buffer, const int max_len); - - int (*set_upgrade_type)(char *type); - int (*get_upgrade_type)(char *buffer, const int max_len); + int (*get_device_serial_number)(char *buffer, const int max_len); /**< Get serial number of this device */ + int (*get_device_revision)(int *revision); /**< Get revision of this device */ + int (*set_boot_success)(void); /**< Set boot success */ + int (*clear_boot_mode)(void); /**< Clear boot mode */ + int (*get_boot_mode)(char *buffer, const int max_len); /**< Get boot mode */ + int (*get_boot_reason)(char *buffer, const int max_len); /**< Get boot reason */ + int (*get_current_partition)(char *partition_ab); /**< Get current partition */ + int (*switch_partition)(char partition_ab); /**< Set to switch partition */ + int (*set_partition_ab_cloned)(void); /**< Set a/b partition cloned flag */ + int (*clear_partition_ab_cloned)(void); /**< Clear a/b partition cloned flag */ + int (*get_partition_ab_cloned)(int *cloned); /**< Get a/b partition cloned flag */ + int (*set_partition_status)(char partition_ab, const char *status); /**< Set partition status */ + int (*get_partition_status)(char partition_ab, char *buffer, const int max_len); /**< Get partition status */ + int (*set_upgrade_progress_status)(int status); /**< Set upgrade progress status */ + int (*get_upgrade_progress_status)(int *status); /**< Get upgrade progress status */ + int (*set_upgrade_state)(char *state); /**< Set upgrade state */ + int (*get_upgrade_state)(char *buffer, const int max_len); /**< Get upgrade state */ + int (*set_upgrade_type)(char *type); /**< Set upgrade type */ + int (*get_upgrade_type)(char *buffer, const int max_len); /**< Get upgrade type */ } hal_backend_device_board_funcs; /** diff --git a/include/hal-device-display-interface-1.h b/include/hal-device-display-interface-1.h index 0c9466c..6bd3822 100644 --- a/include/hal-device-display-interface-1.h +++ b/include/hal-device-display-interface-1.h @@ -29,48 +29,33 @@ extern "C" { * @{ */ +/** + * @brief Structure for Display functions. + * @since HAL_MODULE_DEVICE_DISPLAY 1.0 + */ typedef struct _hal_backend_device_display_funcs { - /* Control display brightness */ - int (*get_max_brightness)(int *brightness); - int (*get_brightness)(int *brightness); - int (*set_brightness)(int brightness); - int (*set_multi_brightness)(int brightness, int step, int delay); - - /* Control display brightness by sensor */ - int (*get_auto_brightness)(float lmax, float lmin, float light, int *brightness); - - /* Control display state */ - int (*get_state)(hal_device_display_state_e *state); - int (*set_state)(hal_device_display_state_e state); - - /* Control image effect */ - int (*get_image_effect)(hal_device_display_image_effect_e *effect); - int (*set_image_effect)(hal_device_display_image_effect_e effect); - - /* Control panel mode */ - int (*get_panel_mode)(hal_device_display_panel_mode_e *mode); - int (*set_panel_mode)(hal_device_display_panel_mode_e mode); - - /* Control AOD mode */ - int (*get_aod_mode)(hal_device_display_aod_mode_e *mode); - - /* Control AOD brightness */ - int (*get_aod_brightness)(int *max, int *normal, int *min, int *charging); - - /* Control display frame rate */ - int (*get_max_frame_rate)(int *rate); - int (*get_min_frame_rate)(int *rate); - int (*get_frame_rate)(int *rate); - int (*set_frame_rate)(int rate); - - /* Control display white balance */ - int (*set_white_balance)(hal_device_display_white_balance_e white_balance_type, int value); - int (*get_white_balance)(hal_device_display_white_balance_e white_balance_type, int *value); - - /* Control display rotation angle */ - int (*get_rotation_angle)(int display_index, hal_device_display_rotation_angle_e *angle); + int (*get_max_brightness)(int *brightness); /**< Get max brightness */ + int (*get_brightness)(int *brightness); /**< Get current brightness */ + int (*set_brightness)(int brightness); /**< Set brightness */ + int (*set_multi_brightness)(int brightness, int step, int delay); /**< Set multi brightness */ + int (*get_auto_brightness)(float lmax, float lmin, float light, int *brightness); /**< Get auto brightness by sensor */ + int (*get_state)(hal_device_display_state_e *state); /**< Get display state */ + int (*set_state)(hal_device_display_state_e state); /**< Set display state */ + int (*get_image_effect)(hal_device_display_image_effect_e *effect); /**< Get display image effect */ + int (*set_image_effect)(hal_device_display_image_effect_e effect); /**< Set display image effect */ + int (*get_panel_mode)(hal_device_display_panel_mode_e *mode); /**< Get display panel mode */ + int (*set_panel_mode)(hal_device_display_panel_mode_e mode); /**< Set display panel mode */ + int (*get_aod_mode)(hal_device_display_aod_mode_e *mode); /**< Get Always On Display mode */ + int (*get_aod_brightness)(int *max, int *normal, int *min, int *charging); /**< Get Always On Display brightness */ + int (*get_max_frame_rate)(int *rate); /**< Get display max frame rate */ + int (*get_min_frame_rate)(int *rate); /**< Get display min frame rate */ + int (*get_frame_rate)(int *rate); /**< Get display frame rate */ + int (*set_frame_rate)(int rate); /**< Set display frame rate */ + int (*set_white_balance)(hal_device_display_white_balance_e white_balance_type, int value); /**< Set display white balance */ + int (*get_white_balance)(hal_device_display_white_balance_e white_balance_type, int *value); /**< Get display white balance */ + int (*get_rotation_angle)(int display_index, hal_device_display_rotation_angle_e *angle); /**< Get display rotation angle */ int (*set_rotation_angle)(int display_index, hal_device_display_rotation_angle_e angle, - hal_device_display_rotation_direction_e direction); + hal_device_display_rotation_direction_e direction); /**< Set display rotation angle */ } hal_backend_device_display_funcs; /** diff --git a/include/hal-device-display-types.h b/include/hal-device-display-types.h index 2918c04..9210a23 100644 --- a/include/hal-device-display-types.h +++ b/include/hal-device-display-types.h @@ -28,81 +28,81 @@ extern "C" { */ /** - * @brief Enumeration for display state. + * @brief Enumeration for Display state. * @since HAL_MODULE_DEVICE_DISPLAY 1.0 */ typedef enum { - HAL_DEVICE_DISPLAY_ON, /**< In use (Since HAL_DEVICE_DISPLAY 1.0) */ - HAL_DEVICE_DISPLAY_STANDBY, /**< Blanked, low power (Since HAL_DEVICE_DISPLAY 1.0) */ - HAL_DEVICE_DISPLAY_SUSPEND, /**< Blanked, lower power (Since HAL_DEVICE_DISPLAY 1.0) */ - HAL_DEVICE_DISPLAY_OFF, /**< Shut off, awaiting activity (Since HAL_DEVICE_DISPLAY 1.0) */ - HAL_DEVICE_DISPLAY_DETACH, /**< Detached display at runtime (Since HAL_DEVICE_DISPLAY 1.0) */ + HAL_DEVICE_DISPLAY_ON, /**< In use */ + HAL_DEVICE_DISPLAY_STANDBY, /**< Blanked, low power */ + HAL_DEVICE_DISPLAY_SUSPEND, /**< Blanked, lower power */ + HAL_DEVICE_DISPLAY_OFF, /**< Shut off, awaiting activity */ + HAL_DEVICE_DISPLAY_DETACH, /**< Detached display at runtime */ } hal_device_display_state_e; /** - * @brief Enumeration for display image effect. + * @brief Enumeration for Display image effect. * @since HAL_MODULE_DEVICE_DISPLAY 1.0 */ typedef enum { - HAL_DEVICE_DISPLAY_IMAGE_EFFECT_STANDARD, /**< No effect (Since HAL_DEVICE_DISPLAY 1.0) */ - HAL_DEVICE_DISPLAY_IMAGE_EFFECT_NEGATIVE, /**< Negative effect (Since HAL_DEVICE_DISPLAY 1.0) */ - HAL_DEVICE_DISPLAY_IMAGE_EFFECT_GREY, /**< Grey effect (Since HAL_DEVICE_DISPLAY 1.0) */ - HAL_DEVICE_DISPLAY_IMAGE_EFFECT_GREY_NEGATIVE, /**< Grey Negative effect (Since HAL_DEVICE_DISPLAY 1.0) */ + HAL_DEVICE_DISPLAY_IMAGE_EFFECT_STANDARD, /**< No effect */ + HAL_DEVICE_DISPLAY_IMAGE_EFFECT_NEGATIVE, /**< Negative effect */ + HAL_DEVICE_DISPLAY_IMAGE_EFFECT_GREY, /**< Grey effect */ + HAL_DEVICE_DISPLAY_IMAGE_EFFECT_GREY_NEGATIVE, /**< Grey Negative effect */ HAL_DEVICE_DISPLAY_IMAGE_EFFECT_MAX, } hal_device_display_image_effect_e; /** - * @brief Enumeration for display panel mode. + * @brief Enumeration for Display panel mode. * @since HAL_MODULE_DEVICE_DISPLAY 1.0 */ typedef enum { - HAL_DEVICE_DISPLAY_PANEL_MODE_STANDARD, /**< Standard mode (Since HAL_DEVICE_DISPLAY 1.0) */ - HAL_DEVICE_DISPLAY_PANEL_MODE_OUTDOOR, /**< Outdoor mode (Since HAL_DEVICE_DISPLAY 1.0) */ - HAL_DEVICE_DISPLAY_PANEL_MODE_CONTENTS, /**< Contents adaptive brightness control mode (Since HAL_DEVICE_DISPLAY 1.0) */ - HAL_DEVICE_DISPLAY_PANEL_MODE_LOWPOWER, /**< Low power mode (Since HAL_DEVICE_DISPLAY 1.0) */ + HAL_DEVICE_DISPLAY_PANEL_MODE_STANDARD, /**< Standard mode */ + HAL_DEVICE_DISPLAY_PANEL_MODE_OUTDOOR, /**< Outdoor mode */ + HAL_DEVICE_DISPLAY_PANEL_MODE_CONTENTS, /**< Contents adaptive brightness control mode */ + HAL_DEVICE_DISPLAY_PANEL_MODE_LOWPOWER, /**< Low power mode */ } hal_device_display_panel_mode_e; /** - * @brief Enumeration for display aod mode. + * @brief Enumeration for Display aod mode. * @since HAL_MODULE_DEVICE_DISPLAY 1.0 */ typedef enum { - HAL_DEVICE_DISPLAY_AOD_MODE_OFF, - HAL_DEVICE_DISPLAY_AOD_MODE_ON, + HAL_DEVICE_DISPLAY_AOD_MODE_OFF, /**< Aod mode off */ + HAL_DEVICE_DISPLAY_AOD_MODE_ON, /**< Aod mode on */ } hal_device_display_aod_mode_e; /** - * @brief Enumeration for display white balance value. + * @brief Enumeration for Display white balance value. * @since HAL_MODULE_DEVICE_DISPLAY 1.0 */ typedef enum { - HAL_DEVICE_DISPLAY_WHITE_BALANCE_R_GAIN, - HAL_DEVICE_DISPLAY_WHITE_BALANCE_G_GAIN, - HAL_DEVICE_DISPLAY_WHITE_BALANCE_B_GAIN, - HAL_DEVICE_DISPLAY_WHITE_BALANCE_R_OFFSET, - HAL_DEVICE_DISPLAY_WHITE_BALANCE_G_OFFSET, - HAL_DEVICE_DISPLAY_WHITE_BALANCE_B_OFFSET, + HAL_DEVICE_DISPLAY_WHITE_BALANCE_R_GAIN, /**< White balance R gain */ + HAL_DEVICE_DISPLAY_WHITE_BALANCE_G_GAIN, /**< White balance G gain */ + HAL_DEVICE_DISPLAY_WHITE_BALANCE_B_GAIN, /**< White balance B gain */ + HAL_DEVICE_DISPLAY_WHITE_BALANCE_R_OFFSET, /**< White balance R offset */ + HAL_DEVICE_DISPLAY_WHITE_BALANCE_G_OFFSET, /**< White balance G offset */ + HAL_DEVICE_DISPLAY_WHITE_BALANCE_B_OFFSET, /**< White balance B offset */ } hal_device_display_white_balance_e; /** - * @brief Enumeration for display rotation angle. + * @brief Enumeration for Display rotation angle. * @since HAL_MODULE_DEVICE_DISPLAY 1.0 */ typedef enum { - HAL_DEVICE_DISPLAY_ROTATION_ANGLE_UNKNOWN = -1, - HAL_DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_0 = 0, - HAL_DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_90 = 90, - HAL_DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_180 = 180, - HAL_DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_270 = 270, + HAL_DEVICE_DISPLAY_ROTATION_ANGLE_UNKNOWN = -1, /**< Unknown rotation angle */ + HAL_DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_0 = 0, /**< Rotation angle degree 0 */ + HAL_DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_90 = 90, /**< Rotation angle degree 90 */ + HAL_DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_180 = 180, /**< Rotation angle degree 180 */ + HAL_DEVICE_DISPLAY_ROTATION_ANGLE_DEGREE_270 = 270, /**< Rotation angle degree 270 */ } hal_device_display_rotation_angle_e; /** - * @brief Enumeration for display rotation direction. + * @brief Enumeration for Display rotation direction. * @since HAL_MODULE_DEVICE_DISPLAY 1.0 */ typedef enum { - HAL_DEVICE_DISPLAY_ROTATION_DIRECTION_CLOCKWISE, - HAL_DEVICE_DISPLAY_ROTATION_DIRECTION_COUNTER_CLOCKWISE, + HAL_DEVICE_DISPLAY_ROTATION_DIRECTION_CLOCKWISE, /**< Clockwise rotation */ + HAL_DEVICE_DISPLAY_ROTATION_DIRECTION_COUNTER_CLOCKWISE, /**< Counter clockwise rotation */ } hal_device_display_rotation_direction_e; /** diff --git a/include/hal-device-external_connection-interface-1.h b/include/hal-device-external_connection-interface-1.h index 7e5a516..1ce536a 100644 --- a/include/hal-device-external_connection-interface-1.h +++ b/include/hal-device-external_connection-interface-1.h @@ -29,13 +29,14 @@ extern "C" { * @{ */ +/** + * @brief Structure for External_connection functions. + * @since HAL_MODULE_DEVICE_EXTERNAL_CONNECTION 1.0 + */ typedef struct _hal_backend_device_external_connection_funcs { - /* Register external_connection event */ - int (*register_changed_event)(hal_device_external_connection_updated_cb updated_cb, void *user_data); - void (*unregister_changed_event)(hal_device_external_connection_updated_cb updated_cb); - - /* Get current states */ - int (*get_current_state)(hal_device_external_connection_updated_cb updated_cb, void *user_data); + int (*register_changed_event)(hal_device_external_connection_updated_cb updated_cb, void *user_data); /**< Register external_connection event */ + void (*unregister_changed_event)(hal_device_external_connection_updated_cb updated_cb); /**< Unregister external_connection event */ + int (*get_current_state)(hal_device_external_connection_updated_cb updated_cb, void *user_data); /**< Get current states */ } hal_backend_device_external_connection_funcs; /** diff --git a/include/hal-device-external_connection-types.h b/include/hal-device-external_connection-types.h index 843ec8d..499b342 100644 --- a/include/hal-device-external_connection-types.h +++ b/include/hal-device-external_connection-types.h @@ -28,32 +28,32 @@ extern "C" { */ /** - * @brief Enumeration for external connection device type. + * @brief Enumeration for External_connection device type. * @since HAL_MODULE_DEVICE_EXTERNAL_CONNECTION 1.0 */ typedef enum { - HAL_DEVICE_EXTERNAL_CONNECTION_USB = 0, - HAL_DEVICE_EXTERNAL_CONNECTION_USB_HOST, - HAL_DEVICE_EXTERNAL_CONNECTION_TA, - HAL_DEVICE_EXTERNAL_CONNECTION_HDMI, - HAL_DEVICE_EXTERNAL_CONNECTION_DOCK, - HAL_DEVICE_EXTERNAL_CONNECTION_MIC, - HAL_DEVICE_EXTERNAL_CONNECTION_HEADPHONE, + HAL_DEVICE_EXTERNAL_CONNECTION_USB = 0, /**< USB device */ + HAL_DEVICE_EXTERNAL_CONNECTION_USB_HOST, /**< USB host device */ + HAL_DEVICE_EXTERNAL_CONNECTION_TA, /**< TA device */ + HAL_DEVICE_EXTERNAL_CONNECTION_HDMI, /**< HDMI device */ + HAL_DEVICE_EXTERNAL_CONNECTION_DOCK, /**< Dock device */ + HAL_DEVICE_EXTERNAL_CONNECTION_MIC, /**< MIC device */ + HAL_DEVICE_EXTERNAL_CONNECTION_HEADPHONE, /**< Headphone device */ } hal_device_external_connection_device_type_e; /** - * @brief Structure for external connection information data. + * @brief Structure for External_connection information data. * @since HAL_MODULE_DEVICE_EXTERNAL_CONNECTION 1.0 */ typedef struct { - hal_device_external_connection_device_type_e device_type; /**< This indicates switch device type (Since HAL_MODULE_DEVICE_EXTERNAL_CONNECTION 1.0) */ + hal_device_external_connection_device_type_e device_type; /**< This indicates switch device type */ char *state; /**< This indicates current state of the switch device, - e.g) "on" of "off" (Since HAL_MODULE_DEVICE_EXTERNAL_CONNECTION 1.0) */ - int flags; + e.g) "on" of "off" */ + int flags; /** < This used as flags */ } hal_device_external_connection_info_s; /** - * @brief Called when a external connection information is handled. + * @brief Called when a External_connection information is handled. * @since HAL_MODULE_DEVICE_EXTERNAL_CONNECTION 1.0 * @param[out] info External connection information * @param[out] user_data User data passed diff --git a/include/hal-device-haptic-interface-1.h b/include/hal-device-haptic-interface-1.h index 85299cd..52abe95 100644 --- a/include/hal-device-haptic-interface-1.h +++ b/include/hal-device-haptic-interface-1.h @@ -29,13 +29,17 @@ extern "C" { * @{ */ +/** + * @brief Structure for Haptic functions. + * @since HAL_MODULE_DEVICE_HAPTIC 1.0 + */ typedef struct _hal_backend_device_haptic_funcs { - int (*get_device_count)(int *count); - int (*open_device)(int *dev_handle); - int (*close_device)(int dev_handle); - bool (*is_valid)(void); - int (*vibrate_monotone)(int device_handle, int duration, int frequency, int overdrive, int level, int intensity, int priority); - int (*stop_device)(int dev_handle); + int (*get_device_count)(int *count); /**< Get the number of haptic devices */ + int (*open_device)(int *dev_handle); /**< Open a haptic device */ + int (*close_device)(int dev_handle); /**< Close a haptic device */ + bool (*is_valid)(void); /**< Check if the haptic device is valid */ + int (*vibrate_monotone)(int device_handle, int duration, int frequency, int overdrive, int level, int intensity, int priority); /**< Vibrate with a monotone pattern */ + int (*stop_device)(int dev_handle); /**< Stop haptic device */ } hal_backend_device_haptic_funcs; /** diff --git a/include/hal-device-haptic-types.h b/include/hal-device-haptic-types.h index 232c29b..9540c03 100644 --- a/include/hal-device-haptic-types.h +++ b/include/hal-device-haptic-types.h @@ -30,11 +30,11 @@ extern "C" { */ /** - * @brief Enumerations of unlimited duration for the Haptic Module API. + * @brief Enumerations of unlimited duration for the Haptic API. * @since HAL_MODULE_DEVICE_HAPTIC 1.0 */ typedef enum { - HAL_DEVICE_HAPTIC_MODULE_DURATION_UNLIMITED = 0x7FFFFFFF, + HAL_DEVICE_HAPTIC_MODULE_DURATION_UNLIMITED = 0x7FFFFFFF, /**< Unlimited duration */ } hal_device_haptic_module_duration_e; /** diff --git a/include/hal-device-input-interface-1.h b/include/hal-device-input-interface-1.h index aed083b..d950874 100644 --- a/include/hal-device-input-interface-1.h +++ b/include/hal-device-input-interface-1.h @@ -28,10 +28,13 @@ extern "C" { * @{ */ +/** + * @brief Structure for Input functions. + * @since HAL_MODULE_DEVICE_INPUT 1.0 + */ typedef struct _hal_backend_device_input_funcs { - /* Control input device event */ - int (*set_event_state)(int input_device_id, int on); - int (*get_event_state)(int input_device_id, int* on); + int (*set_event_state)(int input_device_id, int on); /**< Set event state */ + int (*get_event_state)(int input_device_id, int* on); /**< Get event state */ } hal_backend_device_input_funcs; /** diff --git a/include/hal-device-ir-interface-1.h b/include/hal-device-ir-interface-1.h index 9970f46..47e252b 100644 --- a/include/hal-device-ir-interface-1.h +++ b/include/hal-device-ir-interface-1.h @@ -29,10 +29,13 @@ extern "C" { * @{ */ +/** + * @brief Structure for Ir functions. + * @since HAL_MODULE_DEVICE_IR 1.0 + */ typedef struct _hal_backend_device_ir_funcs { - /* Control ir state */ - int (*is_available)(bool *available); - int (*transmit)(int *frequency_pattern, int size); + int (*is_available)(bool *available); /**< Check if IR is available */ + int (*transmit)(int *frequency_pattern, int size); /**< Transmit IR command */ } hal_backend_device_ir_funcs; /** diff --git a/include/hal-device-led-interface-1.h b/include/hal-device-led-interface-1.h index 895be6f..023fd80 100644 --- a/include/hal-device-led-interface-1.h +++ b/include/hal-device-led-interface-1.h @@ -28,31 +28,28 @@ extern "C" { * @{ */ +/** + * @brief Structure for Led functions. + * @since HAL_MODULE_DEVICE_LED 1.0 + */ struct led_funcs { - /* Set led state */ - int (*set_state)(hal_device_led_device_type_e type, hal_device_led_state_s *state); - - /* Get led number */ - int (*get_number)(void); - - /* Set led number */ - void (*set_num)(int number); - - /* Get max led number */ - int (*get_max_num)(void); - - /* Set keyled state */ - int (*keyled_set_state)(hal_device_led_keyled_state_s *state); - - /* Get keyled state */ - int (*keyled_get_state)(int *keycode, int *brightness); + int (*set_state)(hal_device_led_device_type_e type, hal_device_led_state_s *state); /**< Set led state */ + int (*get_number)(void); /**< Get led number */ + void (*set_num)(int number); /**< Set led number */ + int (*get_max_num)(void); /**< Get max led number */ + int (*keyled_set_state)(hal_device_led_keyled_state_s *state); /**< Set keyled state */ + int (*keyled_get_state)(int *keycode, int *brightness); /**< Get keyled state */ }; +/** + * @brief Structure for Led functions by led device type. + * @since HAL_MODULE_DEVICE_LED 1.0 + */ typedef struct _hal_backend_device_led_funcs { - struct led_funcs *camera_front; - struct led_funcs *camera_back; - struct led_funcs *notification; - struct led_funcs *touch_key; + struct led_funcs *camera_front; /**< Camera front led */ + struct led_funcs *camera_back; /**< Camera back led */ + struct led_funcs *notification; /**< Notification led */ + struct led_funcs *touch_key; /**< Touch key led */ } hal_backend_device_led_funcs; /** diff --git a/include/hal-device-led-types.h b/include/hal-device-led-types.h index 9db331a..1fce792 100644 --- a/include/hal-device-led-types.h +++ b/include/hal-device-led-types.h @@ -27,12 +27,12 @@ extern "C" { */ /** - * @brief Enumeration for led state. + * @brief Enumeration for device-led state. * @since HAL_MODULE_DEVICE_LED 1.0 */ typedef enum { - HAL_DEVICE_LED_TYPE_MANUAL, /**< This indicates LED is in manual control mode (Since HAL_MODULE_DEVICE_LED 1.0) */ - HAL_DEVICE_LED_TYPE_BLINK, /**< This indicates LED blinking mode (Since HAL_MODULE_DEVICE_LED 1.0) */ + HAL_DEVICE_LED_TYPE_MANUAL, /**< This indicates LED is in manual control mode */ + HAL_DEVICE_LED_TYPE_BLINK, /**< This indicates LED blinking mode */ } hal_device_led_type_e; /** @@ -40,29 +40,28 @@ typedef enum { * @since HAL_MODULE_DEVICE_LED 1.0 */ typedef enum { - HAL_DEVICE_LED_CAMERA_FRONT, /**< Front camera LED device (Since HAL_MODULE_DEVICE_LED 1.0) */ - HAL_DEVICE_LED_CAMERA_BACK, /**< Rear camera LED device (Since HAL_MODULE_DEVICE_LED 1.0) */ - HAL_DEVICE_LED_NOTIFICATION, /**< Notification LED device (Since HAL_MODULE_DEVICE_LED 1.0) */ - HAL_DEVICE_LED_TOUCH_KEY, /**< Touch key LED device (Since HAL_MODULE_DEVICE_LED 1.0) */ + HAL_DEVICE_LED_CAMERA_FRONT, /**< Front camera LED device */ + HAL_DEVICE_LED_CAMERA_BACK, /**< Rear camera LED device */ + HAL_DEVICE_LED_NOTIFICATION, /**< Notification LED device */ + HAL_DEVICE_LED_TOUCH_KEY, /**< Touch key LED device */ } hal_device_led_device_type_e; /** - * @brief Structure for led state information. + * @brief Structure for device-led state information. * @since HAL_MODULE_DEVICE_LED 1.0 */ typedef struct { - hal_device_led_type_e type; /**< Led type (Since HAL_MODULE_DEVICE_LED 1.0) */ + hal_device_led_type_e type; /**< Led type */ /** * The first byte means opaque and the other 3 bytes are RGB values. * You can use opaque byte as a led brightness value. * If the first byte is 0x00, led will be turned off. * Anything else will be worked as on. The max value is 0xFF. - * (Since HAL_MODULE_DEVICE_LED 1.0) */ - unsigned int color; - int duty_on; /**< Turn on time in milliseconds (Since HAL_MODULE_DEVICE_LED 1.0) */ - int duty_off; /**< Turn off time in milliseconds (Since HAL_MODULE_DEVICE_LED 1.0) */ + unsigned int color; /**< Led color */ + int duty_on; /**< Turn on time in milliseconds */ + int duty_off; /**< Turn off time in milliseconds */ } hal_device_led_state_s; /** @@ -70,8 +69,8 @@ typedef struct { * @since HAL_MODULE_DEVICE_LED 1.0 */ typedef struct { - int keycode; - int brightness; + int keycode; /**< Key code */ + int brightness; /**< Brightness level */ } hal_device_led_keyled_state_s; /** diff --git a/include/hal-device-memory-interface-1.h b/include/hal-device-memory-interface-1.h index bfa0a22..3ef44a9 100644 --- a/include/hal-device-memory-interface-1.h +++ b/include/hal-device-memory-interface-1.h @@ -29,9 +29,13 @@ extern "C" { * @{ */ +/** + * @brief Structure for Memory functions. + * @since HAL_MODULE_DEVICE_MEMORY 1.0 + */ typedef struct __hal_backend_device_memory_funcs { - int (*get_gpu_info)(const int pid, hal_device_memory_gpu_info_s *info); - int (*get_gem_info)(const int pid, hal_device_memory_gem_info_s *info); + int (*get_gpu_info)(const int pid, hal_device_memory_gpu_info_s *info); /**< Get GPU information */ + int (*get_gem_info)(const int pid, hal_device_memory_gem_info_s *info); /**< Get GEM information */ } hal_backend_device_memory_funcs; /** diff --git a/include/hal-device-memory-types.h b/include/hal-device-memory-types.h index daf2dd8..7834aac 100644 --- a/include/hal-device-memory-types.h +++ b/include/hal-device-memory-types.h @@ -28,20 +28,20 @@ extern "C" { */ /** - * @brief Structure for gpu information data. + * @brief Structure for Memory gpu information data. * @since HAL_MODULE_DEVICE_MEMORY 1.0 */ typedef struct { - int used_pages; + int used_pages; /**< Used pages in GPU */ } hal_device_memory_gpu_info_s; /** - * @brief Structure for GEM information. + * @brief Structure for Memory GEM information. * @since HAL_MODULE_DEVICE_MEMORY 1.0 */ typedef struct { - int rss; /**< Resident set size in graphic execution manager (KiB) (Since HAL_MODULE_DEVICE_MEMORY 1.0) */ - int pss; + int rss; /**< Resident set size in graphic execution manager (KiB) */ + int pss; /**< Proportional set size in graphic execution manager (KiB) */ } hal_device_memory_gem_info_s; /** diff --git a/include/hal-device-power-interface-1.h b/include/hal-device-power-interface-1.h index 4e0d647..54d9d04 100644 --- a/include/hal-device-power-interface-1.h +++ b/include/hal-device-power-interface-1.h @@ -28,8 +28,12 @@ extern "C" { * @{ */ +/** + * @brief Structure for Power functions. + * @since HAL_MODULE_DEVICE_POWER 1.0 + */ typedef struct _hal_backend_device_power_funcs { - int (*get_wakeup_reason)(hal_device_power_transition_reason_e *reason); + int (*get_wakeup_reason)(hal_device_power_transition_reason_e *reason); /**< Get wakeup reason */ } hal_backend_device_power_funcs; /** diff --git a/include/hal-device-power-types.h b/include/hal-device-power-types.h index 32f71c6..edcf37a 100644 --- a/include/hal-device-power-types.h +++ b/include/hal-device-power-types.h @@ -31,37 +31,37 @@ extern "C" { * @since HAL_MODULE_DEVICE_POWER 1.0 */ typedef enum { - HAL_DEVICE_POWER_TRANSITION_REASON_UNKNOWN, - HAL_DEVICE_POWER_TRANSITION_REASON_POWER_KEY, - HAL_DEVICE_POWER_TRANSITION_REASON_VOLUME_UP_KEY, - HAL_DEVICE_POWER_TRANSITION_REASON_VOLUME_DOWN_KEY, - HAL_DEVICE_POWER_TRANSITION_REASON_BATTERY_NORMAL_LEVEL, - HAL_DEVICE_POWER_TRANSITION_REASON_BATTERY_WARNING_LEVEL, - HAL_DEVICE_POWER_TRANSITION_REASON_BATTERY_CRITICAL_LEVEL, - HAL_DEVICE_POWER_TRANSITION_REASON_BATTERY_POWEROFF_LEVEL, - HAL_DEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF, - HAL_DEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF_TIMEOUT, - HAL_DEVICE_POWER_TRANSITION_REASON_TOUCH_KEY, - HAL_DEVICE_POWER_TRANSITION_REASON_TOUCH_SCREEN, - HAL_DEVICE_POWER_TRANSITION_REASON_USB, - HAL_DEVICE_POWER_TRANSITION_REASON_CHARGER, - HAL_DEVICE_POWER_TRANSITION_REASON_HDMI, - HAL_DEVICE_POWER_TRANSITION_REASON_DISPLAY_PORT, - HAL_DEVICE_POWER_TRANSITION_REASON_EMBEDDED_DISPLAY_PORT, - HAL_DEVICE_POWER_TRANSITION_REASON_WIFI, - HAL_DEVICE_POWER_TRANSITION_REASON_BLUETOOTH, - HAL_DEVICE_POWER_TRANSITION_REASON_NFC, - HAL_DEVICE_POWER_TRANSITION_REASON_TELEPHONY, - HAL_DEVICE_POWER_TRANSITION_REASON_ZIGBEE, - HAL_DEVICE_POWER_TRANSITION_REASON_ETHERNET, - HAL_DEVICE_POWER_TRANSITION_REASON_AUDIO, - HAL_DEVICE_POWER_TRANSITION_REASON_ALARM, - HAL_DEVICE_POWER_TRANSITION_REASON_SENSOR, - HAL_DEVICE_POWER_TRANSITION_REASON_RTC, - HAL_DEVICE_POWER_TRANSITION_REASON_HEADSET, - HAL_DEVICE_POWER_TRANSITION_REASON_EXTERNAL_MEMORY, + HAL_DEVICE_POWER_TRANSITION_REASON_UNKNOWN, /**< Unknown reason */ + HAL_DEVICE_POWER_TRANSITION_REASON_POWER_KEY, /**< Power key */ + HAL_DEVICE_POWER_TRANSITION_REASON_VOLUME_UP_KEY, /**< Volume up key */ + HAL_DEVICE_POWER_TRANSITION_REASON_VOLUME_DOWN_KEY, /**< Volume down key */ + HAL_DEVICE_POWER_TRANSITION_REASON_BATTERY_NORMAL_LEVEL, /**< Battery normal level */ + HAL_DEVICE_POWER_TRANSITION_REASON_BATTERY_WARNING_LEVEL, /**< Battery warning level */ + HAL_DEVICE_POWER_TRANSITION_REASON_BATTERY_CRITICAL_LEVEL, /**< Battery critical level */ + HAL_DEVICE_POWER_TRANSITION_REASON_BATTERY_POWEROFF_LEVEL, /**< Battery poweroff level */ + HAL_DEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF, /**< Display off */ + HAL_DEVICE_POWER_TRANSITION_REASON_DISPLAY_OFF_TIMEOUT, /**< Display off timeout */ + HAL_DEVICE_POWER_TRANSITION_REASON_TOUCH_KEY, /**< Touch key */ + HAL_DEVICE_POWER_TRANSITION_REASON_TOUCH_SCREEN, /**< Touch screen */ + HAL_DEVICE_POWER_TRANSITION_REASON_USB, /**< USB */ + HAL_DEVICE_POWER_TRANSITION_REASON_CHARGER, /**< Charger */ + HAL_DEVICE_POWER_TRANSITION_REASON_HDMI, /**< HDMI */ + HAL_DEVICE_POWER_TRANSITION_REASON_DISPLAY_PORT, /**< Display port */ + HAL_DEVICE_POWER_TRANSITION_REASON_EMBEDDED_DISPLAY_PORT, /**< Embedded display port */ + HAL_DEVICE_POWER_TRANSITION_REASON_WIFI, /**< WiFi */ + HAL_DEVICE_POWER_TRANSITION_REASON_BLUETOOTH, /**< Bluetooth */ + HAL_DEVICE_POWER_TRANSITION_REASON_NFC, /**< NFC */ + HAL_DEVICE_POWER_TRANSITION_REASON_TELEPHONY, /**< Telephony */ + HAL_DEVICE_POWER_TRANSITION_REASON_ZIGBEE, /**< Zigbee */ + HAL_DEVICE_POWER_TRANSITION_REASON_ETHERNET, /**< Ethernet */ + HAL_DEVICE_POWER_TRANSITION_REASON_AUDIO, /**< Audio */ + HAL_DEVICE_POWER_TRANSITION_REASON_ALARM, /**< Alarm */ + HAL_DEVICE_POWER_TRANSITION_REASON_SENSOR, /**< Sensor */ + HAL_DEVICE_POWER_TRANSITION_REASON_RTC, /**< RTC */ + HAL_DEVICE_POWER_TRANSITION_REASON_HEADSET, /**< Headset */ + HAL_DEVICE_POWER_TRANSITION_REASON_EXTERNAL_MEMORY, /**< External memory */ - HAL_DEVICE_POWER_TRANSITION_REASON_CUSTOM = 1000, /**< Define custom reason from here (Since HAL_MODULE_DEVICE_POWER 1.0) */ + HAL_DEVICE_POWER_TRANSITION_REASON_CUSTOM = 1000, /**< Define custom reason from here */ } hal_device_power_transition_reason_e; /** diff --git a/include/hal-device-thermal-interface-1.h b/include/hal-device-thermal-interface-1.h index c68efe6..bb11012 100644 --- a/include/hal-device-thermal-interface-1.h +++ b/include/hal-device-thermal-interface-1.h @@ -15,8 +15,8 @@ */ -#ifndef __HAL_DEVICE_TEMPERATURE_INTERFACE_1_H__ -#define __HAL_DEVICE_TEMPERATURE_INTERFACE_1_H__ +#ifndef __HAL_DEVICE_THERMAL_INTERFACE_1_H__ +#define __HAL_DEVICE_THERMAL_INTERFACE_1_H__ #include "hal-device-thermal-types.h" @@ -29,13 +29,14 @@ extern "C" { * @{ */ +/** + * @brief Structure for Thermal functions. + * @since HAL_MODULE_DEVICE_THERMAL 1.0 + */ typedef struct _hal_backend_device_thermal_funcs { - /* Get thermal state */ - int (*get_info)(hal_device_thermal_e type, hal_device_thermal_info_s *info); - - /* Register thermal event */ - int (*register_changed_event)(hal_device_thermal_updated_cb updated_cb, void *user_data); - int (*unregister_changed_event)(hal_device_thermal_updated_cb updated_cb); + int (*get_info)(hal_device_thermal_e type, hal_device_thermal_info_s *info); /**< Get thermal information */ + int (*register_changed_event)(hal_device_thermal_updated_cb updated_cb, void *user_data); /**< Register thermal event */ + int (*unregister_changed_event)(hal_device_thermal_updated_cb updated_cb); /**< Unregister thermal event */ } hal_backend_device_thermal_funcs; /** @@ -45,4 +46,4 @@ typedef struct _hal_backend_device_thermal_funcs { #ifdef __cplusplus } #endif -#endif /* __HAL_DEVICE_TEMPERATURE_INTERFACE_1_H__ */ +#endif /* __HAL_DEVICE_THERMAL_INTERFACE_1_H__ */ diff --git a/include/hal-device-thermal-interface.h b/include/hal-device-thermal-interface.h index 5e88091..e34a421 100644 --- a/include/hal-device-thermal-interface.h +++ b/include/hal-device-thermal-interface.h @@ -15,9 +15,9 @@ */ -#ifndef __HAL_DEVICE_TEMPERATURE_INTERFACE_H__ -#define __HAL_DEVICE_TEMPERATURE_INTERFACE_H__ +#ifndef __HAL_DEVICE_THERMAL_INTERFACE_H__ +#define __HAL_DEVICE_THERMAL_INTERFACE_H__ #include "hal-device-thermal-interface-1.h" -#endif /* __HAL_DEVICE_TEMPERATURE_INTERFACE_H__ */ +#endif /* __HAL_DEVICE_THERMAL_INTERFACE_H__ */ diff --git a/include/hal-device-thermal-types.h b/include/hal-device-thermal-types.h index dd6ba1c..af4f8bb 100644 --- a/include/hal-device-thermal-types.h +++ b/include/hal-device-thermal-types.h @@ -15,8 +15,8 @@ */ -#ifndef __HAL_DEVICE_TEMPERATURE_TYPES_H__ -#define __HAL_DEVICE_TEMPERATURE_TYPES_H__ +#ifndef __HAL_DEVICE_THERMAL_TYPES_H__ +#define __HAL_DEVICE_THERMAL_TYPES_H__ #ifdef __cplusplus extern "C" { @@ -32,18 +32,18 @@ extern "C" { * @since HAL_MODULE_DEVICE_THERMAL 1.0 */ typedef enum { - HAL_DEVICE_THERMAL_AP, /**< AP temperature (Since HAL_MODULE_DEVICE_THERMAL 1.0) */ - HAL_DEVICE_THERMAL_CP, /**< CP temperature (Since HAL_MODULE_DEVICE_THERMAL 1.0) */ - HAL_DEVICE_THERMAL_BATTERY, /**< Battery temperature (Since HAL_MODULE_DEVICE_THERMAL 1.0) */ + HAL_DEVICE_THERMAL_AP, /**< AP temperature */ + HAL_DEVICE_THERMAL_CP, /**< CP temperature */ + HAL_DEVICE_THERMAL_BATTERY, /**< Battery temperature */ } hal_device_thermal_e; /** - * @brief Structure for thermal information. + * @brief Structure for Thermal information. * @since HAL_MODULE_DEVICE_THERMAL 1.0 */ typedef struct { - int temp; - int adc; + int temp; /**< Temperature value in Celsius degree */ + int adc; /**< ADC value */ } hal_device_thermal_info_s; /** @@ -61,4 +61,4 @@ typedef void (*hal_device_thermal_updated_cb)(hal_device_thermal_info_s *info, v #ifdef __cplusplus } #endif -#endif /* __HAL_DEVICE_TEMPERATURE_TYPES_H__ */ +#endif /* __HAL_DEVICE_THERMAL_TYPES_H__ */ diff --git a/include/hal-device-thermal.h b/include/hal-device-thermal.h index 94c0527..a2ae2e7 100644 --- a/include/hal-device-thermal.h +++ b/include/hal-device-thermal.h @@ -15,8 +15,8 @@ */ -#ifndef __HAL_DEVICE_TEMPERATURE_H__ -#define __HAL_DEVICE_TEMPERATURE_H__ +#ifndef __HAL_DEVICE_THERMAL_H__ +#define __HAL_DEVICE_THERMAL_H__ #include #include "hal-device-thermal-interface.h" @@ -36,4 +36,4 @@ int hal_device_thermal_unregister_changed_event(hal_device_thermal_updated_cb up #endif -#endif /* __HAL_DEVICE_TEMPERATURE_H__ */ +#endif /* __HAL_DEVICE_THERMAL_H__ */ diff --git a/include/hal-device-touchscreen-interface-1.h b/include/hal-device-touchscreen-interface-1.h index 82cec81..51b86aa 100644 --- a/include/hal-device-touchscreen-interface-1.h +++ b/include/hal-device-touchscreen-interface-1.h @@ -29,16 +29,17 @@ extern "C" { * @{ */ +/** + * @brief Structure for Touchscreen functions. + * @since HAL_MODULE_DEVICE_TOUCHSCREEN 1.0 + */ typedef struct _hal_backend_device_touchscreen_funcs { - /* Control touchscreen state */ - int (*get_state)(hal_device_touchscreen_state_e *state); - int (*set_state)(hal_device_touchscreen_state_e state); - int (*get_powersaving)(int *state); - int (*set_powersaving)(int state); - - /* Control touch sensitivity state */ - int (*glove_mode_get_state)(int *state); - int (*glove_mode_set_state)(int state); + int (*get_state)(hal_device_touchscreen_state_e *state); /**< Get touchscreen state */ + int (*set_state)(hal_device_touchscreen_state_e state); /**< Set touchscreen state */ + int (*get_powersaving)(int *state); /**< Get power saving state */ + int (*set_powersaving)(int state); /**< Set power saving state */ + int (*glove_mode_get_state)(int *state); /**< Get touch sensitivity state */ + int (*glove_mode_set_state)(int state); /**< Set touch sensitivity state */ } hal_backend_device_touchscreen_funcs; /** diff --git a/include/hal-device-touchscreen-types.h b/include/hal-device-touchscreen-types.h index 4b11109..daa2d31 100644 --- a/include/hal-device-touchscreen-types.h +++ b/include/hal-device-touchscreen-types.h @@ -22,31 +22,27 @@ extern "C" { #endif -/* FIXME: These macros should be changed to enum type */ -#define TOUCHSENSITIVITY_GLOVE_MODE_OFF 0 /* Disable glove mode */ -#define TOUCHSENSITIVITY_GLOVE_MODE_ON 1 /* Enable glove mode */ - /** * @addtogroup HALAPI_HAL_DEVICE_TOUCHSCREEN_MODULE * @{ */ /** - * @brief Enumeration for touchscreen state. + * @brief Enumeration for Touchscreen state. * @since HAL_MODULE_DEVICE_TOUCHSCREEN 1.0 */ typedef enum { - HAL_DEVICE_TOUCHSCREEN_OFF, /* Disable touchscreen (Since HAL_MODULE_DEVICE_TOUCHSCREEN 1.0) */ - HAL_DEVICE_TOUCHSCREEN_ON, /* Enable touchscreen (Since HAL_MODULE_DEVICE_TOUCHSCREEN 1.0) */ + HAL_DEVICE_TOUCHSCREEN_OFF, /**< Disable touchscreen */ + HAL_DEVICE_TOUCHSCREEN_ON, /**< Enable touchscreen */ } hal_device_touchscreen_state_e; /** - * @brief Enumeration for touchscreen sensitivity state. + * @brief Enumeration for Touchscreen sensitivity state. * @since HAL_MODULE_DEVICE_TOUCHSCREEN 1.0 */ typedef enum { - HAL_DEVICE_TOUCHSCREEN_GLOVE_MODE_OFF, /* Disable glove mode (Since HAL_MODULE_DEVICE_TOUCHSCREEN 1.0) */ - HAL_DEVICE_TOUCHSCREEN_GLOVE_MODE_ON, /* Enable glove mode (Since HAL_MODULE_DEVICE_TOUCHSCREEN 1.0) */ + HAL_DEVICE_TOUCHSCREEN_GLOVE_MODE_OFF, /**< Disable glove mode */ + HAL_DEVICE_TOUCHSCREEN_GLOVE_MODE_ON, /**< Enable glove mode */ } hal_device_touchscreen_sensitivity_state_e; /**