/*********************************************************************************
|
* Copyright: (C) 2019 LingYun IoT System Studio
|
* All rights reserved.
|
*
|
* Filename: main.c
|
* Description: This file
|
*
|
* Version: 1.0.0(29/01/19)
|
* Author: Guo Wenxue <guowenxue@gmail.com>
|
* ChangeLog: 1, Release initial version on "29/01/19 15:34:41"
|
*
|
********************************************************************************/
|
#include <stdio.h>
|
#include <time.h>
|
#include <unistd.h>
|
|
#include "logger.h"
|
#include "hal.h"
|
|
/********************************************************************************
|
* Description:
|
* Input Args:
|
* Output Args:
|
* Return Value:
|
********************************************************************************/
|
int main (int argc, char **argv)
|
{
|
float temp;
|
float rh;
|
|
//if( logger_init("mqttd.log", LOG_LEVEL_DEBUG, 1024) < 0 )
|
if( logger_init(DBG_LOG_FILE, LOG_LEVEL_DEBUG, 1024) < 0 )
|
{
|
fprintf(stderr, "Logger system initialise failure\n");
|
return -1;
|
}
|
|
|
log_dbg("Logger system initialise ok\n");
|
|
#if 0
|
if( hal_init() < 0 )
|
{
|
log_err("Initialise hardware failure\n");
|
return -1;
|
}
|
#endif
|
|
log_nrml("HAL initialise ok\n");
|
|
|
logger_term();
|
|
return 0;
|
} /* ----- End of main() ----- */
|