/**
  ******************************************************************************
  * @file    I2C_EEPROM.h
  * @author  SINOMCU-AE
  * @brief   Header file of I2C_EEPROM.c file.
  * 
  ******************************************************************************
  * @attention 
  *                           DISCLAIMER
  * The present firmware which is for guidance only aims at providing customers
  * with coding information regarding their products in order for them to save
  * time. As a result, SinoMCU shall not be held liable for any direct,indirect
  * or consequential damages with respect to any claims arising from the content 
  * of such firmware and/or the use made by customers of the coding information 
  * contained herein in connection with their products.
  *
  * <h2><center>&copy; Copyright (c) 2021 sinomcu All rights reserved.</center></h2>
  *
  ******************************************************************************
  */

#ifndef __I2C_EEPROM_H
#define __I2C_EEPROM_H

#include "ms32f0xx.h"

#define AT24C02_ADD            0xA0    // fixed ,A0 A1 A2 GND, 0x50 <<1
#define AT24C02_PAGE_SIZE      0x08    // fixed
#define AT24C02_WORD_ADD_LEN   0x01    // fixed

#define AT24C02_BUFF_LEN       (AT24C02_PAGE_SIZE+AT24C02_WORD_ADD_LEN)        // 0x09,word address+ 8 Byte
#define AT24C02_TEST_WORD_ADD  0x08

#define AT24C02_WR_DELAY_MS    2       // delay timer ms between write and read

ErrorStatus I2C_AT24C02_test(uint8_t word_address);

#endif /* __I2C_EEPROM_H */ 

/******************************** END OF FILE *********************************/
