xrt: Add XRT_GET_INPUT_ID

This commit is contained in:
Jakob Bornecrantz 2022-04-09 16:31:29 +01:00
parent b26a602322
commit cbeebe6ca4

View file

@ -610,6 +610,17 @@ enum xrt_input_type
*/
#define XRT_GET_INPUT_TYPE(name) ((enum xrt_input_type)(name & 0xff))
/*!
* @brief Extract the xrt_input_name id from an xrt_input_name.
*
* @param name A xrt_input_name value
*
* @relates xrt_input_name
* @returns @ref xrt_input_type
* @ingroup xrt_iface
*/
#define XRT_GET_INPUT_ID(name) ((uint32_t)(name >> 8))
/*!
* Every internal input source known to monado with a baked in type.
*