Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aeec023d authored by Henri Chataing's avatar Henri Chataing Committed by Automerger Merge Worker
Browse files

Merge "pdl: Update endianness documentation" am: 5e4b7cca

parents 695f501b 5e4b7cca
Loading
Loading
Loading
Loading
+20 −9
Original line number Diff line number Diff line
@@ -67,26 +67,37 @@ packet Coffee {
  d: 5,
}

// The first two field are laid out as a single
// integer of 16-bits
//     MSB                                   LSB
//     16                  8                 0
//     +---------------------------------------+
//     | b14 ..                        .. b0 |a|
//     +---------------------------------------+
//
// The file endianness is applied to this integer
// to obtain the byte layout of the packet fields.
//
// Little endian layout
//     LSB                                   MSB
//     0    1    2    3    4    5    6    7
//     MSB                                   LSB
//     7    6    5    4    3    2    1    0
//     +---------------------------------------+
//  0  | a  |             b[6:0]               |
//  0  |            b[6:0]                | a  |
//     +---------------------------------------+
//  1  |               b[14:7]                 |
//     +---------------------------------------+
//  2  |       c      |             d          |
//  2  |          d             |       c      |
//     +---------------------------------------+

//
// Big endian layout
//     LSB                                   MSB
//     0    1    2    3    4    5    6    7
//     MSB                                   LSB
//     7    6    5    4    3    2    1    0
//     +---------------------------------------+
//  0  |               b[14:7]                 |
//     +---------------------------------------+
//  1  | a  |             b[6:0]               |
//  1  |            b[6:0]                | a  |
//     +---------------------------------------+
//  2  |       c      |             d          |
//  2  |          d             |       c      |
//     +---------------------------------------+
```