however I am using a maple mini thus I do not have these ports forcing me to use for loops and digitalread/write/pinmode slowing my code down significantly
void LatchAddress(uint32_t address)
{
//set address/data ports to output
for (auto pin : GbaPins)
pinMode(pin, OUTPUT);
//divide address by 2 to get word addressing
address >>= 1;
//output address to address pins
for (uint8_t i = 0; i < 24; ++i, address >>= 1)
digitalWrite(GbaPins[i], address & 1);
digitalWrite(CS_PIN, HIGH);
delayMicroseconds(10);
digitalWrite(CS_PIN, LOW);
//set address/data ports to input
for (auto pin : GbaPins)
pinMode(pin, INPUT);
}
I mean I'm trying to figure out what everything is mapped to on the maple mini and can't seem to find any examples and I'm having a hard time understanding the documentation it's not as new user friendly as the arduino doc that simply state like "portx" = these 8 pins and you can set them to high with the folling example lol, if anyone could explain it to me or provide an example/link to a tutorial on this would be appreciated.
By the way, although it may seem overly complex, the official core is built mostly on the STM32 HAL which is the reason why it was possible to add support for so many STM32 processors, in such a short time. The processors themselves, have much more complicated GPIO than the AVR 328 and so as far as simplifying direct access for beginners, is not really possible because the core actually calls HAL to do that stuff. Thus if you want to learn how it's done you need to dig into how the HAL or LL GPIO drivers work.
For your application example, the easiest way would probably be to use the same HAL and LL (low layer) library functions that the core does, to access whole registers. Regardless, you should read this file:
The HAL and LL full documentation can be downloaded from ST.