Documentation for “Zerocat Chipflasher” as of Fri, 30 Sep 2022 18:26:54 +0200
Repository: git://zerocat.org/zerocat/projects/chipflasher
Version: v0.6.9-1497-91b1f109
Branch: flashrom-interface

../../firmware2/src/FullDuplexSerial.spin.txt.html

Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2016 Parallax Inc. DBA Parallax Semiconductor.
Version 1.00.78
Compiling...
../../firmware2/src/FullDuplexSerial.spin
Done.
Program size is 736 bytes
TYPE: 53   VALUE: 00000401 (00000004)   NAME: START
TYPE: 53   VALUE: 00000002 (00000004)   NAME: STOP
TYPE: 53   VALUE: 00000003 (00000004)   NAME: RXFLUSH
TYPE: 53   VALUE: 00000004 (00000004)   NAME: RXCHECK
TYPE: 53   VALUE: 00000105 (00000004)   NAME: RXTIME
TYPE: 53   VALUE: 00000006 (00000004)   NAME: RX
TYPE: 53   VALUE: 00000107 (00000004)   NAME: TX
TYPE: 53   VALUE: 00000108 (00000004)   NAME: STR
TYPE: 53   VALUE: 00000109 (00000004)   NAME: WBUF
TYPE: 53   VALUE: 0000010A (00000004)   NAME: DEC
TYPE: 53   VALUE: 0000020B (00000004)   NAME: HEX
TYPE: 53   VALUE: 0000020C (00000004)   NAME: BIN
TYPE: 47   VALUE: 00000000 (00000000)   NAME: RX_HEAD
TYPE: 47   VALUE: 00000004 (00000000)   NAME: RX_TAIL
TYPE: 47   VALUE: 00000008 (00000000)   NAME: TX_HEAD
TYPE: 47   VALUE: 0000000C (00000000)   NAME: TX_TAIL
TYPE: 47   VALUE: 00000010 (00000000)   NAME: RX_PIN
TYPE: 47   VALUE: 00000014 (00000000)   NAME: TX_PIN
TYPE: 47   VALUE: 00000018 (00000000)   NAME: RXTX_MODE
TYPE: 47   VALUE: 0000001C (00000000)   NAME: BIT_TICKS
TYPE: 47   VALUE: 00000020 (00000000)   NAME: BUFFER_PTR
TYPE: 45   VALUE: 00000000 (00000000)   NAME: RX_BUFFER
TYPE: 45   VALUE: 00000010 (00000000)   NAME: TX_BUFFER
TYPE: 45   VALUE: 00000020 (00000000)   NAME: COG
TYPE: 4A   VALUE: 00000034 (00000000)   NAME: ENTRY
TYPE: 4A   VALUE: 0000008C (00000058)   NAME: RECEIVE
TYPE: 4A   VALUE: 000000AC (00000078)   NAME: BIT^C^A^A^A
TYPE: 4A   VALUE: 000000B0 (0000007c)   NAME: WAIT^C^A^A^A
TYPE: 4A   VALUE: 00000100 (000000cc)   NAME: TRANSMIT
TYPE: 4A   VALUE: 0000014C (00000118)   NAME: BIT^D^A^A^A
TYPE: 4A   VALUE: 00000168 (00000134)   NAME: WAIT^D^A^A^A
TYPE: 4B   VALUE: 00000184 (00000150)   NAME: T1
TYPE: 4B   VALUE: 00000184 (00000154)   NAME: T2
TYPE: 4B   VALUE: 00000184 (00000158)   NAME: T3
TYPE: 4B   VALUE: 00000184 (0000015c)   NAME: RXTXMODE
TYPE: 4B   VALUE: 00000184 (00000160)   NAME: BITTICKS
TYPE: 4B   VALUE: 00000184 (00000164)   NAME: RXMASK
TYPE: 4B   VALUE: 00000184 (00000168)   NAME: RXBUFF
TYPE: 4B   VALUE: 00000184 (0000016c)   NAME: RXDATA
TYPE: 4B   VALUE: 00000184 (00000170)   NAME: RXBITS
TYPE: 4B   VALUE: 00000184 (00000174)   NAME: RXCNT
TYPE: 4B   VALUE: 00000184 (00000178)   NAME: RXCODE
TYPE: 4B   VALUE: 00000184 (0000017c)   NAME: TXMASK
TYPE: 4B   VALUE: 00000184 (00000180)   NAME: TXBUFF
TYPE: 4B   VALUE: 00000184 (00000184)   NAME: TXDATA
TYPE: 4B   VALUE: 00000184 (00000188)   NAME: TXBITS
TYPE: 4B   VALUE: 00000184 (0000018c)   NAME: TXCNT
TYPE: 4B   VALUE: 00000184 (00000190)   NAME: TXCODE
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: RXPIN
TYPE: 4E   VALUE: 00000008 (00000000)   NAME: TXPIN
TYPE: 4E   VALUE: 0000000C (00000000)   NAME: MODE
TYPE: 4E   VALUE: 00000010 (00000000)   NAME: BAUDRATE
TYPE: 4E   VALUE: 00000000 (00000000)   NAME: OKAY
TYPE: 4E   VALUE: 00000000 (00000000)   NAME: RXBYTE
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: MS
TYPE: 4E   VALUE: 00000000 (00000000)   NAME: RXBYTE
TYPE: 4E   VALUE: 00000008 (00000000)   NAME: T
TYPE: 4E   VALUE: 00000000 (00000000)   NAME: RXBYTE
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: TXBYTE
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: STRINGPTR
TYPE: 4E   VALUE: 00000000 (00000000)   NAME: STRLENGTH
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: BUFPTR
TYPE: 4E   VALUE: 00000000 (00000000)   NAME: N
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: VALUE
TYPE: 4E   VALUE: 00000008 (00000000)   NAME: I
TYPE: 4E   VALUE: 0000000C (00000000)   NAME: X
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: VALUE
TYPE: 4E   VALUE: 00000008 (00000000)   NAME: DIGITS
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: VALUE
TYPE: 4E   VALUE: 00000008 (00000000)   NAME: DIGITS

Distilled longs: 0

OBJ bytes: 786

_CLKMODE: 00
_CLKFREQ: 00B71B00

0000- 48 00 D0 02 D0 02 0D 00 84 01 00 00 AA 01 00 00   H...............
0010- BE 01 00 00 C8 01 00 00 DB 01 04 00 F8 01 00 00   ................
0020- 04 02 00 00 25 02 00 00 34 02 00 00 44 02 08 00   ....%...4...D...
0030- 90 02 00 00 B8 02 00 00 F0 A9 BC A0 10 A8 FC 80   ................
0040- 54 AA BC 08 01 B2 FC A0 55 B2 BC 2C 04 A8 FC 80   T.......U..,....
0050- 54 AA BC 08 01 BE FC A0 55 BE BC 2C 04 A8 FC 80   T.......U..,....
0060- 54 AE BC 08 04 A8 FC 80 54 B0 BC 08 04 A8 FC 80   T.......T.......
0070- 54 B4 BC 08 5A C0 BC A0 10 C0 FC 80 04 AE 7C 62   T...Z.........|b
0080- 02 AE 7C 61 5F E8 9B 68 5F EC AB 68 33 C8 FC A0   ..|a_..h_..h3...
0090- 64 BC BC 5C 01 AE 7C 62 F2 B3 3C 61 16 00 64 5C   d..\..|b..<a..d\
00A0- 09 B8 FC A0 58 BA BC A0 01 BA FC 28 F1 BB BC 80   ....X......(....
00B0- 58 BA BC 80 64 BC BC 5C 5D A8 BC A0 F1 A9 BC 84   X...d..\].......
00C0- 00 A8 7C C1 1F 00 4C 5C F2 B3 3C 61 01 B6 FC 30   ..|...L\..<a...0
00D0- 1E B8 FC E4 17 B6 FC 28 FF B6 FC 60 01 AE 7C 62   .......(...`..|b
00E0- FF B6 D4 6C F0 AB BC 08 5A AA BC 80 55 B6 3C 00   ...l....Z...U.<.
00F0- 5A AA BC 84 01 AA FC 80 0F AA FC 60 F0 AB 3C 08   Z..........`..<.
0100- 16 00 7C 5C 5E C8 BC 5C F0 A9 BC A0 08 A8 FC 80   ..|\^..\........
0110- 54 AA BC 08 04 A8 FC 80 54 AC BC 08 56 AA 3C 86   T.......T...V.<.
0120- 33 00 68 5C 60 AC BC 80 56 C2 BC 00 60 AC BC 84   3.h\`...V...`...
0130- 01 AC FC 80 0F AC FC 60 54 AC 3C 08 00 C3 FC 68   .......`T.<....h
0140- 02 C2 FC 2C 01 C2 FC 68 0B C4 FC A0 F1 C7 BC A0   ...,...h........
0150- 04 AE 7C 62 02 AE 7C 61 01 C2 E0 6C 01 C2 FC 29   ..|b..|a...l...)
0160- 5F E8 AB 70 5F EC 97 74 58 C6 BC 80 5E C8 BC 5C   _..p_..tX...^..\
0170- 63 A8 BC A0 F1 A9 BC 84 00 A8 7C C1 4D 00 4C 5C   c.........|.M.L\
0180- 46 C4 FC E4 33 00 7C 5C 01 05 02 43 35 37 01 1A   F...3.|\...C57..
0190- 53 67 37 21 1E 35 C0 70 F6 5D 8B 24 C9 20 34 C7   Sg7!.5.p.].$. 4.
01A0- 34 43 28 36 EC 8B 44 35 92 80 35 FA 61 32 8B 44   4C(6..D5..5.a2.D
01B0- 35 90 0A 08 8B 44 35 92 98 36 ED 21 43 35 38 09   5....D5..6.!C58.
01C0- 1A 32 00 05 04 35 FE 0A 02 04 77 32 62 3E 44 40   .2...5....w2b>D@
01D0- FB 0A 0B 44 98 24 61 44 36 EC 37 23 E8 45 32 3F   ...D.$aD6.7#.E2?
01E0- 91 69 00 05 04 62 80 35 FE 3F 91 68 ED 35 C0 39   .i...b.5.?.h.5.9
01F0- 03 E8 F6 F6 64 FA F2 0B 02 04 67 32 00 05 04 62   ....d.....g2...b
0200- 80 35 F9 0A 02 04 75 32 4C 48 36 EC 37 23 E8 FB   .5....u2LH6.7#..
0210- 0B 02 04 74 64 48 99 34 48 36 EC 37 23 E8 49 58   ...tdH.4H6.7#.IX
0220- 37 02 E8 0A 03 01 05 06 32 64 16 61 60 08 08 01   7.......2d.a`...
0230- 66 AE 80 05 07 09 78 32 66 AE A0 61 60 08 08 01   f.....x2f..a`...
0240- 66 A6 80 05 07 09 78 32 64 37 1E FC 6D 64 35 F9   f.....x2d7..md5.
0250- 0A 0A 64 6C EC E9 65 01 38 2D 05 07 3B 3B 9A CA   ..dl..e.8-..;;..
0260- 00 69 38 0A 08 2D 64 68 FE 0A 16 01 64 68 F6 38   .i8..-dh....dh.8
0270- 30 EC 6C 68 36 FC F4 EC 05 07 68 66 57 62 1C 04   0.lh6.....hfWb..
0280- 0C 60 68 36 FC F2 0A 05 01 38 30 05 07 38 0A 6A   .`h6.....80..8.j
0290- 56 09 53 32 37 02 68 ED 37 00 E3 66 43 68 08 1B   V.S27.h.7..fCh..
02A0- 01 35 39 02 B3 37 01 66 C1 37 23 E8 38 30 38 39   .59..7.f.7#.8089
02B0- 12 38 41 38 46 12 0F 05 07 09 65 32 37 04 68 ED   .8A8F.....e27.h.
02C0- 66 43 68 08 0D 01 36 66 C1 36 E8 38 30 EC 05 07   fCh...6f.6.80...
02D0- 09 73 32 00 C3 53 54 41 52 54 04 53 54 4F 50 00   .s2..START.STOP.
02E0- 52 58 46 4C 55 53 48 00 52 58 43 48 45 43 4B 00   RXFLUSH.RXCHECK.
02F0- 52 58 54 49 4D 45 01 52 58 00 54 58 01 53 54 52   RXTIME.RX.TX.STR
0300- 01 57 42 55 46 01 44 45 43 01 48 45 58 02 42 49   .WBUF.DEC.HEX.BI
0310- 4E 02                                             N.
********************************************
*  Full-Duplex Serial Driver v1.2          *
*  Author: Chip Gracey, Jeff Martin        *
*  Copyright (c) 2006-2009 Parallax, Inc.  *
*  See end of file for terms of use.       *
********************************************


Changes, introduced for Zerocat Chipflasher:

* Fix memory access to cog flag, remove initialized data.
* New: PUB wbuf(bufptr) : n
* PUB str(stringptr) -> PUB str(stringptr) : strlength


Object "../../firmware2/src/FullDuplexSerial" Interface:

PUB  start(rxpin, txpin, mode, baudrate) : 
PUB  stop
PUB  rxflush
PUB  rxcheck : 
PUB  rxtime(ms) : 
PUB  rx : 
PUB  tx(txbyte)
PUB  str(stringptr) : 
PUB  wbuf(bufptr) : 
PUB  dec(value)
PUB  hex(value, digits)
PUB  bin(value, digits)

Program:  180 Longs
Variable: 18 Longs

___________________________________________
PUB  start(rxpin, txpin, mode, baudrate) : 

 Start serial driver - starts a cog
 returns false if no cog available

 mode bit 0 = invert rx
 mode bit 1 = invert tx
 mode bit 2 = open-drain/source tx
 mode bit 3 = ignore tx echo on rx

_________
PUB  stop

 Stop serial driver - frees a cog

____________
PUB  rxflush

 Flush receive buffer

_______________
PUB  rxcheck : 

 Check if byte received (never waits)
 returns -1 if no byte received, $00..$FF if byte

__________________
PUB  rxtime(ms) : 

 Wait ms milliseconds for a byte to be received
 returns -1 if no byte received, $00..$FF if byte

__________
PUB  rx : 

 Receive byte (may wait for byte)
 returns $00..$FF

_______________
PUB  tx(txbyte)

 Send byte (may wait for room in buffer)

______________________
PUB  str(stringptr) : 

 Send string

____________________
PUB  wbuf(bufptr) : 

 Send buffer content, first two bytes (word) specifies length of data queue

_______________
PUB  dec(value)

 Print a decimal number

_______________________
PUB  hex(value, digits)

 Print a hexadecimal number

_______________________
PUB  bin(value, digits)

 Print a binary number

******************************************************************************
                        TERMS OF USE: MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

******************************************************************************