Imho, it's needed to extra wait in this function for end of SPI transmission like:
while (ST7789_SPI->SR & SPI_SR_BSY);
because we can't change DC pin while transmitting data and waiting for end of transmission is not available outside.
Waiting for end of DMA transmission is not enough cause it's ended before actual SPI transmission has ended.
Imho, it's needed to extra wait in this function for end of SPI transmission like: while (ST7789_SPI->SR & SPI_SR_BSY); because we can't change DC pin while transmitting data and waiting for end of transmission is not available outside.
Waiting for end of DMA transmission is not enough cause it's ended before actual SPI transmission has ended.