Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

"ip address type mismatch" and "LEDc configuration error and camera_probe failed" #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions wifi/wifi_ap/components/esp32-camera/driver/xclk.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ static const char* TAG = "camera_xclk";

esp_err_t camera_enable_out_clock(camera_config_t* config)
{
periph_module_enable(PERIPH_LEDC_MODULE);

ledc_timer_config_t timer_conf;
timer_conf.duty_resolution = 2;
timer_conf.freq_hz = config->xclk_freq_hz;
timer_conf.speed_mode = LEDC_HIGH_SPEED_MODE;
timer_conf.timer_num = config->ledc_timer;
timer_conf.clk_cfg = LEDC_USE_APB_CLK;
esp_err_t err = ledc_timer_config(&timer_conf);
if (err != ESP_OK) {
ESP_LOGE(TAG, "ledc_timer_config failed, rc=%x", err);
Expand All @@ -39,6 +38,7 @@ esp_err_t camera_enable_out_clock(camera_config_t* config)
ESP_LOGE(TAG, "ledc_channel_config failed, rc=%x", err);
return err;
}
periph_module_enable(PERIPH_LEDC_MODULE);
return ESP_OK;
}

Expand Down
4 changes: 2 additions & 2 deletions wifi/wifi_ap/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static const char* _STREAM_BOUNDARY = "\r\n--" PART_BOUNDARY "\r\n";
static const char* _STREAM_PART = "Content-Type: image/jpeg\r\nContent-Length: %u\r\n\r\n";

static EventGroupHandle_t s_wifi_event_group;
static ip4_addr_t s_ip_addr;
static esp_ip4_addr_t s_ip_addr;
const int CONNECTED_BIT = BIT0;
extern void led_brightness(int duty);
static camera_config_t camera_config = {
Expand Down Expand Up @@ -277,7 +277,7 @@ static void wifi_init_softap()
ESP_ERROR_CHECK(esp_wifi_start());

uint8_t addr[4] = {192, 168, 4, 1};
s_ip_addr = *(ip4_addr_t*)&addr;
s_ip_addr = *(esp_ip4_addr_t*)&addr;

ESP_LOGI(TAG, "wifi_init_softap finished.SSID:%s password:%s",
ESP_WIFI_SSID, ESP_WIFI_PASS);
Expand Down