register2byte static method

Uint8List register2byte(
  1. Uint16List reg
)

Implementation

static Uint8List register2byte(Uint16List reg){
  Uint8List todata = Uint8List(reg.length *2);

  for (int i=0; i< reg.length; i++){
    todata[i*2] = (reg[i] >> 8) & 0xff ;
    todata[i*2+1] = reg[i] & 0xff ;
  }

  return todata;
}