13 pin
```
-### funcsel@ ( addr -- n )
+### funcsel@ ( addr -- n ) *funcsel fetch*
Given a pin address, leave the number of the currently selected pin function on
the stack.
13 pin funcsel@
```
-### funcsel! ( addr n -- )
+### funcsel! ( addr n -- ) *funcsel set*
Given a pin address and a function number (see GPIO pin constants), set the
selected pin's function.
13 pin SIO funcsel!
```
+### pins ( -- )
+
+Display a list of all GPIO pins and their currently selected function.
+
+```forth
+pins
+```
+
+### output-enable ( n -- ), output-disable ( n -- )
+
+Given a pin number, enable or disable that pin for output.
+
+```forth
+13 output-enable
+13 output-disable
+```
+
+### output-enabled? ( n -- flag )
+
+Given a pin number, leave a flag on the stack indicating whether or not output
+is enabled.
+
+```forth
+13 output-enabled?
+```
+
+### output-enabled. ( -- )
+
+Display a table of pins and their output status.
+
+```forth
+output-enabled.
+```
+
## Terminal
*file: terminal.fs*
--- /dev/null
+\ Words for interacting with RTC peripheral
+
+$4005c000 constant RTC_BASE
+RTC_BASE $00 + constant RTC_CLKDIV_M1
+RTC_BASE $04 + constant RTC_SETUP_0
+RTC_BASE $08 + constant RTC_SETUP_1
+RTC_BASE $0c + constant RTC_CTRL
+RTC_BASE $10 + constant RTC_IRC_SETUP_0
+RTC_BASE $14 + constant RTC_IRC_SETUP_1
+RTC_BASE $18 + constant RTC_1
+RTC_BASE $1c + constant RTC_0
+RTC_BASE $20 + constant RTC_INTR
+RTC_BASE $24 + constant RTC_INTE
+RTC_BASE $28 + constant RTC_INTF
+RTC_BASE $2c + constant RTC_INTS
+
+( Working with the onboard RTC
+ It would appear the the rpiPico does have an onboard RTC.)
+
+: rtc-active? ( -- flag ) RTC_CTRL %10 and ;
+: rtc-enable ( -- ) RTC_CTRL %1 or ;
--- /dev/null
+\ Words for interacting with the sysinfo block
+
+$40000000 constant SYSINFO_BASE
+SYSINFO_BASE $00 + constant CHIP_ID
+SYSINFO_BASE $04 + constant PLATFORM
+SYSINFO_BASE $40 + constant GITREF_RP2040
--- /dev/null
+\ Words for dealing with the system timer peripheral
+
+$40054000 constant TIMER_BASE
+TIMER_BASE $00 + constant TIMEHW
+TIMER_BASE $04 + constant TIMELW
+TIMER_BASE $08 + constant TIMEHR
+TIMER_BASE $0c + constant TIMELR
+
+TIMER_BASE $38 + constant TIMER_INTE
+
+
+\ Display the current system timer. "counter print"
+: counter. ( -- ) TIMELR @ TIMEHR @ swap D. ;
+
+\ Enable or disable a specific alarm.
+\ example: 2 alarm-enable
+: alarm-enable ( n -- ) 1 swap lshift TIMER_INTE @ or TIMER_INTE ! ;
+: alarm-disable ( n -- ) 1 swap lshift TIMER_INTE @ and TIMER_INTE ! ;
+
+\ Check if an alarm is enabled.
+\ example: 2 alarm-enabled?
+: alarm-enabled? ( n -- flag ) 1 swap lshift TIMER_INTE @ and 0 > ;