A function to write several digital outputs at once (C++ level)

Hello
Do you have a smart proposal to handle digital outputs at once in C++?