tweaked formatting
[wikirepo] / projects / anytone778uv_serial / index.mdwn
index 24dc811..994f5cd 100644 (file)
@@ -293,109 +293,111 @@ Message format, and a typical message from the host asking to read the first 16
 \r
 ## Memory Format\r
 \r
-+------+---+--------------+----------------------------+\r
-| 0x00 | 4 | frequency    | big endian bcd             |\r
-|      |   |              | frequency 10s of Hz        |\r
-+------+---+--------------+----------------------------+\r
-| 0x04 | 4 | offset       | big endian bcd             |\r
-|      |   |              | frequency 10s of Hz        |\r
-+------+---+--------------+----------------------------+\r
-| 0x08 | 1 | unknown1     | default 00                 |\r
-+------+---+--------------+----------------------------+\r
-| 0x09 | 1 |              | OR of tx power and split   |\r
-|      |   | tx power     | tx power high : 00001000   |\r
-|      |   |              | tx power med  : 00000100   |\r
-|      |   | and          | tx power low  : 00000000   |\r
-|      |   |              |                            |\r
-|      |   | split        | split +ve : 00000001       |\r
-|      |   |              | split -ve : 00000010       |\r
-|      |   | flags1       | no split : 00000000        |\r
-|      |   |              |                            |\r
-|      |   |              | talk around: 0x80          |\r
-|      |   |              | scramble : 0x40            |\r
-+------+---+--------------+----------------------------+\r
-| 0x0a | 1 | chan spacing | bit:                       |\r
-|      |   |              |   7 -                      |\r
-|      |   | and          |   6                        |\r
-|      |   |              |   5                        |\r
-|      |   | params       |   4                        |\r
-|      |   |              |   3 - channel width 3,2    |\r
-|      |   | flags 2      |   2 - 10=25kHz,01=20kHz,   |\r
-|      |   |              |       00=12.5kHz           | \r
-|      |   |              |   1 - reverse              |\r
-|      |   |              |   0 - tx off               |\r
-+------+---+--------------+----------------------------+\r
-| 0x0b | 1 | ctcss enable | bit:                       |\r
-|      |   |              |   3 - dcs dec enable       |\r
-|      |   |              |   2 - ctcss dec enable     |\r
-|      |   | flags3       |   1 - dcs enc enable       |\r
-|      |   |              |   0 - ctcss enc enable     |\r
-+------+---+--------------+----------------------------+\r
-| 0x0c | 1 |ctcss dec tone| ctcss enumeration          |\r
-+------+---+--------------+----------------------------+\r
-| 0x0d | 1 |ctcss enc tone| ctcss enumeration          |\r
-+------+---+--------------+----------------------------+\r
-| 0x0e | 1 | dcs dec code | =int(tone, 8) bits 7:0     |\r
-+------+---+--------------+----------------------------+\r
-| 0x0f | 1 | unknown3     | default 0x00               |\r
-|      |   |              |   1 - DCS dec invert en    |\r
-|      |   |              |   0 - DCS dec code bit 8   |\r
-+------+---+--------------+----------------------------+\r
-| 0x10 | 1 | dcs enc code | =int(tone, 8) bits 7:0     |\r
-+------+---+--------------+----------------------------+\r
-| 0x11 | 1 | unknown5     | default 0x00               |\r
-|      |   |              |   1 - DCS enc invert en    |\r
-|      |   |              |   0 - DCS enc code bit 8   |\r
-+------+---+--------------+----------------------------+\r
-| 0x12 | 1 | params       | bit                        |\r
-|      |   |              | 1,0 - busy chn lockout     |\r
-|      |   |              |       10 = 'busy'          |\r
-|      |   | flags4       |       01 = 'repeater'      |\r
-|      |   |              |       00 = 'off'           |\r
-+------+---+--------------+----------------------------+\r
-| 0x13 | 1 | unknown6     | default 0x00               |\r
-+------+---+--------------+----------------------------+\r
-| 0x14 | 1 | params       | bit                        |\r
-|      |   | flags5       |   0 - ctcss squelch enable |\r
-+------+---+--------------+----------------------------+\r
-| 0x15 | 1 | unknown7     | default 0x00               |\r
-+------+---+--------------+----------------------------+\r
-| 0x16 | 1 | unknown8     | default 0x00               |\r
-+------+---+--------------+----------------------------+\r
-| 0x17 | 1 | unknown9     | default 0x00               |\r
-+------+---+--------------+----------------------------+\r
-| 0x18 | 1 | unknown10    | default 0x00               |\r
-+------+---+--------------+----------------------------+\r
-| 0x19 | 5 | name string  |                            |\r
-+------+---+--------------+----------------------------+\r
-| 0x1e | 1 | custom ctcss | custom ctcss value as      |\r
-|      |   | low byte     |  Hz * 10, litte endian     |\r
-+------+---+--------------+ e.g. 0xae08 = 222.2Hz      |\r
-| 0x1f | 1 | custom ctcss | see 'define' value in      |\r
-|      |   | high byte    | ctcss enumeration          |\r
-|      |   |              |                            |\r
-+------+---+--------------+----------------------------+\r
+       +------+---+--------------+----------------------------+\r
+       | 0x00 | 4 | frequency    | big endian bcd             |\r
+       |      |   |              | frequency 10s of Hz        |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x04 | 4 | offset       | big endian bcd             |\r
+       |      |   |              | frequency 10s of Hz        |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x08 | 1 | unknown1     | default 00                 |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x09 | 1 |              | OR of tx power and split   |\r
+       |      |   | tx power     | tx power high : 00001000   |\r
+       |      |   |              | tx power med  : 00000100   |\r
+       |      |   | and          | tx power low  : 00000000   |\r
+       |      |   |              |                            |\r
+       |      |   | split        | split +ve : 00000001       |\r
+       |      |   |              | split -ve : 00000010       |\r
+       |      |   | flags1       | no split : 00000000        |\r
+       |      |   |              |                            |\r
+       |      |   |              | talk around: 0x80          |\r
+       |      |   |              | scramble : 0x40            |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x0a | 1 | chan spacing | bit:                       |\r
+       |      |   |              |   7 -                      |\r
+       |      |   | and          |   6                        |\r
+       |      |   |              |   5                        |\r
+       |      |   | params       |   4                        |\r
+       |      |   |              |   3 - channel width 3,2    |\r
+       |      |   | flags 2      |   2 - 10=25kHz,01=20kHz,   |\r
+       |      |   |              |       00=12.5kHz           | \r
+       |      |   |              |   1 - reverse              |\r
+       |      |   |              |   0 - tx off               |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x0b | 1 | ctcss enable | bit:                       |\r
+       |      |   |              |   3 - dcs dec enable       |\r
+       |      |   |              |   2 - ctcss dec enable     |\r
+       |      |   | flags3       |   1 - dcs enc enable       |\r
+       |      |   |              |   0 - ctcss enc enable     |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x0c | 1 |ctcss dec tone| ctcss enumeration          |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x0d | 1 |ctcss enc tone| ctcss enumeration          |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x0e | 1 | dcs dec code | =int(tone, 8) bits 7:0     |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x0f | 1 | unknown3     | default 0x00               |\r
+       |      |   |              |   1 - DCS dec invert en    |\r
+       |      |   |              |   0 - DCS dec code bit 8   |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x10 | 1 | dcs enc code | =int(tone, 8) bits 7:0     |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x11 | 1 | unknown5     | default 0x00               |\r
+       |      |   |              |   1 - DCS enc invert en    |\r
+       |      |   |              |   0 - DCS enc code bit 8   |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x12 | 1 | params       | bit                        |\r
+       |      |   |              | 1,0 - busy chn lockout     |\r
+       |      |   |              |       10 = 'busy'          |\r
+       |      |   | flags4       |       01 = 'repeater'      |\r
+       |      |   |              |       00 = 'off'           |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x13 | 1 | unknown6     | default 0x00               |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x14 | 1 | params       | bit                        |\r
+       |      |   | flags5       |   0 - ctcss squelch enable |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x15 | 1 | unknown7     | default 0x00               |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x16 | 1 | unknown8     | default 0x00               |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x17 | 1 | unknown9     | default 0x00               |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x18 | 1 | unknown10    | default 0x00               |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x19 | 5 | name string  |                            |\r
+       +------+---+--------------+----------------------------+\r
+       | 0x1e | 1 | custom ctcss | custom ctcss value as      |\r
+       |      |   | low byte     |  Hz * 10, litte endian     |\r
+       +------+---+--------------+ e.g. 0xae08 = 222.2Hz      |\r
+       | 0x1f | 1 | custom ctcss | see 'define' value in      |\r
+       |      |   | high byte    | ctcss enumeration          |\r
+       |      |   |              |                            |\r
+       +------+---+--------------+----------------------------+\r
 \r
 ## ctcss enumeration:\r
-+------+-----------++------+------------++------+-----------++------+------------+\r
-| Val  | Tone [Hz] || Val  | Tone [Hz]  || Val  | Tone [Hz] || Val  | Tone [Hz]  |\r
-+------+-----------++------+------------++------+-----------++------+------------+\r
-| 0x00 | 62.5      || 0x0d | 100.0      || 0x1a | 156.7     || 0x27 | 196.6      |\r
-| 0x01 | 67.0      || 0x0e | 103.5      || 0x1b | 159.8     || 0x28 | 199.5      |\r
-| 0x02 | 69.3      || 0x0f | 107.2      || 0x1c | 162.2     || 0x29 | 203.5      |\r
-| 0x03 | 71.9      || 0x10 | 110.9      || 0x1d | 165.5     || 0x2a | 206.5      |\r
-| 0x04 | 74.4      || 0x11 | 114.8      || 0x1e | 167.9     || 0x2b | 210.7      |\r
-| 0x05 | 77.0      || 0x12 | 118.8      || 0x1f | 171.3     || 0x2c | 218.1      |\r
-| 0x06 | 79.7      || 0x13 | 123.0      || 0x20 | 173.8     || 0x2d | 225.7      |\r
-| 0x07 | 82.5      || 0x14 | 127.3      || 0x21 | 177.3     || 0x2e | 229.1      |\r
-| 0x08 | 85.4      || 0x15 | 131.8      || 0x22 | 179.9     || 0x2f | 233.6      |\r
-| 0x09 | 88.5      || 0x16 | 136.5      || 0x23 | 183.5     || 0x30 | 241.8      |\r
-| 0x0a | 91.5      || 0x17 | 141.3      || 0x24 | 186.2     || 0x31 | 250.3      |\r
-| 0x0b | 94.8      || 0x18 | 146.2      || 0x25 | 189.9     || 0x32 | 254.1      |\r
-| 0x0c | 97.4      || 0x19 | 151.4      || 0x26 | 192.8     || 0x33 | define     |\r
-+------+-----------++------+------------++------+-----------++------+------------+\r
+\r
+       +------+-----------++------+------------++------+-----------++------+------------+\r
+       | Val  | Tone [Hz] || Val  | Tone [Hz]  || Val  | Tone [Hz] || Val  | Tone [Hz]  |\r
+       +------+-----------++------+------------++------+-----------++------+------------+\r
+       | 0x00 | 62.5      || 0x0d | 100.0      || 0x1a | 156.7     || 0x27 | 196.6      |\r
+       | 0x01 | 67.0      || 0x0e | 103.5      || 0x1b | 159.8     || 0x28 | 199.5      |\r
+       | 0x02 | 69.3      || 0x0f | 107.2      || 0x1c | 162.2     || 0x29 | 203.5      |\r
+       | 0x03 | 71.9      || 0x10 | 110.9      || 0x1d | 165.5     || 0x2a | 206.5      |\r
+       | 0x04 | 74.4      || 0x11 | 114.8      || 0x1e | 167.9     || 0x2b | 210.7      |\r
+       | 0x05 | 77.0      || 0x12 | 118.8      || 0x1f | 171.3     || 0x2c | 218.1      |\r
+       | 0x06 | 79.7      || 0x13 | 123.0      || 0x20 | 173.8     || 0x2d | 225.7      |\r
+       | 0x07 | 82.5      || 0x14 | 127.3      || 0x21 | 177.3     || 0x2e | 229.1      |\r
+       | 0x08 | 85.4      || 0x15 | 131.8      || 0x22 | 179.9     || 0x2f | 233.6      |\r
+       | 0x09 | 88.5      || 0x16 | 136.5      || 0x23 | 183.5     || 0x30 | 241.8      |\r
+       | 0x0a | 91.5      || 0x17 | 141.3      || 0x24 | 186.2     || 0x31 | 250.3      |\r
+       | 0x0b | 94.8      || 0x18 | 146.2      || 0x25 | 189.9     || 0x32 | 254.1      |\r
+       | 0x0c | 97.4      || 0x19 | 151.4      || 0x26 | 192.8     || 0x33 | define     |\r
+       +------+-----------++------+------------++------+-----------++------+------------+\r
 \r
 ## Checksum\r
+\r
 ```python\r
 def checksum(message_bytes):\r
        mask = 0xFF\r
@@ -404,4 +406,6 @@ def checksum(message_bytes):
                checksum = (checksum + b) & mask\r
        return checksum\r
 ```\r
+\r
+\r
 vim: set ft=markdown :\r