pack data in the UART format used for serial communication
npm install uart-pack-framepack data in the
UART
format used for serial communication
`` js
var packer = require('uart-pack-frame');
var p = packer();
p.write('abcdefg');
console.log(p.read(10));
`
` js`
var packer = require('uart-pack-frame');
Create a pack instance p.
* opts.stop - number of stop bits. default: 1
Presently unconfigurable options: 8 bits, no parity.
Write buf to the packer.
Read n bytes of framed data into a buffer buf.
If all the written data has been read, buf is padded with trailing stop bits.
Read n bits of framed data into bits, an array of 0s and 1s.
If all the written data has been read, bits is padded with trailing stop bits
(1s).
Discard all bytes previously written.
When there is pending data to write, p.stopped is false.p.stopped
When there is no more data to read, is true.
With npm do:
```
npm install uart-pack-frame
MIT