PicoMite MMBasic GPIO Library v1.0 available


Author Message
vincenthimpe
Regular Member

Joined: 14/10/2018
Location: United States
Posts: 86
Posted: 03:30pm 09 May 2025      

New version PicoMite MMBasic GPIO library RC2

- added GPIO.InMode
- added GPIO.OutMode

I Got tired of configuring pins one by one...
The above two functions allow you to provide a mask and configure it in one shot.

Example
GPIO.Inmode  &b00111100
GPIO.Outmode &b01000010

would set GP2,GP3,GP4,GP5 as input (equivalent of MMBasic SETPIN GPx,DIN)
and set GP1 and GP6 as output (equivalent of MMBasic SETPIN GPx,DOUT

A bit set to "1" will alter the pin type. A pin set to "0" does NOT alter the current state

Under the hood this calls the actual SETPIN function using the EXECUTE command

Note : all the GPIO library code works on GPIO numbers. Not on "pin numbers"