From 519ffcefbe607dcb89dd9da654628dd3b0c588eb Mon Sep 17 00:00:00 2001 From: ThomasintAnker Date: Fri, 31 May 2024 00:00:19 +0200 Subject: Working i2c+utp wo extra functionality --- main/i2c.c | 1 + main/i2c.h | 1 + main/init.c | 2 ++ main/main.c | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) (limited to 'main') diff --git a/main/i2c.c b/main/i2c.c index b324124..2615d0a 100644 --- a/main/i2c.c +++ b/main/i2c.c @@ -38,6 +38,7 @@ void init_addr_array(uint8_t array[], int size) { } } +// Make sure that current addresses are checked (modules), and invalid addresses are ignore (neotrellis slave) uint8_t* scan_bus(uint8_t *array) { int ret; int i = 0; diff --git a/main/i2c.h b/main/i2c.h index 5ad5cfb..05acb1c 100644 --- a/main/i2c.h +++ b/main/i2c.h @@ -1,5 +1,6 @@ #pragma once // https://github.com/raspberrypi/pico-examples/tree/master/i2c +// https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html #include #include diff --git a/main/init.c b/main/init.c index 08177c7..fee3a6a 100644 --- a/main/init.c +++ b/main/init.c @@ -24,8 +24,10 @@ static void init_wifi() { // enable 'station' mode (connect to an access point instead of acting like one) cyw43_arch_enable_sta_mode(); + /* WERKT GEWOON NIET MET DEZE LIJNEN CODE */ // if (cyw43_arch_wifi_connect_timeout_ms(CONF_NET_SSID, CONF_NET_PASS, CONF_NET_AUTH, CONF_NET_CONN_TIMEOUT)) // panic("cyw43_arch_wifi_connect failed\n"); + /* WERKT GEWOON NIET MET DEZE LIJNEN CODE */ printf("connected to Wi-Fi\n"); diff --git a/main/main.c b/main/main.c index 19dd3cd..b38030f 100644 --- a/main/main.c +++ b/main/main.c @@ -24,7 +24,7 @@ int main() { init(); xTaskCreate((TaskFunction_t) blink_task, "blink", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 2, NULL); - //xTaskCreate((TaskFunction_t) serve_task, "serve", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 2, NULL); + xTaskCreate((TaskFunction_t) serve_task, "serve", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 2, NULL); xTaskCreate((TaskFunction_t) bus_task, "bus", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 2, NULL); vTaskStartScheduler(); -- cgit v1.2.3