Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add descriptor handling hook #9

Merged
merged 1 commit into from
Aug 28, 2013
Merged

Add descriptor handling hook #9

merged 1 commit into from
Aug 28, 2013

Conversation

dewyatt
Copy link
Contributor

@dewyatt dewyatt commented Aug 17, 2013

Simple hook to allow user handling of descriptor requests (to support HID, etc). This allows, for example, fw/fw.c to do something like:

void handle_get_descriptor() {
  switch ( SETUPDAT[3] ) {
    case DSCR_HID: //HID Descriptor
      SUDPTRH = MSB((WORD)&hid_dscr);
      SUDPTRL = LSB((WORD)&hid_dscr);
      return TRUE;
    case DSCR_HID_REPORT: //Report Descriptor
      //...
      return TRUE;
  }
  //did not handle the request
  return FALSE;
}

djmuhlestein added a commit that referenced this pull request Aug 28, 2013
Add descriptor handling hook
@djmuhlestein djmuhlestein merged commit 17bc61e into djmuhlestein:master Aug 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants