/*
* File: BOARD.h
* Author: Max Dunne
*
* Created on December 19, 2012, 2:08 PM
*/
#ifndef BOARD_H
#define BOARD_H
#include <stdint.h>
#include <GenericTypeDefs.h>
/*******************************************************************************
* PUBLIC #DEFINES *
******************************************************************************/
//suppresses various warnings that we don't need to worry about for CMPE13
#ifndef _SUPPRESS_PLIB_WARNING
#define _SUPPRESS_PLIB_WARNING
#endif
#ifndef _DISABLE_OPENADC10_CONFIGPORT_WARNING
#define _DISABLE_OPENADC10_CONFIGPORT_WARNING
#endif
/*****************************************************************************/
// Boolean defines for TRUE, FALSE, SUCCESS and ERROR
#ifndef FALSE
//#define FALSE ((int8_t) 0)
//#define TRUE ((int8_t) 1)
#endif
#define ERROR ((int8_t) -1)
#define SUCCESS ((int8_t) 1)
/**
* Function: BOARD_Init(void)
* @param None
* @return None
* @brief Set the clocks up for the board, initializes the serial port, and turns
* on the A/D subsystem for battery monitoring
* @author Max Dunne, 2013.09.15 */
void BOARD_Init();
/**
* Function: BOARD_End(void)
* @param None
* @return None
* @brief shuts down all peripherals except for serial and A/D. Turns all pins
* into input
* @author Max Dunne, 2013.09.20 */
void BOARD_End();
/**
* Function: BOARD_GetPBClock(void)
* @param None
* @return PB_CLOCK - speed the peripheral clock is running in hertz
* @brief returns the speed of the peripheral clock. Nominally at 40Mhz
* @author Max Dunne, 2013.09.01 */
unsigned int BOARD_GetPBClock();
#endif /* BOARD_H */