Subversion Repositories idreammicro-avr

Compare Revisions

Regard whitespace Rev 42 → Rev 41

/trunk/projects/clock/clock.c
37,30 → 37,11
#include <avr/io.h>
#include <util/delay.h>
 
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
 
/******************************************************************************
* Private function prototypes.
******************************************************************************/
 
/**************************************************************************//**
* \fn static void clock__transmit_string(const char* p_string)
*
* \brief Transmit a string through USART.
*
* \param[in] p_string String to transmit.
******************************************************************************/
static
void
clock__transmit_string
(
const char* p_string
);
 
/******************************************************************************
* Main function.
******************************************************************************/
 
146,9 → 127,20
time.seconds
);
 
clock__transmit_string(&(str_date[0]));
char* p_date = &(str_date[0]);
while(*p_date != '\0')
{
usart0__transmit_byte(*p_date);
p_date++;
}
usart0__transmit_byte(' ');
clock__transmit_string(&(str_time[0]));
 
char* p_time = &(str_time[0]);
while(*p_time != '\0')
{
usart0__transmit_byte(*p_time);
p_time++;
}
usart0__transmit_byte('\n');
 
deuligne__set_cursor_position(DEULIGNE__DISPLAY_LINE_1, 0);
162,30 → 154,3
 
return 0;
}
 
/******************************************************************************
* Private function definitions.
******************************************************************************/
 
/**************************************************************************//**
* \fn static void clock__transmit_string(const char* p_string)
*
* \brief Transmit a string through USART.
*
* \param[in] p_string String to transmit.
******************************************************************************/
static
void
clock__transmit_string
(
const char* p_string
){
// Check the preconditions.
assert(NULL != p_string);
 
while (*p_string != '\0')
{
usart0__transmit_byte(*p_string);
p_string++;
}
}