Last active
          August 29, 2015 14:20 
        
      - 
      
 - 
        
Save wolf99/a01a5de369c101dc829f to your computer and use it in GitHub Desktop.  
    CAP_setPrescale() for TI F2802x cap.h support drivers files
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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