Skip to content

smokris/usb-hid-usage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

USB HID Usage → Text converter

C function for converting USB HID Usage values to text

Example

#include "usb-hid-usage.h"

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    uint32_t usagePage = 0x02;
    uint32_t usage     = 0x04;
    char *usageText = getHidUsageText(usagePage, usage);
    printf("%04x:%04x  %s\n", usagePage, usage, usageText);
    free(usageText);
    return 0;
}

Output:

0002:0004  Spaceship Simulation Device

About

C function for converting USB HID Usage values to text

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages