make format

This commit is contained in:
Arti Zirk 2016-10-11 00:43:31 +03:00
parent 39720c676e
commit 25b1feb71d
2 changed files with 9 additions and 6 deletions

View File

@ -61,7 +61,6 @@ int main (void)
lcd_puts_P(PSTR(" ")); /* Clear the end of the line */
lcd_goto(0x40); /* Got to the beginning of the next line */
/* set pin 3 low to turn led off */
PORTA &= ~_BV(PORTA3);
_delay_ms(BLINK_DELAY_MS);

View File

@ -1,17 +1,20 @@
#include <stdio.h>
#include "print_helper.h"
int print_ascii_tbl (FILE *stream) {
int print_ascii_tbl (FILE *stream)
{
for (char c = ' '; c <= '~'; c++) {
if (!fprintf(stream, "%c ", c)) {
return 0;
}
}
return fprintf(stream, "\n");
}
int print_for_human (FILE *stream, const unsigned char *array, const int len) {
int print_for_human (FILE *stream, const unsigned char *array, const int len)
{
for (int i = 0; i < len; i++) {
if (array[i] >= ' ' && array[i] <= '~') {
if (!fprintf(stream, "%c", array[i])) {
@ -23,5 +26,6 @@ int print_for_human (FILE *stream, const unsigned char *array, const int len) {
}
}
}
return fprintf(stream, "\n");;
}