Documentation for “Zerocat Chipflasher” as of Sat, 18 Jun 2022 21:45:44 +0200
Repository: git://zerocat.org/zerocat/projects/chipflasher
Version: v0.6.9
Branch: master

../../firmware2/src/ledstat.spin.txt.html

Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2016 Parallax Inc. DBA Parallax Semiconductor.
Version 1.00.78
Compiling...
../../firmware2/src/ledstat.spin
|-pins.spin
|-time.spin
Done.
Program size is 584 bytes
TYPE: 43   VALUE: FFFFFFFF (00000000)   NAME: P_ON
TYPE: 43   VALUE: 00000000 (00000000)   NAME: P_OFF
TYPE: 43   VALUE: 00000001 (00000000)   NAME: P_1
TYPE: 43   VALUE: 00000002 (00000000)   NAME: P_2
TYPE: 43   VALUE: 00000003 (00000000)   NAME: P_3
TYPE: 43   VALUE: 00000004 (00000000)   NAME: P_4
TYPE: 43   VALUE: 00000005 (00000000)   NAME: P_5
TYPE: 43   VALUE: 00000006 (00000000)   NAME: P_MAX
TYPE: 43   VALUE: 000F4240 (00000000)   NAME: CYCLE_TIME
TYPE: 43   VALUE: 000003E8 (00000000)   NAME: LOOP_TIME
TYPE: 43   VALUE: 00000053 (00000000)   NAME: PHASE_INIT
TYPE: 43   VALUE: 000003E4 (00000000)   NAME: CYCLE_INIT
TYPE: 43   VALUE: 00000000 (00000000)   NAME: TSTAMPERROR
TYPE: 53   VALUE: 00000001 (00000004)   NAME: START
TYPE: 53   VALUE: 00000002 (00000004)   NAME: STOP
TYPE: 53   VALUE: 00000103 (00000004)   NAME: CHECK
TYPE: 53   VALUE: 00000104 (00000004)   NAME: SET_D1
TYPE: 53   VALUE: 00000105 (00000004)   NAME: SET_D2
TYPE: 53   VALUE: 00000106 (00000004)   NAME: SET_D3
TYPE: 53   VALUE: 00000007 (00000004)   NAME: SET
TYPE: 53   VALUE: 00000008 (00000004)   NAME: CLR
TYPE: 53   VALUE: 00000009 (00000004)   NAME: GET_D1
TYPE: 53   VALUE: 0000000A (00000004)   NAME: GET_D2
TYPE: 53   VALUE: 0000000B (00000004)   NAME: GET_D3
TYPE: 53   VALUE: 0000000C (00000005)   NAME: LEDINIT
TYPE: 53   VALUE: 0000010D (00000005)   NAME: SETPIN_D1
TYPE: 53   VALUE: 0000010E (00000005)   NAME: SETPIN_D2
TYPE: 53   VALUE: 0000010F (00000005)   NAME: SETPIN_D3
TYPE: 53   VALUE: 00000010 (00000005)   NAME: LEDSTAT
TYPE: 4F   VALUE: 00000011 (00000000)   NAME: PINS
TYPE: 4F   VALUE: 00000112 (00000000)   NAME: TIME
TYPE: 51   VALUE: 00000000 (00000000)   NAME: PIN_CEN^A
TYPE: 51   VALUE: 00000001 (00000000)   NAME: PIN_CEN_1^A
TYPE: 51   VALUE: 00000002 (00000000)   NAME: PIN_MOSI^A
TYPE: 51   VALUE: 00000003 (00000000)   NAME: PIN_WPN^A
TYPE: 51   VALUE: 00000004 (00000000)   NAME: PIN_SCLK3^A
TYPE: 51   VALUE: 00000005 (00000000)   NAME: PIN_SCLK2^A
TYPE: 51   VALUE: 00000006 (00000000)   NAME: PIN_SCLK1^A
TYPE: 51   VALUE: 00000007 (00000000)   NAME: PIN_SCLK0^A
TYPE: 51   VALUE: 00000008 (00000000)   NAME: PIN_MISO^A
TYPE: 51   VALUE: 00000009 (00000000)   NAME: PIN_PLUGTESTN^A
TYPE: 51   VALUE: 0000000A (00000000)   NAME: PIN_PNP^A
TYPE: 51   VALUE: 0000000C (00000000)   NAME: PIN_HOLDN^A
TYPE: 51   VALUE: 0000000D (00000000)   NAME: LED_YELLOW^A
TYPE: 51   VALUE: 0000000E (00000000)   NAME: LED_ORANGE^A
TYPE: 51   VALUE: 0000000F (00000000)   NAME: LED_GREEN^A
TYPE: 51   VALUE: 00000010 (00000000)   NAME: RST_DISABLE^A
TYPE: 51   VALUE: 0000001F (00000000)   NAME: PIN_RX^A
TYPE: 51   VALUE: 0000001E (00000000)   NAME: PIN_TX^A
TYPE: 51   VALUE: 00002000 (00000000)   NAME: BIT_LED_YELLOW^A
TYPE: 51   VALUE: 00004000 (00000000)   NAME: BIT_LED_ORANGE^A
TYPE: 51   VALUE: 00008000 (00000000)   NAME: BIT_LED_GREEN^A
TYPE: 51   VALUE: 00000400 (00000000)   NAME: BIT_PNP^A
TYPE: 51   VALUE: 00000010 (00000000)   NAME: BIT_SCLK3^A
TYPE: 51   VALUE: 00000020 (00000000)   NAME: BIT_SCLK2^A
TYPE: 51   VALUE: 00000040 (00000000)   NAME: BIT_SCLK1^A
TYPE: 51   VALUE: 00000080 (00000000)   NAME: BIT_SCLK0^A
TYPE: 51   VALUE: 00000008 (00000000)   NAME: BIT_WPN^A
TYPE: 51   VALUE: 00000100 (00000000)   NAME: BIT_MISO^A
TYPE: 51   VALUE: 00000001 (00000000)   NAME: BIT_CEN^A
TYPE: 51   VALUE: 00000002 (00000000)   NAME: BIT_CEN_1^A
TYPE: 51   VALUE: 00001000 (00000000)   NAME: BIT_HOLDN^A
TYPE: 51   VALUE: 00000004 (00000000)   NAME: BIT_MOSI^A
TYPE: 51   VALUE: 00000200 (00000000)   NAME: BIT_PLUGTESTN^A
TYPE: 51   VALUE: 00000003 (00000000)   NAME: MASK_CEN_AVAIL^A
TYPE: 51   VALUE: 000000F0 (00000000)   NAME: MASK_SCLK_AVAIL^A
TYPE: 51   VALUE: 000011FF (00000000)   NAME: MASK_SPI_BUS_AVAIL^A
TYPE: 51   VALUE: 000000F0 (00000000)   NAME: MASK_SCLK_ACTIVE^A
TYPE: 50   VALUE: 00000101 (00000000)   NAME: HIGH^A
TYPE: 50   VALUE: 00000102 (00000000)   NAME: LOW^A
TYPE: 51   VALUE: 0000017D (00000000)   NAME: SPIN_OVERHEAD^B
TYPE: 51   VALUE: 00000032 (00000000)   NAME: FDS_STOP^B
TYPE: 51   VALUE: 00000064 (00000000)   NAME: TCOOL_LINE^B
TYPE: 51   VALUE: 000004B0 (00000000)   NAME: TCOOL_BLOCK^B
TYPE: 50   VALUE: 00000101 (00000000)   NAME: SLEEP^B
TYPE: 50   VALUE: 00000102 (00000000)   NAME: SLEEP_MS^B
TYPE: 50   VALUE: 00000203 (00000000)   NAME: WAIT^B
TYPE: 50   VALUE: 00000204 (00000000)   NAME: WAIT_MS^B
TYPE: 47   VALUE: 00000000 (00000000)   NAME: STACKSPACE
TYPE: 48   VALUE: 0000004C (00000000)   NAME: COGNUM
TYPE: 48   VALUE: 0000004D (00000001)   NAME: D1
TYPE: 48   VALUE: 0000004E (00000002)   NAME: D2
TYPE: 48   VALUE: 0000004F (00000003)   NAME: D3
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: OKAY
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: TIME_MS
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: CONTROL
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: CONTROL
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: CONTROL
TYPE: 4E   VALUE: 00000000 (00000000)   NAME: R
TYPE: 4E   VALUE: 00000000 (00000000)   NAME: R
TYPE: 4E   VALUE: 00000000 (00000000)   NAME: R
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: ONOFF
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: ONOFF
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: ONOFF
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: TIMESTAMP
TYPE: 4E   VALUE: 00000008 (00000000)   NAME: PHASE
TYPE: 4E   VALUE: 0000000C (00000000)   NAME: D1_CONTROL
TYPE: 4E   VALUE: 00000010 (00000000)   NAME: D2_CONTROL
TYPE: 4E   VALUE: 00000014 (00000000)   NAME: D3_CONTROL
TYPE: 4E   VALUE: 00000018 (00000000)   NAME: D1_PHASES
TYPE: 4E   VALUE: 0000001C (00000000)   NAME: D2_PHASES
TYPE: 4E   VALUE: 00000020 (00000000)   NAME: D3_PHASES
TYPE: 4E   VALUE: 00000024 (00000000)   NAME: CYCLE

Distilled longs: 0

OBJ bytes: 784

_CLKMODE: 00
_CLKFREQ: 00B71B00

0000- 50 00 38 02 D0 01 11 02 50 00 04 00 63 00 00 00   P.8.....P...c...
0010- 74 00 00 00 82 00 00 00 88 00 00 00 8E 00 00 00   t...............
0020- 94 00 00 00 A1 00 00 00 AE 00 00 00 B5 00 00 00   ................
0030- BC 00 00 00 C3 00 00 00 D2 00 00 00 DA 00 00 00   ................
0040- E2 00 00 00 EA 00 24 00 D0 01 50 00 F0 01 50 00   ......$...P...P.
0050- 00 00 00 00 01 05 02 37 03 43 15 28 36 EC 87 4C   .......7.C.(6..L
0060- 35 92 80 35 FA 65 32 87 4C 35 90 35 FA 0A 08 87   5..5.e2.L5.5....
0070- 4C 35 92 98 36 ED 21 32 01 05 07 01 64 3F 91 06   L5..6.!2....d?..
0080- 12 04 01 05 08 32 64 87 4D 35 91 32 64 87 4E 35   .....2d.M5.2d.N5
0090- 91 32 64 87 4F 35 91 32 01 34 05 04 01 34 05 05   .2d.O5.2.4...4..
00A0- 01 34 05 06 32 01 35 05 04 01 35 05 05 01 35 05   .4..2.5...5...5.
00B0- 06 32 87 4D 35 92 90 61 32 87 4E 35 92 90 61 32   .2.M5..a2.N5..a2
00C0- 87 4F 35 92 90 61 32 37 23 38 0D 3E D4 18 37 23   .O5..a27#8.>..7#
00D0- 38 0D 3E D6 1C 32 64 35 FB 37 23 3D B4 32 64 35   8.>..2d5.7#=.2d5
00E0- FB 38 0E 3D B4 32 64 35 FB 38 0D 3D B4 32 01 05   .8.=.2d5.8.=.2..
00F0- 0C 35 CD 24 35 69 3F 91 65 87 4D 35 92 90 6D 87   .5.$5i?.e.M5..m.
0100- 4E 35 92 90 71 87 4F 35 92 90 75 6C 35 FA 7A 48   N5..q.O5..ul5.zH
0110- 70 35 FA 7E 48 74 35 FA CE 20 48 68 35 FC 0A 34   p5.~Ht5.. Hh5..4
0120- 38 53 69 CC 24 35 FC 0A 1A 39 03 E4 CD 24 6C 36   8Si.$5...9...$l6
0130- E3 36 ED 79 70 36 E3 36 ED 7D 74 36 E3 36 ED CD   .6.yp6.6.}t6.6..
0140- 20 04 11 78 35 FA 7A 4C 7C 35 FA 7E 4C CC 20 35    ..x5.zL|5.~L. 5
0150- FA CE 20 4C 39 01 6D 6C 34 0D 0A 36 38 06 0E 0A   .. L9.ml4..68...
0160- 01 35 05 0D 0C 01 34 05 0D 0C 01 78 36 E8 05 0D   .5....4....x6...
0170- 0C 39 01 8A 70 34 0D 0A 36 38 06 0E 0A 01 35 05   .9..p4..68....5.
0180- 0E 0C 01 34 05 0E 0C 01 7C 36 E8 05 0E 0C 39 01   ...4....|6....9.
0190- B4 74 34 0D 0E 37 60 0D 0F 36 38 06 0E 12 01 35   .t4..7`..68....5
01A0- 05 0F 0C 01 34 05 0F 0C 01 38 09 3D 92 05 0F 0C   ....4....8.=....
01B0- 01 CC 20 36 E8 05 0F 0C 6A 3E CE 24 3E 64 35 ED   .. 6....j>.$>d5.
01C0- 35 C0 3A 0F 42 40 F6 39 03 E8 F4 EC 23 04 FF 26   5.:.B@.9....#..&
01D0- 32 00 00 00 20 00 03 00 0C 00 00 00 15 00 00 00   2... ...........
01E0- 64 3D D4 1C 64 3D D6 1C 32 64 3D D4 18 64 3D D6   d=..d=..2d=..d=.
01F0- 1C 32 00 00 48 00 05 00 14 00 00 00 21 00 00 00   .2..H.......!...
0200- 32 00 00 00 3A 00 00 00 35 C0 64 F4 39 01 7D E4   2...:...5.d.9.}.
0210- 3F 91 EC 23 32 35 C0 39 03 E8 F6 64 F4 39 01 7D   ?..#25.9...d.9.}
0220- E4 3F 91 EC 23 32 35 C0 64 F4 68 EC 23 32 35 C0   .?..#25.d.h.#25.
0230- 39 03 E8 F6 64 F4 68 EC 23 32 00 00 7B 50 5F 4F   9...d.h.#2..{P_O
0240- 4E 10 FF FF FF FF 50 5F 4F 46 46 10 00 00 00 00   N.....P_OFF.....
0250- 50 5F 31 10 01 00 00 00 50 5F 32 10 02 00 00 00   P_1.....P_2.....
0260- 50 5F 33 10 03 00 00 00 50 5F 34 10 04 00 00 00   P_3.....P_4.....
0270- 50 5F 35 10 05 00 00 00 50 5F 4D 41 58 10 06 00   P_5.....P_MAX...
0280- 00 00 43 59 43 4C 45 5F 54 49 4D 45 10 40 42 0F   ..CYCLE_TIME.@B.
0290- 00 4C 4F 4F 50 5F 54 49 4D 45 10 E8 03 00 00 50   .LOOP_TIME.....P
02A0- 48 41 53 45 5F 49 4E 49 54 10 53 00 00 00 43 59   HASE_INIT.S...CY
02B0- 43 4C 45 5F 49 4E 49 54 10 E4 03 00 00 54 53 54   CLE_INIT.....TST
02C0- 41 4D 50 45 52 52 4F 52 10 00 00 00 00 53 54 41   AMPERROR.....STA
02D0- 52 54 00 53 54 4F 50 00 43 48 45 43 4B 01 53 45   RT.STOP.CHECK.SE
02E0- 54 5F 44 31 01 53 45 54 5F 44 32 01 53 45 54 5F   T_D1.SET_D2.SET_
02F0- 44 33 01 53 45 54 00 43 4C 52 00 47 45 54 5F 44   D3.SET.CLR.GET_D
0300- 31 00 47 45 54 5F 44 32 00 47 45 54 5F 44 33 00   1.GET_D2.GET_D3.

______________________________________________________________________________
********************************************************* File starts here ***
Zerocat Chipflasher --- Flash free firmware, kick the Management Engine.

Copyright (C) 2020  Kai Mertens 

File ledstat.spin --- display program status via status LEDs D1, D2 and D3

This file is part of Zerocat Chipflasher.

See end of file for terms of use.

Usage:
        1. method calls ledstat.start
        2. ledstat is controlled via set_... and get_... methods
        3. method calls ledstat.stop to stop cog

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

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

PUB  start
PUB  stop
PUB  check(time_ms)
PUB  set_D1(control)
PUB  set_D2(control)
PUB  set_D3(control)
PUB  set
PUB  clr
PUB  get_D1 : 
PUB  get_D2 : 
PUB  get_D3 : 

Program:  142 Longs
Variable: 20 Longs

CON Block:
=== LED Status Cycle Timings =============================
Time per Status Cycle (us):       CYCLE_TIME      1_000_000
Time per Loop Iteration (us):     LOOP_TIME       1_000
Max. LED Pulses per Cycle:        P_MAX           6
----------------------------------------------------------
ENUM P_type

VAR Block:
Stackspace.

__________
PUB  start

Stop a running cog, previously launched fromout this object,
start a new cog and store cog number,
return TRUE if successful.

_________
PUB  stop

Stop cog and clear cog number.
See Propeller Manual v1.2 -- page 83, COGSTOP.
Note the exact sample code does not work, why?

___________________
PUB  check(time_ms)

Provide a light pulse so that...
- broken LEDs can be detected visually
- false cog execution can be detected

____________________
PUB  set_D1(control)

Valid Control Values:
-1:                   switches the LED on
1..P_MAX:             pulse train, repeated contiguously (1s cycle time)
other values:         LED is off

____________________
PUB  set_D2(control)

Valid Control Values:
-1:                   switches the LED on
1..P_MAX:             pulse train, repeated contiguously (1s cycle time)
other values:         LED is off

____________________
PUB  set_D3(control)

Valid Control Values:
-2:                   enables monitor for PIN_PLUGTESTn
-1:                   switches the LED on
1..P_MAX:             pulse train, repeated contiguously (1s cycle time)
other values:         LED is off

________
PUB  set

Set all LEDs on (TRUE).

________
PUB  clr

Set all LEDs off (FALSE).

______________
PUB  get_D1 : 


______________
PUB  get_D2 : 


______________
PUB  get_D3 : 


DAT Block:
cognum
LED control bytes D1, D2, D3

******************************************************************************
Terms of Use:

Zerocat Chipflasher is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

Zerocat Chipflasher is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License along
with Zerocat Chipflasher.  If not, see <http://www.gnu.org/licenses/>.

************************************************************** End of File ***