Microchip® Advanced Software Framework

at24cxx.h File Reference

API driver for component AT24CXX.

Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.

#include "twi_master.h"

Macros

#define AT24C_MEM_ADDR_LEN   2
 
#define AT24C_READ_FAIL   1
 
#define AT24C_READ_SUCCESS   0
 
#define AT24C_WRITE_FAIL   1
 
#define AT24C_WRITE_SUCCESS   0
 
#define BOARD_AT24C_ADDRESS   0 /* TWI eeprom address (0x50u) */
 
#define BOARD_AT24C_TWI_INSTANCE   0 /* TWI instance (TWI0) */
 Checking board configuration of the AT24C EEPROM. More...
 
#define BOARD_CLK_TWI_EEPROM   0 /* TWI eeprom clock pin index */
 
#define BOARD_CLK_TWI_MUX_EEPROM   0 /* TWI eeprom clock pin peripheral */
 

Functions

uint32_t at24cxx_fill_pattern (uint32_t u32_start_address, uint32_t u32_end_address, uint8_t u8_pattern)
 Fill the specified pattern to AT24CXX. More...
 
uint32_t at24cxx_read_byte (uint32_t u32_address, uint8_t *p_rd_byte)
 Read single byte from AT24CXX. More...
 
uint32_t at24cxx_read_continuous (uint32_t u32_start_address, uint16_t u16_length, uint8_t *p_rd_buffer)
 Read multiple bytes continuously from AT24CXX. More...
 
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. More...
 
void at24cxx_reset (void)
 Reset AT24CXX. More...
 
uint32_t at24cxx_write_byte (uint32_t u32_address, uint8_t uc_value)
 Write single byte to AT24CXX. More...
 
uint32_t at24cxx_write_continuous (uint32_t u32_start_address, uint16_t u16_length, uint8_t const *p_wr_buffer)
 Write multiple bytes continuously to AT24CXX. More...
 
uint32_t at24cxx_write_page (uint32_t u32_page_address, uint32_t u32_page_size, uint8_t const *p_wr_buffer)
 Write data to the specified page in AT24CXX. More...
 

#define AT24C_READ_FAIL   1
#define AT24C_READ_SUCCESS   0
#define AT24C_WRITE_FAIL   1
#define AT24C_WRITE_SUCCESS   0
#define BOARD_AT24C_ADDRESS   0 /* TWI eeprom address (0x50u) */
#define BOARD_AT24C_TWI_INSTANCE   0 /* TWI instance (TWI0) */
#define BOARD_CLK_TWI_EEPROM   0 /* TWI eeprom clock pin index */

Referenced by at24cxx_reset().

#define BOARD_CLK_TWI_MUX_EEPROM   0 /* TWI eeprom clock pin peripheral */

Referenced by at24cxx_reset().