Skip to content

Commit

Permalink
Don't print "0x" prefix, bus_out() will take care of needed presentat…
Browse files Browse the repository at this point in the history
…ion.

Otherwise, it prints "READ: 0x0xFF"
  • Loading branch information
pfalcon committed Apr 25, 2012
1 parent e8e4fcc commit 139e8ca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/bus_spi.c
Expand Up @@ -34,7 +34,7 @@ static void bus_spi_stop(void)
static void bus_spi_write(uint8_t c)
{
hw_spi_write8(c);
bus_log_puts_P(PSTR("WRITE: 0x"));
bus_log_puts_P(PSTR("WRITE: "));
bus_log_puthex8(c);
bus_log_newline();
}
Expand All @@ -43,7 +43,7 @@ static void bus_spi_read(void)
{
uint8_t c;
c = hw_spi_write8(0xFF);
bus_log_puts_P(PSTR("READ: 0x"));
bus_log_puts_P(PSTR("READ: "));
bus_out(c);
bus_log_newline();
}
Expand All @@ -52,11 +52,11 @@ static void bus_spi_xact(uint8_t c)
{
uint8_t r;
r = hw_spi_write8(c);
bus_log_puts_P(PSTR("WRITE: 0x"));
bus_log_puts_P(PSTR("WRITE: "));
bus_out(c);
bus_log_newline();
// TODO: refactor with *_read()
bus_log_puts_P(PSTR("READ: 0x"));
bus_log_puts_P(PSTR("READ: "));
bus_out(r);
bus_log_newline();
}
Expand Down

0 comments on commit 139e8ca

Please sign in to comment.