/*
 *This is a main.c file for the printf Test.
 *
 *This program is free software: you can redistribute it and/or modify
 *it under the terms of the GNU General Public License as published by
 *the Free Software Foundation, either version 3 of the License, or
 *(at your option) any later version.

 *This program is distributed in the hope that it will be useful,
 *but WITHOUT ANY WARRANTY; without even the implied warranty of
 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *GNU General Public License for more details.
 *
 *You should have received a copy of the GNU General Public License
 *along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *Parker Dillmann
 *www.longhornengineer.com
*/

#include <msp430g2553.h>
#include "uart_fifo.h"					//Your UART header
#include "printf.h"


int main(void)
{
	WDTCTL = WDTPW + WDTHOLD; 			//Stop WDT
	BCSCTL1 = CALBC1_8MHZ; 				//Set DCO to 8Mhz
	DCOCTL = CALDCO_8MHZ; 				//Set DCO to 8Mhz

	__enable_interrupt();				//Interrupts Enabled

	uart_init();

	signed int si = -314;
	unsigned int ui = 150;
	signed long sl = -456310;
	unsigned long ul = 325650;

	uart_printf("Testing the printf Function!\r\n");
	uart_printf("signed int %i\r\n", si);
	uart_printf("unsigned int %u\r\n", ui);
	uart_printf("signed long %l\r\n", sl);
	uart_printf("unsigned long %n\r\n", ul);
	uart_printf("HEX %x\r\n", ui);
	uart_printf("Types Done!\r\n");


}
