Rewrite code from MVP to use with Arduino, stuck on errors

I'm trying to rewrite the code from this link at GitHub but I can't seem to solve some of the errors.

The errors I am stuck on when compiling are liste below.

Does anyone know what the correct Arduino code should be?

pinMode(d4, INPUT_PULLDOWN);
sketch_apr18a.ino:41:17: error: ‘INPUT_PULLDOWN’ was not declared in this scope

if(pinReadFast(rs) == 0){
sketch_apr18a.ino:70:22: error: ‘pinReadFast’ was not declared in this scope

upperNibble = (GPIOB -> IDR & 0B0000000011110000) >> 4;
sketch_apr18a.ino:72:25: error: ‘GPIOB’ was not declared in this scope

What Arduino Board are you using?

Arduino boards do not have INPUT_PULLDOWN capability. They only have pull-up resistors you can enable. If your code requires pull-down, you will have to supply them externally.

Same for the other functions (pinReadFast) and constants GPIOB

I'm going to guess that code is meant for an STM32 processor.

I seem to remember that the Due and Zero have internal pull-downs

I’m using a nano at this time.
So I need to supply all 3 functions externally?
How can this be done?

Guess you should start by understanding what the 3 "functions" do.

GPIOB appears to be a pointer to a struct defining a hardware I/O port.

As mentioned, you might have to implement PULL_DOWN with an external resistor.

From its name, I'd guess pinReadFast() does just that .... directly read a port pin without all the niceties that digitalRead supplies.