ESP32 Native version of Blinky, featureful controller code for WS2811/WS2812/NeoPixels
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

24 řádky
619B

  1. static const char *TAG = "http_serv";
  2. #include "esp_log.h"
  3. #include "http_serv.hpp"
  4. httpd_handle_t start_webserver(void) {
  5. ESP_LOGI(TAG, "Starting HTTP server");
  6. // Default configuration, EXCEPT for the wildcard URI match
  7. httpd_config_t config = HTTPD_DEFAULT_CONFIG();
  8. config.stack_size = 4096 * 4;
  9. config.uri_match_fn = httpd_uri_match_wildcard;
  10. // Start the httpd server
  11. httpd_handle_t server = NULL;
  12. ESP_ERROR_CHECK(httpd_start(&server, &config));
  13. return server;
  14. }
  15. void stop_webserver(httpd_handle_t server) {
  16. if (server) httpd_stop(server);
  17. }