From 328474f555ab0958e0921c7d04d8d7dbb1789bc4 Mon Sep 17 00:00:00 2001 From: tslil clingman <> Date: Wed, 29 Sep 2021 14:33:21 -0400 Subject: Init --- code/src/TinyI2CMaster.c | 133 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 code/src/TinyI2CMaster.c (limited to 'code/src/TinyI2CMaster.c') diff --git a/code/src/TinyI2CMaster.c b/code/src/TinyI2CMaster.c new file mode 100644 index 0000000..3ec6b64 --- /dev/null +++ b/code/src/TinyI2CMaster.c @@ -0,0 +1,133 @@ +/* Tiny I2C + + David Johnson-Davies - www.technoblogy.com - 14th April 2018 + + CC BY 4.0 + Licensed under a Creative Commons Attribution 4.0 International license: + http://creativecommons.org/licenses/by/4.0/ +*/ + +#include "TinyI2CMaster.h" + +// Constants +// Prepare register value to: Clear flags, and set USI to shift 8 bits i.e. count 16 clock edges. +static const uint8_t USISR_8bit = 1<