2 Replies Latest reply on Jan 23, 2018 3:27 PM by ichirou.tokuda_1583401

    Emulated EEPROM:cy_en_eeprom_return_value_t EmEEPROM_1_Init (uint32 startAddress)

    ichirou.tokuda_1583401

      Hi All

       

      In Datasheet (Document Number. 002 - 20502 Rev. E) of Emulated EEPROM (Em_EEPROM) 2.0.

      In the description of ComponentntoFunction

      1.cy_en_eeprom_return_value_t EmEEPROM_1_Init (uint32 startAddress)
         Please let me know the return value Type (Viod or uint32 or ...) and the result of this function.


      2.cy_en_eeprom_return_value_t EmEEPROM_1_Write (uint32 addr, void * eepromData, uint32 size)
        Explanation and return value of parameter of this function Type (Viod or uint32 or ...) and the result.

      3.cy_en_eeprom_return_value_t EmEEPROM_1_Read (uint32 addr, void * eepromDdata, uint32 size)
      Explanation and return value of parameter of this function Type (Viod or uint32 or ...) and the result.

      4.cy_en_eeprom_return_value_t EmEEPROM_1_Erase (void)
      Please let me know the return value Type (Viod or uint32 or ...) and the result of this function.


      Thank you.

        • 1. Re: Emulated EEPROM:cy_en_eeprom_return_value_t EmEEPROM_1_Init (uint32 startAddress)
          hima

          Hello,

           

          1)The return value of EEPROM_Init() is 'cy_en_em_eeprom_status_t'. This is an enumerated datatype with the following definition. Basically it returns the status.The return value must be "CY_EM_EEPROM_SUCCESS" for proper operation.

          /** EEPROM return enumeration type */

          typedef enum

          {

              CY_EM_EEPROM_SUCCESS      = 0x00uL,                             /**< The function executed successfully */

              CY_EM_EEPROM_BAD_PARAM    = (CY_EM_EEPROM_ID_ERROR + 1uL),      /**< The input parameter is invalid */

              CY_EM_EEPROM_BAD_CHECKSUM = (CY_EM_EEPROM_ID_ERROR + 2uL),      /**< The data in EEPROM is corrupted */

              CY_EM_EEPROM_BAD_DATA     = (CY_EM_EEPROM_ID_ERROR + 3uL),      /**< Failed to place the EEPROM in flash */

              CY_EM_EEPROM_WRITE_FAIL   = (CY_EM_EEPROM_ID_ERROR + 4uL)       /**< Write to EEPROM failed */

          } cy_en_em_eeprom_status_t;

           

          For all other functions also return value is with enumerated datatype cy_en_em_eeprom_status_t as explained above on section (1).

           

          Please let me know if this helps.

           

          Thanks,

          Hima

          1 of 1 people found this helpful
          • 2. Re: Emulated EEPROM:cy_en_eeprom_return_value_t EmEEPROM_1_Init (uint32 startAddress)
            ichirou.tokuda_1583401

            Hi.Hima san

            Thank you for your reply. 
            I understand that.
            Thank you very much.
            Ichiro.