summaryrefslogtreecommitdiff
path: root/irmp/irmp.c
AgeCommit message (Collapse)Author
2020-07-18irmp: silence missing prototype compiler warningGerhard Sittig
The sigrok project enforces warnings when public routines of compile units lack prototypes. Add a prototype for the irmp.c:print_spectrum() routine to silence a compiler warning. An alternative would have been to mark the routine as static (it's exclusively used within the same file).
2020-07-18irmp: address unbalanced preprocessor condition (PIC workaround)Gerhard Sittig
The #else inside a multi line comment in combination with the excess yet commented #endif threw off my editor's syntax highlighting and parentheses matching. Use "#if 0" instead to disable the empty side of ANALYZE macros which some PIC compilers are said to not support. No change in behaviour.
2020-07-18irmp: silence signedness compiler warning in IR command comparisonGerhard Sittig
Assume that IR command codes can get represented by a C language 'int' data type. The other value in the comparison is another 'int' anyway.
2020-07-18irmp: silence printf(3) format warnings (simple approach)Gerhard Sittig
Pick low hanging fruit. Stick with the previous implementation's format specifiers, assume that they work on all platforms which IRMP supports. Cast arguments to mere integers where necessary instead, again assume that their range fits as they did in the previous implementation. This silences several of these compiler warnings: irmp.c:3332:25: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=] ANALYZE_PRINTF ("protocol = NIKON, start bit timings: pulse: %3d - %3d, pause: %3d - %3d\n", ^
2020-07-18irmp: introduce (part of) upstream IRMP sourcesGerhard Sittig
Introduce source files and documentation from the GPL'ed IRMP project. Commit those files which represent the IRMP core logic (detection of IR frames), and reference the project's homepage for the remainder. These files correspond to svn://mikrocontroller.net/irmp r191