uapi_gpio_set_dir(en_pin, GPIO_DIRECTION_OUTPUT);
if( wake == 1)
{
- cat1_print_warning("wakeup cat1\n");
+ // cat1_print_warning("wakeup cat1\n");
if(en_value != uapi_gpio_get_output_val(en_pin))
{
uapi_gpio_set_val(en_pin, en_value);
#include "ln_api.h"
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
char *msg = (char *)malloc(64);
if (msg)
{
- int n = snprintf(msg, 64, "{\"status\":%d,\"error\":\"download failed\"}", 2);
+ int n = snprintf(msg, 64, "{\"status\":%d,\"error\":\"download failed\"}", OTA_DOWNLOAD_STATUS_FAILED);
if (n > 0)
do_ln_http_server_recv_data(LN_HTTP_RECV_OTA_DOWNLOAD_MSG, msg, (uint32_t)n);
free(msg);
char *done = (char *)malloc(done_cap);
if (done)
{
- int m = snprintf(done, done_cap, "{\"status\":%d,\"filePath\":\"%s\",\"md5\":\"%s\"}", 1, save_path, g_ln_last_package_md5);
+ int m = snprintf(done, done_cap, "{\"status\":%d,\"filePath\":\"%s\",\"md5\":\"%s\"}", OTA_DOWNLOAD_STATUS_COMPLETED, save_path, g_ln_last_package_md5);
if (m > 0)
do_ln_http_server_recv_data(LN_HTTP_RECV_OTA_DOWNLOAD_MSG, done, (uint32_t)m);
free(done);