"gpio.h" 2 differents files

mozufferey
Posts: 8
Joined: Thu Aug 10, 2017 7:21 pm

"gpio.h" 2 differents files

Postby mozufferey » Thu Oct 19, 2017 7:21 am

If found two files with the name gpio.h which are located

1) ~esp-idf\components\driver\include\driver\gpio.h
2) ~esp\esp-idf\components\esp32\include\rom\gpio.h

In the SDK the two of them are clearly identify. e.g. in ~esp\esp-idf\components\driver\sdmmc_host.c

Code: Select all

#include "rom/gpio.h"
#include "driver/gpio.h"


I found it however very dangerous. Maybe the less used should be renamed.

mozufferey
Posts: 8
Joined: Thu Aug 10, 2017 7:21 pm

Re: "gpio.h" 2 differents files

Postby mozufferey » Thu Nov 02, 2017 7:07 am

I made some systematic analysis and found that many files are doubles, often same name with different content, I give here the full list as completion of this post. Note files and repository are alphabetic sorted.


_types.h
./newlib/include/machine/_types.h
./newlib/include/sys/_types.h

aes.h
./bt/bluedroid/stack/smp/include/aes.h
./esp32/include/hwcrypto/aes.h
./esp32/include/rom/aes.h
./mbedtls/include/mbedtls/aes.h
./wpa_supplicant/include/crypto/aes.h

allocator.h
./bt/bluedroid/osi/include/allocator.h
./nghttp/nghttp2/src/allocator.h

arc4.h
./lwip/include/lwip/netif/ppp/polarssl/arc4.h
./mbedtls/include/mbedtls/arc4.h

asn1.h
./mbedtls/include/mbedtls/asn1.h
./wpa_supplicant/include/wpa2/tls/asn1.h

aws_iot_config.h
./aws_iot/aws-iot-device-sdk-embedded-C/samples/linux/shadow_sample/aws_iot_config.h
./aws_iot/aws-iot-device-sdk-embedded-C/samples/linux/shadow_sample_console_echo/aws_iot_config.h
./aws_iot/aws-iot-device-sdk-embedded-C/samples/linux/subscribe_publish_cpp_sample/aws_iot_config.h
./aws_iot/aws-iot-device-sdk-embedded-C/samples/linux/subscribe_publish_library_sample/aws_iot_config.h
./aws_iot/aws-iot-device-sdk-embedded-C/samples/linux/subscribe_publish_sample/aws_iot_config.h
./aws_iot/aws-iot-device-sdk-embedded-C/tests/integration/include/aws_iot_config.h
./aws_iot/aws-iot-device-sdk-embedded-C/tests/unit/include/aws_iot_config.h
./aws_iot/aws-iot-device-sdk-embedded-C/include/aws_iot_error.h
./aws_iot/include/aws_iot_config.h

aws_iot_log.h
./aws_iot/aws-iot-device-sdk-embedded-C/include/aws_iot_log.h
./aws_iot/include/aws_iot_log.h

base64.h
./mbedtls/include/mbedtls/base64.h
./nghttp/nghttp2/src/base64.h
./wpa_supplicant/include/crypto/base64.h
./wpa_supplicant/include/wpa2/utils/base64.h

bignum.h
./mbedtls/include/mbedtls/bignum.h
./mbedtls/port/include/mbedtls/bignum.h
./wpa_supplicant/include/wpa2/tls/bignum.h
./wpa_supplicant/src/crypto/bignum.h

board.h
./esp32/include/xtensa/board.h
./esp32/include/xtensa/xtav110/xtensa/board.h
./esp32/include/xtensa/xtav200/xtensa/board.h
./esp32/include/xtensa/xtav60/xtensa/board.h
./esp32/include/xtensa/xtkc705/xtensa/board.h
./esp32/include/xtensa/xtml605/xtensa/board.h

bt_vendor_lib.h
./bt/bluedroid/hci/include/bt_vendor_lib.h
./bt/bluedroid/include/bt_vendor_lib.h

buffer.h
./bt/bluedroid/osi/include/buffer.h
./nghttp/nghttp2/src/buffer.h

coap_config.h
./coap/libcoap/examples/contiki/coap_config.h
./coap/libcoap/examples/lwip/coap_config.h

common.h
./libsodium/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/common.h
./libsodium/libsodium/src/libsodium/include/sodium/private/common.h
./nghttp/nghttp2/third-party/mruby/include/mruby/common.h
./wpa_supplicant/include/crypto/common.h
./wpa_supplicant/include/wpa/common.h

config.h
./bt/bluedroid/osi/include/config.h
./mbedtls/include/mbedtls/config.h
./newlib/include/config.h
./newlib/include/sys/config.h
./nghttp/port/include/config.h

core.h
./esp32/include/xtensa/config/core.h
./libsodium/libsodium/src/libsodium/include/sodium/core.h

core-isa.h
./esp32/include/xtensa/config/core-isa.h
./newlib/include/xtensa/config/core-isa.h

crc.h
./esp32/include/rom/crc.h
./nvs_flash/test_nvs_host/crc.h

debug.h
./coap/libcoap/include/coap/debug.h
./lwip/include/lwip/lwip/debug.h
./mbedtls/include/mbedtls/debug.h
./nghttp/nghttp2/third-party/mruby/include/mruby/debug.h

defs.h
./esp32/include/xtensa/config/defs.h
./wpa_supplicant/include/wpa/defs.h

des.h
./lwip/include/lwip/netif/ppp/polarssl/des.h
./mbedtls/include/mbedtls/des.h

eap.h
./lwip/include/lwip/netif/ppp/eap.h
./wpa_supplicant/include/wpa2/eap_peer/eap.h

ecp.h
./lwip/include/lwip/netif/ppp/ecp.h
./mbedtls/include/mbedtls/ecp.h

endian.h
./newlib/include/machine/endian.h
./wpa_supplicant/port/include/endian.h

errno.h
./newlib/include/errno.h
./newlib/include/sys/errno.h

error.h
./nghttp/nghttp2/src/shrpx_error.h
./nghttp/nghttp2/third-party/mruby/include/mruby/error.h
./nghttp/nghttp2/third-party/mruby/src/error.h

gpio.h
./driver/include/driver/gpio.h
./esp32/include/rom/gpio.h

ieeefp.h
./newlib/include/ieeefp.h
./newlib/include/machine/ieeefp.h

includes.h
./wpa_supplicant/include/crypto/includes.h
./wpa_supplicant/include/wpa/includes.h

inet.h
./lwip/include/lwip/lwip/inet.h
./lwip/include/lwip/port/arpa/inet.h

jsmn.h
./aws_iot/aws-iot-device-sdk-embedded-C/external_libs/jsmn/jsmn.h
./jsmn/include/jsmn.h

libtommath.h
./wpa_supplicant/include/wpa2/tls/libtommath.h
./wpa_supplicant/src/crypto/libtommath.h

list.h
./bt/bluedroid/osi/include/list.h
./freertos/include/freertos/list.h
./wpa_supplicant/include/wpa/list.h

lwipopts.h
./coap/libcoap/examples/lwip/lwipopts.h
./lwip/include/lwip/port/lwipopts.h

malloc.h
./newlib/include/machine/malloc.h
./newlib/include/malloc.h

md4.h
./lwip/include/lwip/netif/ppp/polarssl/md4.h
./mbedtls/include/mbedtls/md4.h

md5.h
./lwip/include/lwip/netif/ppp/polarssl/md5.h
./mbedtls/include/mbedtls/md5.h
./wpa_supplicant/include/crypto/md5.h

mem.h
./coap/libcoap/include/coap/mem.h
./lwip/include/lwip/lwip/mem.h

miniz.h
./esp32/include/rom/miniz.h
./esptool_py/esptool/flasher_stub/miniz.h

net.h
./coap/libcoap/include/coap/net.h
./mbedtls/include/mbedtls/net.h

netdb.h
./lwip/include/lwip/lwip/netdb.h
./lwip/include/lwip/posix/netdb.h

network_platform.h
./aws_iot/aws-iot-device-sdk-embedded-C/platform/linux/mbedtls/network_platform.h
./aws_iot/aws-iot-device-sdk-embedded-C/tests/unit/tls_mock/network_platform.h
./aws_iot/include/network_platform.h

opcode.h
./nghttp/nghttp2/third-party/mruby/include/mruby/opcode.h
./nghttp/nghttp2/third-party/mruby/src/opcode.h

param.h
./newlib/include/machine/param.h
./newlib/include/sys/param.h

phy.h
./esp32/phy.h
./ethernet/include/eth_phy/phy.h

pkcs5.h
./mbedtls/include/mbedtls/pkcs5.h
./wpa_supplicant/include/wpa2/tls/pkcs5.h

queue.h
./esp32/include/rom/queue.h
./freertos/include/freertos/queue.h
./newlib/include/sys/queue.h

random.h
./nghttp/nghttp2/third-party/mruby/mrbgems/mruby-random/src/random.h
./wpa_supplicant/include/crypto/random.h

reent.h
./newlib/include/reent.h
./newlib/include/sys/reent.h

resource.h
./newlib/include/sys/resource.h
./coap/libcoap/include/coap/resource.h

rsa.h
./mbedtls/include/mbedtls/rsa.h
./wpa_supplicant/include/wpa2/tls/rsa.h

rtc.h
./esp32/include/rom/rtc.h
./soc/esp32/include/soc/rtc.h

sched.h
./newlib/include/sched.h
./newlib/include/sys/sched.h

sdkconfig.h
./nvs_flash/test_nvs_host/sdkconfig.h
./wear_levelling/test_wl_host/sdkconfig.h

setjmp.h
./newlib/include/machine/setjmp.h
./newlib/include/setjmp.h

sha.h
./esp32/include/hwcrypto/sha.h
./esp32/include/rom/sha.h

sha1.h
./lwip/include/lwip/netif/ppp/polarssl/sha1.h
./mbedtls/include/mbedtls/sha1.h
./wpa_supplicant/include/crypto/sha1.h

signal.h
./newlib/include/signal.h
./newlib/include/sys/signal.h

specreg.h
./esp32/include/xtensa/config/specreg.h
./esp32/include/xtensa/specreg.h

ssl.h
./mbedtls/include/mbedtls/ssl.h
./openssl/include/openssl/ssl.h

stdio.h
./newlib/include/stdio.h
./newlib/include/sys/stdio.h

stdlib.h
./newlib/include/machine/stdlib.h
./newlib/include/stdlib.h

string.h
./newlib/include/string.h
./newlib/include/sys/string.h
./nghttp/nghttp2/third-party/mruby/include/mruby/string.h

termios.h
./newlib/include/termios.h
./newlib/include/machine/termios.h

threads_platform.h
./aws_iot/aws-iot-device-sdk-embedded-C/platform/linux/pthread/threads_platform.h
./aws_iot/include/threads_platform.h

time.h
./newlib/include/machine/time.h
./newlib/include/sys/time.h
./newlib/include/time.h

timers.h
./freertos/include/freertos/timers.h
./lwip/include/lwip/lwip/timers.h

tls.h
./nghttp/nghttp2/src/tls.h
./wpa_supplicant/include/wpa2/tls/tls.h

trax.h
./esp32/include/xtensa/trax.h
./xtensa-debug-module/include/trax.h

types.h
./micro-ecc/micro-ecc/types.h
./newlib/include/machine/types.h
./newlib/include/sys/types.h

u0.h
./libsodium/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/u0.h
./libsodium/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h

u1.h
./libsodium/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/u1.h
./libsodium/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u1.h

u4.h
./libsodium/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/u4.h
./libsodium/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u4.h

u8.h
./libsodium/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/u8.h
./libsodium/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u8.h

uart.h
./driver/include/driver/uart.h
./esp32/include/rom/uart.h

unistd.h
./newlib/include/sys/unistd.h
./newlib/include/unistd.h

utime.h
./newlib/include/sys/utime.h
./newlib/include/utime.h

version.h
./aws_iot/aws-iot-device-sdk-embedded-C/include/aws_iot_version.h
./bt/bluedroid/btcore/include/version.h
./libsodium/libsodium/builds/msvc/version.h
./libsodium/port_include/sodium/version.h
./mbedtls/include/mbedtls/version.h
./nghttp/nghttp2/third-party/mruby/include/mruby/version.h

ESP_Sprite
Posts: 1182
Joined: Thu Nov 26, 2015 4:08 am

Re: "gpio.h" 2 differents files

Postby ESP_Sprite » Sat Nov 04, 2017 4:42 pm

What's your reasoning to think this is 'very dangerous'?

Who is online

Users browsing this forum: No registered users and 10 guests