forked from M-Labs/artiq
i2c: port syscalls to NAC3
This commit is contained in:
parent
645c4590b3
commit
2720bfa398
|
@ -2,34 +2,33 @@
|
||||||
Non-realtime drivers for I2C chips on the core device.
|
Non-realtime drivers for I2C chips on the core device.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from numpy import int32
|
||||||
from artiq.language.core import syscall, kernel
|
from artiq.language.core import extern, kernel
|
||||||
from artiq.language.types import TBool, TInt32, TNone
|
|
||||||
from artiq.coredevice.exceptions import I2CError
|
from artiq.coredevice.exceptions import I2CError
|
||||||
|
|
||||||
|
|
||||||
@syscall(flags={"nounwind", "nowrite"})
|
@extern
|
||||||
def i2c_start(busno: TInt32) -> TNone:
|
def i2c_start(busno: int32):
|
||||||
raise NotImplementedError("syscall not simulated")
|
raise NotImplementedError("syscall not simulated")
|
||||||
|
|
||||||
|
|
||||||
@syscall(flags={"nounwind", "nowrite"})
|
@extern
|
||||||
def i2c_restart(busno: TInt32) -> TNone:
|
def i2c_restart(busno: int32):
|
||||||
raise NotImplementedError("syscall not simulated")
|
raise NotImplementedError("syscall not simulated")
|
||||||
|
|
||||||
|
|
||||||
@syscall(flags={"nounwind", "nowrite"})
|
@extern
|
||||||
def i2c_stop(busno: TInt32) -> TNone:
|
def i2c_stop(busno: int32):
|
||||||
raise NotImplementedError("syscall not simulated")
|
raise NotImplementedError("syscall not simulated")
|
||||||
|
|
||||||
|
|
||||||
@syscall(flags={"nounwind", "nowrite"})
|
@extern
|
||||||
def i2c_write(busno: TInt32, b: TInt32) -> TBool:
|
def i2c_write(busno: int32, b: int32) -> bool:
|
||||||
raise NotImplementedError("syscall not simulated")
|
raise NotImplementedError("syscall not simulated")
|
||||||
|
|
||||||
|
|
||||||
@syscall(flags={"nounwind", "nowrite"})
|
@extern
|
||||||
def i2c_read(busno: TInt32, ack: TBool) -> TInt32:
|
def i2c_read(busno: int32, ack: bool) -> int32:
|
||||||
raise NotImplementedError("syscall not simulated")
|
raise NotImplementedError("syscall not simulated")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue