Nano 33 IoT newbie: how to access SAMD21 registers ?

Hello. I've been grinding through the SAMD21 data sheet, reading how to set direction and read/write i/o pins, but having no luck writing code to access the various control registers of interest. Can anyone tell me (1.) is there a specific library or .h file required to access Nano 33 IoT register, and (2.) where might I find some code examples of setting the DIR etc registers? Thanks.

You might find something about #1 here:

No, that’s for the due, which has different io registers.

Try ArduinoCore-samd/wiring_digital.c at master · arduino/ArduinoCore-samd · GitHub

Thank you. That last link looks interesting.

Interesting? Yes. I can see see the use of port and pin designations, which I recognize from the D21 data sheet, but in the statement g_APinDescription[ulPin].ulPort;, where is the term g_APinDescriptionp[] defined and what is it's meaning, please? Is this expression unique to a specific IDE? Thanks.