LEDs now indicate bit position (instead of (1 << pos)) which is more

consistent with how everything else works
This commit is contained in:
Mariano Alvira 2010-03-07 15:39:56 -05:00
parent c218d1bffa
commit 4b17c144d0
13 changed files with 50 additions and 46 deletions

View file

@ -27,18 +27,19 @@ void print_welcome(char* testname) {
printf("board: %s\n\r", STR2(BOARD));
}
void print_packet(packet_t *p) {
void print_packet(volatile packet_t *p) {
volatile uint8_t i,j,k;
#define PER_ROW 16
if(p) {
printf("len 0x%02x\n\r",p->length);
for(j=0, k=0; j < ((p->length)%PER_ROW)-1; j++) {
for(i=0; i < PER_ROW; i++, k++) {
if(k>=p->length) { break; }
if(k >= (p->length + 1) ) { goto out; } /* + 1 since first byte is len+2 */
printf("%02x ",p->data[j*PER_ROW+i]);
}
printf("\n\r");
}
out:
printf("\n\r");
}
return;