[riot-notifications] [RIOT-OS/RIOT] drivers/sx126x: Add support for Nucleo -WL55JC (#16579)

José Alamos notifications at github.com
Fri Jun 25 10:36:48 CEST 2021

@jia200x commented on this pull request.

> @@ -148,6 +166,7 @@ int sx126x_init(sx126x_t *dev)
     DEBUG("[sx126x] init: SPI_%i initialized with success\n", dev->params->spi);
+#if !defined(CPU_FAM_STM32WL)

the code here is not CPU specific, but it shouldn't be loaded in the STM32WL case. If there's another SOC that contains similar features, we will need to keep changing these files.

Even more, having these `#ifdef...#endif` everywhere makes it really hard to maintain. For this pattern, I would suggest to use common functions and implement them accordingly. E.g you could have a `sx126x_hw_init` that's implemented for the "SPI" version and the "Periph" version.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210625/be7f4c77/attachment.htm>

More information about the notifications mailing list