Elisa3
utility.c File Reference
#include "utility.h"

Functions

unsigned char getSelector ()
 Return the current selector postion.
void initPeripherals (void)
 Initialize all the port pins and peripherals calling their "init" functions.
 ISR (TIMER2_OVF_vect)
void sleep (unsigned char seconds)
 Let the roboot go in extended standby mode.
unsigned long int getTime100MicroSec ()
 A global variable "clockTick" is incremented at each adc interrupt; this variable is used as base time (104 us resolution). This function is useful for instance to create non-blocking delays, calling the function at start of delay and then re-calling it to check when the desired delay is passed.
void readBatteryLevel ()
 Simply set the flag that indicates when the battery has to be read.
void resetOdometry ()

Function Documentation

unsigned char getSelector ( )

Return the current selector postion.

Returns:
byte representing the selector postion (0..15).
unsigned long int getTime100MicroSec ( )

A global variable "clockTick" is incremented at each adc interrupt; this variable is used as base time (104 us resolution). This function is useful for instance to create non-blocking delays, calling the function at start of delay and then re-calling it to check when the desired delay is passed.

Returns:
the current clock ticks since the start
void initPeripherals ( )

Initialize all the port pins and peripherals calling their "init" functions.

Returns:
none
ISR ( TIMER2_OVF_vect  )
void readBatteryLevel ( )

Simply set the flag that indicates when the battery has to be read.

Returns:
none
void resetOdometry ( )
void sleep ( unsigned char  seconds)

Let the roboot go in extended standby mode.

Parameters:
secondsnumber of seconds to stay in sleep
Returns:
none
 All Files Functions Variables Defines