Skip to content

Commit

Permalink
wiringPi: Refactor source codes including fixes for collisions that'd…
Browse files Browse the repository at this point in the history
… occur

Replace WiringPi header files to the ODROID specific files
 - Note: To avoid unforeseen errors when working with Python Wrapper.
   Python Wrapper doesn't recognize the ODROID specific header files and
   its introduced functions, declarations. So just thought that fixing
   Python Wrapper is much more complicated than replacing the header files
   and it seems more suitable for the later updates.
Fix messaging implicit declaration of core functions
Fix collisions of functions/declarations by header files
 - Note: In each ODROID sources, the prefix '_' have to be added to the
   core functions in order to avoid the collisions that non-static function
   follows static function. This is because of importing "wiringPi.h" header
   file that has extern core functions which names the same as listed in
   each ODROID source code file. So the core functions that exported from
   here must have that prefix, and only to be assigned its pointer to the
   "libodroid" structure.

Change-Id: Ia927c7946cfb6ca6ce3a02530936325e1acb0620
  • Loading branch information
joshua-yang committed Feb 25, 2019
1 parent 1f53a9c commit 4b08e7f
Show file tree
Hide file tree
Showing 26 changed files with 2,301 additions and 4,141 deletions.
11 changes: 0 additions & 11 deletions gpio/Makefile
Expand Up @@ -30,9 +30,6 @@ ifneq ($V,1)
Q ?= @
endif

# BRAND_NAME = Pi
BRAND_NAME = Odroid

#DEBUG = -g -O0
DEBUG = -O2
CC = gcc
Expand All @@ -44,16 +41,8 @@ LIBS = -lwiringPi -lwiringPiDev -lpthread -lrt -lm -lcrypt

# May not need to alter anything below this line
###############################################################################
ifeq ($(BRAND_NAME), Odroid)

SRC = gpio_odroid.c readall_odroid.c pins.c

else

SRC = gpio.c readall.c pins.c

endif

OBJ = $(SRC:.c=.o)

all: gpio
Expand Down

0 comments on commit 4b08e7f

Please sign in to comment.