LEDs now indicate bit position (instead of (1 << pos)) which is more
consistent with how everything else works
This commit is contained in:
parent
c218d1bffa
commit
4b17c144d0
13 changed files with 50 additions and 46 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue