Exemplo n.º 1
0
void serialWrite(
 GioEndpoint *gioEndpoint,
 unsigned char byte){
 #ifdef BRLTTY
 gioWriteData(gioEndpoint, &byte, 1);
 #endif
 #ifdef ARDUINO
 Serial.write(byte);
 #endif
}
Exemplo n.º 2
0
int
writeBraillePacket (
  BrailleDisplay *brl,
  GioEndpoint *endpoint,
  const void *packet, size_t size
) {
  if (!endpoint) endpoint = brl->gioEndpoint;
  logOutputPacket(packet, size);
  if (gioWriteData(endpoint, packet, size) == -1) return 0;

  if (endpoint == brl->gioEndpoint) {
    brl->writeDelay += gioGetMillisecondsToTransfer(endpoint, size);
  }

  return 1;
}
Exemplo n.º 3
0
static ssize_t
writeData_generic (BrailleDisplay *brl, const void *data, size_t length) {
  updateWriteDelay(brl, length);
  return gioWriteData(brl->gioEndpoint, data, length);
}