Fixed linking
This commit is contained in:
parent
c43eb50661
commit
93f060a5f2
|
@ -15,7 +15,7 @@ start:
|
|||
@echo " SSS7 linux port $(VERSION)"
|
||||
@echo "=========================="
|
||||
|
||||
$(OBJDIR)/test : $(OBJDIR)/test.o $(OBJDIR)/sss7core/sss7.o $(OBJDIR)/libsss7.so
|
||||
$(OBJDIR)/test : $(OBJDIR)/libsss7.so
|
||||
|
||||
$(OBJDIR)/%.o : %.c $(HEADERS) Makefile
|
||||
@mkdir -p $$(dirname $@)
|
||||
|
@ -25,7 +25,7 @@ $(OBJDIR)/sss7core/%.o : ../sss7core/%.c $(HEADERS) Makefile
|
|||
@mkdir -p $$(dirname $@)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(OBJDIR)/%.so : $(OBJDIR)/%.o
|
||||
$(OBJDIR)/libsss7.so : $(OBJDIR)/libsss7.o $(OBJDIR)/sss7core/sss7.o
|
||||
@mkdir -p $$(dirname $@)
|
||||
$(CC) $+ -shared $(LDFLAGS) -o $@
|
||||
|
||||
|
|
|
@ -11,6 +11,10 @@
|
|||
|
||||
#include "sss7.h"
|
||||
|
||||
#if LIBSSS7_PAYLOAD_SIZE != SSS7_PAYLOAD_SIZE
|
||||
#error LIBSSS7_PAYLOAD_SIZE is not equal to SSS7_PAYLOAD_SIZE
|
||||
#endif
|
||||
|
||||
// A state kept a across eventloop iterations to emulate tx complete interrupts
|
||||
enum UartTxState {
|
||||
TX_IDLE, // Idle state
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#ifndef _LIBSSS7_H_
|
||||
#define _LIBSSS7_H_
|
||||
|
||||
#include "sss7.h"
|
||||
#include<stdint.h>
|
||||
|
||||
#define LIBSSS7_PAYLOAD_SIZE 16
|
||||
|
||||
// See libsss7.c for more detailed descriptions
|
||||
|
||||
|
@ -12,7 +14,7 @@ int libsss7_start(char *serialport);
|
|||
int libsss7_can_send(void);
|
||||
|
||||
// Send a frame with the payload msg
|
||||
void libsss7_send(uint8_t *msg);
|
||||
void libsss7_send(uint8_t msg[LIBSSS7_PAYLOAD_SIZE]);
|
||||
|
||||
// Check if the last transmission failed
|
||||
int libsss7_send_failed(void);
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
int main(int argc, char const *argv[]) {
|
||||
libsss7_start("/dev/ttyUSB0");
|
||||
|
||||
uint8_t msg[SSS7_PAYLOAD_SIZE];
|
||||
memset(msg, 0, SSS7_PAYLOAD_SIZE);
|
||||
uint8_t msg[LIBSSS7_PAYLOAD_SIZE];
|
||||
memset(msg, 0, LIBSSS7_PAYLOAD_SIZE);
|
||||
msg[0] = 'H';
|
||||
msg[1] = 'e';
|
||||
msg[2] = 'l';
|
||||
|
|
Loading…
Reference in New Issue