sinkSender
This commit is contained in:
@ -11,7 +11,7 @@ VERSION:=$(shell cat VERSION)
|
|||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: counter
|
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) $^
|
$(CC) -o $@ $(LDFLAGS) $^
|
||||||
|
|
||||||
version.o: version.c VERSION
|
version.o: version.c VERSION
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "ringbuffer.h"
|
#include "ringbuffer.h"
|
||||||
#include "led.h"
|
#include "led.h"
|
||||||
#include "logging.h"
|
#include "logging.h"
|
||||||
|
#include "sinkSender.h"
|
||||||
|
|
||||||
|
|
||||||
extern char VERSION[];
|
extern char VERSION[];
|
||||||
@ -74,6 +75,7 @@ int main (void) {
|
|||||||
init();
|
init();
|
||||||
ledInit();
|
ledInit();
|
||||||
ls7366rInit(SPI_CHAN);
|
ls7366rInit(SPI_CHAN);
|
||||||
|
sinkSenderInit();
|
||||||
start();
|
start();
|
||||||
|
|
||||||
uint8_t ledTick = 0;
|
uint8_t ledTick = 0;
|
||||||
@ -105,8 +107,7 @@ int main (void) {
|
|||||||
mainsCntCnt = 0;
|
mainsCntCnt = 0;
|
||||||
uint32_t freq = PRECISION * COUNTER_FREQUENCY / cnt;
|
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
11
src/sinkSender.c
Normal 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
7
src/sinkSender.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#ifndef _SINKSENDER_H_
|
||||||
|
#define _SINKSENDER_H_
|
||||||
|
|
||||||
|
void sinkSenderInit();
|
||||||
|
void sinkSenderPut(uint32_t seconds, uint32_t frequency);
|
||||||
|
|
||||||
|
#endif // _SINKSENDER_H_
|
Reference in New Issue
Block a user