24FC256 driver More...

#include <stddef.h>
#include <stdint.h>
#include "M24FC256.h"
#include "MCAL.h"
Include dependency graph for M24FC256.c:

Go to the source code of this file.

Functions

int M24FC256_Read (uint16_t u16Address, uint8_t *pu8RxBuffer, uint8_t u8Pages)
 Read data from 24FC256 EEPROM. More...
 
int M24FC256_Write (uint16_t u16Address, uint8_t *pu8TxBuffer, uint8_t u8Pages)
 Write data to 24FC256 EEPROM. More...
 

Detailed Description

24FC256 driver

256Kb I²C compatible 2-wire Serial EEPROM with 1MHz clock compatibility 24

Definition in file M24FC256.c.

Function Documentation

◆ M24FC256_Read()

int M24FC256_Read ( uint16_t  u16Address,
uint8_t *  pu8RxBuffer,
uint8_t  u8Pages 
)

Read data from 24FC256 EEPROM.

Parameters
u16AddressAddress to specify where to read the data from
pu8RxBufferPointer to receive buffer
u8PagesNumber of pages to read
Returns
Error code
Return values
0OK
-1Error
Remarks
The user has to ensure that the size of the buffer where he wants to store the requested EEPROM content is big enough to store the number of requested pages. Or the CPU will crash.

Definition at line 42 of file M24FC256.c.

Here is the call graph for this function:

◆ M24FC256_Write()

int M24FC256_Write ( uint16_t  u16Address,
uint8_t *  pu8TxBuffer,
uint8_t  u8Pages 
)

Write data to 24FC256 EEPROM.

Parameters
u16AddressAddress to specify where to write the data
pu8TxBufferPointer to transmit buffer
u8PagesNumber of pages to write
Returns
Error code
Return values
0OK
-1Error

Definition at line 89 of file M24FC256.c.

Here is the call graph for this function: