Subversion Repositories idreammicro-avr

Compare Revisions

Regard whitespace Rev 41 → Rev 42

/trunk/projects/clock/clock.c
37,11 → 37,30
#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.
******************************************************************************/
 
127,20 → 146,9
time.seconds
);
 
char* p_date = &(str_date[0]);
while(*p_date != '\0')
{
usart0__transmit_byte(*p_date);
p_date++;
}
clock__transmit_string(&(str_date[0]));
usart0__transmit_byte(' ');
 
char* p_time = &(str_time[0]);
while(*p_time != '\0')
{
usart0__transmit_byte(*p_time);
p_time++;
}
clock__transmit_string(&(str_time[0]));
usart0__transmit_byte('\n');
 
deuligne__set_cursor_position(DEULIGNE__DISPLAY_LINE_1, 0);
154,3 → 162,30
 
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++;
}
}