Hi Marcel,
If you need to use the pins from PTC10 to PTC17 you will need to do a shift to the command. Also it will be better to use the PSOR and PCOR register to set/clear the pin logic state. Also the mask will need to change to match the pins.
Here's an example with the changes:
void TFT_CMD (int8_t command)
{
command = command << 10;
uint32_t tmp;
tmp = GPIOC->PDOR & 0xFFFC03FF;
GPIOC->PDOR = tmp | command;
}
If you want to use the SDK functions, you can use the GPIO_PortSet but considering all the pins you want to set, for example:
GPIO_PortSet(GPIOC, command << 10)
Let me know if this helps you.
Best Regards,
Alexis Andalon