This commit is contained in:
2025-08-09 11:30:34 +03:00
parent 9976c50da0
commit 851605cae3
4 changed files with 606 additions and 479 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.DS_Store

View File

@@ -1,3 +1,3 @@
# zh_avr_i2c
AVR library for I2C bus.
AVR library for I2C bus.

View File

@@ -1,9 +1,14 @@
#pragma once
#include "FreeRTOS.h"
#include "event_groups.h"
#include "avr/io.h"
#include "avr/interrupt.h"
#include "stdlib.h"
#include "stdint.h"
#include "string.h"
#include "stdbool.h"
#include "stdio.h"
#ifdef __cplusplus
extern "C"
@@ -29,6 +34,7 @@ extern "C"
} avr_err_t;
avr_err_t zh_avr_i2c_master_init(const bool pullup);
avr_err_t zh_avr_i2c_master_probe(const uint8_t addr, TickType_t xTicksToWait);
avr_err_t zh_avr_i2c_master_transmit(const uint8_t addr, uint8_t *data, uint8_t size, size_t delay);
avr_err_t zh_avr_i2c_master_receive(const uint8_t addr, uint8_t *data, uint8_t size, size_t delay);
avr_err_t zh_avr_i2c_master_transmit_receive(const uint8_t addr, uint8_t *write_data, uint8_t write_size, uint8_t *read_data, uint8_t read_size, size_t delay);
@@ -40,8 +46,7 @@ extern "C"
#ifndef IICULTIMATE_H
#define IICULTIMATE_H
#include <avr/io.h>
#include <avr/interrupt.h>
// #include <avrlibtypes.h>
// #include <avrlibdefs.h>

File diff suppressed because it is too large Load Diff