Subversion Repositories FlightCtrl

Rev

Blame | Last modification | View Log | RSS feed

/*****************************************************************************************************************************
* File:                 I2Cmaster.h
* Purpose:              header of I2Cmaster.c
*****************************************************************************************************************************/

#ifndef _I2CMASTER_H
 #define _I2CMASTER_H

#include <stdio.h>
#include <stdlib.h>
#include <avr/io.h>
#include <avr/interrupt.h>

#define SYSCLK 16000000UL               // Crystal Frequency in Hz (unsigned long)
#define SCL_CLOCK  200000UL             // clock I2C

extern volatile unsigned char Motor[4];                         // turn rate of the connected electrical motor 0 - 255


// --------------------------- declaration of functions ------------------
extern void i2c_init(void);
extern void i2c_reset(void);
extern void i2c_start(void);
extern void i2c_stop(void);
extern void i2c_write_byte(unsigned char byte);

#endif
// *** EOF: _I2CMASTER_H ********************************************************************************************************