forked from Hyperion/HyperionOS
finished vfs for a while
This commit is contained in:
15
Src/Hyperion-kernel/lib/modules/Hyperion/50_gpio.kmod
Normal file
15
Src/Hyperion-kernel/lib/modules/Hyperion/50_gpio.kmod
Normal file
@@ -0,0 +1,15 @@
|
||||
local kernel=...
|
||||
local sysc=kernel.syscalls
|
||||
kernel.gpio={}
|
||||
|
||||
sysc["gpio_write"]=function(pin, data)
|
||||
if kernel.gpio[pin] then
|
||||
return kernel.gpio[pin]("w", data)
|
||||
end
|
||||
end
|
||||
|
||||
sysc["gpio_read"]=function(pin)
|
||||
if kernel.gpio[pin] then
|
||||
return kernel.gpio[pin]("r")
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user