예제 #1
0
파일: level2.c 프로젝트: Feechka/UOBP
void serialWrite(
 GioEndpoint *gioEndpoint,
 unsigned char byte){
 #ifdef BRLTTY
 gioWriteData(gioEndpoint, &byte, 1);
 #endif
 #ifdef ARDUINO
 Serial.write(byte);
 #endif
}
예제 #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;
}
예제 #3
0
static ssize_t
writeData_generic (BrailleDisplay *brl, const void *data, size_t length) {
  updateWriteDelay(brl, length);
  return gioWriteData(brl->gioEndpoint, data, length);
}