From b073db4017008ceb638a9c23c8cc93e60a3a7fdb Mon Sep 17 00:00:00 2001
From: xengineering <me@xengineering.eu>
Date: Sun, 23 Mar 2025 17:53:24 +0100
Subject: fw: app: Move application firmware code here

This makes the structure of the `fw` folder more clear and separates
application-related code from bootloader- or rtos-related code.
---
 fw/src/heart.c | 52 ----------------------------------------------------
 1 file changed, 52 deletions(-)
 delete mode 100644 fw/src/heart.c

(limited to 'fw/src/heart.c')

diff --git a/fw/src/heart.c b/fw/src/heart.c
deleted file mode 100644
index 6bcced6..0000000
--- a/fw/src/heart.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * This Source Code Form is subject to the terms of the Mozilla Public License,
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
- * obtain one at https://mozilla.org/MPL/2.0/.
- */
-
-
-#include <stdbool.h>
-
-#include <zephyr/kernel.h>
-#include <zephyr/logging/log.h>
-
-#include "heart.h"
-
-
-LOG_MODULE_REGISTER(heart);
-
-
-#define HEART_PERIOD          K_MSEC(1000)
-#define HEART_STACK_SIZE               500
-#define HEART_PRIO       K_PRIO_PREEMPT(8)
-
-
-ZBUS_CHAN_DEFINE(
-	heartbeat_channel,
-	struct heartbeat,
-	NULL,
-	NULL,
-	ZBUS_OBSERVERS_EMPTY,
-	ZBUS_MSG_INIT(.ttl_ms = 0)
-);
-
-
-static void heart_thread_function(void *ptr1, void *ptr2, void *ptr3) {
-	LOG_INF("Starting to beat");
-
-	struct heartbeat heartbeat = {.ttl_ms = 1100};
-
-	while (true) {
-		LOG_DBG("Heart beat");
-		int ret = zbus_chan_pub(&heartbeat_channel, &heartbeat, K_FOREVER);
-		if (ret < 0) {
-			LOG_ERR("Could not publish heartbeat");
-		}
-		k_sleep(HEART_PERIOD);
-	}
-}
-
-
-K_THREAD_DEFINE(heart_thread, HEART_STACK_SIZE,
-                heart_thread_function, NULL, NULL, NULL,
-                HEART_PRIO, 0, 0);
-- 
cgit v1.2.3-70-g09d2