Commit 8eea9ce6 authored by chen.weican's avatar chen.weican

【修改内容】添加产测相关代码

【提交人】陈伟灿
parent cd33d07d
{
"args": {
"ccu": {
"id": "*",
"version": "*",
"name": "*"
},
"net": {
"interface": "eth1"
},
"qr_code": {
"string": "http://www.ikonke.com",
"show": true
}
},
"config":
{
"path": "/tmp/oled_addr",
"hw_ver": 1
}
}
This diff is collapsed.
#include <stdint.h>
#ifndef __SERIAL_H__
#define __SERIAL_H__
#include <syslog.h>
#if defined __cplusplus
extern "C" {
#endif
/****************************************************************************/
/*** Include files ***/
/****************************************************************************/
/****************************************************************************/
/*** Macro Definitions ***/
/****************************************************************************/
#define _SERIAL_LOG(level, fmt, args...) \
do \
{ \
syslog(level, fmt, ##args); \
printf("\n["__FILE__":%d] "fmt,__LINE__, ##args); \
} while(0)
#define SERIAL_LOG_DBG(fmt, args...) _SERIAL_LOG(LOG_DEBUG, fmt, ##args)
#define SERIAL_LOG_ERR(fmt, args...) _SERIAL_LOG(LOG_ERR, fmt, ##args)
#define SERIAL_NAME "/dev/ttyS0"
#define SERIAL_BAUD 115200
/****************************************************************************/
/*** Type Definitions ***/
/****************************************************************************/
typedef enum
{
E_ERROR = -1,
E_SERIAL_OK = 0,
E_SERIAL_ERROR,
E_SERIAL_NODATA,
E_SERIAL_FD_ERROR,
} teSerial_Status;
/****************************************************************************/
/*** Local Function Prototypes ***/
/****************************************************************************/
/****************************************************************************/
/*** Exported Variables ***/
/****************************************************************************/
extern int serial_fd;
/****************************************************************************/
/*** Local Variables ***/
/****************************************************************************/
/****************************************************************************/
/*** Exported Functions ***/
/****************************************************************************/
void eSerial_start();
void eSerial_stop();
teSerial_Status eSerial_Init(char *name, uint32_t baud, int *piserial_fd);
teSerial_Status eSerial_Read(unsigned char *data);
teSerial_Status eSerial_Write(const unsigned char data);
teSerial_Status eSerial_ReadBuffer(unsigned char *data, int *count);
teSerial_Status eSerial_WriteBuffer(unsigned char *data, uint32_t count);
/****************************************************************************/
/*** Local Functions ***/
/****************************************************************************/
/****************************************************************************/
/*** END OF FILE ***/
/****************************************************************************/
#if defined __cplusplus
}
#endif
#endif /* __SERIAL_H__ */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
LIBA_TARGET := libiot_factory.a
$(call Append_Conditional, LIB_SRCS_EXCLUDE, main.c)
$(call Append_Conditional, SRCS_product_test, main.c)
$(call Append_Conditional, TARGET, product_test)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -21,6 +21,7 @@ SUBDIRS += common/nanomsg
SUBDIRS += common/ev
SUBDIRS += common/sqlite
SUBDIRS += common/hal
SUBDIRS += factory_test_src/src
#SUBDIRS += common/zlog
#SUBDIRS += platform/zigbee
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment