Updated: April 19, 2023 |
Locate a specific instance of the named tag for a device
#include <drvr/hwinfo.h> hwi_tag *hwi_tag_find( unsigned hwi_off, const char *tag_name, unsigned *tag_idx );
The hwi_tag_find() function locates a specific instance of the named tag tag_name for the device specified by hwi_off.
The tag_idx is pointer to the specific tag instance of interest. Some devices may contain multiple tags of the same type. This parameter lets you obtain a specific instance or repeatedly call this function to obtain all instances. For example, to obtain the second instance of tag_name, set *tag_idx to 1. Repeatedly calling this function with the tag_idx parameter sequentially retrieves each one starting with the second.
If you want only the first tag instance, set tag_idx to NULL, which is equivalent to setting *tag_idx to 0 and calling the function only once.
A pointer to the tag, or NULL on error.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |