#ifndef MAIN_H__
#define MAIN_H__

#include "common.h"
#include "device_fileopen.h"
#include "mylog.h"
#include "device_identity.h"
#include "pthread_open.h"

/*设备id读取初始化*/
int device_id_file_init();

/*初始化log日志*/
int mylog_init();

/*wiringPi初始化函数*/
int  wiringPiSetup(); 


/*mqtt的topic初始化*/
int device_mqtt_topic_init();

/*线程初始化函数*/
int thread_start_init(ThreadFunc thread_exit_time, ThreadFunc thread_mqtt_beat,
                 ThreadFunc thread_open_browser, ThreadFunc thread_mqtt_reconnect,
                 ThreadFunc thread_time_calculation, ThreadFunc thread_play_mp3);

/*线程关闭函数*/
void thread_end_close() ;

/*关闭log日志记录*/
void my_log_close();
#endif
