Documentation for “Zerocat Dev Kit”
Generated on: Tue, 03 Dec 2024 15:24:37 +0100
Repository: git://zerocat.org/zerocat/projects/zerocat-dev-kit.git
Version: 2117b7b4b
Branch: master

../firmware/src/status.spin.txt.html

Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2016 Parallax Inc. DBA Parallax Semiconductor.
Version 1.00.78
Compiling...
../../firmware/src/status.spin
|-pins.spin
|-time.spin
Done.
Program size is 416 bytes
TYPE: 43   VALUE: 00000028 (00000000)   NAME: SIZE_STACK
TYPE: 43   VALUE: 00000000 (00000000)   NAME: ERR_HELLO
TYPE: 43   VALUE: 00000001 (00000000)   NAME: ERR_CANCEL
TYPE: 43   VALUE: 00000002 (00000000)   NAME: ERR_MAIN
TYPE: 43   VALUE: 00000003 (00000000)   NAME: ERR_SUCCESS
TYPE: 43   VALUE: 00000004 (00000000)   NAME: ERR_RST
TYPE: 43   VALUE: 00000005 (00000000)   NAME: ERR_COG
TYPE: 53   VALUE: 00000101 (00000004)   NAME: INI
TYPE: 53   VALUE: 00000002 (00000004)   NAME: GO
TYPE: 53   VALUE: 00000003 (00000004)   NAME: STOP
TYPE: 53   VALUE: 00000104 (00000004)   NAME: SET_CODE
TYPE: 53   VALUE: 00000005 (00000004)   NAME: GET_CODE
TYPE: 53   VALUE: 00000006 (00000005)   NAME: PORT_INI
TYPE: 53   VALUE: 00000007 (00000005)   NAME: DISPLAY
TYPE: 4F   VALUE: 00000008 (00000000)   NAME: PINS
TYPE: 4F   VALUE: 00000109 (00000000)   NAME: TIME
TYPE: 51   VALUE: 0000001F (00000000)   NAME: PIN_RX
TYPE: 51   VALUE: 0000001E (00000000)   NAME: PIN_TX
TYPE: 51   VALUE: 0000001D (00000000)   NAME: I2C_SDA
TYPE: 51   VALUE: 0000001C (00000000)   NAME: I2C_SCL
TYPE: 51   VALUE: 0000001B (00000000)   NAME: RST_INHIBIT
TYPE: 51   VALUE: 0000001A (00000000)   NAME: RS232_RST
TYPE: 51   VALUE: 00000019 (00000000)   NAME: PIN_D2
TYPE: 51   VALUE: 00000018 (00000000)   NAME: PIN_D1
TYPE: 51   VALUE: 00000017 (00000000)   NAME: IN_A2
TYPE: 51   VALUE: 00000016 (00000000)   NAME: IN_A1
TYPE: 51   VALUE: 00000015 (00000000)   NAME: IN_A0
TYPE: 51   VALUE: 00000014 (00000000)   NAME: IN_D
TYPE: 51   VALUE: 00000010 (00000000)   NAME: ADC_OUT
TYPE: 51   VALUE: 0000000F (00000000)   NAME: ADC_IN
TYPE: 51   VALUE: 0000000E (00000000)   NAME: RC_DECAY2
TYPE: 51   VALUE: 0000000D (00000000)   NAME: RC_DECAY1
TYPE: 51   VALUE: 00000000 (00000000)   NAME: PIN_P0
TYPE: 51   VALUE: 00000001 (00000000)   NAME: PIN_P1
TYPE: 51   VALUE: 00000002 (00000000)   NAME: PIN_P2
TYPE: 51   VALUE: 00000003 (00000000)   NAME: PIN_P3
TYPE: 51   VALUE: 00000004 (00000000)   NAME: PIN_P4
TYPE: 51   VALUE: 00000005 (00000000)   NAME: PIN_P5
TYPE: 51   VALUE: 00000006 (00000000)   NAME: PIN_P6
TYPE: 51   VALUE: 00000007 (00000000)   NAME: PIN_P7
TYPE: 51   VALUE: 00000008 (00000000)   NAME: PIN_P8
TYPE: 51   VALUE: 00000009 (00000000)   NAME: PIN_P9
TYPE: 51   VALUE: 0000000A (00000000)   NAME: PIN_P10
TYPE: 51   VALUE: 0000000B (00000000)   NAME: PIN_P11
TYPE: 51   VALUE: 0000000C (00000000)   NAME: PIN_P12
TYPE: 51   VALUE: 00000011 (00000000)   NAME: PIN_P17
TYPE: 51   VALUE: 00000012 (00000000)   NAME: PIN_P18
TYPE: 51   VALUE: 00000013 (00000000)   NAME: PIN_P19
TYPE: 51   VALUE: 00000000 (00000000)   NAME: MODULE_A
TYPE: 51   VALUE: 00000001 (00000000)   NAME: MODULE_B
TYPE: 51   VALUE: 00000002 (00000000)   NAME: COL_A0
TYPE: 51   VALUE: 00000003 (00000000)   NAME: COL_A1
TYPE: 51   VALUE: 00000004 (00000000)   NAME: COL_A2
TYPE: 51   VALUE: 00000005 (00000000)   NAME: COL_A3
TYPE: 51   VALUE: 00000006 (00000000)   NAME: COL_A4
TYPE: 51   VALUE: 00000007 (00000000)   NAME: COL_A5
TYPE: 51   VALUE: 00000008 (00000000)   NAME: DATA
TYPE: 51   VALUE: 00000009 (00000000)   NAME: ROW_A0
TYPE: 51   VALUE: 0000000A (00000000)   NAME: ROW_A1
TYPE: 51   VALUE: 0000000B (00000000)   NAME: ROW_A2
TYPE: 51   VALUE: 0000000C (00000000)   NAME: ROW_A3
TYPE: 50   VALUE: 00000001 (00000000)   NAME: INI_74HC151
TYPE: 50   VALUE: 00000102 (00000000)   NAME: GET_74HC151
TYPE: 50   VALUE: 00000103 (00000000)   NAME: HIGH
TYPE: 50   VALUE: 00000104 (00000000)   NAME: LOW
TYPE: 51   VALUE: 0000017D (00000000)   NAME: SPIN_OVERHEAD
TYPE: 50   VALUE: 00000101 (00000000)   NAME: SLEEP
TYPE: 50   VALUE: 00000102 (00000000)   NAME: SLEEP_MS
TYPE: 50   VALUE: 00000103 (00000000)   NAME: SLEEP_CYCLES
TYPE: 43   VALUE: 00000018 (00000000)   NAME: PIN_D1
TYPE: 43   VALUE: 00000019 (00000000)   NAME: PIN_D2
TYPE: 47   VALUE: 00000000 (00000000)   NAME: STACK1
TYPE: 45   VALUE: 00000000 (00000000)   NAME: COGX
TYPE: 45   VALUE: 00000001 (00000000)   NAME: OBJECTCFG
TYPE: 45   VALUE: 00000002 (00000000)   NAME: ERRCODE
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: CONFIG
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: CODE
TYPE: 4E   VALUE: 00000004 (00000000)   NAME: CODE

Distilled longs: 0

OBJ bytes: 554

_CLKMODE: 00
_CLKFREQ: 00B71B00

0000- A4 00 90 01 FC 00 08 02 28 00 00 00 3C 00 00 00   ........(...<...
0010- 48 00 00 00 54 00 00 00 5A 00 00 00 60 00 00 00   H...T...Z...`...
0020- 70 00 04 00 FC 00 A4 00 58 01 A4 00 43 35 38 28   p.......X...C58(
0030- 1A 34 89 80 A0 64 8B 80 A1 81 35 8B 80 A2 81 32   .4...d....5....2
0040- 01 05 03 37 22 43 15 28 89 80 A0 32 88 80 A0 34   ...7"C.(...2...4
0050- FA 0A 04 88 80 A0 21 32 64 8B 80 A2 81 32 8B 80   ......!2d....2..
0060- A2 80 33 32 35 38 19 38 18 3E B4 37 21 38 19 38   ..3258.8.>.7!8.8
0070- 18 3E B6 32 01 05 06 8B 80 A2 80 65 38 F5 64 35   .>.2.......e8.d5
0080- 0D 3C 36 0D 80 67 37 00 0D 80 68 38 19 3D D4 18   .<6..g7...h8.=..
0090- 01 39 01 5E 06 09 02 64 37 21 ED 08 19 38 19 3D   .9.^...d7!...8.=
00A0- D4 1C 01 38 32 06 09 02 38 19 3D D4 18 01 39 01   ...82...8.=...9.
00B0- 5E 06 09 02 09 67 01 39 01 5E 06 09 02 0C 37 21   ^....g.9.^....7!
00C0- 08 24 01 38 64 06 09 02 37 21 38 19 38 18 3E B4   .$.8d...7!8.8.>.
00D0- 01 39 01 2C 06 09 02 35 38 19 38 18 3E B4 01 38   .9.,...58.8.>..8
00E0- 64 06 09 02 09 5C 37 21 8B 80 A2 81 0C 38 19 3D   d....\7!.....8.=
00F0- D4 18 0C 38 19 3D D4 1C 0C 04 FF 7B 32 00 00 00   ...8.=.....{2...
0100- 5C 00 05 00 14 00 00 00 25 00 04 00 48 00 00 00   \.......%...H...
0110- 51 00 00 00 37 22 38 17 38 15 3E B4 37 22 38 17   Q...7"8.8.>.7"8.
0120- 38 15 3E B6 32 37 02 69 35 61 37 02 08 19 68 36   8.>.27.i5a7...h6
0130- ED 69 68 38 17 38 15 3E B4 36 62 43 38 14 3D 92   .ih8.8.>.6bC8.=.
0140- 62 4A 64 62 4B 09 67 32 64 3D D4 1C 64 3D D6 1C   bJdbK.g2d=..d=..
0150- 32 64 3D D4 18 64 3D D6 1C 32 00 00 38 00 04 00   2d=..d=..2..8...
0160- 10 00 00 00 1D 00 00 00 2E 00 00 00 35 C0 64 F4   ............5.d.
0170- 39 01 7D E4 3F 91 EC 23 32 35 C0 39 03 E8 F6 64   9.}.?..#25.9...d
0180- F4 39 01 7D E4 3F 91 EC 23 32 64 39 01 7D E4 3F   .9.}.?..#2d9.}.?
0190- 91 EC 23 32 29 53 49 5A 45 5F 53 54 41 43 4B 10   ..#2)SIZE_STACK.
01A0- 28 00 00 00 45 52 52 5F 48 45 4C 4C 4F 10 00 00   (...ERR_HELLO...
01B0- 00 00 45 52 52 5F 43 41 4E 43 45 4C 10 01 00 00   ..ERR_CANCEL....
01C0- 00 45 52 52 5F 4D 41 49 4E 10 02 00 00 00 45 52   .ERR_MAIN.....ER
01D0- 52 5F 53 55 43 43 45 53 53 10 03 00 00 00 45 52   R_SUCCESS.....ER
01E0- 52 5F 52 53 54 10 04 00 00 00 45 52 52 5F 43 4F   R_RST.....ERR_CO
01F0- 47 10 05 00 00 00 49 4E 49 01 47 4F 00 53 54 4F   G.....INI.GO.STO
0200- 50 00 53 45 54 5F 43 4F 44 45 01 47 45 54 5F 43   P.SET_CODE.GET_C
0210- 4F 44 45 00 50 49 4E 5F 44 31 10 18 00 00 00 50   ODE.PIN_D1.....P
0220- 49 4E 5F 44 32 10 19 00 00 00                     IN_D2.....

______________________________________________________________________________
********************************************************* File starts here ***
Zerocat Dev Kit --- Put the fun back into hardware development!

Copyright (C) 2023, 2024  Kai Mertens 

File status.spin --- Provide status codes.

This file is part of Zerocat Dev Kit.

See end of file for terms of use.

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

Object "../../firmware/src/status" Interface:

PUB  ini(config)
PUB  go
PUB  stop
PUB  set_code(code)
PUB  get_code

Program:  100 Longs
Variable: 41 Longs


# Objects

Load pin configuration object.
Load time object.


# Constants


Pins:

  PIN_D1 --- Status LED D1 (green)
  PIN_D2 --- Status LED D2 (orange)

Stack Size:

  SIZE_STACK

ENUM t_ERR:

  ERR_HELLO     -> both LEDs blink three times
  ERR_CANCEL    -> LED D2 off
  ERR_MAIN      -> LED D2 on
  ERR_SUCCESS   -> LED D2 off
  ERR_RST       -> LED D2 blinks once
  ERR_COG       -> LED D2 blinks twice


# Globals

stack space
cog ID
Object Configuration, atomic access
errcode, atomic access


# Functions


________________
PUB  ini(config)

initialize RAM

_______
PUB  go

start principal method in its own cog

_________
PUB  stop

stop running cog

___________________
PUB  set_code(code)

set errcode value

_____________
PUB  get_code

get errcode value


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

Zerocat Dev Kit 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 Dev Kit 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 Dev Kit.  If not, see <http://www.gnu.org/licenses/>.

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