Subversion Repositories FlightCtrl

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2214 - 1
/*****************************************************************************************************************************
2
* File:                 twimaster.h
3
* Purpose:              header of twimaster.c
4
*****************************************************************************************************************************/
5
#ifndef _I2CMASTER_H
6
 #define _I2CMASTER_H
7
 
8
#include <stdio.h>
9
#include <stdlib.h>
10
#include <avr/io.h>
11
#include <avr/interrupt.h>
12
 
13
#define SYSCLK 16000000UL               // Crystal Frequency in Hz (unsigned long)
14
#define SCL_CLOCK  200000UL             // clock I2C
15
 
16
extern volatile unsigned char Motor[4];                         // turn rate of the connected electrical motor 0 - 255
17
 
18
 
19
// --------------------------- declaration of functions ------------------
20
extern void i2c_init(void);
21
extern void i2c_reset(void);
22
extern void i2c_start(void);
23
extern void i2c_stop(void);
24
extern void i2c_write_byte(unsigned char byte);
25
 
26
#endif
27
// *** EOF: _I2CMASTER_H ********************************************************************************************************