src/utils/math.c
void u8toa_impl(u8 const u8val, char* str, u8 addz) {
   u8 v = u8val; 
   u8 z = 0; 
   if      (v > 199) { *str = '2'; ++str; v -= 200; z=1; }
   else if (v >  99) { *str = '1'; ++str; v -= 100; z=1; }
   if (v > 9) {
      u8 const d = v/10;
      *str = '0' + d; ++str;
      v -= d*10;
   } else if(z != 0) {
      *str = '0'; ++str;
   }
   *str = '0' + v;
   if (addz) { ++str; *str=0; }
}
//--------------------------------------------------------------------------------
// u8toa() : Converts a u8 value to ascii
// u8toaz() : Converts u8 value to ascii adding zero char at the end8
//
u8toa() : Converts a u8 value to ascii
u8toaz() : Converts u8 value to ascii adding zero char at the end8
u8toa () : Converts a u8 value to ascii u8toaz () : Converts u8 value to ascii adding zero char at the end8
void u8toa_impl(u8 const u8val, char* str, u8 addz) {
   u8 v = u8val; 
   u8 z = 0; 
   if      (v > 199) { *str = '2'; ++str; v -= 200; z=1; }
   else if (v >  99) { *str = '1'; ++str; v -= 100; z=1; }
   if (v > 9) {
      u8 const d = v/10;
      *str = '0' + d; ++str;
      v -= d*10;
   } else if(z != 0) {
      *str = '0'; ++str;
   }
   *str = '0' + v;
   if (addz) { ++str; *str=0; }
}
void u8toa_impl ( u8 const u8val , char * str , u8 addz ) { u8 v = u8val ; u8 z = 0 ; if ( v > 199 ) { * str = ' ' ; ++ str ; v -= 200 ; z = 1 ; } else if ( v > 99 ) { * str = ' ' ; ++ str ; v -= 100 ; z = 1 ; } if ( v > 9 ) { u8 const d = v / 10 ; * str = ' ' + d ; ++ str ; v -= d * 10 ; } else if ( z != 0 ) { * str = ' ' ; ++ str ; } * str = ' ' + v ; if ( addz ) { ++ str ; * str = 0 ; } }
u8toa() : Converts a u8 value to ascii
u8toaz() : Converts u8 value to ascii adding zero char at the end8
u8toa () : Converts a u8 value to ascii u8toaz () : Converts u8 value to ascii adding zero char at the end8