Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/linux-sunxi/sunxi-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/pio.c
AgeCommit message (Collapse)Author
2018-07-09Fix two warnings about implicit fallthrough.Ian Campbell
In the first case: pio.c: In function ‘main’: pio.c:355:4: warning: this statement may fall through [-Wimplicit-fallthrough=] usage(0); ^~~~~~~~ pio.c:356:3: note: here case 'm': ^~~~ The fallthrough is not intended because `usage()` never returns (it calls `exit` unconditionally). Annotate as `noreturn` so the compiler realises this. In the second case: fexc.c: In function ‘main’: fexc.c:312:15: warning: this statement may fall through [-Wimplicit-fallthrough=] filename[1] = argv[optind+1]; /* out */ ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ fexc.c:313:2: note: here case 1: ^~~~ The fallthrough appears to be intended (the two argument case is a superset of the one argument case). Annotate with a comment which tells the compiler this is intended. Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
2018-07-09pio: add missing return statementAndre Przywara
main() should return 0 if execution was successful. Signed-off-by: Andre Przywara <osp@andrep.de>
2018-07-09pio: fix typo in help messageAndre Przywara
Signed-off-by: Andre Przywara <osp@andrep.de>
2016-10-26Have a workaround for missing mmap() in fexc.c and pio.cBernhard Nortmann
By defining NO_MMAP it's now possible to avoid the usage of mmap() and munmap(). This benefits platforms that don't support these functions, e.g. Windows. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2016-10-24Have programs display version information in their usage helpBernhard Nortmann
This way we don't have to introduce new options for retrieving version info. For those programs that do not output their usage by default (e.g. because they would process stdin), you may pass a "-?" option to get help - and thus version information. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2016-05-04Get rid of two "unused parameter" warningsBernhard Nortmann
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2016-05-03Makefile: Have portable_endian.h properly expose all functionsBernhard Nortmann
For Linux, this requires additional #defines, see https://gist.github.com/panzi/6856583#gistcomment-1656524 Placing those #defines into portable_endian.h would mean we depend on the specific order of #includes (whatever pulls in endian.h first, including other system includes). Avoid this by using symbols provided "globally" via the Makefile. Also nuke the _NETBSD_SOURCE definition in fel.c Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2016-04-20Replace endian_compat.h with portable_endian.hBernhard Nortmann
Our previous include file only supplied a very limited set of wrapper redefinitions for platforms that define __APPLE__ (i.e. Mac OS). In particular, some needed big endian conversions were missing, causing "symbol(s) not found" errors when linking. Instead of patching the existing file, let's do away with it completely and replace it by something more sophisticated. The portable_endian.h used is in the public domain, and was taken from https://gist.github.com/panzi/6856583 Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2015-09-13fix compiler warnings due to deprecated _BSD_SOURCEBernhard Nortmann
With glibc 2.20 (and newer), defining _BSD_SOURCE (only) will now generate compiler warnings similar to: /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] See the glibc 2.20 release notes, https://lwn.net/Articles/611162/. This patch adds the required _DEFAULT_SOURCE. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de> Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
2014-01-29Fix bogus usage message in pio tool.Michal Suchanek
Signed-off-by: Michal Suchanek <hramrach@gmail.com> Signed-off-by: Henrik Nordstrom <henrik@henriknordstrom.net>
2013-04-12pio.c: Fix broken file I/OAngus Gratton
2013-01-21pio: Add mmap supportHenrik Nordstrom
2012-09-29pio: add missing copyright noteAlejandro Mery
and remove unused macro
2012-09-05pio: Fix Pxx= and Pxx? commandsHenrik Nordstrom
2012-09-05pio: Add = and ? pin commands for easier GPIO operationHenrik Nordstrom
2012-08-07move OSX compatible <endian.h> exception to a common "endian_compat.h" headerAlejandro Mery
2012-08-01pio: Correct drv_level settingHenrik Nordstrom
2012-08-01pio: Correct parsing of pin valuesHenrik Nordstrom
2012-08-01pio manipulation optionsHenrik Nordstrom
2012-07-31pio: clean offset pattern in pio_get() and pio_set()Alejandro Mery
2012-07-31pio: add pio_set() helperAlejandro Mery
2012-07-31pio: fix pio_get()'s data extractionAlejandro Mery
2012-07-31pio: add `pio print < PIO` to turn a PIO dump into human readableAlejandro Mery