Skip to content

Commit

Permalink
#42 Cleanup. Needs to use custom partitions.csv for NVS
Browse files Browse the repository at this point in the history
  • Loading branch information
martinberlin committed Jul 5, 2021
1 parent a303f84 commit 0e66e4e
Show file tree
Hide file tree
Showing 5 changed files with 516 additions and 130 deletions.
6 changes: 4 additions & 2 deletions components/esp_rainmaker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ set(console_priv_includes "src/console")
set(standard_types_srcs "src/standard_types/esp_rmaker_standard_params.c"
"src/standard_types/esp_rmaker_standard_devices.c"
"src/standard_types/esp_rmaker_standard_services.c")
# COMMON
set(common_srcs "src/common/app_wifi.cpp")

idf_component_register(SRCS ${core_srcs} ${mqtt_srcs} ${ota_srcs} ${standard_types_srcs} ${console_srcs}
idf_component_register(SRCS ${core_srcs} ${common_srcs} ${mqtt_srcs} ${ota_srcs} ${standard_types_srcs} ${console_srcs}
INCLUDE_DIRS "include"
PRIV_INCLUDE_DIRS ${core_priv_includes} ${ota_priv_includes} ${console_priv_includes}
REQUIRES
REQUIRES qrcode
PRIV_REQUIRES ${priv_req})

target_add_binary_data(${COMPONENT_TARGET} "server_certs/mqtt_server.crt" TEXT)
Expand Down
4 changes: 4 additions & 0 deletions components/esp_rainmaker/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Note:
**app_wifi**

Added here also from [Rainmaker common directory](https://github.com/espressif/esp-rainmaker/tree/master/examples) in examples was also added here and probably will be moved elsewhere in a future refactoring.
28 changes: 28 additions & 0 deletions components/esp_rainmaker/include/app_wifi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#pragma once
#include <esp_err.h>


#ifdef __cplusplus
extern "C" {
#endif
/** Types of Proof of Possession */
typedef enum {
/** Use MAC address to generate PoP */
POP_TYPE_MAC,
/** Use random stream generated and stored in fctry partition during claiming process as PoP */
POP_TYPE_RANDOM
} app_wifi_pop_type_t;

void app_wifi_init();
esp_err_t app_wifi_start(app_wifi_pop_type_t pop_type);

#ifdef __cplusplus
}
#endif
Loading

0 comments on commit 0e66e4e

Please sign in to comment.