/*!
*	\file 
*	\details This is main program header file.
*
*	\ingroup WheelchairControl
*	@{
*/

#ifndef _WHEELCHAIR_CONTROL	//Define once
#define _WHEELCHAIR_CONTROL

//Includes
#include "Defines.h"
#include "SRF08.h"
#include "UART.h"
#include "MiscInits.h"

#include <math.h>
#include <util/delay.h>
#include <stdlib.h>
#include <avr/interrupt.h>
#include <avr/eeprom.h>

//Functions

/*!
* Loads variables stored in EEPROM to RAM.
*/
void EEPROM_LoadVariables(void);

/*!
* Writes byte to EEPROM.
* \param address Address in EEPROM to write to.
* \param data 1 byte of data to be written.
*/
void EEPROM_WriteVariable(uint8_t* address, uint8_t data);

/*!
* Writes word to EEPROM.
* \param address Address in EEPROM to write to.
* \param data 2 bytes of data to be written.
*/
void EEPROM_WriteWord(uint16_t* address, uint16_t data);

/*!
* Initializes interrupts and peripherals.
*/
void InitializeMCU(void);

/*!
* Odometry is calculated here.
*/
void CalculateOdometry(void);	

/*!
* Position regulators are run here (wall following and position regulator).
*/
void RunRegulators(void); 			

#endif //_WHEELCHAIR_CONTROL
