portOutputRegister not yet supported with NANO BLE. When will it?

Trying to get a TFT ILI9488 LCD to work with NANO BLE Sense and get compiler errors!

Simple_test:38:5: error: 'portOutputRegister' was not declared in this scope

   *(portOutputRegister(digitalPinToPort(RS))) &=  ~digitalPinToBitMask(RS);//LCD_RS=0;

Any alternative work around! I'm new to micro controller world .

Thanks

Pere

Workaround might be:

DigitalWrite(RS, 0);

Which is slower, but perhaps fast enough.

Here is a sketch that shows the port mapping for Arduino digital pins.

If you copy the macros to your variant.h file they will let you compile for the Nano BLE.

#define PORT   NRF_P0
#define LED_bm (1<<13) //digital #13 on P0.13

#if !defined(portOutputRegister)
#define digitalPinToBitMask(P) (1uL<<(digitalPinToPinName(P)&31))
#define portOutputRegister(port) (port ? &NRF_P1->OUT : &NRF_P0->OUT) 
#define portInputRegister(port) (port ? &NRF_P1->IN : &NRF_P0->IN) 
#endif


void show(uint8_t pin)
{
    int n = digitalPinToPinName(pin);
    int p = digitalPinToPort(pin);
    int b = n & 31;
    uint32_t mask = digitalPinToBitMask(pin);
    volatile uint32_t *ads = portOutputRegister(p);
    char buf[80];
    sprintf(buf, "digitalPinToPinName(%d) = %d i.e. NRF_P%d.%02d ads = %8p mask=0x%08lX",
            pin, n, p, b, ads, mask);
    Serial.println(buf);
}

void setup() {
    PORT->DIRSET = LED_bm; //set as output
    Serial.begin(9600);
    while (!Serial);
    Serial.println("Nano 33 BLE only has digitalPinToPinName(P) and digitalPinToPort(P)");
    Serial.println("Copy the extra macros to your variant.h");
    Serial.println("");
    Serial.println("running sketch blinks LED @ 5Hz");
    Serial.println("change COM port to view Serial");
    Serial.println("double-click reset button to enter Bootloader");
    Serial.println("change COM port for Bootloader");
    Serial.println("Bootloader has slow heartbeat on LED");
    Serial.println("Build and Upload when Bootloader COM is correct");
    Serial.println("");
    for (int pin = 2; pin <= 13; pin++) show(pin);
    volatile uint32_t *spirstPort = portOutputRegister(digitalPinToPort(8));
    volatile uint32_t *spicsPort = portOutputRegister(digitalPinToPort(10));
    Serial.println((uint32_t)spirstPort, HEX);
    Serial.println((uint32_t)spicsPort, HEX);
}

void loop() {
    PORT->OUTSET = LED_bm;
    delay(100);
    PORT->OUTCLR = LED_bm;
    delay(100);
}

David.