diff --git a/input/v1_0/IInputCallback.idl b/input/v1_0/IInputCallback.idl
index 2f60a1de1d3617d3b56b63e109fe8c0fb3e29bfc..90ca7d3b709c06ad73d34f6ef8661e7968d08781 100644
--- a/input/v1_0/IInputCallback.idl
+++ b/input/v1_0/IInputCallback.idl
@@ -17,36 +17,65 @@
* @addtogroup HdiInput
* @{
*
- * @brief Provides driver interfaces for the input service.
+ * @brief Provides APIs for the upper-layer input service.
*
- * These driver interfaces can be used to open and close input device files, get input events, query device information,
- * register callback functions, and control the feature status.
+ * Using the APIs provided by the Input module, input service developers can implement the following
+ * functions: enabling or disabling input devices, obtaining input events, querying device information,
+ * registering callback functions, and managing the feature status.
*
+ * @since 3.2
* @version 1.0
*/
+/**
+ * @file IInputCallback.idl
+ *
+ * @brief Provides data reporting and hot swap event reporting callbacks for the input service.
+ *
+ * @since 3.2
+ * @version 1.0
+ */
+
+/**
+ * @brief Defines the package path of the Input module APIs.
+ *
+ * @since 3.2
+ * @version 1.0
+ */
package ohos.hdi.input.v1_0;
import ohos.hdi.input.v1_0.InputTypes;
+/**
+ * @brief Defines the callbacks of the Input module.
+ *
+ * When an input device performs operations such as data reporting, insertion, or removal, the input service
+ * can call the respective callback for data processing.
+ *
+ * @since 3.2
+ * @version 1.0
+ */
[callback] interface IInputCallback {
/**
- * @brief Reports input event data by the registered callback.
+ * @brief Called to report input event data.
+ *
+ * @param pkgs Input event data reported by the driver. For details, see {@link EventPackage}.
+ * @param devIndex Index of the input device. The value ranges from 0 to 31.
+ * A maximum of 32 input devices are supported.
*
- * @param pkgs describes the input event data package.
- * @param count Indicates the number of input event data packets.
- * @param devIndex Indicates the index of an input device.
* @since 3.2
* @version 1.0
*/
EventPkgCallback([in] struct EventPackage[] pkgs, [in] unsigned int devIndex);
/**
- * @brief Reports hot plug event data by the registered callback.
+ * @brief Called to report hot plug events.
+ *
+ * @param event Hot swap event data. For details, see {@link HotPlugEvent}.
*
- * @param event Indicates the pointer to the hot plug event data reported by the input driver.
* @since 3.2
* @version 1.0
*/
HotPlugCallback([in] struct HotPlugEvent event);
-}
\ No newline at end of file
+}
+/** @} */
diff --git a/input/v1_0/IInputInterfaces.idl b/input/v1_0/IInputInterfaces.idl
index ba0e7b940fa00021f3272d808e3296cc4b9a97bd..daa2b2d20720c245e84a643760baea13ce762b6e 100644
--- a/input/v1_0/IInputInterfaces.idl
+++ b/input/v1_0/IInputInterfaces.idl
@@ -17,186 +17,237 @@
* @addtogroup HdiInput
* @{
*
- * @brief Provides driver interfaces for the input service.
+ * @brief Provides APIs for the upper-layer input service.
*
- * These driver interfaces can be used to open and close input device files, get input events, query device information,
- * register callback functions, and control the feature status.
+ * Using the APIs provided by the Input module, input service developers can implement the following functions:
+ * enabling or disabling input devices, obtaining input events, querying device information, registering callback
+ * functions, and managing the feature status.
*
+ * @since 3.2
* @version 1.0
*/
+/**
+ * @file IInputInterfaces.idl
+ *
+ * @brief Provides APIs for the input service to perform the following: enabling and disabling input devices,
+ * obtaining input events, querying device information, registering callback functions, and managing the feature status.
+ *
+ * @since 3.2
+ * @version 1.0
+ */
+
+/**
+ * @brief Defines the package path of the Input module APIs.
+ *
+ * @since 3.2
+ * @version 1.0
+ */
package ohos.hdi.input.v1_0;
import ohos.hdi.input.v1_0.IInputCallback;
import ohos.hdi.input.v1_0.InputTypes;
+/**
+ * @brief Provides APIs for the upper-layer input service.
+ *
+ * Using the APIs provided by the Input module, input service developers can implement the following functions:
+ * enabling or disabling input devices, obtaining input events, querying device information, registering callback
+ * functions, and managing the feature status.
+ *
+ * @since 3.2
+ * @version 1.0
+ */
interface IInputInterfaces {
/**
* @brief Scans all online input devices.
*
- * @param staArr Indicates the pointer to the array storing information about the scanned input devices,
- * including the device index and device type.
- * @return Returns 0 if the operation is successful; returns an error code defined in
- * {@link RetStatus} otherwise.
+ * @param staArr Array for storing input device scanning information, including the device index and
+ * device type. For details, see {@link DevDesc}.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
+ *
+ *
* @since 3.2
* @version 1.0
*/
ScanInputDevice([out] struct DevDesc[] staArr);
/**
- * @brief Opens a specified input device file.
+ * @brief Opens a specified input device file.
+ *
+ * @param devIndex Index of the input device. The value ranges from 0 to 31.
+ * A maximum of 32 input devices are supported.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
*
- * @param devIndex Indicates the index of an input device. A maximum of 32 input devices are supported.
- * The value ranges from 0 to 31, and value 0 represents the first input device.
- * @return Returns 0 if the operation is successful; returns an error code defined in
- * {@link RetStatus} otherwise.
* @since 3.2
* @version 1.0
*/
OpenInputDevice([in] unsigned int devIndex);
/**
- * @brief Closes a specified input device file.
+ * @brief Closes a specified input device file.
+ *
+ * @param devIndex Index of the input device. The value ranges from 0 to 31.
+ * A maximum of 32 input devices are supported.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
*
- * @param devIndex Indicates the index of an input device. A maximum of 32 input devices are supported.
- * The value ranges from 0 to 31, and value 0 represents the first input device.
- * @return Returns 0 if the operation is successful; returns an error code defined in
- * {@link RetStatus} otherwise.
* @since 3.2
* @version 1.0
*/
CloseInputDevice([in] unsigned int devIndex);
/**
- * @brief Gets information about a specified input device.
- *
- * @param devIndex Indicates the index of an input device. A maximum of 32 input devices are supported.
- * The value ranges from 0 to 31, and value 0 represents the first input device.
- * @param devInfo Indicates the double pointer to information about the specified device.
- * For details, see {@link DeviceInfo}.
- * @return Returns 0 if the operation is successful; returns an error code defined in
- * {@link RetStatus} otherwise.
+ * @brief Obtains information about the input device indicated by devIndex.
+ *
+ * @param devIndex Index of the input device. The value ranges from 0 to 31.
+ * A maximum of 32 input devices are supported.
+ * @param devInfo Input device information. For details, see {@link DeviceInfo}.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
+ *
* @since 3.2
* @version 1.0
*/
GetInputDevice([in] unsigned int devIndex, [out] struct DeviceInfo devInfo);
/**
- * @brief Gets information about all input devices in the device list.
- *
- * @param devNum Indicates the pointer to the total number of input devices which have been registered.
- * @param devList Indicates the double pointer to information about all devices in the device list.
- * For details, see {@link DeviceInfo}.
- * @param size Indicates the number of elements in the devList array.
- * @return Returns 0 if the operation is successful; returns an error code defined in
- * {@link RetStatus} otherwise.
+ * @brief Obtains information about all input devices in the device list.
+ *
+ * @param devNum Total number of registered input devices.
+ * @param devList Information about all devices in the device list. For details, see {@link DeviceInfo}.
+ * @param size Number of elements in the devList array.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
+ *
* @since 3.2
* @version 1.0
*/
GetInputDeviceList([out] unsigned int devNum, [out] struct DeviceInfo[] devList, [in]unsigned int size);
/**
- * @brief Sets the power status.
- *
- * This function is called only when the power status of the OS is changed. \n
- * The input service or the power management module can call this function to set the power status
- * for the input device when the OS is in the Resume or Suspend status, so that the driver integrated circuit (IC)
- * of the device can normally enter the specified status.
- *
- * @param devIndex Indicates the index of an input device. A maximum of 32 input devices are supported.
- * The value ranges from 0 to 31, and value 0 represents the first input device.
- * @param status Indicates the power status to set. The input service will notify the input device of entering the
- * Resume or Suspend state specified by {@link PowerStatus}.
- * @return Returns 0 if the operation is successful; returns an error code defined in
- * {@link RetStatus} otherwise.
+ * @brief Sets the power status of the input device indicated by devIndex.
+ *
+ * When the OS enters the sleep mode or wakes up from the sleep mode, the input service or the power management
+ * module can set the power status of the input device, so that the driver IC of the device enters the
+ * corresponding state.
+ *
+ * @param devIndex Index of the input device. The value ranges from 0 to 31.
+ * A maximum of 32 input devices are supported.
+ * @param status Power status. For example, 0 indicates the wakeup state, 1 indicates the suspend
+ * state, 2 indicates the low power state, and 3 indicates an unknown power state.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
+ *
* @since 3.2
* @version 1.0
*/
SetPowerStatus([in] unsigned int devIndex, [in] unsigned int status);
/**
- * @brief Gets the power status.
+ * @brief Obtains the power status of the input device indicated by devIndex.
+ *
+ * When the OS enters the sleep mode or wakes up from the sleep mode, the input service or the power management
+ * module can obtain the power status of the input device.
*
- * The input service or the power management module can get the power status for the input device when the OS
- * is in the Resume or Suspend status, so that the driver IC of the device can normally enter the specified status.
- * You can call this function to obtain the power status.
+ * @param devIndex Index of the input device. The value ranges from 0 to 31.
+ * A maximum of 32 input devices are supported.
+ * @param status Power status. For example, 0 indicates the wakeup state, 1 indicates the suspend
+ * state, 2 indicates the low power state, and 3 indicates an unknown power state.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
*
- * @param devIndex Indicates the index of an input device. A maximum of 32 input devices are supported.
- * The value ranges from 0 to 31, and value 0 represents the first input device.
- * @param status Indicates the pointer to the power status of the device. For details, see {@link PowerStatus}.
- * @return Returns 0 if the operation is successful; returns an error code defined in
- * {@link RetStatus} otherwise.
* @since 3.2
* @version 1.0
*/
GetPowerStatus([in] unsigned int devIndex, [out] unsigned int status);
/**
- * @brief Gets the type of the input device based on the specified device index.
+ * @brief Obtains the type of the input device indicated by devIndex.
+ *
+ * @param devIndex Index of the input device. The value ranges from 0 to 31.
+ * A maximum of 32 input devices are supported.
+ * @param deviceType Device type. For example, 0 indicates a touchscreen, 1 indicates a physical key,
+ * 2 indicates a keyboard, and 3 indicates a mouse.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
*
- * @param devIndex Indicates the index of an input device. A maximum of 32 input devices are supported.
- * The value ranges from 0 to 31, and value 0 represents the first input device.
- * @param deviceType Indicates the pointer to the device type. For details, see {@link InputDevType}.
- * @return Returns 0 if the operation is successful; returns an error code defined
- * in {@link RetStatus} otherwise.
* @since 3.2
* @version 1.0
*/
GetDeviceType([in] unsigned int devIndex, [out] unsigned int deviceType);
/**
- * @brief Gets the chip information of the specified device.
+ * @brief Obtains chip information of the input device indicated by devIndex.
*
- * A product is usually equipped with modules and driver ICs provided by multiple vendors. An input service
- * can call this function to get the specific information if needed.
+ * A product is usually equipped with modules and driver ICs provided by multiple vendors. The input service can
+ * call this function to obtain the chip information if needed.
*
- * @param devIndex Indicates the index of an input device. A maximum of 32 input devices are supported.
- * The value ranges from 0 to 31, and value 0 represents the first input device.
- * @param chipInfo Indicates the pointer to the chip information.
- * @return Returns 0 if the operation is successful; returns an error code defined
- * in {@link RetStatus} otherwise.
- * @since 3.2
+ * @param devIndex Index of the input device. The value ranges from 0 to 31.
+ * A maximum of 32 input devices are supported.
+ * @param chipInfo Chip information.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
+ *
+ * @since 3.2
* @version 1.0
*/
GetChipInfo([in] unsigned int devIndex, [out] String chipInfo);
/**
- * @brief Gets the module vendor name of the specified device.
+ * @brief Obtains the module vendor name of the input device indicated by devIndex.
+ *
+ * @param devIndex Index of the input device. The value ranges from 0 to 31.
+ * A maximum of 32 input devices are supported.
+ * @param vendorName Module vendor name.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
*
- * @param devIndex Indicates the index of an input device. A maximum of 32 input devices are supported.
- * The value ranges from 0 to 31, and value 0 represents the first input device.
- * @param vendorName Indicates the pointer to the module vendor name.
- * @return Returns 0 if the operation is successful; returns an error code defined
- * in {@link RetStatus} otherwise.
* @since 3.2
* @version 1.0
*/
GetVendorName([in] unsigned int devIndex, [out] String vendorName);
/**
- * @brief Gets the driver chip name of the specified device.
+ * @brief Obtains the driver chip name of the input device indicated by devIndex.
+ *
+ * @param devIndex Index of the input device. The value ranges from 0 to 31.
+ * A maximum of 32 input devices are supported.
+ * @param chipName Driver chip name.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
*
- * @param devIndex Indicates the index of an input device. A maximum of 32 input devices are supported.
- * The value ranges from 0 to 31, and value 0 represents the first input device.
- * @param chipName Indicates the pointer to the driver chip name.
- * @return Returns 0 if the operation is successful; returns an error code defined
- * in {@link RetStatus} otherwise.
* @since 3.2
* @version 1.0
*/
GetChipName([in] unsigned int devIndex, [out] String chipName);
/**
- * @brief Sets the gesture mode.
+ * @brief Sets the gesture mode of the input device indicated by devIndex.
*
- * The input service can use this function to enable or disable the gesture mode by setting EnableBit
- * of the gesture mode.
+ * The input service can use this function to enable or disable the gesture mode
+ * by setting EnableBit of the gesture mode.
+ *
+ * @param devIndex Index of the input device. The value ranges from 0 to 31.
+ * A maximum of 32 input devices are supported.
+ * @param gestureMode Gesture mode.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
*
- * @param devIndex Indicates the index of an input device. A maximum of 32 input devices are supported.
- * The value ranges from 0 to 31, and value 0 represents the first input device.
- * @param gestureMode Indicates the gesture mode to set.
- * @return Returns 0 if the operation is successful; returns an error code defined
- * in {@link RetStatus} otherwise.
* @since 3.2
* @version 1.0
*/
@@ -205,17 +256,21 @@ interface IInputInterfaces {
/**
* @brief Conducts a capacitance self-test.
*
- * The capacitance self-test items are defined by the component vendor, such as the tests on the raw data,
- * short circuit, open circuit, interference, and row/column difference.
- *
- * @param devIndex Indicates the index of an input device. A maximum of 32 input devices are supported.
- * The value ranges from 0 to 31, and value 0 represents the first input device.
- * @param testType Indicates the capacitance test type. For details, see {@link CapacitanceTest}.
- * @param result Indicates the pointer to the capacitance test result. The value is SUCC for a successful
- * operation and is an error code for a failed operation.
- * @param length Indicates the length of the test result. The minimum value of length is 20.
- * @return Returns 0 if the operation is successful; returns an error code defined
- * in {@link RetStatus} otherwise.
+ * The capacitance self-test items are defined by the component vendor,
+ * such as the tests on the RawData, short circuit, open circuit, interference, and row/column difference.
+ *
+ * @param devIndex Index of the input device. The value ranges from 0 to 31.
+ * A maximum of 32 input devices are supported.
+ * @param testType Capacitance test type. For example, 0 indicates the basic capacitance test,
+ * 1 indicates the full capacitance self-check test, 2 indicates the MMI capacitance test,
+ * and 3 indicates the aging capacitance test.
+ * @param result Capacitance test result. The value is SUCC for a successful operation and is an error code
+ * for a failed operation.
+ * @param length Length of the capacitance test result.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
+ *
* @since 3.2
* @version 1.0
*/
@@ -224,65 +279,75 @@ interface IInputInterfaces {
/**
* @brief Executes the extra command.
*
- * @param devIndex Indicates the index of an input device. A maximum of 32 input devices are supported.
- * The value ranges from 0 to 31, and value 0 represents the first input device.
- * @param cmd Indicates the pointer to the extra command data packet, including the command codes and parameters.
- * For details, see {@link InputExtraCmd}.
- * @return Returns 0 if the operation is successful; returns an error code defined
- * in {@link RetStatus} otherwise.
+ * @param devIndex Index of the input device. The value ranges from 0 to 31.
+ * A maximum of 32 input devices are supported.
+ * @param cmd Extra command data packet, including the command codes and parameters.
+ * For details, see {@link ExtraCmd}.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
+ *
* @since 3.2
* @version 1.0
*/
RunExtraCommand([in] unsigned int devIndex, [in] struct ExtraCmd cmd);
/**
- * @brief Register a callback for reporting subscribed data of specified input devices.
+ * @brief Registers an input event callback to the HDI for the input device indicated by devIndex.
*
* After this callback is successfully registered, the driver can report the input event data to the input service
* through this callback.
*
- * @param devIndex Indicates the index of an input device. A maximum of 32 input devices are supported.
- * The value ranges from 0 to 31, and value 0 represents the first input device.
- * @param callback Indicates the pointer to the callback to register.
- * @return Returns 0 if the operation is successful; returns an error code defined in
- * {@link RetStatus} otherwise.
+ * @param devIndex Index of the input device. The value ranges from 0 to 31.
+ * A maximum of 32 input devices are supported.
+ * @param eventPkgCallback Input event callback.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
+ *
* @since 3.2
* @version 1.0
*/
RegisterReportCallback([in] unsigned int devIndex, [in] IInputCallback eventPkgCallback);
/**
- * @brief Unregister the callback for reporting subscribed data of specified input devices.
+ * @brief Unregisters the input event callback of the input device indicated by devIndex.
+ *
+ * @param devIndex Index of the input device. The value ranges from 0 to 31.
+ * A maximum of 32 input devices are supported.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
*
- * @param devIndex Indicates the index of an input device. A maximum of 32 input devices are supported.
- * The value ranges from 0 to 31, and value 0 represents the first input device.
- * @return Returns 0 if the operation is successful; returns an error code defined in
- * {@link RetStatus} otherwise.
* @since 3.2
* @version 1.0
*/
UnregisterReportCallback([in] unsigned int devIndex);
/**
- * @brief Register a hot plug callback to the HDIs for input devices.
+ * @brief Registers a hot plug callback to the HDI for input devices.
*
* All input devices can use this callback to report hot plug events.
*
- * @param callback Indicates the pointer to the callback to register.
- * @return Returns 0 if the operation is successful; returns an error code defined in
- * {@link RetStatus} otherwise.
+ * @param hotPlugCallback Hot plug event callback.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
+ *
* @since 3.2
* @version 1.0
*/
RegisterHotPlugCallback([in] IInputCallback hotPlugCallback);
/**
- * @brief Unregister the hot plug callback of input devices.
+ * @brief Unregisters the hot plug callback of input devices.
+ *
+ * @return Returns 0 if the operation is successful.
+ * @return Returns a negative value if the operation fails.
*
- * @return Returns 0 if the operation is successful; returns an error code defined in
- * {@link RetStatus} otherwise.
* @since 3.2
* @version 1.0
*/
UnregisterHotPlugCallback();
-}
\ No newline at end of file
+}
+/** @} */
diff --git a/input/v1_0/InputTypes.idl b/input/v1_0/InputTypes.idl
index 6ec405b13391e641e75374f584048725a6b96fa9..3b3edb5651ebcc451afe25d2d1df1ce62029e62a 100644
--- a/input/v1_0/InputTypes.idl
+++ b/input/v1_0/InputTypes.idl
@@ -13,85 +13,139 @@
* limitations under the License.
*/
+/**
+ * @addtogroup HdiInput
+ * @{
+ *
+ * @brief Provides APIs for the upper-layer input service.
+ *
+ * Using the APIs provided by the Input module, input service developers can implement the following functions:
+ * enabling or disabling input devices, obtaining input events, querying device information, registering callback
+ * functions, and managing the feature status.
+ *
+ * @since 3.2
+ * @version 1.0
+ */
+
+/**
+ * @file InputTypes.idl
+ *
+ * @brief Defines input device-specific data types.
+ *
+ * This module defines the structures used by the driver APIs for the input service, including the device information,
+ * device attributes, and device capabilities.
+ *
+ * @since 3.2
+ * @version 1.0
+ */
+
+/**
+ * @brief Defines the package path of the Input module APIs.
+ *
+ * @since 3.2
+ * @version 1.0
+ */
package ohos.hdi.input.v1_0;
+/**
+ * @brief Describes the input device.
+ */
struct DevDesc {
- unsigned int devIndex;
- unsigned int devType;
+ unsigned int devIndex; /**< Device index */
+ unsigned int devType; /**< Device type */
};
+/**
+ * @brief Describes identification information of the input device.
+ */
struct DevIdentify {
- unsigned short busType;
- unsigned short vendor;
- unsigned short product;
- unsigned short version;
+ unsigned short busType; /**< Bus type */
+ unsigned short vendor; /**< Vendor ID */
+ unsigned short product; /**< Product ID */
+ unsigned short version; /**< Version */
};
+/**
+ * @brief Describes dimension information of the input device.
+ */
struct DimensionInfo {
- int axis;
- int min;
- int max;
- int fuzz;
- int flat;
- int range;
+ int axis; /**< Axis */
+ int min; /**< Minimum value of each coordinate */
+ int max; /**< Maximum value of each coordinate */
+ int fuzz; /**< Resolution of each coordinate */
+ int flat; /**< Reference value of each coordinate */
+ int range; /**< Range */
};
+/**
+ * @brief Describes input device attributes.
+ */
struct DevAttr {
- String devName;
- struct DevIdentify id;
- struct DimensionInfo[] axisInfo;
+ String devName; /**< Device name */
+ struct DevIdentify id; /**< Device identification information */
+ struct DimensionInfo[] axisInfo; /**< Device dimension information */
};
+/**
+ * @brief Describes the input device ability for storing bitmaps that record supported event types.
+ *
+ * A bit is used to indicate the type of events that can be reported by the input device.
+ *
+ */
struct DevAbility {
- unsigned long[] devProp;
- unsigned long[] eventType;
- unsigned long[] absCode;
- unsigned long[] relCode;
- unsigned long[] keyCode;
- unsigned long[] ledCode;
- unsigned long[] miscCode;
- unsigned long[] soundCode;
- unsigned long[] forceCode;
- unsigned long[] switchCode;
- unsigned long[] keyType;
- unsigned long[] ledType;
- unsigned long[] soundType;
- unsigned long[] switchType;
+ unsigned long[] devProp; /**< Device properties */
+ unsigned long[] eventType; /**< Bitmap for recording the supported event types */
+ unsigned long[] absCode; /**< Bitmap for recording the supported absolute coordinates */
+ unsigned long[] relCode; /**< Bitmap for recording the supported relative coordinates */
+ unsigned long[] keyCode; /**< Bitmap for recording the supported keycodes */
+ unsigned long[] ledCode; /**< Bitmap for recording the supported indicators */
+ unsigned long[] miscCode; /**< Bitmap for recording other supported functions */
+ unsigned long[] soundCode; /**< Bitmap for recording supported sounds or alerts */
+ unsigned long[] forceCode; /**< Bitmap for recording the supported force functions */
+ unsigned long[] switchCode; /**< Bitmap for recording the supported switch functions */
+ unsigned long[] keyType; /**< Bitmap of the key type */
+ unsigned long[] ledType; /**< Bitmap of the LED type */
+ unsigned long[] soundType; /**< Bitmap of the sound type */
+ unsigned long[] switchType; /**< Bitmap of the switch type */
};
/**
* @brief Describes basic device information of the input device.
*/
struct DeviceInfo {
- unsigned int devIndex; /**< Device index */
- unsigned int devType; /**< Device type */
- String chipInfo; /**< Driver chip information */
- String vendorName; /**< Module vendor name */
- String chipName; /**< Driver chip name */
- struct DevAttr attrSet;
- struct DevAbility abilitySet;
+ unsigned int devIndex; /**< Device index */
+ unsigned int devType; /**< Device type */
+ String chipInfo; /**< Driver chip information */
+ String vendorName; /**< Module vendor name */
+ String chipName; /**< Driver chip name */
+ struct DevAttr attrSet; /**< Device attributes */
+ struct DevAbility abilitySet; /**< Device abilities */
};
/**
- * @brief Describes the extra commands.
+ * @brief Defines the data structure of the extra command.
*/
struct ExtraCmd {
String cmdCode; /**< Command code */
String cmdValue; /**< Data transmitted in the command */
};
+/**
+ * @brief Defines the data packet structure for hot plug events.
+ */
struct HotPlugEvent {
- unsigned int devIndex;
- unsigned int devType;
- unsigned int status;
+ unsigned int devIndex; /**< Device index */
+ unsigned int devType; /**< Device type */
+ unsigned int status; /**< Device status 1: offline 0: online */
};
/**
- * @brief Describes the input event data package.
+ * @brief Defines the data packet structure for input events.
*/
struct EventPackage {
unsigned int type; /**< Type of the input event */
unsigned int code; /**< Specific code item of the input event */
- int value; /**< Value of the input event code item */
- unsigned long timestamp; /**< Timestamp of the input event */
+ int value; /**< Value corresponding to the input event code */
+ unsigned long timestamp; /**< Timestamp corresponding to the input event */
};
+/** @} */