[riot-notifications] [RIOT-OS/RIOT] sys/arduino: Added SPI interface (#12118)

Gunar Schorcht notifications at github.com
Thu Sep 5 19:07:11 CEST 2019


gschorcht commented on this pull request.



> @@ -0,0 +1,163 @@
+/*

@maribu Static tests fail for this file since they suppose that the file is a C header file. To avoid static test problems, you have to shift the whole contents of this file to a separate `.hpp` file, for example `spiport.hpp`. File `SPI.h` has only to include this `.hpp` file if the C++ compiler is used. It should therefore look like:
```
#ifndef SPI_H
#define SPI_H

#ifdef __cplusplus
#include "spiport.hpp"
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifdef __cplusplus
}
#endif

#endif /* SPI_H */
```
That is, this C header file does nothing else than to keep source code compatibility and to make static C checks happy. And yes, the separate
```
#ifdef __cplusplus
extern "C" {
#endif
```
definition is required since `./dist/tools/externc/check.sh` is obviously scanning for the exact pattern.

I had the same problems with PR #10592.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12118#pullrequestreview-284409646
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190905/60b9c0ea/attachment-0001.htm>


More information about the notifications mailing list