Echoing an earlier topic of similar title, but I am trying to use a Nano BLE to work with a touchscreen that was designed to work with an UNO. The examples that come with it are tuned to that and related processors. And so I try to compile my touchscreen's simplest example and it tells me
‘PORTD’ was not declared in this scope
for the following code:
void Lcd_Writ_Bus(unsigned char d)
{
PORTD = (PORTD & B00000011) | ((d) & B11111100);
PORTB = (PORTB & B11111100) | ((d) & B00000011);
*(portOutputRegister(digitalPinToPort(LCD_WR))) &= ~digitalPinToBitMask(LCD_WR);
*(portOutputRegister(digitalPinToPort(LCD_WR)))|= digitalPinToBitMask(LCD_WR);
}
So I understand that a newer board/processor is going to be differently organized. How can I translate this operation to be appropriate for my board? And don't worry, I am not afraid of hacking bits.