1
0
mirror of synced 2026-01-22 10:11:34 +00:00

LEDs show that the board has been probed

This commit is contained in:
Romain Dolbeau 2020-12-16 10:15:37 +01:00
parent b39f32afb7
commit 3738909f37

View File

@ -1,16 +1,33 @@
\ version1 fcode-revision
fcode-version1
\ beware the space with the quotes, Forth is strict
\ minimal required stuff
\ " RDOL,SBusFPGA" encode-string " name" property
\ my-address h# 200 + my-space encode-phys
\ h# 100 encode-int encode+
\ " reg" property
fcode-version2
\ Absolute minimal stuff; name & registers def.
" RDOL,SBusFPGA" name
my-address h# 200 + my-space h# 100 reg
\ we don't support ET
h# 7f xdrint " slave-burst-sizes" attribute
headers
-1 instance value led-virt
my-address constant my-sbus-address
my-space constant my-sbus-space
: map-in ( adr space size -- virt ) " map-in" $call-parent ;
: map-out ( virt size -- ) " map-out" $call-parent ;
: map-in-led ( -- ) my-sbus-address h# 200 + my-sbus-space h# 4 map-in is led-virt ;
: map-out-led ( -- ) led-virt h# 4 map-out ;
external
: blink! ( pattern -- )
map-in-led
led-virt l! ( pattern virt -- )
map-out-led
;
\ works at probe time, but not as a user command
h# 12488421 blink!
\ \hex