User Tools

Site Tools

한국어

logicpython:cubloc_api:sys

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

logicpython:cubloc_api:sys [2026/04/10 02:06] – created - external edit 127.0.0.1logicpython:cubloc_api:sys [2026/04/10 06:16] (current) – removed mfranklin
Line 1: Line 1:
-====== Sys ====== 
- 
-Return a supported CUBLOC system status value. 
- 
-===== Syntax ===== 
- 
-<code python> 
-from cubloc import Sys 
- 
-Sys(address: int) 
-</code> 
- 
-===== Parameters ===== 
- 
-  * **address**: System status ''address'' (0 to 255). 
- 
-===== Return Value ===== 
- 
-Return a supported CUBLOC system status value. ''Sys(0)'' returns the most recent actual UART write count. ''Sys(1)'' returns the most recent actual UART read count. ''Sys(2)'' and ''Sys(3)'' return ''0'' because the vendor docs mark them unused. ''Sys(4)'' returns ''1'' while an EEPROM byte write is in progress, otherwise ''0''. ''Sys(5)'' returns a 10 ms timer that wraps at 65535. ''Sys(6)'' returns ''micropython.stack_use()''. 
- 
-===== Exceptions ===== 
- 
-  * [[https://docs.micropython.org/en/latest/library/builtins.html#TypeError|TypeError]]: ''address'' is not an integer. 
-  * [[https://docs.micropython.org/en/latest/library/builtins.html#ValueError|ValueError]]: ''address'' is outside 0 to 255. 
-  * [[https://docs.micropython.org/en/latest/library/builtins.html#NotImplementedError|NotImplementedError]]: ''address'' is not supported by this implementation. 
- 
-===== Example ===== 
- 
-<code python> 
-from cubloc import Sys 
- 
-# Example usage 
-result = Sys(1) 
-print(result) 
-</code> 
- 
-===== Related APIs ===== 
- 
-  * [[logicpython:cubloc_api:debug|Debug]] 
-  * [[logicpython:cubloc_api:nop|Nop]] 
-  * [[logicpython:cubloc_api:setdebug|SetDebug]] 
-  * [[logicpython:cubloc_api:setonglobal|SetOnGlobal]] 
-  * [[logicpython:cubloc_api:time|Time]] 
  
logicpython/cubloc_api/sys.1775786799.txt.gz · Last modified: by 127.0.0.1