
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <linux/types.h>
//#include <linux/jiffies.h>
#include <unistd.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>
#include <pthread.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <netdb.h>        /* getaddrinfo(3) et al.                       */
#include <netinet/in.h>   /* sockaddr_in & sockaddr_in6 definition.      */
#include  <net/if.h>
#include <sys/prctl.h>
#include "driver.h"
#include "hal_interface_api.h"

int main()
{
	int i;
	uint8_t buf[2] = {0};
	int fd;
	while(1)
	{
		fd = open("/dev/gpio_i2c", O_RDWR);
		buf[0] = 0;
		//stm32_gpio_i2c_master_write(fd, 0x90, buf, 1);
		stm32_gpio_i2c_master_read(fd, 0x90, buf, 1);
		printf("---> buf: %#x %#x\n", buf[0], buf[1]);
		close(fd);
		sleep(3);
	}
	close(fd);
	
}
