Feature/port avr build check (#35)
* fix atmega168 build. * remove time.h to solve AVR compile * Add AVR build to CI for compile check
This commit is contained in:
@@ -7,6 +7,7 @@ before_install:
|
||||
- sudo apt-get -y install build-essential
|
||||
- sudo apt-get -y install gcc-arm-none-eabi
|
||||
- sudo apt-get -y install libnewlib-arm-none-eabi
|
||||
- sudo apt-get -y install gcc-avr avr-libc binutils-avr
|
||||
|
||||
compiler:
|
||||
- gcc
|
||||
@@ -38,3 +39,11 @@ jobs:
|
||||
script:
|
||||
- make stm32f10x
|
||||
- make at91sam7s
|
||||
- stage: ports-avr
|
||||
os: linux
|
||||
before_script:
|
||||
- avr-gcc --version
|
||||
script:
|
||||
- make atmega168
|
||||
- make bdk-atxx4-mstp
|
||||
|
||||
|
||||
@@ -122,6 +122,7 @@ void apdu_handler(
|
||||
handler_unrecognized_service(service_request,
|
||||
service_request_len, src, &service_data);
|
||||
}
|
||||
(void)len;
|
||||
break;
|
||||
case PDU_TYPE_UNCONFIRMED_SERVICE_REQUEST:
|
||||
service_choice = apdu[1];
|
||||
|
||||
@@ -154,6 +154,7 @@ void handler_read_property(
|
||||
bytes_sent =
|
||||
datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0],
|
||||
pdu_len);
|
||||
(void)bytes_sent;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -133,6 +133,7 @@ void handler_write_property(
|
||||
bytes_sent =
|
||||
datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0],
|
||||
pdu_len);
|
||||
(void)bytes_sent;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ bool RS485_ReceiveError(
|
||||
void)
|
||||
{
|
||||
bool ReceiveError = false;
|
||||
uint8_t dummy_data;
|
||||
volatile uint8_t dummy_data;
|
||||
|
||||
/* check for framing error */
|
||||
#if 0
|
||||
@@ -281,6 +281,7 @@ bool RS485_ReceiveError(
|
||||
if (ReceiveError) {
|
||||
RS485_LED1_On();
|
||||
}
|
||||
(void)dummy_data;
|
||||
|
||||
return ReceiveError;
|
||||
}
|
||||
|
||||
@@ -67,8 +67,9 @@ AVRDUDE_PORT := /dev/ttyUSB0
|
||||
endif
|
||||
|
||||
# Source locations
|
||||
BACNET_CORE = ../../src
|
||||
BACNET_INCLUDE = $(BACNET_CORE)
|
||||
BACNET_SRC = ../../src
|
||||
BACNET_CORE = $(BACNET_SRC)/bacnet
|
||||
BACNET_INCLUDE = $(BACNET_SRC)
|
||||
BACNET_BASIC = $(BACNET_CORE)/basic
|
||||
|
||||
# local files for this project
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#include "mstimer.h"
|
||||
|
||||
/**
|
||||
@@ -83,12 +82,12 @@ void mstimer_restart(struct mstimer *t)
|
||||
* @return Non-zero if the timer has expired, zero otherwise.
|
||||
*/
|
||||
int mstimer_expired(struct mstimer *t)
|
||||
{
|
||||
{
|
||||
if (t->interval) {
|
||||
return ((unsigned long)((mstimer_now()) - (t->start + t->interval)) <
|
||||
((unsigned long)(~((unsigned long)0)) >> 1));
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user