tests: drivers: build_all: add fake serial device for modem tests

Serial device is needed for building drivers that use DEVICE_DT_GET().
None of the currently used modem drivers use that right now, but this is
about to change.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
This commit is contained in:
Marcin Niestroj 2021-06-30 17:19:33 +02:00 committed by Christopher Friedt
commit 9e58a1e475

View file

@ -27,3 +27,11 @@ void main(void)
DEVICE_DT_DEFINE(DT_INST(0, vnd_gpio), NULL, NULL, NULL, NULL,
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, NULL);
#endif
#if DT_NODE_EXISTS(DT_INST(0, vnd_serial))
/* Fake serial device, needed for building drivers that use DEVICE_DT_GET()
* to access serial bus.
*/
DEVICE_DT_DEFINE(DT_INST(0, vnd_serial), NULL, NULL, NULL, NULL,
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, NULL);
#endif