aboutsummaryrefslogtreecommitdiff
path: root/main/i2c.h
diff options
context:
space:
mode:
authorThomasintAnker <thomasintanker1@gmail.com>2024-06-18 16:23:51 +0200
committerThomasintAnker <thomasintanker1@gmail.com>2024-06-18 16:23:51 +0200
commita55d0bed6240c54f6173b1e38e80212c02c302de (patch)
tree07c15eebc8cd84e1071a3f72d3c74475017372f3 /main/i2c.h
parentb45b5d04daa29fcdd456233a931dcbb5b287769f (diff)
parent245fde65808ce902064ab438296f04f691d007e7 (diff)
Merge branch 'master' into wip/handover
Diffstat (limited to 'main/i2c.h')
-rw-r--r--main/i2c.h47
1 files changed, 2 insertions, 45 deletions
diff --git a/main/i2c.h b/main/i2c.h
index fcfa23b..6625756 100644
--- a/main/i2c.h
+++ b/main/i2c.h
@@ -2,52 +2,9 @@
// https://github.com/raspberrypi/pico-examples/tree/master/i2c
// https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html
-#include <stddef.h>
-#include <stdint.h>
-#include <hardware/i2c.h>
-
-#define SDA_PIN 16
-#define SCL_PIN 17
-#define I2C_PORT i2c0
#define MAX_SLAVES 10
#define MAX_TIMEOUT_TIME 50 //ms
-/**
- * \brief initialize all required gpio for i2c usage on the pico
- *
- * This functions only initializes the standard gpio required to start i2c
- * communications.
- *
- * \note Tasks shouldn't depend on any other module in the main controller
- */
-void init_i2c();
-
-/**
- * \brief read data from addr with length len from i2c bus.
- *
- * This functions reads data from a specific address on the i2c bus,
- * the output var will hold the data which was read from said address with
- * length len.
- */
-int read_i2c(uint8_t addr, uint8_t *output, size_t len);
-
-/**
- * \brief write data to addr with length len from i2c bus.
- * \param addr
- * \param input
- * \param len
- * This functions writes data to a specific address on the i2c bus,
- * the input var holds the data which will be written to the given
- * address with length len.
- */
-int write_i2c(uint8_t addr, uint8_t *input, size_t len);
-
-/**
- * \brief
-*/
-int write_read_i2c(uint8_t addr, uint8_t *input, size_t input_len, uint8_t *output, size_t output_len);
-
-uint8_t* scan_bus(uint8_t *array);
-
-/** \brief looking for slave addresses and requesting updates */
+//! looking for slave addresses and requesting updates
void bus_task();
+