From e92bf0817e954f421b5973fc2a6cff48b04ddf67 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Thu, 4 Mar 2021 15:54:30 +0100 Subject: [PATCH] sinkSender --- src/Makefile | 2 +- src/counter.c | 5 +++-- src/sinkSender.c | 11 +++++++++++ src/sinkSender.h | 7 +++++++ 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 src/sinkSender.c create mode 100644 src/sinkSender.h diff --git a/src/Makefile b/src/Makefile index 58dd1e4..dba57f7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -11,7 +11,7 @@ VERSION:=$(shell cat VERSION) .PHONY: all all: counter -counter: counter.o LS7366R.o ringbuffer.o led.o logging.o version.o +counter: counter.o LS7366R.o ringbuffer.o led.o logging.o sinkSender.o version.o $(CC) -o $@ $(LDFLAGS) $^ version.o: version.c VERSION diff --git a/src/counter.c b/src/counter.c index e82d34e..e103dad 100644 --- a/src/counter.c +++ b/src/counter.c @@ -12,6 +12,7 @@ #include "ringbuffer.h" #include "led.h" #include "logging.h" +#include "sinkSender.h" extern char VERSION[]; @@ -74,6 +75,7 @@ int main (void) { init(); ledInit(); ls7366rInit(SPI_CHAN); + sinkSenderInit(); start(); uint8_t ledTick = 0; @@ -105,8 +107,7 @@ int main (void) { mainsCntCnt = 0; uint32_t freq = PRECISION * COUNTER_FREQUENCY / cnt; - logmsg(LOG_DEBUG, "s: %lu, f: %lu", current_seconds, freq); - + sinkSenderPut(current_seconds, freq); } diff --git a/src/sinkSender.c b/src/sinkSender.c new file mode 100644 index 0000000..6538ebb --- /dev/null +++ b/src/sinkSender.c @@ -0,0 +1,11 @@ +#include +#include "sinkSender.h" +#include "logging.h" + +void sinkSenderInit() { + +} + +void sinkSenderPut(uint32_t seconds, uint32_t frequency) { + logmsg(LOG_DEBUG, "s: %lu, f: %lu", seconds, frequency); +} \ No newline at end of file diff --git a/src/sinkSender.h b/src/sinkSender.h new file mode 100644 index 0000000..068cd59 --- /dev/null +++ b/src/sinkSender.h @@ -0,0 +1,7 @@ +#ifndef _SINKSENDER_H_ +#define _SINKSENDER_H_ + +void sinkSenderInit(); +void sinkSenderPut(uint32_t seconds, uint32_t frequency); + +#endif // _SINKSENDER_H_