I'm am confused by Section 14.2.3 of the 328P datasheet - Switching between input and output. It seems to say that the DDR and Port bits for a pin cannot be changed at the same time. So you can't switch directly between INPUT and OUTPUT HIGH, and you can't switch directly between INPUT_PULLUP and OUTPUT LOW. You have to change one of the bits, then the other. It doesn't say why you can't do these transitions, or what happens if you do.
But you know, at the assembly level, how could you change these bits at the same time in the first place? Aren't they in different registers? Wouldn't you have to change one, then the other? So maybe that's the point - it is just warning you that you can't change both bits at the same time, and that there is inevitably an intermediate state that you have to deal with.
Well, I guess I'm basically asking whether this should have any effect on my coding. I understand that the order of the pinMode and digitalWrite instructions can matter, but beyond that is there anything in that Section that I need to worry about? Are those rules, or just warnings?