accessors.h 632 B

123456789101112131415161718
  1. /*
  2. This example code is in the Public Domain (or CC0 licensed, at your option.)
  3. Unless required by applicable law or agreed to in writing, this
  4. software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  5. CONDITIONS OF ANY KIND, either express or implied.
  6. */
  7. #pragma once
  8. #include "esp_system.h"
  9. #include "driver/i2c.h"
  10. #include "driver/spi_master.h"
  11. esp_err_t config_i2c_set(const i2c_config_t * config, int port);
  12. const i2c_config_t * config_i2c_get(int * i2c_port);
  13. const spi_bus_config_t * config_spi_get(spi_host_device_t * spi_host);
  14. void parse_set_GPIO(void (*cb)(int gpio, char *value));