GlobLib
HAL and API libraries for MCUs and hardware.
AT24C256

Routines for interaction with Atmel EEPROM AT24C256. More...

Files

file  at24c256.h
 Header file for Atmel EEPROM AT24C256.
 

Data Structures

struct  AT24C256
 

Macros

#define AT24C256_DEVICE_ADDRESS   0xA0
 Standard slave address for the module.
 

Functions

void AT24C256_setup (AT24C256 *target, uint8_t i2c_number, uint8_t address)
 Initalizes the slave device and populates data structure variable. More...
 

Detailed Description

Routines for interaction with Atmel EEPROM AT24C256.

The AT24C256 operates on the I2C bus. This module provides routines for

Note
This library requires external functions to be declared.
  • I2C_start()
  • I2C_address()
  • I2C_write()
  • I2C_read()
  • I2C_repeatRead()
  • I2C_stop()
Author
Stuart Ianna
Version
0.1
Date
December 2018
Warning
This module is incomplete
Bug:
None
Todo:
Verified Compilers
  • arm-none-eabi-gcc (15:4.9.3+svn231177-1) 4.9.3 20150529 (prerelease)
Example - Typical usage.

Data Structure Documentation

struct AT24C256

Definition at line 60 of file at24c256.h.

Data Fields

uint8_t bus
 The I2C bus which the device is connected to.
 

Function Documentation

void AT24C256_setup ( AT24C256 target,
uint8_t  i2c_number,
uint8_t  address 
)

Initalizes the slave device and populates data structure variable.

Note
The relavent I2C port must be setup before this is called
Parameters
targetPointer to the MPU6050 data structure
i2c_numberThe number of the peripheral port connected, typically I2C_1 or I2C_2
addressThe slave address of the device MPU_DEVICE_ADDRESS or MPU_DEVICE_ADDRESS_ALTERNATE
Returns
0 if setup was ok, 1 if error occured.

Definition at line 31 of file at24c256.c.