USB-BDI
Defines | Functions
M:/USB-BDI/USB-BDI/Firmware/MPC555-USB-BDI/lib/timer.c File Reference

This file contains the main method. More...

#include "timer.h"
#include "fx2regs.h"
#include "isr.h"

Go to the source code of this file.

Defines

#define RELOAD_VALUE   ((unsigned short) -40000)

Functions

void hook_timer_tick (unsigned short isr_tick_handler)
 hooks the timer interrupt service routine

Detailed Description

This file contains the main method.

Author:
Schlaepfer Stephan
Version:
1.0
Date:
18.01.2006

Definition in file timer.c.


Define Documentation

#define RELOAD_VALUE   ((unsigned short) -40000)

Arrange to have isr_tick_handler called at 100 Hz.

The cpu clock is running at 48e6. The input to the timer is 48e6 / 12 = 4e6.

We arrange to have the timer overflow every 40000 clocks == 100 Hz

Definition at line 37 of file timer.c.


Function Documentation

void hook_timer_tick ( unsigned short  isr_tick_handler)

hooks the timer interrupt service routine

Parameters:
isr_tick_handlerinterrupt service routine

Definition at line 44 of file timer.c.

 All Files Functions Variables Defines