change system api ID to 0
This commit is contained in:
parent
fb32c9bdff
commit
5bac7ae67b
|
@ -8,4 +8,4 @@ sdkconfig
|
||||||
dependencies.lock
|
dependencies.lock
|
||||||
package-lock.json
|
package-lock.json
|
||||||
managed_components/
|
managed_components/
|
||||||
version.txt
|
/version.txt
|
|
@ -2,9 +2,9 @@
|
||||||
# 1st stage ROM ,data, ,
|
# 1st stage ROM ,data, ,
|
||||||
# 2nd stage boot ,data,0x1000,
|
# 2nd stage boot ,data,0x1000,
|
||||||
# partition table,data,0xF000,4K(0x1000),
|
# partition table,data,0xF000,4K(0x1000),
|
||||||
begin ,0x40,0x00 , ,0k ,
|
begin ,0x40,0x00 , ,0k ,
|
||||||
nvs ,data,nvs ,0x10000,16K ,
|
nvs ,data,nvs ,0x10000 ,16K ,
|
||||||
phy_init ,data,phy , ,4K ,
|
phy_init,data,phy , ,4K ,
|
||||||
none0 ,0x40,0x00 , ,0k ,
|
none0 ,0x40,0x00 , ,0k ,
|
||||||
ota_0 ,app ,ota_0 ,0x20000,0x1B0000,
|
ota_0 ,app ,ota_0,0x20000 ,0x1B0000,
|
||||||
wt_nvs ,data,nvs , ,64K ,
|
wt_nvs ,data,nvs , ,64K ,
|
||||||
|
|
|
|
@ -1,5 +1,3 @@
|
||||||
#include "wifi_api_json.h"
|
|
||||||
|
|
||||||
#include "api_json_module.h"
|
#include "api_json_module.h"
|
||||||
#include "wifi_api.h"
|
#include "wifi_api.h"
|
||||||
#include "wifi_json_utils.h"
|
#include "wifi_json_utils.h"
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
#ifndef WIFI_API_JSON_H_GUARD
|
|
||||||
#define WIFI_API_JSON_H_GUARD
|
|
||||||
|
|
||||||
#endif //WIFI_API_JSON_H_GUARD
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
file(GLOB SOURCES *.c
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
idf_component_register(
|
idf_component_register(
|
||||||
|
SRCS ${SOURCES}
|
||||||
INCLUDE_DIRS "."
|
INCLUDE_DIRS "."
|
||||||
)
|
)
|
|
@ -9,33 +9,34 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define DECLARE_HANDLE(name) struct name##__ { int unused[0]; }; \
|
||||||
|
typedef struct name##__ *name
|
||||||
|
|
||||||
typedef enum wt_data_type_t {
|
typedef enum wt_data_type_t {
|
||||||
WT_DATA_RESERVED = 0x00,
|
WT_DATA_RESERVED = 0x00,
|
||||||
|
/* primitive type */
|
||||||
WT_DATA_EVENT = 0x02,
|
WT_DATA_EVENT = 0x02,
|
||||||
|
WT_DATA_ROUTE_HDR = 0x03,
|
||||||
|
WT_DATA_RAW_BROADCAST = 0x04,
|
||||||
|
|
||||||
|
/* data_type */
|
||||||
/* broadcast data */
|
/* broadcast data */
|
||||||
WT_DATA_RAW_BROADCAST = 0x10,
|
|
||||||
WT_DATA_CMD_BROADCAST = 0x11,
|
WT_DATA_CMD_BROADCAST = 0x11,
|
||||||
|
|
||||||
/* targeted data */
|
/* targeted data */
|
||||||
WT_DATA_ROUTE_HDR = 0x20,
|
WT_DATA_RAW = 0x20,
|
||||||
WT_DATA_RAW = 0x21,
|
WT_DATA_CMD = 0x21,
|
||||||
WT_DATA_CMD = 0x22,
|
WT_DATA_RESPONSE = 0x22,
|
||||||
WT_DATA_RESPONSE = 0x23,
|
|
||||||
|
|
||||||
/* standard protocols */
|
/* standard protocols */
|
||||||
WT_DATA_PROTOBUF = 0x40,
|
WT_DATA_PROTOBUF = 0x40,
|
||||||
WT_DATA_JSON = 0x41,
|
WT_DATA_JSON = 0x41,
|
||||||
WT_DATA_MQTT = 0x42,
|
WT_DATA_MQTT = 0x42,
|
||||||
|
|
||||||
WT_USER_DATA_TYPE_BEGIN = 0xA0,
|
|
||||||
WT_USER_DATA_TYPE_END = 0xFE,
|
|
||||||
WT_DATA_TYPE_MAX = 0xFF,
|
|
||||||
} __attribute__((packed)) wt_data_type_t;
|
} __attribute__((packed)) wt_data_type_t;
|
||||||
_Static_assert(sizeof(wt_data_type_t) == 1, "wt_data_type_t must be 1 byte");
|
_Static_assert(sizeof(wt_data_type_t) == 1, "wt_data_type_t must be 1 byte");
|
||||||
|
|
||||||
typedef struct wt_bin_data_hdr_t {
|
typedef struct wt_bin_data_hdr_t {
|
||||||
wt_data_type_t data_type; /* type of the hdr+payload */
|
wt_data_type_t data_type; /* type of the payload */
|
||||||
union {
|
union {
|
||||||
/* when targeted message -> bin data handle */
|
/* when targeted message -> bin data handle */
|
||||||
struct {
|
struct {
|
||||||
|
@ -61,12 +62,17 @@ typedef struct wt_bin_data_internal_t {
|
||||||
struct {
|
struct {
|
||||||
uint64_t Dummy1;
|
uint64_t Dummy1;
|
||||||
uint64_t Dummy2;
|
uint64_t Dummy2;
|
||||||
} Dummy; /* 16 byte padding for httpd_ws_frame */
|
} ws_frame_slot; /* 16 byte padding for httpd_ws_frame */
|
||||||
struct {
|
struct { /* */
|
||||||
uint16_t data_len;
|
uint16_t data_len;
|
||||||
uint8_t src_module;
|
uint8_t src_module;
|
||||||
uint8_t src_sub_module;
|
uint8_t src_sub_module;
|
||||||
};
|
};
|
||||||
|
struct { /* */
|
||||||
|
uint8_t send_count;
|
||||||
|
uint8_t reserved1;
|
||||||
|
uint16_t reserved2;
|
||||||
|
};
|
||||||
wt_bin_data_t data;
|
wt_bin_data_t data;
|
||||||
} wt_bin_data_internal_t;
|
} wt_bin_data_internal_t;
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,19 @@ idf_component_register(
|
||||||
global_resource esp_app_format api_router
|
global_resource esp_app_format api_router
|
||||||
)
|
)
|
||||||
|
|
||||||
string(TIMESTAMP CURRENT_DATE "%Y-%m-%d")
|
# Execute the Git command to get the formatted commit date
|
||||||
add_compile_definitions(FW_UPD_DATE="${CURRENT_DATE}")
|
execute_process(
|
||||||
|
COMMAND git show -s --format=%cd --date=format:'%Y-%m-%d'
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
OUTPUT_VARIABLE FM_DATE
|
||||||
|
RESULT_VARIABLE result
|
||||||
|
ERROR_VARIABLE git_error
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT "${result}" STREQUAL "0")
|
||||||
|
message(WARNING "Git command failed with: ${git_error}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_compile_definitions(${COMPONENT_LIB} PRIVATE FW_UPD_DATE="${FM_DATE}")
|
||||||
idf_component_set_property(${COMPONENT_NAME} WHOLE_ARCHIVE ON)
|
idf_component_set_property(${COMPONENT_NAME} WHOLE_ARCHIVE ON)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#ifndef WT_SYSTEM_API_H_GUARD
|
#ifndef WT_SYSTEM_API_H_GUARD
|
||||||
#define WT_SYSTEM_API_H_GUARD
|
#define WT_SYSTEM_API_H_GUARD
|
||||||
|
|
||||||
#define SYSTEM_MODULE_ID 6
|
#define SYSTEM_MODULE_ID 0
|
||||||
|
|
||||||
typedef enum wt_system_cmd_t {
|
typedef enum wt_system_cmd_t {
|
||||||
WT_SYS_GET_FM_INFO = 1,
|
WT_SYS_GET_FM_INFO = 1,
|
||||||
|
|
Loading…
Reference in New Issue