新版本powerlog2.5,主要改動:
printf("Powerlog Version 2.5\n");
Makefile:
MYSQL = -L/usr/lib64/mysql -lmysqlclient
temperature.c:
UART_Receive(buffer, 4);
UART.h:
int UART_Receive(unsigned char *buf, int len);
UART.c:
int UART_Receive(unsigned char *buf, int len)
{
int n, cnt;
memset(buf, 0, len);
for (cnt = 0; cnt < len; cnt += n)
{
n = read(UART_id, buf + cnt, len - cnt);
if (n == 0)
break;
}
return cnt;
}