Merge branch 'master' of ssh://master.iot-yun.club:2280/raspberrypi
| | |
| | | * |
| | | ********************************************************************************/ |
| | | |
| | | #include <wiringPi.h> |
| | | #include <wiringPiI2C.h> |
| | | #include <string.h> |
| | | #include <stdio.h> |
| | | #include <stdlib.h> |
| | |
| | | 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) |
| | | { |
| | |
| | | |
| | | 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++) |
| | |
| | | |
| | | apt install -y make vim gawk wget curl unzip sed tree coreutils diffstat git subversion \ |
| | | groff lzop make gcc g++ libtool automake autoconf autoconf-archive flex texinfo bison \ |
| | | build-essential libelf-dev |
| | | build-essential libelf-dev lrzsz |
| | | |
| | | # apt-cache policy libssl-dev |
| | | apt install -y libssl-dev=1.1.1n-0+deb11u1 libssl1.1 |