Fix odd-nibble encoding issue
This commit is contained in:
parent
8b3d277a29
commit
05770bdd7b
|
@ -11,10 +11,11 @@ static uint8_t buf[MAXCHR];
|
||||||
char gnn(){ // Get next nibble
|
char gnn(){ // Get next nibble
|
||||||
static int byte;
|
static int byte;
|
||||||
int val;
|
int val;
|
||||||
|
if(hilo==1)
|
||||||
|
ctr++;
|
||||||
hilo=1-hilo;
|
hilo=1-hilo;
|
||||||
if(hilo==1){
|
if(hilo==1){
|
||||||
byte=data[ctr];
|
byte=data[ctr];
|
||||||
ctr++;
|
|
||||||
val=byte>>4;
|
val=byte>>4;
|
||||||
}else{
|
}else{
|
||||||
val=byte&0x0f;
|
val=byte&0x0f;
|
||||||
|
|
Loading…
Reference in New Issue