aboutsummaryrefslogtreecommitdiff
path: root/main/i2c.c
diff options
context:
space:
mode:
authorThomasintAnker <thomasintanker1@gmail.com>2024-05-25 17:21:04 +0200
committerThomasintAnker <thomasintanker1@gmail.com>2024-05-25 17:21:04 +0200
commit4fc192eb9ba949276c47c1bbd86164d955d3548c (patch)
tree4a4cef98d51c3fb579e3cae4c0c9c55785b19187 /main/i2c.c
parentc00f589d6a1636f3b74be0b27becbca684da8cb7 (diff)
Removed redundant prints
Diffstat (limited to 'main/i2c.c')
-rw-r--r--main/i2c.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/main/i2c.c b/main/i2c.c
index 31a1454..b324124 100644
--- a/main/i2c.c
+++ b/main/i2c.c
@@ -54,7 +54,7 @@ uint8_t* scan_bus(uint8_t *array) {
// if acknowledged -> ret == number of bytes sent
if(ret > 0){
- printf("found i2c slave on addr: %d", addr);
+ printf("found i2c slave on addr: %d\n", addr);
array[i] = addr;
i++;
}
@@ -67,14 +67,13 @@ void bus_task() {
// scan bus for slaves
// send updates at regular intervals
await_init();
- printf("Bus task!");
int i = 0;
uint8_t found[MAX_SLAVES];
init_addr_array(found, MAX_SLAVES);
while(1) {
- printf("Bus scan!");
+ // printf("Bus scan!");
scan_bus(found);
for(int i = 0; i < MAX_SLAVES; i++){
@@ -83,10 +82,8 @@ void bus_task() {
uint8_t data = 0x01;
// send data to found slave address
- printf("printing data 1");
write_i2c(found[i], &data, 1);
- printf("printing data 0");
data = 0x02;
write_i2c(found[i], &data, 1);
// request update from slave addr at found[i]