AbstractStatic ReadonlyPINS_Pins across a single braille cell.
Static ReadonlyPINS_Pins down a single braille cell.
StaticgraphicPacks a pin buffer into a graphic-mode hex payload.
Cells are emitted in row-major order — the full top row of cells left to right, then the next row down — which is the order the device scans them. A raster larger than the cell grid is cropped; a smaller one is padded with lowered pins, so a caller may hand over a buffer sized for a different DotPad model without the payload length changing.
The pin buffer to pack
Cells across the device's graphic area
Cells down the device's graphic area
Hex string of cellColumns * cellRows bytes
StaticgraphicPacks one row of cells from a pin buffer, for a single-line update.
Repainting one row instead of the whole frame keeps the device's acknowledgement chain to a single line, which matters because a full frame costs a second or more and the user is pressing arrow keys faster than that.
The pin buffer to read from
Zero-based cell row to pack
Cells across the device's graphic area
Hex string of cellColumns bytes
StaticchangedReports which cell rows differ between two pin buffers, so only those rows need transmitting.
Ascending list of zero-based cell rows that changed
StaticbraillePacks braille cells given as dot bit patterns into a text-mode hex payload.
One byte per cell, bit 0 being dot 1
Cells on the device's text line; the input is cropped or padded with blanks to this length
Packs pin buffers and braille cells into the hex payloads a DotPad expects.
The device uses two different bit orders, one per display mode, and they are not interchangeable:
The two differ by a permutation of bits
0x08,0x10,0x20and0x40, so a payload packed for one mode is silently wrong in the other. They are kept as separate functions here, with separate tests, rather than as one function with a mode flag.