Real Time Clock Module with I2C Interface  0.3
⇒ back to Project Page
 All Data Structures Files Functions Variables Typedefs Macros Pages
Functions | Variables
i2c.c File Reference

Contains the functions for the data transmission via the I2C interface as master and also as slave. More...

#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include "basic_definitions.h"
#include "port_definitions.h"
#include "i2c.h"
Include dependency graph for i2c.c:

Go to the source code of this file.

Functions

void i2c_pin_init (void)
 
uint8_t i2c_set_scl (uint32_t f_cpu, uint32_t f_scl)
 
uint8_t i2c_master_data_io (uint8_t *data, uint8_t number_bytes, uint8_t end_noack)
 
uint8_t i2c_slave_data_io (uint8_t *data, uint8_t *number_bytes, uint8_t command)
 

Variables

volatile uint8_t i2c_slave_mode_blocked
 device is blocked an can not receive any data from I2C master
 

Detailed Description

Contains the functions for the data transmission via the I2C interface as master and also as slave.

Author
Michael Skutek
Date
20.03.2013
Version
0.3

Platform: AVR ATmega (tested on ATmega168)

Include Files:

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file i2c.c.