BugID:17158311:initialize spiffs if this component included; remove tftp ota funtion as it is abandoned
#include <pwrmgmt_api.h>
#endif
+#ifdef AOS_COMP_SPIFFS
+#include <aos_spiffs.h>
+#endif
+
+
#include <network/network.h>
#ifdef WITH_LWIP_TFTP
#include "lwip/ip_addr.h"
@@ -104,7 +109,6 @@ static void tftp_get_done(int error, int len)
}
extern tftp_context_t client_ctx;
-extern tftp_context_t ota_ctx;
void ota_get_done(int error, int len);
static void tftp_cmd(char *buf, int len, int argc, char **argv)
{
@@ -128,12 +132,6 @@ static void tftp_cmd(char *buf, int len, int argc, char **argv)
ipaddr_aton(argc == 4 ? argv[2] : "10.0.0.2", &dst_addr);
tftp_client_get(&dst_addr, argv[argc - 1], &client_ctx, tftp_get_done);
return;
- } else if (strncmp(argv[1], "ota", 3) == 0) {
- ip_addr_t dst_addr;
- uint8_t gw_ip[4] = {10, 0 , 0, 2};
- memcpy(&dst_addr, gw_ip, 4);
- tftp_client_get(&dst_addr, argv[2], &ota_ctx, ota_get_done);
- return;
}
tftp_print_usage:
@@ -263,6 +261,10 @@ int aos_components_init(kinit_t *kinit)
cli_service_init(kinit);
#endif
+#ifdef AOS_COMP_SPIFFS
+ vfs_spiffs_register();
+#endif
+
#ifdef AOS_COMP_ULOG
ulog_init("A");
#endif
@@ -292,7 +294,6 @@ int aos_components_init(kinit_t *kinit)
gps_init();
#endif
-
/* auto_component generated by the compiler system, now gcc support */
#if defined (__GNUC__) && !defined (__CC_ARM)
/* aos_components_init(); */
