src/modules/my_delay.c File Reference

This is the file for using a specific delay function designed for 8MHz. More...

#include "sysconfig.h"
#include "my_delay.h"

Functions

int my_delay (unsigned int time, char *base)
 my_delay: This function is called when a delay is necessary
void my_timeout (void(*func)(void))
 my_timeout: This function is called when a function should be called after one second

Variables

unsigned int gtime
void(* t_callback )(void)
int start_temp


Detailed Description

This is the file for using a specific delay function designed for 8MHz.

It contains all functions which are neccessary to handle the delay
It handles delay and sends uC to IDLE Mode during delay

It is NOT Controller specific, only to 8MHz Clock


Function Documentation

int my_delay ( unsigned int  time,
char *  base 
)

my_delay: This function is called when a delay is necessary

This function is called when a delay is necessary
It manages the delay with timer interrupts and sends uC to IDLE

Parameters:
time (duration of sleep), base ("ms", "sec")
Returns:
0 on SUCCESS and -1 if not

References gtime, idle(), init_timer0_ms(), init_timer0_us(), and init_timer1_sec().

Referenced by bt_device_config(), bt_device_reset(), init_lcd(), knight_rider(), main(), and SPI_MasterTransmit().

void my_timeout ( void(*)(void)  func  ) 

my_timeout: This function is called when a function should be called after one second

This function is called to trigger a function after one second

Parameters:
functioncall 
Returns:
void

References gtime, init_timer1_sec(), start_temp, and t_callback.

Referenced by main().


Variable Documentation

unsigned int gtime

Referenced by ISR(), my_delay(), and my_timeout().

Referenced by init_usart(), ISR(), and my_timeout().

void(* t_callback)(void)

Referenced by my_timeout().


Generated on Mon Jan 12 21:12:08 2009 for BlueTemp by  doxygen 1.5.8