This is a i2c adxl345 lib designed for esp-idf. Currently there is no i2c lib in esp-idf repository, so I modified a lib from ESP8266 rtos sdk.
Please refer to esp32_i2c_adxl345_main.c.
I only tested GPIO4 and GPIO5. In theory other pins should also work with the same configurations.