Commit d5c80abb authored by yids's avatar yids
Browse files

fixed ifdef and removed sortatypo

parent d272dd12
#include <micro-ecc.h>
#include "../micro-ecc/uECC.h"
#include <AESLib.h>
#include <RadioHead.h>
#include <RH_ASK.h>
......
CFILES=blink.c
LIBCFILES=
CFLAGS=-Os -pedantic -std=gnu99
ELF=blink.elf
HEX=blink.hex
OPTIMIZE = -O3
MCU=atmega328p
......@@ -12,11 +10,17 @@ AVRDUDE_PROGRAMMERID=stk200 /* Programmer ids are listed in /etc/avrdude.conf *
AVRDUDE_PORT=/dev/ttyUSB4
blink: blink.c
avr-gcc $(OPTIMZE) -g -I AVRLIB/ -mmcu=$(MCU) -D$(F_CPU) $(CFLAGS) $(CFILES) $(LIBCFILES) -o $(ELF)
avr-objcopy -j .text -j .data -O ihex $(ELF) $(HEX)
avr-gcc blink.c $(OPTIMZE) -g -I AVRLIB/ -mmcu=$(MCU) -D$(F_CPU) $(CFLAGS) $(LIBCFILES) -o blink.elf
avr-objcopy -j .text -j .data -O ihex blink.elf blink.hex
rm blink.elf
lib-test: lib-test.c
avr-gcc lib-test.c $(OPTIMZE) -g -I AVRLIB/ -mmcu=$(MCU) -D$(F_CPU) $(CFLAGS) $(LIBCFILES) -o lib-test.elf
avr-objcopy -j .text -j .data -O ihex lib-test.elf lib-test.hex
rm lib-test.elf
upload:
avrdude -carduino -p atmega328p -P /dev/ttyUSB1 -b57600 -U flash:w:$(HEX)
avrdude -carduino -p atmega328p -P /dev/ttyUSB1 -b57600 -U flash:w:lib-test.hex
clean:
rm -r $(ELF) $(HEX)
rm -r *.elf *.hex
......@@ -37,7 +37,7 @@ int main() {
DBG("pagerlib initialized \n");
}
*/
context = pl_init(context);
context = pl_init();
// sended_msg = (struct pl_pagermessage *) malloc(sizeof(struct pl_pagermessage));
// memset(sended_msg, 7, sizeof(struct pl_pagermessage));
......
......@@ -18,6 +18,10 @@ extern "C"
#ifdef ARDUINO
#include <AESLib.h>
#else
#include "mbedtls/entropy.h"
#include "mbedtls/ctr_drbg.h"
#include "mbedtls/aes.h"
#endif
#ifdef DEBUG
......@@ -35,10 +39,6 @@ extern "C"
#define DBM
#endif
#include "mbedtls/entropy.h"
#include "mbedtls/ctr_drbg.h"
#include "mbedtls/aes.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment