Skip to content

Instantly share code, notes, and snippets.

@wolf99
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wolf99/a01a5de369c101dc829f to your computer and use it in GitHub Desktop.
Save wolf99/a01a5de369c101dc829f to your computer and use it in GitHub Desktop.
CAP_setPrescale() for TI F2802x cap.h support drivers files
static void CAP_setPrescale(CAP_Handle capHandle, const CAP_Prescale_e prescale)
{
CAP_Obj *cap = (CAP_Obj *)capHandle;
/* clear the bits */
cap->ECCTL1 &= (~CAP_ECCTL1_PRESCALE_BITS);
/* Set the new value */
cap->ECCTL1 |= (uint16_t)prescale;
return;
} /* end of CAP_setPrescale() function */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment