From: Adam Shamblin Date: Wed, 25 May 2022 04:32:33 +0000 (-0600) Subject: Correct naming of funcsel words X-Git-Url: https://git.vexinglabs.com/?a=commitdiff_plain;h=5520028df5219db532cd32b56620b99a3ce84532;p=forthdeck.git Correct naming of funcsel words --- diff --git a/gpio.fs b/gpio.fs index d365640..9101e23 100644 --- a/gpio.fs +++ b/gpio.fs @@ -25,11 +25,11 @@ SIO_BASE $02c + constant GPIO_OE_XOR \ Given a pin address, leave its selected function value on the stack \ example: 13 pin funcsel -: funcsel ( addr -- n ) GPIO_CTRL + @ ; +: funcsel@ ( addr -- n ) GPIO_CTRL + @ ; \ Given a pin address, set its function \ example: 13 pin SIO funcset -: funcset ( addr n -- ) swap GPIO_CTRL + ! ; +: funcsel! ( addr n -- ) swap GPIO_CTRL + ! ; \ Display a list of all gpio pins and their current function : pins ( -- ) cr 30 0 DO I dup u. pin funcsel u. cr LOOP ;