I'm using Atmel Studio.
This is my struct:
struct button {
    char *button_port;
    uint8_t button_pin;
    uint8_t flagPress;
    uint8_t flagClick;
    uint8_t buttonCount;
    uint8_t time_button;
} button_left, button_right, button_menu;
I want to set initial button parameters. This is not working:
button_left.button_port = "PORTD";
I'm getting the error
Error expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
However, this works:
struct button button_left = {"PORTD", 6, 0, 0, 0, 12};
How can I use the struct in more comfortable way like this:
button_left.button_port = "PORTD"
 
     
    