| We're just
about there. Now we need a function to send a
character string of data out the serial port.
Oh oh, there's some stuff here that hasn't been
introduced yet. In order to send a string of data we
need to define a string of data in memory and then
somehow get access to where in memory this data is.
That's basically what the const
char *str is allowing us to do.
More on this later. For now just blindly add this
to the serial.c file and also add a function prototype
to the serial.h file. |
/*
// function: CommPortSendString( const char *str )
// description: This function sends a string.
//
void CommPortSendString(const char
*str)
{
while( (*str) != 0 )
{
CommPortSendByte( *str
);
str++;
}
}
|