/* Read data from the specified page in AT24CXX.  */
uint32_t at24cxx_read_page(uint32_t u32_page_address, uint32_t u32_page_size, uint8_t *p_rd_buffer)
/* Read data from the specified page in AT24CXX.  */
uint32_t at24cxx_read_page(uint32_t u32_page_address, uint32_t u32_page_size, uint8_t *p_rd_buffer)
{
	twi_package_t twi_package;
	uint32_t start_address = (u32_page_address * u32_page_size) & 0xFFFF;
	twi_package.chip = BOARD_AT24C_ADDRESS;
	at24c_build_word_address(twi_package.addr, start_address);
	twi_package.addr_length = AT24C_MEM_ADDR_LEN;
	twi_package.buffer = p_rd_buffer;
	twi_package.length = u32_page_size;
	if (twi_master_read(BOARD_AT24C_TWI_INSTANCE, &twi_package) !=
			TWI_SUCCESS) {
		return AT24C_READ_FAIL;
	}
	return AT24C_READ_SUCCESS;
}