Lines Matching defs:packet
108 #define ELO_SYNC_BYTE 'U' /* Sync byte. First of a packet. */
116 #define ELO_ACK 'A' /* Acknowledge packet */
208 * Read a packet from the port. Try to synchronize with start of
209 * packet and compute checksum.
210 * The packet structure read by this function is as follow:
214 * Byte 8 : packet data
217 * This function returns if a valid packet has been assembled in
220 * Returns Success if a packet is successfully assembled including
221 * testing checksum. If a packet checksum is incorrect, it is discarded.
224 * partially assembled packet is left in buffer, buffer_p and
242 * Try to read enough bytes to fill up the packet buffer.
261 * Sync with the start of a packet.
287 * Got a packet, validate checksum and reset state.
300 * Valid packet received report it.
313 * Read an unframed packet from the port
314 * The packet structure read by this function is as follow:
318 * Byte 8 : packet data
320 * This function returns if a valid packet has been assembled in
355 * If a packet is not fully received it is deferred until the next
385 * one packet worth of data in the OS buffer.
431 * emit a motion, regardless of the kind of packet processed.
455 * Emit an height bytes packet to the controller.
463 xf86EloSendPacket(unsigned char *packet,
469 packet[0] = ELO_SYNC_BYTE;
471 sum += packet[i];
474 packet[ELO_PACKET_SIZE-1] = sum;
476 DBG(4, ErrorF("Sending packet : 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X \n",
477 packet[0], packet[1], packet[2], packet[3], packet[4],
478 packet[5], packet[6], packet[7], packet[8], packet[9]));
479 SYSCALL(result = write(fd, packet, ELO_PACKET_SIZE));
522 * timeout and each wrong packet.
562 unsigned char packet[ELO_PACKET_SIZE];
565 if (xf86EloWaitReply(ELO_ACK, packet, fd) == Success) {
567 if (packet[2 + i] != '0') {
572 DBG(2, ErrorF("Elographics acknowledge packet reports %d errors\n",
648 xf86EloPrintIdent(unsigned char *packet,
652 switch(packet[2]) {
664 switch(packet[3]) {
676 if (packet[8] & 1) {
687 xf86Msg(X_NONE, ", firmware revision %d.%d.\n", packet[6], packet[5]);
689 if (packet[4]) {
691 if (packet[4] & 0x10) {
694 if (packet[4] & 0x20) {
697 if (packet[4] & 0x40) {
700 if (packet[4] & 0x80) {