1 Star 0 Fork 7

f1nder/CGuard

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.c 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
ChannelGuard 提交于 2020-05-09 19:06 . update
#include <stdint.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <unistd.h>
#include <limits.h>
#include <string.h>
#include <pthread.h>
#include <time.h>
#include <stdbool.h>
#include <signal.h>
#define IP 1
#include "AWSMain.h"
#include "App.h"
#include "DB.h"
#include "HAP.h"
#include "HAPBase.h"
#include "HAPPlatform+Init.h"
#include "HAPPlatformAccessorySetup+Init.h"
#include "HAPPlatformBLEPeripheralManager+Init.h"
#include "HAPPlatformKeyValueStore+Init.h"
#include "HAPPlatformMFiHWAuth+Init.h"
#include "HAPPlatformMFiTokenAuth+Init.h"
#include "HAPPlatformRunLoop+Init.h"
#if IP
#include "HAPPlatformServiceDiscovery+Init.h"
#include "HAPPlatformTCPStreamManager+Init.h"
#endif
/**
* @brief the state of light bulb, on: ture; off: false
*/
bool gLightBulbState = false;
unsigned short gChoosedChannel = 0;
pthread_mutex_t gMutexLightBulb;
pthread_t gAWSChannel;
pthread_t gHomeKitChannel;
//gHAPaccessoryServerRef gHAPaccessoryServer;
bool gHAPrequestedFactoryReset;
bool gisHomeKitEnabled;
int main(int argc, char **argv) {
int AWSThreadSuccess = 0;
int HomeKitThreadSuccess = 0;
int channel = 1;
pthread_mutex_init(&gMutexLightBulb, NULL);
AWSThreadSuccess = pthread_create(&gAWSChannel, NULL, (void *)AWSMainFunction, NULL);
if(0 != AWSThreadSuccess){
printf("Create AWS pthread error\n");
exit(1);
}
pthread_join(gAWSChannel, NULL);
printf("End of main process.\n");
return(0);
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/f1nder/CGuard.git
git@gitee.com:f1nder/CGuard.git
f1nder
CGuard
CGuard
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385