DEV Community

Sameer
Sameer

Posted on

Answer:

Here is a modified function that generalizes your function above for other baud rates:

private byte[] getLineEncoding(int baudRate) {
    final byte[] lineEncodingRequest = { (byte) 0x80, 0x25, 0x00, 0x00, 0x00, 0x00, 0x08 };
    //Get the least significant byte of baudRate, 
    //and put it in first byte of the array being

Top comments (0)