prog8/examples/test.p8
Irmen de Jong 6a9269111e some changes in SMC routines for the cx16:
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.
2024-03-15 23:00:14 +01:00

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
}}
}
}
}