/*******************************************************************
* FileName:        Morse Code Printf.c
* Processor:       PIC18F4520
* Compiler:        MPLAB C18 v.3.06 
*
* This file processes hardcoded string and transmits them using Morse Code
*                                                                     
*
* Creation and Revisions:
*      Author               Date			Comments
*   (your name here)       9/22/09
********************************************************************/

/** Header Files ***************************************************/     
#include <p18f4520.h> 
#include <stdio.h>

/** Configuration Bits *********************************************/     
#pragma config OSC = EC  // EC = External 4MHz Crystal for PICDEM board only
#pragma config WDT = OFF
#pragma config LVP = OFF
#pragma config BOREN = OFF

/** Define Constants Here ******************************************/
#define MSG1_LENGTH 7
#define MSG2_LENGTH 15

/** Local Function Prototypes **************************************/
void sendMorseCode(char ary[], int numChars);
// Prototype for transmitChar
void dot(void);
void dash(void);
void spaceBetweenMarksWithinLetter(void);
void spaceBetweenLetters(void);
void spaceBetweenWords(void);
void spaceAfterMessage(void);

/** Global Variables ***********************************************/
	
/*******************************************************************
* Function:        void main(void)
********************************************************************/
#pragma code
void main (void)
{
	char msg1[] = "sos sos";
	sendMorseCode(msg1,MSG1_LENGTH);	
	
	while (1)
    {
		// This area loops forever
    }
}

/*******************************************************************
* Additional Helper Functions
********************************************************************/

void sendMorseCode(char ary[], int numCharsInArray)
{
}

// Add transmitChar function

	
void dot(void)
{
	printf("*");
}	
void dash(void)
{
	printf("---");
}	
void spaceBetweenMarksWithinLetter(void)
{
	printf(" ");
}	
void spaceBetweenLetters(void)
{
	printf("   ");
}	
void spaceBetweenWords(void)
{
	printf("       ");
}	
void spaceAfterMessage(void)
{
	printf("\n");
}