Project 5
Character Liquid-Crystal Display
|
Neff Site |
Header file for the I2C interface. More...
Go to the source code of this file.
Macros | |
#define | F_I2C 100000L |
#define | I2C_PORT PORTF |
#define | I2C_MODULE TWIF |
#define | I2C_SDA_bp PIN0_bp |
#define | I2C_SDA_bm PIN0_bm |
#define | I2C_SCL_bp PIN1_bp |
#define | I2C_SCL_bm PIN1_bm |
Functions | |
void | i2c_init (void) |
Initializes the I2C module. More... | |
void | i2c_start_write (uint8_t addr) |
Start a write transaction. More... | |
void | i2c_write (uint8_t data) |
Write one byte. More... | |
void | i2c_stop (void) |
Close the current transaction. More... | |
Header file for the I2C interface.
This library provides high level access to the Inter-Integrated Circuit bus module.
#define F_I2C 100000L |
#define I2C_MODULE TWIF |
#define I2C_PORT PORTF |
#define I2C_SCL_bm PIN1_bm |
#define I2C_SCL_bp PIN1_bp |
#define I2C_SDA_bm PIN0_bm |
#define I2C_SDA_bp PIN0_bp |
void i2c_init | ( | void | ) |
Initializes the I2C module.
void i2c_start_write | ( | uint8_t | addr | ) |
Start a write transaction.
Starts a master write transaction by issuing a START condition which is followed by a write request for the addressed slave.
addr | The address of the receiver. |
void i2c_stop | ( | void | ) |
Close the current transaction.
Closes the current transaction by issuing a STOP condition.
void i2c_write | ( | uint8_t | data | ) |
Write one byte.
Send one byte to the addressed slave.
data | The byte to be sent. |
Contact | Generated by 1.8.13 |