74 #define TC_EnableEventDelay( _tc ) ( (_tc)->CTRLD |= TC0_EVDLY_bm ) 80 #define TC_DisableEventDelay( _tc ) ( (_tc)->CTRLD &= ~TC0_EVDLY_bm ) 90 #define TC_LockCompareUpdate( _tc ) ( (_tc)->CTRLFSET = TC0_LUPD_bm ) 102 #define TC_UnlockCompareUpdate( _tc ) ( (_tc)->CTRLFCLR = TC0_LUPD_bm ) 114 #define TC_ForceUpdate( _tc ) ( (_tc)->CTRLFSET = TC_CMD_UPDATE_gc ) 126 #define TC_Restart( _tc ) ( (_tc)->CTRLFSET = TC_CMD_RESTART_gc ) 137 #define TC_SetCount( _tc, _count ) ( (_tc)->CNT = (_count) ) 148 #define TC_SetPeriod( _tc, _period ) ( (_tc)->PER = (_period) ) 158 #define TC_SetPeriodBuffered( _tc, _period ) ( (_tc)->PERBUF = (_period) ) 169 #define TC_SetCompareA( _tc, _compareValue ) ( (_tc)->CCABUF = (_compareValue) ) 180 #define TC_SetCompareB( _tc, _compareValue ) ( (_tc)->CCBBUF = (_compareValue) ) 193 #define TC_SetCompareC( _tc, _compareValue ) ( (_tc)->CCCBUF = (_compareValue) ) 206 #define TC_SetCompareD( _tc, _compareValue ) ( (_tc)->CCDBUF = (_compareValue) ) 216 #define TC_GetOverflowFlag( _tc ) ( (_tc)->INTFLAGS & TC0_OVFIF_bm ) 224 #define TC_ClearOverflowFlag( _tc ) ( (_tc)->INTFLAGS = TC0_OVFIF_bm ) 234 #define TC_GetErrorFlag( _tc ) ( (_tc)->INTFLAGS & TC0_ERRIF_bm ) 242 #define TC_ClearErrorFlag( _tc ) ( (_tc)->INTFLAGS = TC0_ERRIF_bm ) 258 #define TC_GetCCAFlag( _tc ) ( (_tc)->INTFLAGS & TC0_CCAIF_bm ) 264 #define TC_ClearCCAFlag( _tc ) ( (_tc)->INTFLAGS = TC0_CCAIF_bm ) 280 #define TC_GetCCBFlag( _tc ) ( (_tc)->INTFLAGS & TC0_CCBIF_bm ) 286 #define TC_ClearCCBFlag( _tc ) ( (_tc)->INTFLAGS = TC0_CCBIF_bm ) 304 #define TC_GetCCCFlag( _tc ) ( (_tc)->INTFLAGS & TC0_CCCIF_bm ) 314 #define TC_ClearCCCFlag( _tc ) ( (_tc)->INTFLAGS = TC0_CCCIF_bm ) 332 #define TC_GetCCDFlag( _tc ) ( (_tc)->INTFLAGS & TC0_CCDIF_bm ) 342 #define TC_ClearCCDFlag( _tc ) ( (_tc)->INTFLAGS = TC0_CCDIF_bm ) 354 #define TC_GetCaptureA( _tc ) ( (_tc)->CCA ) 365 #define TC_GetCaptureB( _tc ) ( (_tc)->CCB ) 378 #define TC_GetCaptureC( _tc ) ( (_tc)->CCC ) 391 #define TC_GetCaptureD( _tc ) ( (_tc)->CCD ) void TC0_SetOverflowIntLevel(volatile TC0_t *tc, TC_OVFINTLVL_t intLevel)
Sets the overflow interrupt level.
void TC1_ConfigInputCapture(volatile TC1_t *tc, TC_EVSEL_t eventSource)
Configures the Timer/Counter 1 for input capture operation.
void TC1_EnableCCChannels(volatile TC1_t *tc, uint8_t enableMask)
Enables compare/capture channels for Timer/Counter 1.
void TC0_EnableCCChannels(volatile TC0_t *tc, uint8_t enableMask)
Enables compare/capture channels for Timer/Counter 0.
void TC1_ConfigClockSource(volatile TC1_t *tc, TC_CLKSEL_t clockSelection)
Configures clock source for the Timer/Counter 1.
void TC0_SetCCCIntLevel(volatile TC0_t *tc, TC_CCCINTLVL_t intLevel)
Sets the interrupt level for compare/capture channel C interrupt.
void TC0_DisableCCChannels(volatile TC0_t *tc, uint8_t disableMask)
Disables compare/capture channels on Timer/Counter 0.
void TC1_SetErrorIntLevel(volatile TC1_t *tc, TC_ERRINTLVL_t intLevel)
Sets the Error interrupt level.
void TC0_SetCCAIntLevel(volatile TC0_t *tc, TC_CCAINTLVL_t intLevel)
Sets the interrupt level for compare/capture channel A interrupt.
void TC1_Reset(volatile TC1_t *tc)
Resets the Timer/Counter 1.
This file implements some macros that makes the IAR C-compiler and avr-gcc work with the same code ba...
void TC1_SetCCDIntLevel(volatile TC1_t *tc, TC_CCDINTLVL_t intLevel)
void TC0_ConfigWGM(volatile TC0_t *tc, TC_WGMODE_t wgm)
Configures the Waveform Generation Mode for the Timer/Counter 0.
void TC1_ConfigWGM(volatile TC1_t *tc, TC_WGMODE_t wgm)
Configures the Waveform Generation Mode for the Timer/Counter 1.
void TC0_Reset(volatile TC0_t *tc)
Resets the Timer/Counter 0.
void TC1_SetOverflowIntLevel(volatile TC1_t *tc, TC_OVFINTLVL_t intLevel)
Sets the overflow interrupt level.
void TC0_ConfigClockSource(volatile TC0_t *tc, TC_CLKSEL_t clockSelection)
Configures clock source for the Timer/Counter 0.
void TC1_SetCCBIntLevel(volatile TC1_t *tc, TC_CCBINTLVL_t intLevel)
Sets the interrupt level for compare/capture channel B interrupt.
void TC0_SetCCDIntLevel(volatile TC0_t *tc, TC_CCDINTLVL_t intLevel)
Sets the interrupt level for compare/capture channel D interrupt.
void TC0_SetCCBIntLevel(volatile TC0_t *tc, TC_CCBINTLVL_t intLevel)
Sets the interrupt level for compare/capture channel B interrupt.
void TC0_SetErrorIntLevel(volatile TC0_t *tc, TC_ERRINTLVL_t intLevel)
Sets the Error interrupt level.
void TC0_ConfigInputCapture(volatile TC0_t *tc, TC_EVSEL_t eventSource)
Configures the Timer/Counter 0 for input capture operation.
void TC1_SetCCCIntLevel(volatile TC1_t *tc, TC_CCCINTLVL_t intLevel)
void TC1_SetCCAIntLevel(volatile TC1_t *tc, TC_CCAINTLVL_t intLevel)
Sets the interrupt level for compare/capture channel A interrupt.
void TC1_DisableCCChannels(volatile TC1_t *tc, uint8_t disableMask)
Disables compare/capture channels on Timer/Counter 1.