Where to find libraries i2c slave and master for the atmega328p?

In General the question in the title, but there are a couple of nuances.
Google immediately shows github and it would seem - ready:
https://github.com/g4lvanix/I2C-slave-lib
https://github.com/g4lvanix/I2C-master-lib
But I was not able to pick their environment, CodeVisionAvr, the compiler swears.
I really found nothing (don't exclude that was looking bad).
Found several manuals how to raise without all the libraries, but it is too tricky and written in 2009-2012, and to necroposting wrong.
Briefly about the project:
2 атмеги328 master and slave, respectively, the slave is free only 2 pins, though any (i.e. or the UART, or i2c) the master must transmit 2 bytes of information - 2 number: the cell number and the value that you want to put here.
The master should keep the communication on the UART (for receive commands over), and occasionally send these 2 numbers to the slave.
And optional can occur 3 ADC module (or a special IC, attiny44 or(or something like that)) from which you want the wizard to retrieve the values upon request.
Sobstvenno i2c and therefore want that all hung on one bus.
July 9th 19 at 11:06
2 answers
July 9th 19 at 11:08
Solution
https://github.com/konachan700/i2c_atmel
Wrote once to learn the topic.
There are two ways how to work with i2c: using the wait status register or through interrupts. To do using interrupts, because the first item is a blind hovering of the code, if the bus is an obstacle, conflict or other issue. I have written such libo myself from scratch, there is work for the evening, and will understand how it works. In DS very well painted that to what.
July 9th 19 at 11:10
i.e. the problem is: "But I was not able to pick their environment, CodeVisionAvr, the compiler swears."
then start the steps to connect, start with H files.
for example i2c_master.h turn include in their program.
Issued to correct the error.
for example MB. complains on uint8_t . define as unsigned char (or more correctly bezrucovy int as 8 bits, for example u8, I don't know what types defined in CodeVisionAvr).
we start from the idea that a char in C is usually 8 bits.

Find more questions by tags Atmel AVRDo it yourselfElectronics