Lines Matching defs:frame
291 * Writing a frame must not return the number of written bytes.
308 I2C_DUMP_SKB("i2c frame written", skb);
350 * Reads an shdlc frame and returns it in a newly allocated sk_buff. Guarantees
351 * that i2c bus will be flushed and that next read will start on a new frame.
355 * -EBADMSG : frame was incorrect and discarded
356 * -ENOMEM : cannot allocate skb, frame dropped
392 I2C_DUMP_SKB("i2c frame read", *skb);
467 * Reads an shdlc frame from the chip. This is not as straightforward as it
468 * seems. There are cases where we could loose the frame start synchronization.
469 * The frame format is len-data-crc, and corruption can occur anywhere while
471 * In order to recover synchronization with the next frame, we must be sure
474 * - the chip will always present only one single complete frame on the bus
476 * - the chip will not present a new frame until we have completely read
563 u8 frame[PN544_FW_I2C_MAX_PAYLOAD];
572 framep = (struct pn544_i2c_fw_frame_write *) frame;
591 r = i2c_master_send(client, frame, framelen);
604 struct pn544_i2c_fw_frame_check frame;
611 frame.cmd = PN544_FW_CMD_CHECK;
613 put_unaligned_be16(sizeof(frame.be_start_addr) +
614 sizeof(frame.be_datalen) + sizeof(frame.be_crc),
615 &frame.be_length);
618 frame.be_start_addr[0] = (start_addr & 0xff0000) >> 16;
619 frame.be_start_addr[1] = (start_addr & 0xff00) >> 8;
620 frame.be_start_addr[2] = start_addr & 0xff;
622 put_unaligned_be16(datalen, &frame.be_datalen);
628 put_unaligned_be16(crc, &frame.be_crc);
630 r = i2c_master_send(client, (const char *) &frame, sizeof(frame));
632 if (r == sizeof(frame))