Skip to content
This repository was archived by the owner on Apr 25, 2021. It is now read-only.

Commit 7c408f3

Browse files
committed
components to component
1 parent 387b0c0 commit 7c408f3

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

src/main/java/kr/pe/ecmaxp/openpie/arch/OpenPieInterruptHandler.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class OpenPieInterruptHandler(val vm: OpenPieVirtualMachine) {
2020
SYS_CONTROL -> handleControl(intr, synchronized)
2121
SYS_DEBUG -> handleDebug(intr, synchronized)
2222
SYS_SIGNAL -> handleSignal(intr, synchronized)
23-
SYS_COMPONENTS -> handleComponents(intr, synchronized)
23+
SYS_COMPONENT -> handleComponents(intr, synchronized)
2424
SYS_VALUE -> handleValue(intr, synchronized)
2525
SYS_COMPUTER -> handleComputer(intr, synchronized)
2626
SYS_INFO -> handleInfo(intr, synchronized)
@@ -108,7 +108,7 @@ class OpenPieInterruptHandler(val vm: OpenPieVirtualMachine) {
108108

109109
private fun handleComponents(intr: Interrupt, synchronized: Boolean): Int {
110110
return when (intr.imm) {
111-
SYS_COMPONENTS_INVOKE -> {
111+
SYS_COMPONENT_INVOKE -> {
112112
val obj = intr.readObject()
113113
val call = ComponentInvoke.fromArray(obj as Array<*>)
114114
?: return intr.responseError(Exception("Invalid invoke"))
@@ -137,7 +137,7 @@ class OpenPieInterruptHandler(val vm: OpenPieVirtualMachine) {
137137
ret.error?.printStackTrace()
138138
intr.responseResult(ret)
139139
}
140-
SYS_COMPONENTS_LIST -> {
140+
SYS_COMPONENT_LIST -> {
141141
when (intr.r0) {
142142
0 -> intr.responseValue(machine.components())
143143
else -> {
@@ -152,9 +152,9 @@ class OpenPieInterruptHandler(val vm: OpenPieVirtualMachine) {
152152
}
153153
}
154154
}
155-
SYS_COMPONENTS_COUNT -> intr.responseValue(machine.componentCount())
156-
SYS_COMPONENTS_MAX -> intr.responseValue(machine.maxComponents())
157-
SYS_COMPONENTS_METHODS -> {
155+
SYS_COMPONENT_COUNT -> intr.responseValue(machine.componentCount())
156+
SYS_COMPONENT_MAX -> intr.responseValue(machine.maxComponents())
157+
SYS_COMPONENT_METHODS -> {
158158
val req = intr.readObject() as Array<*>
159159
val node = machine.node().network().node(req[0] as String)
160160

@@ -164,7 +164,7 @@ class OpenPieInterruptHandler(val vm: OpenPieVirtualMachine) {
164164

165165
intr.responseNone()
166166
}
167-
SYS_COMPONENTS_DOC -> {
167+
SYS_COMPONENT_DOC -> {
168168
val req = intr.readObject() as Array<*>
169169
if (req.size == 2) {
170170
val node = machine.node().network().node(req[0] as String)

src/main/java/kr/pe/ecmaxp/openpie/arch/consts/OpenPieSystemCallTable.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ const val SYS_SIGNAL_REQUEST = SYS_SIGNAL or 1
1515
const val SYS_SIGNAL_PENDING = SYS_SIGNAL or 2
1616
const val SYS_SIGNAL_PUSH = SYS_SIGNAL or 3
1717

18-
const val SYS_COMPONENTS = 0x040000
19-
const val SYS_COMPONENTS_INVOKE = SYS_COMPONENTS or 0
20-
const val SYS_COMPONENTS_LIST = SYS_COMPONENTS or 16
21-
const val SYS_COMPONENTS_COUNT = SYS_COMPONENTS or 17
22-
const val SYS_COMPONENTS_MAX = SYS_COMPONENTS or 18
23-
const val SYS_COMPONENTS_METHODS = SYS_COMPONENTS or 19
24-
const val SYS_COMPONENTS_DOC = SYS_COMPONENTS or 20
18+
const val SYS_COMPONENT = 0x040000
19+
const val SYS_COMPONENT_INVOKE = SYS_COMPONENT or 0
20+
const val SYS_COMPONENT_LIST = SYS_COMPONENT or 16
21+
const val SYS_COMPONENT_COUNT = SYS_COMPONENT or 17
22+
const val SYS_COMPONENT_MAX = SYS_COMPONENT or 18
23+
const val SYS_COMPONENT_METHODS = SYS_COMPONENT or 19
24+
const val SYS_COMPONENT_DOC = SYS_COMPONENT or 20
2525

2626
const val SYS_VALUE = 0x050000
2727
const val SYS_VALUE_INVOKE = SYS_VALUE or 1

src/main/resources/assets/openpie/firmwares/debug/eeprom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
def main():
55
globals().pop('main')
6-
from ucomponents import invoke, components
6+
from ucomponent import invoke, components
77
from ucomputer import crash, get_computer_address
88

99
def component(t):

src/main/resources/assets/openpie/opos/init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import machine
44
import uos
5-
from ucomponents import invoke
5+
from ucomponent import invoke
66
from uio import FileIO
77

88

src/main/resources/assets/openpie/opos/lib/components.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ucomponents import invoke, methods, doc, components as _components
1+
from ucomponent import invoke, methods, doc, components as _components
22

33
__all__ = ['Component', 'get_component', 'find_components', 'components']
44

0 commit comments

Comments
 (0)