applied emit IR process
This commit is contained in:
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -13,6 +13,7 @@
|
|||||||
"random": "cpp",
|
"random": "cpp",
|
||||||
"optional": "cpp",
|
"optional": "cpp",
|
||||||
"memory_resource": "cpp",
|
"memory_resource": "cpp",
|
||||||
"system_error": "cpp"
|
"system_error": "cpp",
|
||||||
|
"*.tcc": "cpp"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -176,8 +176,8 @@ void setup() {
|
|||||||
saveSettings();
|
saveSettings();
|
||||||
|
|
||||||
delay(SYSTEM_DELAY);
|
delay(SYSTEM_DELAY);
|
||||||
connectToAliyunIoT();
|
|
||||||
loadIRPin(ConfigData["pin"]["ir_send"], ConfigData["pin"]["ir_receive"]);
|
loadIRPin(ConfigData["pin"]["ir_send"], ConfigData["pin"]["ir_receive"]);
|
||||||
|
connectToAliyunIoT();
|
||||||
|
|
||||||
alinkCheckTask.attach_scheduled(MQTT_CHECK_INTERVALS, checkAlinkMQTT);
|
alinkCheckTask.attach_scheduled(MQTT_CHECK_INTERVALS, checkAlinkMQTT);
|
||||||
disableIRTask.attach_scheduled(DISABLE_SIGNAL_INTERVALS, disableIR);
|
disableIRTask.attach_scheduled(DISABLE_SIGNAL_INTERVALS, disableIR);
|
||||||
@@ -185,6 +185,7 @@ void setup() {
|
|||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
recvIR();
|
recvIR();
|
||||||
|
// downloadBin();
|
||||||
yield();
|
yield();
|
||||||
aliotKeepAlive();
|
aliotKeepAlive();
|
||||||
}
|
}
|
||||||
|
|||||||
120
src/IRbabyIR.cpp
120
src/IRbabyIR.cpp
@@ -30,20 +30,22 @@
|
|||||||
#include "IRbabyUserSettings.h"
|
#include "IRbabyUserSettings.h"
|
||||||
#include "IRbabyIRIS.h"
|
#include "IRbabyIRIS.h"
|
||||||
#include "IRbabyHttp.h"
|
#include "IRbabyHttp.h"
|
||||||
|
#include "IRbabyUtils.h"
|
||||||
|
|
||||||
#include "IRbabyIR.h"
|
#include "IRbabyIR.h"
|
||||||
|
|
||||||
#define SAVE_PATH "/ir/"
|
#define IR_SERIES_MAX (1024)
|
||||||
|
#define IR_END_CODE (10000)
|
||||||
|
|
||||||
decode_results results; // Somewhere to store the results
|
|
||||||
const uint8_t kTimeout = 50;
|
|
||||||
// As this program is a special purpose capture/decoder, let us use a larger
|
|
||||||
// than normal buffer so we can handle Air Conditioner remote codes.
|
|
||||||
const uint16_t kCaptureBufferSize = 1024;
|
|
||||||
static IRsend * ir_send = nullptr;
|
|
||||||
static IRrecv * ir_recv = nullptr;
|
|
||||||
bool saveSignal();
|
bool saveSignal();
|
||||||
|
|
||||||
|
decode_results results; // Somewhere to store the results
|
||||||
|
const uint8_t k_timeout = 50;
|
||||||
|
// As this program is a special purpose capture/decoder, let us use a larger
|
||||||
|
// than normal buffer so we can handle Air Conditioner remote codes.
|
||||||
|
const uint16_t k_capture_buffer_size = IR_SERIES_MAX;
|
||||||
|
static IRsend * ir_send = nullptr;
|
||||||
|
static IRrecv * ir_recv = nullptr;
|
||||||
|
|
||||||
bool sendIR(String file_name) {
|
bool sendIR(String file_name) {
|
||||||
String save_path = SAVE_PATH + file_name;
|
String save_path = SAVE_PATH + file_name;
|
||||||
@@ -54,9 +56,9 @@ bool sendIR(String file_name) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Serial.println();
|
Serial.println();
|
||||||
uint16_t *data_buffer = (uint16_t *)malloc(sizeof(uint16_t) * 512);
|
uint16_t *data_buffer = (uint16_t *)malloc(sizeof(uint16_t) * IR_SERIES_MAX);
|
||||||
uint16_t length = cache.size() / 2;
|
uint16_t length = cache.size() / 2;
|
||||||
memset(data_buffer, 0x0, 512);
|
memset(data_buffer, 0x0, IR_SERIES_MAX);
|
||||||
INFOF("file size = %d\n", cache.size());
|
INFOF("file size = %d\n", cache.size());
|
||||||
INFOLN();
|
INFOLN();
|
||||||
cache.readBytes((char *)data_buffer, cache.size());
|
cache.readBytes((char *)data_buffer, cache.size());
|
||||||
@@ -70,6 +72,63 @@ bool sendIR(String file_name) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool emitIR(String timing) {
|
||||||
|
char* parts[IR_SERIES_MAX];
|
||||||
|
uint16_t series[IR_SERIES_MAX + 1] = { 0 };
|
||||||
|
int parts_num = 0;
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
parts_num = split_string(timing, parts, ",");
|
||||||
|
if (parts_num > 0) {
|
||||||
|
for (i = 0; i < parts_num; i++) {
|
||||||
|
series[i] = (uint16_t) atoi(parts[i]);
|
||||||
|
// INFOF("%d ", series[i]);
|
||||||
|
}
|
||||||
|
series[i] = (uint16_t) IR_END_CODE;
|
||||||
|
ir_recv->disableIRIn();
|
||||||
|
ir_send->sendRaw(series, parts_num + 1, 38);
|
||||||
|
ir_recv->enableIRIn();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool sendCommand(String file_name, int key) {
|
||||||
|
String save_path = SAVE_PATH;
|
||||||
|
save_path += file_name;
|
||||||
|
if (LittleFS.exists(save_path)) {
|
||||||
|
File cache = LittleFS.open(save_path, "r");
|
||||||
|
if (cache) {
|
||||||
|
UINT16 content_size = cache.size();
|
||||||
|
DEBUGF("content size = %d\n", content_size);
|
||||||
|
|
||||||
|
if (content_size != 0) {
|
||||||
|
UINT8 *content = (UINT8 *)malloc(content_size * sizeof(UINT8));
|
||||||
|
cache.seek(0L, fs::SeekSet);
|
||||||
|
cache.readBytes((char *)content, content_size);
|
||||||
|
ir_binary_open(2, 1, content, content_size);
|
||||||
|
UINT16 *user_data = (UINT16 *)malloc(IR_SERIES_MAX * sizeof(UINT16));
|
||||||
|
UINT16 data_length = ir_decode(0, user_data, NULL, FALSE);
|
||||||
|
|
||||||
|
DEBUGF("data_length = %d\n", data_length);
|
||||||
|
if (LOG_DEBUG) {
|
||||||
|
for (int i = 0; i < data_length; i++)
|
||||||
|
Serial.printf("%d ", *(user_data + i));
|
||||||
|
Serial.println();
|
||||||
|
}
|
||||||
|
ir_recv->disableIRIn();
|
||||||
|
ir_send->sendRaw(user_data, data_length, 38);
|
||||||
|
ir_recv->enableIRIn();
|
||||||
|
ir_close();
|
||||||
|
free(user_data);
|
||||||
|
free(content);
|
||||||
|
} else
|
||||||
|
ERRORF("Open %s is empty\n", save_path.c_str());
|
||||||
|
}
|
||||||
|
cache.close();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void sendStatus(String file, t_remote_ac_status status) {
|
void sendStatus(String file, t_remote_ac_status status) {
|
||||||
String save_path = SAVE_PATH + file;
|
String save_path = SAVE_PATH + file;
|
||||||
String url = String(DOWNLOAD_PREFIX) + file + String(DOWNLOAD_SUFFIX);
|
String url = String(DOWNLOAD_PREFIX) + file + String(DOWNLOAD_SUFFIX);
|
||||||
@@ -89,7 +148,7 @@ void sendStatus(String file, t_remote_ac_status status) {
|
|||||||
cache.seek(0L, fs::SeekSet);
|
cache.seek(0L, fs::SeekSet);
|
||||||
cache.readBytes((char *)content, content_size);
|
cache.readBytes((char *)content, content_size);
|
||||||
ir_binary_open(REMOTE_CATEGORY_AC, 1, content, content_size);
|
ir_binary_open(REMOTE_CATEGORY_AC, 1, content, content_size);
|
||||||
UINT16 *user_data = (UINT16 *)malloc(1024 * sizeof(UINT16));
|
UINT16 *user_data = (UINT16 *)malloc(IR_SERIES_MAX * sizeof(UINT16));
|
||||||
UINT16 data_length = ir_decode(0, user_data, &status, FALSE);
|
UINT16 data_length = ir_decode(0, user_data, &status, FALSE);
|
||||||
|
|
||||||
DEBUGF("data_length = %d\n", data_length);
|
DEBUGF("data_length = %d\n", data_length);
|
||||||
@@ -156,43 +215,6 @@ void initAC(String file) {
|
|||||||
ACStatus[file]["speed"] = 0;
|
ACStatus[file]["speed"] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool sendKey(String file_name, int key) {
|
|
||||||
String save_path = SAVE_PATH;
|
|
||||||
save_path += file_name;
|
|
||||||
if (LittleFS.exists(save_path)) {
|
|
||||||
File cache = LittleFS.open(save_path, "r");
|
|
||||||
if (cache) {
|
|
||||||
UINT16 content_size = cache.size();
|
|
||||||
DEBUGF("content size = %d\n", content_size);
|
|
||||||
|
|
||||||
if (content_size != 0) {
|
|
||||||
UINT8 *content = (UINT8 *)malloc(content_size * sizeof(UINT8));
|
|
||||||
cache.seek(0L, fs::SeekSet);
|
|
||||||
cache.readBytes((char *)content, content_size);
|
|
||||||
ir_binary_open(2, 1, content, content_size);
|
|
||||||
UINT16 *user_data = (UINT16 *)malloc(1024 * sizeof(UINT16));
|
|
||||||
UINT16 data_length = ir_decode(0, user_data, NULL, FALSE);
|
|
||||||
|
|
||||||
DEBUGF("data_length = %d\n", data_length);
|
|
||||||
if (LOG_DEBUG) {
|
|
||||||
for (int i = 0; i < data_length; i++)
|
|
||||||
Serial.printf("%d ", *(user_data + i));
|
|
||||||
Serial.println();
|
|
||||||
}
|
|
||||||
ir_recv->disableIRIn();
|
|
||||||
ir_send->sendRaw(user_data, data_length, 38);
|
|
||||||
ir_recv->enableIRIn();
|
|
||||||
ir_close();
|
|
||||||
free(user_data);
|
|
||||||
free(content);
|
|
||||||
} else
|
|
||||||
ERRORF("Open %s is empty\n", save_path.c_str());
|
|
||||||
}
|
|
||||||
cache.close();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void loadIRPin(uint8_t send_pin, uint8_t recv_pin) {
|
void loadIRPin(uint8_t send_pin, uint8_t recv_pin) {
|
||||||
if (ir_send != nullptr) {
|
if (ir_send != nullptr) {
|
||||||
delete ir_send;
|
delete ir_send;
|
||||||
@@ -203,7 +225,7 @@ void loadIRPin(uint8_t send_pin, uint8_t recv_pin) {
|
|||||||
ir_send = new IRsend(send_pin);
|
ir_send = new IRsend(send_pin);
|
||||||
DEBUGF("Load IR send pin at %d\n", send_pin);
|
DEBUGF("Load IR send pin at %d\n", send_pin);
|
||||||
ir_send->begin();
|
ir_send->begin();
|
||||||
ir_recv = new IRrecv(recv_pin, kCaptureBufferSize, kTimeout, true);
|
ir_recv = new IRrecv(recv_pin, k_capture_buffer_size, k_timeout, true);
|
||||||
disableIR();
|
disableIR();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,13 +30,25 @@
|
|||||||
#include "ir_decode.h"
|
#include "ir_decode.h"
|
||||||
|
|
||||||
void loadIRPin(uint8_t send_pin, uint8_t recv_pin);
|
void loadIRPin(uint8_t send_pin, uint8_t recv_pin);
|
||||||
|
|
||||||
void enableIR();
|
void enableIR();
|
||||||
|
|
||||||
void disableIR();
|
void disableIR();
|
||||||
void sendStatus(String file_name, t_remote_ac_status status);
|
|
||||||
bool sendKey(String file_name, int key);
|
bool downloadBin(int remote_id);
|
||||||
|
|
||||||
bool sendIR(String file_name);
|
bool sendIR(String file_name);
|
||||||
|
|
||||||
|
bool emitIR(String timing);
|
||||||
|
|
||||||
|
bool sendCommand(String file_name, int key);
|
||||||
|
|
||||||
|
void sendStatus(String file_name, t_remote_ac_status status);
|
||||||
|
|
||||||
void recvIR();
|
void recvIR();
|
||||||
|
|
||||||
bool saveIR(String file_name);
|
bool saveIR(String file_name);
|
||||||
|
|
||||||
void initAC(String);
|
void initAC(String);
|
||||||
|
|
||||||
#endif // IRBABY_IR_H
|
#endif // IRBABY_IR_H
|
||||||
@@ -27,12 +27,14 @@
|
|||||||
|
|
||||||
#include <Esp.h>
|
#include <Esp.h>
|
||||||
#include <WString.h>
|
#include <WString.h>
|
||||||
|
#include <LittleFS.h>
|
||||||
|
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "IRbabyGlobal.h"
|
#include "IRbabyGlobal.h"
|
||||||
#include "IRbabySerial.h"
|
#include "IRbabySerial.h"
|
||||||
#include "IRbabyAlink.h"
|
#include "IRbabyAlink.h"
|
||||||
#include "IRbabyHttp.h"
|
#include "IRbabyHttp.h"
|
||||||
|
#include "IRbabyIR.h"
|
||||||
|
|
||||||
#include "IRbabyIRIS.h"
|
#include "IRbabyIRIS.h"
|
||||||
|
|
||||||
@@ -48,10 +50,10 @@ extern String g_device_name;
|
|||||||
extern String g_upstream_topic;
|
extern String g_upstream_topic;
|
||||||
extern int g_app_id;
|
extern int g_app_id;
|
||||||
|
|
||||||
|
|
||||||
char iris_credential_token[CREDENTIAL_MAX] = { 0 };
|
char iris_credential_token[CREDENTIAL_MAX] = { 0 };
|
||||||
char iris_server_address[URL_SHORT_MAX] = { 0 };
|
char iris_server_address[URL_SHORT_MAX] = { 0 };
|
||||||
|
|
||||||
|
|
||||||
// private function declarations
|
// private function declarations
|
||||||
static int processEvent(String event_name, String product_key, String device_name, String content);
|
static int processEvent(String event_name, String product_key, String device_name, String content);
|
||||||
static String buildConnect();
|
static String buildConnect();
|
||||||
@@ -156,6 +158,37 @@ int fetchIrisCredential(String credential_token,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool downloadBin(int remote_id) {
|
||||||
|
bool ret = false;
|
||||||
|
bool protocol_prefix = false;
|
||||||
|
String save_file = "";
|
||||||
|
String download_bin_url;
|
||||||
|
http_error_t http_ret = HTTP_ERROR_GENERIC;
|
||||||
|
|
||||||
|
if (NULL != strstr(iris_server_address, "http://")) {
|
||||||
|
protocol_prefix = true;
|
||||||
|
}
|
||||||
|
if (protocol_prefix) {
|
||||||
|
download_bin_url = String(iris_server_address);
|
||||||
|
} else {
|
||||||
|
download_bin_url = String("http://");
|
||||||
|
download_bin_url.concat(iris_server_address);
|
||||||
|
}
|
||||||
|
download_bin_url.concat(String(DOWNLOAD_BIN_SUFFIX));
|
||||||
|
|
||||||
|
if (-1 != remote_id) {
|
||||||
|
INFOF("notified to download bin: %d", remote_id);
|
||||||
|
save_file = String("ir_") + String(remote_id);
|
||||||
|
|
||||||
|
String temp = String(SAVE_PATH) + String("/") + save_file;
|
||||||
|
if (!LittleFS.exists(temp)) {
|
||||||
|
downLoadFile(download_bin_url, save_file, SAVE_PATH);
|
||||||
|
ret = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
void sendIrisKitConnect() {
|
void sendIrisKitConnect() {
|
||||||
String connectMessage = buildConnect();
|
String connectMessage = buildConnect();
|
||||||
sendRawData(g_upstream_topic.c_str(), (uint8_t*) connectMessage.c_str(), connectMessage.length());
|
sendRawData(g_upstream_topic.c_str(), (uint8_t*) connectMessage.c_str(), connectMessage.length());
|
||||||
@@ -237,8 +270,12 @@ static int handleEmit(String product_key, String device_name, String content) {
|
|||||||
emit_code_doc.clear();
|
emit_code_doc.clear();
|
||||||
if (OK == deserializeJson(emit_code_doc, content)) {
|
if (OK == deserializeJson(emit_code_doc, content)) {
|
||||||
int remote_id = emit_code_doc["remoteId"];
|
int remote_id = emit_code_doc["remoteId"];
|
||||||
int key_number = emit_code_doc["keyNumber"];
|
String key_name = emit_code_doc["keyName"];
|
||||||
INFOF("will emit key : %d for remote %d\n", key_number, remote_id);
|
String key_value = emit_code_doc["keyValue"];
|
||||||
|
INFOF("will emit key : %s for remote %d = %s\n", key_name.c_str(), remote_id, key_value.c_str());
|
||||||
|
emitIR(key_value);
|
||||||
|
} else {
|
||||||
|
INFOF("deserialize failed\n");
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -33,6 +33,8 @@
|
|||||||
#define DOWNLOAD_PREFIX "http://irext-debug.oss-cn-hangzhou.aliyuncs.com/irda_"
|
#define DOWNLOAD_PREFIX "http://irext-debug.oss-cn-hangzhou.aliyuncs.com/irda_"
|
||||||
#define DOWNLOAD_SUFFIX ".bin"
|
#define DOWNLOAD_SUFFIX ".bin"
|
||||||
|
|
||||||
|
// IRext bin code storage
|
||||||
|
#define SAVE_PATH "/ir/"
|
||||||
|
|
||||||
// IRIS communication
|
// IRIS communication
|
||||||
#define EVENT_NAME_CONNECT "__connect"
|
#define EVENT_NAME_CONNECT "__connect"
|
||||||
|
|||||||
71
src/IRbabyUtils.cpp
Normal file
71
src/IRbabyUtils.cpp
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020-2022 IRbaby-IRext
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "IRbabyUtils.h"
|
||||||
|
|
||||||
|
int split_string(const String source, char* parts[], const char* delimiter) {
|
||||||
|
char* pch = NULL;
|
||||||
|
char* copy = NULL;
|
||||||
|
char* tmp = NULL;
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
copy = strdup(source.c_str());
|
||||||
|
if (NULL == copy) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
pch = strtok(copy, delimiter);
|
||||||
|
|
||||||
|
tmp = strdup(pch);
|
||||||
|
if (NULL == tmp) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
parts[i++] = tmp;
|
||||||
|
|
||||||
|
while (pch) {
|
||||||
|
pch = strtok(NULL, delimiter);
|
||||||
|
if (NULL == pch) break;
|
||||||
|
|
||||||
|
tmp = strdup(pch);
|
||||||
|
if (NULL == tmp) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
parts[i++] = tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
free(copy);
|
||||||
|
return i;
|
||||||
|
|
||||||
|
exit:
|
||||||
|
free(copy);
|
||||||
|
for (int j = 0; j < i; j++) {
|
||||||
|
free(parts[j]);
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
32
src/IRbabyUtils.h
Normal file
32
src/IRbabyUtils.h
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020-2022 IRbaby-IRext
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "WString.h"
|
||||||
|
|
||||||
|
#ifndef IRBABY_IRIS_UTILS_H
|
||||||
|
#define IRBABY_IRIS_UTILS_H
|
||||||
|
|
||||||
|
int split_string(const String source, char* parts[], const char* delimiter);
|
||||||
|
|
||||||
|
#endif //IRBABY_IRIS_UTILS_H
|
||||||
|
|
||||||
Reference in New Issue
Block a user