From 47579e3790b1ee5a1ad2ce35ea6028cd9ddf6ea0 Mon Sep 17 00:00:00 2001 From: GuoWenxue <“guowenxue@gmail.com”> Date: Fri, 29 Apr 2022 09:23:27 +0800 Subject: [PATCH] update client_main.c to use packet_segmented_pack --- modules/c/tsl2561.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/c/tsl2561.c b/modules/c/tsl2561.c index 3884671..33611ac 100644 --- a/modules/c/tsl2561.c +++ b/modules/c/tsl2561.c @@ -12,8 +12,6 @@ * ********************************************************************************/ -#include <wiringPi.h> -#include <wiringPiI2C.h> #include <string.h> #include <stdio.h> #include <stdlib.h> @@ -53,6 +51,8 @@ int tsl_fd = -1; static const int regs_addr[REG_COUNT]={DATA0LOW, DATA0HIGH, DATA1LOW, DATA1HIGH}; + +#define msleep(x) usleep( 1000*(x) ) int tsl2561_init(void) { @@ -166,7 +166,7 @@ tsl2561_power(ON); - delay(410); /* t(CONV) MAX 400ms */ + msleep(410); /* t(CONV) MAX 400ms */ /* Read register Channel0 and channel1 data from register */ for(i=0; i<REG_COUNT; i++) -- Gitblit v1.9.1