mirror of
https://github.com/irmen/prog8.git
synced 2024-12-24 16:29:21 +00:00
6a9269111e
sys.poweroff_system() moved to cx16 sys.set_leds_brightness() moved to cx16 and changed to set_led_brightness, you can only change the activity led brightness.
28 lines
509 B
Lua
28 lines
509 B
Lua
%import textio
|
|
%zeropage basicsafe
|
|
%option no_sysinit
|
|
|
|
main {
|
|
sub start() {
|
|
cx16.reset_system()
|
|
repeat {
|
|
for cx16.r0L in 0 to 255 {
|
|
cx16.set_led_brightness(cx16.r0L)
|
|
delay()
|
|
}
|
|
for cx16.r0L in 255 downto 0 {
|
|
cx16.set_led_brightness(cx16.r0L)
|
|
delay()
|
|
}
|
|
}
|
|
}
|
|
|
|
sub delay() {
|
|
repeat 2000 {
|
|
%asm {{
|
|
nop
|
|
}}
|
|
}
|
|
}
|
|
}
|