rewrite with minimal hd444780/modbus example

This commit is contained in:
2021-05-20 20:56:22 +02:00
parent fce2b8b26b
commit 76ced85569
6 changed files with 357 additions and 120 deletions

26
i2c.h Normal file
View File

@@ -0,0 +1,26 @@
/*
* i2c.h
*
* Created: 20.01.2018 12:51:11
* Author: Ulrich
*/
#ifndef I2C_H_
#define I2C_H_
#include <avr/io.h>
#include <util/delay.h>
//I2C
#define SDA_PIN PC4 //PIN am Atmel
#define SCL_PIN PC5 //PIN am Atmel
#define I2C_PORT PORTC //PORT am Atmel
#define SCL_CLOCK 100000UL
void i2c_init(void);
uint8_t i2c_start (uint8_t);
uint8_t i2c_byte (uint8_t);
uint8_t i2c_readNak(void);
void i2c_stop (void);
#endif /* I2C_H_ */