Help me fix a library for DHT sensors to run on Nano 33 IOT

I am working on a project that uses the Arduino 33 IOT. I have found several libraries that work on UNO but have problems with things like digitalPinToPort. I think if I get one of these fixed, I can figure out the rest.

Here is the relevant .cpp code

class DHT_nonblocking
{
public:
DHT_nonblocking( uint8_t pin, uint8_t type );
bool measure( float *temperature, float *humidity );

private:
bool read_data( );
bool read_nonblocking( );
float read_temperature( ) const;
float read_humidity( ) const;

uint8_t dht_state;
unsigned long dht_timestamp;
uint8_t data[ 6 ];
const uint8_t _pin, _type, _bit;
const uint32_t _maxcycles;
volatile REGTYPE *_port;

uint32_t expect_pulse( bool level ) const;
};

Here is the .h with my attempt to fix the problem, but doesn't & shows my ignorance in this area.
#define REGTYPE uint32_t
class DHT_nonblocking
{
public:
DHT_nonblocking( uint8_t pin, uint8_t type );
bool measure( float *temperature, float *humidity );

private:
bool read_data( );
bool read_nonblocking( );
float read_temperature( ) const;
float read_humidity( ) const;

uint8_t dht_state;
unsigned long dht_timestamp;
uint8_t data[ 6 ];
const uint8_t _pin, _type, _bit;
const uint32_t _maxcycles;
volatile REGTYPE *_port; //for the UNO, _port is a uint8_t

uint32_t expect_pulse( bool level ) const;
};

Any enlightenment would be greatly appreciated

Thanks. This post was recommended in my post on the topic elsewhere.

This compiled and I won't know if it actually works, until I get 3.3V to 5.5V bi-directional transceivers later this week.

#if defined(SAMD21G18A)
#define REGTYPE PortGroup*
#else#
#define REGTYPE uint8_t //UNO & other AVR processors, use 8 bit registers
#endif

class DHT_nonblocking
{
public:
DHT_nonblocking( uint8_t pin, uint8_t type );
bool measure( float *temperature, float *humidity );

private:
bool read_data( );
bool read_nonblocking( );
float read_temperature( ) const;
float read_humidity( ) const;

uint8_t dht_state;
unsigned long dht_timestamp;
uint8_t data[ 6 ];
const uint8_t _pin, _type, _bit;
const uint32_t _maxcycles;
REGTYPE _port;

uint32_t expect_pulse( bool level ) const;
};