Timer 4 (only available for processors with Timer 4)

Functions

void timer4_compare_output_A_mode_set (uint8_t mode)
void timer4_compare_output_B_mode_set (uint8_t mode)
void timer4_compare_output_C_mode_set (uint8_t mode)
void timer4_config (uint8_t config)
uint16_t timer4_output_compare_A_read (void)
void timer4_output_compare_A_set (uint16_t val)
uint16_t timer4_output_compare_B_read (void)
void timer4_output_compare_B_set (uint16_t val)
uint16_t timer4_output_compare_C_read (void)
void timer4_output_compare_C_set (uint16_t val)
void timer4_output_compare_config (uint8_t config)
uint16_t timer4_read (void)
void timer4_set (uint16_t val)
void timer4_enable (void)
void timer4_disable (void)

Function Documentation

void timer4_compare_output_A_mode_set ( uint8_t  mode  ) 

Configure the timer 4 compare output A mode.

Parameters:
mode One of:
TIMER16B_COMPARE_OUTPUT_MODE_NORMAL: Normal operation
TIMER16B_COMPARE_OUTPUT_MODE_TOGGLE: Toggle on output compare
TIMER16B_COMPARE_OUTPUT_MODE_CLEAR: Clear on output compare
TIMER16B_COMPARE_OUTPUT_MODE_SET: Set on output compare
Author:
Andrew H. Fagg

Only available for the following processors:

void timer4_compare_output_B_mode_set ( uint8_t  mode  ) 

Configure the timer 4 compare output B mode.

Parameters:
mode One of:
TIMER16B_COMPARE_OUTPUT_MODE_NORMAL: Normal operation
TIMER16B_COMPARE_OUTPUT_MODE_TOGGLE: Toggle on output compare
TIMER16B_COMPARE_OUTPUT_MODE_CLEAR: Clear on output compare
TIMER16B_COMPARE_OUTPUT_MODE_SET: Set on output compare
Author:
Andrew H. Fagg

Only available for the following processors:

void timer4_compare_output_C_mode_set ( uint8_t  mode  ) 

Configure the timer 4 compare output C mode.

Parameters:
mode One of:
TIMER16B_COMPARE_OUTPUT_MODE_NORMAL: Normal operation
TIMER16B_COMPARE_OUTPUT_MODE_TOGGLE: Toggle on output compare
TIMER16B_COMPARE_OUTPUT_MODE_CLEAR: Clear on output compare
TIMER16B_COMPARE_OUTPUT_MODE_SET: Set on output compare
Author:
Andrew H. Fagg

Only available for the following processors:

void timer4_config ( uint8_t  config  ) 

Determine the clock source for timer 4

Parameters:
config One of:
TIMER1_NOCLK: no input clock
TIMER4_NOPRE: No prescalar
TIMER4_PRE_8: Prescalar of 8
TIMER4_PRE_64: Prescalar of 64
TIMER4_PRE_256: Prescalar of 256
TIMER4_PRE_1024: Prescalar of 1024
TIMER4_EXT_FALLING: Count on falling edge of external pin T4
TIMER4_EXT_RISING: Count on rising edge of external pin T4
Author:
Andrew H. Fagg

Only available for the following processors:

void timer4_disable ( void   )  [inline]

Disable the timer 4 overflow interrupt.

Author:
Andrew H. Fagg
void timer4_enable ( void   )  [inline]

Enable the timer 4 overflow interrupt.

Author:
Andrew H. Fagg
uint16_t timer4_output_compare_A_read ( void   ) 

Read the state of the timer 4 output compare unit A register.

Note: this implementation is thread safe.

Returns:
The current state of the timer 4 output compare unit A register.
Author:
Andrew H. Fagg

Only available for the following processors:

void timer4_output_compare_A_set ( uint16_t  val  ) 

Set the state of the timer 4 output compare unit A register.

Note: this implementation is thread safe.

Parameters:
val The new value of the timer 4 output compare unit A register.
Author:
Andrew H. Fagg

Only available for the following processors:

uint16_t timer4_output_compare_B_read ( void   ) 

Read the state of the timer 4 output compare unit B register.

Note: this implementation is thread safe.

Returns:
The current state of the timer 4 output compare unit B register.
Author:
Andrew H. Fagg

Only available for the following processors:

void timer4_output_compare_B_set ( uint16_t  val  ) 

Set the state of the timer 4 output compare unit B register.

Note: this implementation is thread safe.

Parameters:
val The new value of the timer 4 output compare unit B register.
Author:
Andrew H. Fagg

Only available for the following processors:

uint16_t timer4_output_compare_C_read ( void   ) 

Read the state of the timer 4 output compare unit C register.

Note: this implementation is thread safe.

Returns:
The current state of the timer 4 output compare unit C register.
Author:
Andrew H. Fagg

Only available for the following processors:

void timer4_output_compare_C_set ( uint16_t  val  ) 

Set the state of the timer 4 output compare unit C register.

Note: this implementation is thread safe.

Parameters:
val The new value of the timer 4 output compare unit C register.
Author:
Andrew H. Fagg

Only available for the following processors:

void timer4_output_compare_config ( uint8_t  config  ) 

Configure the timer 4 output compare unit.

Parameters:
config One of:
TIMER4_OUTPUT_COMPARE_CONFIG_NORMAL: Normal operation
TIMER4_OUTPUT_COMPARE_CONFIG_PWM_PC_08: PWM, Phase Correct, 8-bit
TIMER4_OUTPUT_COMPARE_CONFIG_PWM_PC_09: PWM, Phase Correct, 9-bit
TIMER4_OUTPUT_COMPARE_CONFIG_PWM_PC_10: PWM, Phase Correct, 10-bit
TIMER4_OUTPUT_COMPARE_CONFIG_CTC_OCR4A: CTC, Top = OCRA4
TIMER4_OUTPUT_COMPARE_CONFIG_PWM_F_08: Fast PWM, 8-bit
TIMER4_OUTPUT_COMPARE_CONFIG_PWM_F_09: Fast PWM, 9-bit
TIMER4_OUTPUT_COMPARE_CONFIG_PWM_F_10: Fast PWM, 10-bit
TIMER4_OUTPUT_COMPARE_CONFIG_PWM_PFC_ICR4: PWM, Phase and Frequency Correct, Top = ICR4
TIMER4_OUTPUT_COMPARE_CONFIG_PWM_PFC_OCR4A: PWM, Phase and Frequency Correct, Top = OCR4A
TIMER4_OUTPUT_COMPARE_CONFIG_PWM_PC_ICR4: PWM, Phase Correct, Top = ICR4
TIMER4_OUTPUT_COMPARE_CONFIG_PWM_PC_OCR4A: PWM, Phase Correct, Top = OCR4A
TIMER4_OUTPUT_COMPARE_CONFIG_CTC_ICR4: CTC, Top = ICR4
TIMER4_OUTPUT_COMPARE_CONFIG_PWM_F_ICR4: Fast PWM, Top = ICR4
TIMER4_OUTPUT_COMPARE_CONFIG_PWM_F_OCR4A: Fast PWM, Top = OCR4A
Author:
Andrew H. Fagg

Only available for the following processors:

uint16_t timer4_read ( void   ) 

Read the state of the timer 4 counter.

Note: this implementation is thread safe.

Returns:
The current state of the timer 4 counter
Author:
Andrew H. Fagg

Only available for the following processors:

void timer4_set ( uint16_t  val  ) 

Set the state of the timer 4 counter

Note: this implementation is thread safe.

Parameters:
val The new value of the timer 4 counter.
Author:
Andrew H. Fagg

Only available for the following processors:

Generated on Tue Feb 14 00:23:58 2012 for OU Atmel Utilities Library by  doxygen 1.6.3