diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-08 19:20:49 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-08 19:20:49 +0200 |
commit | feaa43f37c01cf832fed17572d915e5709231893 (patch) | |
tree | 37f63dee764e75ad2dd1485f06c583b5473ff6fc /main/i2c.h | |
parent | e4b241c8ec4f12fe6ac479c2153cc540830e6a5d (diff) |
WIP raspberry pi pico pbdrv
Diffstat (limited to 'main/i2c.h')
-rw-r--r-- | main/i2c.h | 34 |
1 files changed, 1 insertions, 33 deletions
@@ -5,40 +5,8 @@ #include <stdint.h> #include <hardware/i2c.h> -#define SDA_PIN 16 -#define SCL_PIN 17 -#define I2C_PORT i2c0 #define MAX_SLAVES 10 -/** - * \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 looking for slave addresses and requesting updates */ void bus_task(); + |