summaryrefslogtreecommitdiff
path: root/irmp/irmp.c
AgeCommit message (Collapse)Author
2020-07-19irmp: silence "illegal character encoding" compiler warningGerhard Sittig
Replace non-ASCII characters in the FDC keyboard map with their respective number values, since the character presentation is non-portable and results in compiler warnings. A similar change was done in IRMP version 3.2.0 (SVN r192 as of 2020-06-22) which the sigrok project has not caught up with yet.
2020-07-18irmp: introduce variables for start of IR frame and current sampleGerhard Sittig
Introduce variables in the IRMP core logic which track the current sample number, and the position where the start of an IR frame got detected. The variables are conditional (ANALYZE builds only). Provided by: Rene Staffen Local modification: Drop the initializer for the static variables. They reside in .bss and need not occupy .data space.
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