As you already mentioned, it should be avoided to modify the generated code - this would be the end of maintainability...
The solution for the described problem is the usage of inline code.
With inline code definitions you are able to store some snippets of native code (e.g. C code) within the project. During code generation these code snippets are output together with other project members strictly according to the order in which the members are defined. Typical application case is to use inline code to add '#include' directives to the generated code. In this manner you can combine the translated Chora platform-independent code with code to communicate with the target system.
Just take a 'Inline Code' template from the Gallery folder 'Chora' and put it into the unit where your device class resists. Please note, an inline code definition can exist only within a unit.

The inline code snippets are placed in the generated code according to their sequence (Z-order) within the unit file, together with other definitions, such as classes, constants, resources, and so on. Since you want to place the #include section at the beginning of the generated file you have to restack the inline brick backmost:

When you double-click on an Inline brick, you can see the content within the Code Editor. There you can insert your #include statements. Please note, that all inline definitions are considered during code generation only. They have no effect during prototyping.