Skip to content

Commit

Permalink
Fix tables in drivers section of documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
n1000 committed May 21, 2017
1 parent 69c7c4c commit a405c84
Showing 1 changed file with 67 additions and 166 deletions.
233 changes: 67 additions & 166 deletions docs/drivers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,85 +24,38 @@ SPI Transmit Frame

Allocate a 1528-byte buffer to accommodate the largest outgoing serial packet and pad with ``NUL`` bytes. Write ``SOF``, compute and write ``FL``, copy the outgoing frame then write ``EOF``. Serially transmit ``FL`` + ``12`` buffer bytes to the QCA7000.

Offset

Length

Symbol

Description

0x0000

4

SOF

Start Of Frame. Must be ``0xAAAAAAAA``.

0x0004

2

FL

The Ethernet frame length in little endian format. The frame starts at offset ``0x0008`` here and includes all fields up to but excluding ``EOF``. The minimum is ``60``. The maximum is ``1518`` if ``VLAN`` is omitted and ``1522`` if not.

0x0006

2

RSVD

Must be ``0x0000``. Reserved to ensure 4-byte frame alignment.

0x0008

6

DA

Destination address.

0x000E

6

SA

Source address. This must not be the MAC address of the powerline device. This must be the MAC address of the local host serial interface as assigned by the SP or UART driver. The PLC device and the associated host interface must have different MAC address.

0x0014

4

VLAN

Virtual LAN tag. This field may be omitted.

0x0018

2

ET

Ethertype. This field starts at offset ``0x0014`` if ``VLAN`` is omitted.

0x001A

42 to 1500

BODY

Frame body. This field starts at offset ``0x0016`` and ranges from ``46`` to ``1500`` bytes if ``VLAN`` is omitted.

0x004A to 0x05F8

4

EOF

End Of Frame. Must be ``0x5555``. This field starts at offset ``0x0008`` plus ``FL``.
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| Offset | Length | Symbol | Description |
+=======================+=============+=============+========================================================================+
| 0x0000 | 4 | SOF | Start Of Frame. Must be ``0xAAAAAAAA``. |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| 0x0004 | 2 | FL | The Ethernet frame length in little endian format. The frame starts |
| | | | at offset ``0x0008`` here and includes all fields up to but excluding |
| | | | ``EOF``. The minimum is ``60``. The maximum is ``1518`` if ``VLAN`` |
| | | | is omitted and ``1522`` if not. |
| | | | |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| 0x0006 | 2 | RSVD | Must be ``0x0000``. Reserved to ensure 4-byte frame alignment. |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| 0x0008 | 6 | DA | Destination Address |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| 0x000E | 6 | SA | Source Address. This must not be the MAC address of the powerline |
| | | | device. This must be the MAC address of the local host serial |
| | | | interface as assigned by the SPI or UART driver. The PLC device |
| | | | and the associated host interface must have different MAC addresses. |
| | | | |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| 0x0014 | 4 | VLAN | Virtual LAN tag. This field may be omitted. |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| 0x0018 | 2 | ET | Ethertype. This field starts at offset ``0x0014`` if ``VLAN`` is |
| | | | omitted. |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| 0x001A | 42 to 1500 | BODY | Frame body. This field starts at offset ``0x0016`` and ranges from |
| | | | ``46`` to ``1500`` bytes if ``VLAN`` is omitted. |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| 0x004A to 0x005F8 | 4 | EOF | End Of Frame. Must be ``0x5555``. This field starts at offset |
| | | | ``0x0008`` plus ``FL``. |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+

SPI Receive Frame
-----------------
Expand All @@ -111,93 +64,41 @@ The SPI read frame occurs in response to a read interrupt generated by the QCA70

Allocate a 1532-byte buffer to accomodate the largest incoming serial packet. Read ``LEN`` to determine the size of the incoming serial packet. Read ``LEN`` bytes into the buffer. Beware that ``LEN`` is a multiple of 4-bytes so there may be a few trailing ``NUL`` bytes in buffer.

Offset

Length

Symbol

Description

0x0000

4

LEN

Hardware generated packet length. This field is only generated for SPI packets, not the UART packets.

0x0004

4

SOF

Start Of Frame. Must be ``0xAAAAAAAA``.

0x0008

2

FL

Ethernet frame length in little endian format. The frame starts at offset ``0x000C`` here and includes all fields up to but excluding ``EOF``. The minimum length is ``60``. The maximum is ``1518`` if ``VLAN`` is omitted and ``1522`` if not.

0x000A

2

RSVD

Must be ``0x0000``. Reserved to ensure 4-byte frame alignment.

0x000C

6

DA

Destination address.

0x0012

6

SA

Source address. This must not be the MAC address of the powerline device. This must be the MAC address of the local host serial interface as assigned by the SP or UART driver. The PLC device and the associated host interface must have different MAC address.

0x0018

4

VLAN

Virtual LAN tag. This field may be omitted.

0x001C

2

ET

Ethertype. This field starts offset ``0x0018`` if ``VLAN`` is omitted.

0x001E

42 to 1500

BODY

Frame body. This field starts at offset ``0x001A`` and ranges from ``46`` to ``1500`` bytes if ``VLAN`` is omitted.

0x004A to 0x05F8

4

EOF

End Of Frame. Must be ``0x5555``. This field starts at offset ``0x000C`` plus ``FL``.
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| Offset | Length | Symbol | Description |
+=======================+=============+=============+========================================================================+
| 0x0000 | 4 | LEN | Hardware generated packet length. This field is only generated for |
| | | | SPI packets, not the UART packets. |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| 0x0004 | 4 | SOF | Start Of Frame. Must be ``0xAAAAAAAA``. |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| 0x0008 | 2 | FL | The Ethernet frame length in little endian format. The frame starts |
| | | | at offset ``0x000C`` here and includes all fields up to but excluding |
| | | | ``EOF``. The minimum is ``60``. The maximum is ``1518`` if ``VLAN`` |
| | | | is omitted and ``1522`` if not. |
| | | | |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| 0x000A | 2 | RSVD | Must be ``0x0000``. Reserved to ensure 4-byte frame alignment. |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| 0x000C | 6 | DA | Destination Address |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| 0x0012 | 6 | SA | Source Address. This must not be the MAC address of the powerline |
| | | | device. This must be the MAC address of the local host serial |
| | | | interface as assigned by the SPI or UART driver. The PLC device |
| | | | and the associated host interface must have different MAC addresses. |
| | | | |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| 0x0018 | 4 | VLAN | Virtual LAN tag. This field may be omitted. |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| 0x001C | 2 | ET | Ethertype. This field starts at offset ``0x0018`` if ``VLAN`` is |
| | | | omitted. |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| 0x001E | 42 to 1500 | BODY | Frame body. This field starts at offset ``0x001A`` and ranges from |
| | | | ``46`` to ``1500`` bytes if ``VLAN`` is omitted. |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+
| 0x004A to 0x005F8 | 4 | EOF | End Of Frame. Must be ``0x5555``. This field starts at offset |
| | | | ``0x000C`` plus ``FL``. |
+-----------------------+-------------+-------------+------------------------------------------------------------------------+

.. _qcaspi1:

Expand Down

0 comments on commit a405c84

Please sign in to comment.