Routines for interaction with Atmel EEPROM AT24C256.
More...
|
void | AT24C256_setup (AT24C256 *target, uint8_t i2c_number, uint8_t address) |
| Initalizes the slave device and populates data structure variable. More...
|
|
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
- Copyright
- GNU GPLv3
- 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.
-
Definition at line 60 of file at24c256.h.
Data Fields |
uint8_t | bus |
| The I2C bus which the device is connected to.
|
|
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
-
target | Pointer to the MPU6050 data structure |
i2c_number | The number of the peripheral port connected, typically I2C_1 or I2C_2 |
address | The 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.