From 46eb2370e53c3a1c7eb593ca99c07944c81ec695 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sun, 23 Jun 2024 13:37:17 +0200 Subject: remove delay function from pbdrv --- lib/pbdrv/ext/freertos/include.cmake | 2 -- lib/pbdrv/ext/freertos/index.dox | 2 +- lib/pbdrv/ext/freertos/pb-mod.c | 10 ---------- lib/pbdrv/pb-mod.h | 8 -------- main/i2c.c | 2 +- main/mod.c | 4 ---- 6 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 lib/pbdrv/ext/freertos/pb-mod.c diff --git a/lib/pbdrv/ext/freertos/include.cmake b/lib/pbdrv/ext/freertos/include.cmake index 70ed090..e205c8f 100644 --- a/lib/pbdrv/ext/freertos/include.cmake +++ b/lib/pbdrv/ext/freertos/include.cmake @@ -5,5 +5,3 @@ target_link_libraries(pbdrv PUBLIC freertos_config ) -target_sources(pbdrv-mod PRIVATE "${CMAKE_CURRENT_LIST_DIR}/pb-mod.c") - diff --git a/lib/pbdrv/ext/freertos/index.dox b/lib/pbdrv/ext/freertos/index.dox index dfa45ff..7d72918 100644 --- a/lib/pbdrv/ext/freertos/index.dox +++ b/lib/pbdrv/ext/freertos/index.dox @@ -2,5 +2,5 @@ /** \ingroup pb_ext \defgroup pb_ext_freertos FreeRTOS -\brief FreeRTOS memory management and scheduler-based delay +\brief FreeRTOS memory management */ diff --git a/lib/pbdrv/ext/freertos/pb-mod.c b/lib/pbdrv/ext/freertos/pb-mod.c deleted file mode 100644 index 5c0aa36..0000000 --- a/lib/pbdrv/ext/freertos/pb-mod.c +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include - -#include "../../pb-types.h" - -/// \ingroup pb_ext_freertos -__weak void pb_mod_blocking_delay_ms(unsigned long ms) { - vTaskDelay(ms / portTICK_PERIOD_MS); -} - diff --git a/lib/pbdrv/pb-mod.h b/lib/pbdrv/pb-mod.h index 3869e55..91e1d1f 100644 --- a/lib/pbdrv/pb-mod.h +++ b/lib/pbdrv/pb-mod.h @@ -24,14 +24,6 @@ extern const char * PB_MOD_NAME; */ extern const i2c_addr_t PB_MOD_ADDR; -/** - * \brief Platform-specific blocking delay function - * - * FIXME: this entire function should be removed (see handover: RP2040 I2C - * limitations) - */ -void pb_mod_blocking_delay_ms(unsigned long ms); - /// \} /** diff --git a/main/i2c.c b/main/i2c.c index db859d8..93b64db 100644 --- a/main/i2c.c +++ b/main/i2c.c @@ -44,7 +44,7 @@ void bus_task() { state_exchange(); // wait 1 second - pb_mod_blocking_delay_ms(1e3); + vTaskDelay(1e3 / portTICK_PERIOD_MS); } } diff --git a/main/mod.c b/main/mod.c index ac9107d..8650861 100644 --- a/main/mod.c +++ b/main/mod.c @@ -7,7 +7,3 @@ const char * PB_MOD_NAME = "main controller"; const i2c_addr_t PB_MOD_ADDR = PB_ADDR_MOD_MAIN; -void pb_mod_blocking_delay_ms(unsigned long ms) { - vTaskDelay(ms / portTICK_PERIOD_MS); -} - -- cgit v1.2.3