You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Operation framing configuration for I2C transactions.
439
+
/// Frame type in I2C transaction.
440
440
///
441
-
/// This determines the I2C frame boundaries for each operation within a transaction,
442
-
/// controlling the generation of start conditions (ST or SR), stop conditions (SP),
443
-
/// and ACK/NACK behavior for read operations.
441
+
/// This tells each method what kind of frame to use, to generate a (repeated) start condition (ST
442
+
/// or SR), and/or a stop condition (SP). For read operations, this also controls whether to send an
443
+
/// ACK or NACK after the last byte received.
444
444
///
445
-
/// For write operations, some framing configurations are functionally identical
446
-
/// because they differ only in ACK/NACK treatment which is relevant only for reads:
445
+
/// For write operations, the following options are identical because they differ only in the (N)ACK
446
+
/// treatment relevant for read operations:
447
447
///
448
-
/// - `First` and `FirstAndNext` behave identically for writes
449
-
/// - `Next` and `LastNoStop` behave identically for writes
448
+
/// - `FirstFrame` and `FirstAndNextFrame` behave identically for writes
449
+
/// - `NextFrame` and `LastFrameNoStop` behave identically for writes
450
+
///
451
+
/// Abbreviations used below:
450
452
///
451
-
/// **Framing Legend:**
452
453
/// - `ST` = start condition
453
-
/// - `SR` = repeated start condition
454
+
/// - `SR` = repeated start condition
454
455
/// - `SP` = stop condition
455
-
/// - `ACK/NACK` = acknowledgment behavior for the final byte of read operations
456
+
/// - `ACK`/`NACK` = last byte in read operation
456
457
#[derive(Copy,Clone)]
457
458
#[allow(dead_code)]
458
-
enumOperationFraming{
459
-
/// `[ST/SR]+[NACK]+[SP]` - First operation of its type in the transaction and also the final operation overall.
460
-
FirstAndLast,
461
-
/// `[ST/SR]+[NACK]` - First operation of its type in the transaction, final operation in a read sequence, but not the final operation overall.
462
-
First,
463
-
/// `[ST/SR]+[ACK]` - First operation of its type in the transaction, but neither the final operation overall nor the final operation in a read sequence.
464
-
FirstAndNext,
465
-
/// `[ACK]` - Continuation operation in a read sequence (neither first nor last).
466
-
Next,
467
-
/// `[NACK]+[SP]` - Final operation overall in the transaction, but not the first operation of its type.
468
-
Last,
469
-
/// `[NACK]` - Final operation in a read sequence, but not the final operation overall in the transaction.
470
-
LastNoStop,
459
+
enumFrameOptions{
460
+
/// `[ST/SR]+[NACK]+[SP]` First frame (of this type) in transaction and also last frame overall.
461
+
FirstAndLastFrame,
462
+
/// `[ST/SR]+[NACK]` First frame of this type in transaction, last frame in a read operation but
463
+
/// not the last frame overall.
464
+
FirstFrame,
465
+
/// `[ST/SR]+[ACK]` First frame of this type in transaction, neither last frame overall nor last
466
+
/// frame in a read operation.
467
+
FirstAndNextFrame,
468
+
/// `[ACK]` Middle frame in a read operation (neither first nor last).
469
+
NextFrame,
470
+
/// `[NACK]+[SP]` Last frame overall in this transaction but not the first frame.
471
+
LastFrame,
472
+
/// `[NACK]` Last frame in a read operation but not last frame overall in this transaction.
473
+
LastFrameNoStop,
471
474
}
472
475
473
476
#[allow(dead_code)]
474
-
implOperationFraming{
477
+
implFrameOptions{
475
478
/// Returns true if a start or repeated start condition should be generated before this operation.
0 commit comments