IntEEPROM
 
 
 Bean IntEEPROM
 
Internal EEPROM

Methods are user callable functions/subroutines that are means of controlling the bean functions.

Methods:

  • Methods for Atmel AVR or Freescale HCS12 derivatives.
    • DisableEvent - This method disables all the events.

        ANSIC prototype: byte DisableEvent(void)
      • Return value:byte - Error code, possible codes:
        • ERR_OK
        • ERR_SPEED

    • EnableEvent - This method enables all the events.

        ANSIC prototype: byte EnableEvent(void)
      • Return value:byte - Error code, possible codes:
        • ERR_OK
        • ERR_SPEED

  • SetByte - Method writes a given byte to a specified address in EEPROM.

      ANSIC prototype: byte SetByte(BeanName_TAddress Addr,byte Data)
    • Addr:BeanName_TAddress - Address to EEPROM
    • Data:byte - Data to write
    • Return value:byte - Error code, possible codes:
      • ERR_OK
      • ERR_SPEED
      • ERR_BUSY
      • ERR_VALUE
      • ERR_NOTAVAIL
      • ERR_RANGE

  • GetByte - Method reads a byte from a specified EEPROM address

      ANSIC prototype: byte GetByte(BeanName_TAddress Addr,byte *Data)
    • Addr:BeanName_TAddress - EEPROM Address
    • Data: Pointer to byte - A pointer to the returned 8-bit data
    • Return value:byte - Error code, possible codes:
      • ERR_OK
      • ERR_BUSY
      • ERR_RANGE

  • Methods for Freescale HCS12 derivatives.
    • SetProtection - Method allows write to the protection byte.

        ANSIC prototype: void SetProtection(byte Data)
      • Data:byte - 0 - protect area $_FC0 - $_FFF
        1 - protect area $_F80 - $_FFF
        2 - protect area $_F40 - $_FFF
        3 - protect area $_F00 - $_FFF
        4 - protect area $_EC0 - $_FFF
        5 - protect area $_E80 - $_FFF
        6 - protect area $_E40 - $_FFF
        7 - protect area $_E00 - $_FFF
        128 - protect all EEPROM

    • SetWord - Method writes a given word to the specified address in EEPROM.

        ANSIC prototype: byte SetWord(BeanName_TAddress Addr,word Data)
      • Addr:BeanName_TAddress - Address to EEPROM
      • Data:word - Data to write
      • Return value:byte - Error code, possible codes:
        • ERR_OK
        • ERR_SPEED
        • ERR_BUSY
        • ERR_VALUE
        • ERR_NOTAVAIL
        • ERR_RANGE

    • GetWord - Method reads a word from the specified EEPROM address

        ANSIC prototype: byte GetWord(BeanName_TAddress Addr,word *Data)
      • Addr:BeanName_TAddress - Address to EEPROM
      • Data: Pointer to word - Pointer to returned 16-bit data
      • Return value:byte - Error code, possible codes:
        • ERR_OK
        • ERR_BUSY
        • ERR_RANGE

    • SetLong - Method writes a given long word to the specified address in EEPROM.

        ANSIC prototype: byte SetLong(BeanName_TAddress Addr,dword Data)
      • Addr:BeanName_TAddress - Address to EEPROM
      • Data:dword - Data to write
      • Return value:byte - Error code, possible codes:
        • ERR_OK
        • ERR_SPEED
        • ERR_BUSY
        • ERR_VALUE
        • ERR_NOTAVAIL
        • ERR_RANGE

    • GetLong - Method reads a long word from the specified EEPROM address

        ANSIC prototype: byte GetLong(BeanName_TAddress Addr,dword *Data)
      • Addr:BeanName_TAddress - Address to EEPROM
      • Data: Pointer to dword - A pointer to the returned 32-bit data
      • Return value:byte - Error code, possible codes:
        • ERR_OK
        • ERR_BUSY
        • ERR_RANGE

  • SetActByte - Method writes given byte to the actual address in EEPROM.
    The EEPROM address is pre-incremented.

      ANSIC prototype: byte SetActByte(byte Data)
    • Data:byte - Data to write
    • Return value:byte - Error code, possible codes:
      • ERR_OK
      • ERR_SPEED
      • ERR_BUSY
      • ERR_VALUE
      • ERR_NOTAVAIL
      • ERR_RANGE

  • GetActByte - Method reads an actual byte from EEPROM.
    The EEPROM address is pre-incremented.

      ANSIC prototype: byte GetActByte(byte *Data)
    • Data: Pointer to byte - A pointer to the returned 8-bit data
    • Return value:byte - Error code, possible codes:
      • ERR_OK
      • ERR_BUSY
      • ERR_RANGE

  • SetBytePage - Method writes a given byte to a virtual page.
    This method is only available when the Page size property is set to a non-zero size of the virtual page.

      ANSIC prototype: byte SetBytePage(word Index,byte Data)
    • Index:word - Index to page
    • Data:byte - Data to write
    • Return value:byte - Error code, possible codes:
      • ERR_OK
      • ERR_RANGE

  • GetBytePage - Method reads a byte from a virtual page.
    This method is only available when the Page size property is set to a non-zero size of the virtual page.

      ANSIC prototype: byte GetBytePage(word Index,byte *Data)
    • Index:word - Index to page
    • Data: Pointer to byte - A pointer to the returned 8-bit data
    • Return value:byte - Error code, possible codes:
      • ERR_OK
      • ERR_RANGE

  • SetActBytePage - Method writes a given byte to the actual address in a virtual page.
    Address in page is pre-incremented.
    This method is only available when the Page size property is set to a non-zero size of the virtual page.

      ANSIC prototype: byte SetActBytePage(byte Data)
    • Data:byte - Data to write
    • Return value:byte - Error code, possible codes:
      • ERR_OK
      • ERR_RANGE

  • GetActBytePage - Method reads a byte from the actual address in a virtual page.
    Address in page is pre-incremented.
    This method is only available when the Page size property is set to a non-zero size of the virtual page.

      ANSIC prototype: byte GetActBytePage(byte *Data)
    • Data: Pointer to byte - A pointer to the returned 8-bit data
    • Return value:byte - Error code, possible codes:
      • ERR_OK
      • ERR_RANGE

  • SetPage - Method writes a virtual page to EEPROM.
    This method is only available when the Page size property is set to a non-zero size of the virtual page.

      ANSIC prototype: byte SetPage(BeanName_TAddress Addr)
    • Addr:BeanName_TAddress - Address in EEPROM
    • Return value:byte - Error code, possible codes:
      • ERR_OK
      • ERR_SPEED
      • ERR_BUSY
      • ERR_VALUE
      • ERR_NOTAVAIL
      • ERR_RANGE

  • GetPage - Method reads a page at specified EEPROM address to a virtual page in RAM.
    This method is only available when the Page size property is set to a non-zero size of the virtual page.

      ANSIC prototype: byte GetPage(BeanName_TAddress Addr)
    • Addr:BeanName_TAddress - Address in EEPROM
    • Return value:byte - Error code, possible codes:
      • ERR_OK
      • ERR_BUSY
      • ERR_RANGE

  • Methods for Atmel AVR or Freescale HCS12 derivatives.
    • SetWait - Method changes the wait status of SetByte, SetActByte, and SetPage methods.

        ANSIC prototype: void SetWait(bool Wait)
      • Wait:bool - TRUE - methods wait till EEPROM write operation is finished,
        FALSE - methods do not wait for the end of EEPROM write operation

    • Busy - Method returns the status of EEPROM device

        ANSIC prototype: bool Busy(void)
      • Return value:bool - TRUE/FALSE - EEPROM is busy/ready


Note: Some methods can be implemented as macros.



Processor ExpertTM and Embedded BeansTM are registered trademarks of UNIS, Ltd.
©1997-2005, UNIS, Ltd.