This commit is contained in:
jomjol
2020-10-24 11:56:36 +02:00
parent 0d90977917
commit 1223aa7c70
7 changed files with 48 additions and 6 deletions

View File

@@ -10,6 +10,8 @@
#include "camera_define.h"
#include "driver/ledc.h"
CCamera Camera;
@@ -20,6 +22,42 @@ typedef struct {
size_t len;
} jpg_chunking_t;
///////////////////////////////////////////////////////////////////////////////////////////////////////
#define LEDC_LS_CH2_GPIO (4)
#define LEDC_LS_CH2_CHANNEL LEDC_CHANNEL_2
#define LEDC_LS_TIMER LEDC_TIMER_1
#define LEDC_LS_MODE LEDC_LOW_SPEED_MODE
#define LEDC_TEST_DUTY (4000)
void test(){
ledc_channel_config_t ledc_channel = { };
ledc_channel.channel = LEDC_LS_CH2_CHANNEL;
ledc_channel.duty = 0;
ledc_channel.gpio_num = FLASH_GPIO;
ledc_channel.speed_mode = LEDC_LS_MODE;
ledc_channel.hpoint = 0;
ledc_channel.timer_sel = LEDC_LS_TIMER;
ledc_channel_config(&ledc_channel);
ledc_set_duty(ledc_channel.speed_mode, ledc_channel.channel, LEDC_TEST_DUTY);
ledc_update_duty(ledc_channel.speed_mode, ledc_channel.channel);
vTaskDelay(1000 / portTICK_PERIOD_MS);
};
////////////////////////////////////////////////////////////////////////////////////////////////////////
static size_t jpg_encode_stream(void * arg, size_t index, const void* data, size_t len){
jpg_chunking_t *j = (jpg_chunking_t *)arg;
if(!index){

View File

@@ -402,8 +402,8 @@ void task_reboot(void *pvParameter)
void doReboot(){
LogFile.WriteToFile("Reboot - now");
KillTFliteTasks();
xTaskCreate(&task_reboot, "reboot", configMINIMAL_STACK_SIZE * 64, NULL, 10, NULL);
KillTFliteTasks();
}

View File

@@ -1,4 +1,4 @@
const char* GIT_REV="7e57e85";
const char* GIT_REV="0d90977";
const char* GIT_TAG="";
const char* GIT_BRANCH="rolling";
const char* BUILD_TIME="2020-10-18 09:07";
const char* BUILD_TIME="2020-10-24 11:45";

View File

@@ -1,4 +1,4 @@
const char* GIT_REV="7e57e85";
const char* GIT_REV="0d90977";
const char* GIT_TAG="";
const char* GIT_BRANCH="rolling";
const char* BUILD_TIME="2020-10-18 09:07";
const char* BUILD_TIME="2020-10-24 11:45";