sinkSender

This commit is contained in:
2021-03-04 15:54:30 +01:00
parent 9eee986123
commit e92bf0817e
4 changed files with 22 additions and 3 deletions

View File

@ -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

View File

@ -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);
}

11
src/sinkSender.c Normal file
View File

@ -0,0 +1,11 @@
#include <stdint.h>
#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);
}

7
src/sinkSender.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef _SINKSENDER_H_
#define _SINKSENDER_H_
void sinkSenderInit();
void sinkSenderPut(uint32_t seconds, uint32_t frequency);
#endif // _SINKSENDER_H_