I figured out the problem. There were a few.
In order to write, I need to set the first byte of the xfer.data as a location on the page.
in order to read I need to write a buffer to the xfer.data witht the same locaiton on the page.
the subaddress should be the same as where i initially wrote the data and the size should be 1.
then i need to set to read, with the same subaddress with size of 0. The code is as follows.
to write:
i2c_master_transfer_t xfer;
memset(&xfer, 0, sizeof(xfer));
buffer[0] = 0; // this is the LSB of the position it should be with in the page 0-63 64-127 128-255
////////////////////write to read///////////
xfer.flags = kI2C_TransferDefaultFlag;
xfer.slaveAddress = EEPROM_I2C_ADDRESS >> 1;
xfer.direction = kI2C_Write;
xfer.subaddress = 0x01u;//This is the MSB of the address
xfer.subaddressSize = 1;
xfer.data = buffer;
xfer.dataSize = size;
I2C_MasterTransferBlocking(NTAG_I2C_MASTER_BASEADDR, &xfer);
//Read
//First Write to read
uintu_t tx[1];
tx[0] = 0; // should be the same as initial write
////////////////////write to read///////////
xfer.flags = kI2C_TransferDefaultFlag;
xfer.slaveAddress = EEPROM_I2C_ADDRESS >> 1;
xfer.direction = kI2C_Write;
xfer.subaddress = 0x01u;//should be the same as write
xfer.subaddressSize = 1;
xfer.data = tx;
xfer.dataSize = 1;
I2C_MasterTransferBlocking(NTAG_I2C_MASTER_BASEADDR, &xfer);
//read
uint8_t Rbuffer[size];
xfer.flags = kI2C_TransferDefaultFlag; /*!< A transfer flag which controls the transfer. */
xfer.slaveAddress = EEPROM_I2C_ADDRESS >> 1;/*!< 7-bit slave address. */
xfer.direction = kI2C_Read; /*!< A transfer direction, read or write. */
xfer.subaddress = 0x01U; /*!< A sub address. Transferred MSB first. */ //should be the same as the write
xfer.subaddressSize = 0; /*Read Page*//*!< A size of the command buffer. */
xfer.data = Rbuffer; /*!< A transfer buffer. */
xfer.dataSize = size; /*!< A transfer size. */
I2C_MasterTransferBlocking(NTAG_I2C_MASTER_BASEADDR, &xfer);// the Rbuffer will be populated with the read from eeprom