#include <stdio.h>
#include <time.h>
#include <string.h>
#define M24C16_ADDRESS 0x50
#define M24C16_PAGE_SIZE 16
#define WRITE_TIME_NS (5 * 1000000)
int main(void)
{
uint8_t txData[100] = {0x00};
uint8_t rxData[100] = {0x00};
const char * string = "RaspberryPi";
struct timespec sleepForWriteTime;
sleepForWriteTime.tv_sec = 0;
sleepForWriteTime.tv_nsec = WRITE_TIME_NS;
memcpy(&txData[1], string, strlen(string));
{
}
{
}
{
}
{
}
{
}
nanosleep(&sleepForWriteTime, NULL);
{
}
{
}
else if (printf("Received Data:\n%s\n", rxData))
{
}
else if (memcmp(txData, rxData, 13) != 0)
{
}
return rtn;
}