- Main Page
- Modules
- Data Structures
- Files
- Related Pages

# timer16_drv.c File Reference

`#include "config.h"`
`#include "timer16_drv.h"`

Include dependency graph for timer16_drv.c:

Go to the source code of this file.

## Functions
U16 | timer16_get_counter (void)
| This function READ the 16-bit TIMER counter.
U16 | timer16_get_capture (void)
| This function READ the 16-bit TIMER capture register.

## Detailed Description

This file contains the low level functions (drivers) of 16-bit Timer(s) - Compiler: IAR EWAVR and GNU GCC for AVR

- Supported devices: AT90USB1287, AT90USB1286, AT90USB647, AT90USB646
  Author:
    Atmel Corporation: http://www.atmel.com
    Support and FAQ: http://support.atmel.no/

Definition in file timer16_drv.c.

## Function Documentation

U16 timer16_get_counter | ( | void |  | ) |

This function READ the 16-bit TIMER counter.

Warning:

Parameters:

Returns:
  16-bit counter value

Definition at line 62 of file timer16_drv.c.

    00063 {
    00064     U16 u16_temp;
    00065
    00066     u16_temp  =  Timer16_get_counter_low();
    00067     u16_temp |= (Timer16_get_counter_high() << 8 );
    00068
    00069     return u16_temp;
    00070 }

U16 timer16_get_capture | ( | void |  | ) |

This function READ the 16-bit TIMER capture register.

Warning:

Parameters:

Returns:
  16-bit capture value

Definition at line 83 of file timer16_drv.c.

    00084 {
    00085     U16 u16_temp;
    00086
    00087     u16_temp  =  Timer16_get_capture_low();
    00088     u16_temp |= (Timer16_get_capture_high() << 8 );
    00089
    00090     return u16_temp;
    00091 }