Lines Matching defs:frame

289  * Writing a frame must not return the number of written bytes.
306 I2C_DUMP_SKB("i2c frame written", skb);
348 * Reads an shdlc frame and returns it in a newly allocated sk_buff. Guarantees
349 * that i2c bus will be flushed and that next read will start on a new frame.
353 * -EBADMSG : frame was incorrect and discarded
354 * -ENOMEM : cannot allocate skb, frame dropped
390 I2C_DUMP_SKB("i2c frame read", *skb);
465 * Reads an shdlc frame from the chip. This is not as straightforward as it
466 * seems. There are cases where we could loose the frame start synchronization.
467 * The frame format is len-data-crc, and corruption can occur anywhere while
469 * In order to recover synchronization with the next frame, we must be sure
472 * - the chip will always present only one single complete frame on the bus
474 * - the chip will not present a new frame until we have completely read
561 u8 frame[PN544_FW_I2C_MAX_PAYLOAD];
570 framep = (struct pn544_i2c_fw_frame_write *) frame;
589 r = i2c_master_send(client, frame, framelen);
602 struct pn544_i2c_fw_frame_check frame;
609 frame.cmd = PN544_FW_CMD_CHECK;
611 put_unaligned_be16(sizeof(frame.be_start_addr) +
612 sizeof(frame.be_datalen) + sizeof(frame.be_crc),
613 &frame.be_length);
616 frame.be_start_addr[0] = (start_addr & 0xff0000) >> 16;
617 frame.be_start_addr[1] = (start_addr & 0xff00) >> 8;
618 frame.be_start_addr[2] = start_addr & 0xff;
620 put_unaligned_be16(datalen, &frame.be_datalen);
626 put_unaligned_be16(crc, &frame.be_crc);
628 r = i2c_master_send(client, (const char *) &frame, sizeof(frame));
630 if (r == sizeof(frame))