From: asterix Date: Tue, 27 May 2008 14:43:07 +0000 (+0000) Subject: Merge from BeRTOS. Reformat. Clean up. X-Git-Tag: 2.0.0~547 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=a9ab2dc002e9b0ff91cb3f74c3ad3aa3676b84b1;p=bertos.git Merge from BeRTOS. Reformat. Clean up. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1387 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/app/triface/hw/hw_adc.c b/app/triface/hw/hw_adc.c index 7b9d667b..4d521383 100644 --- a/app/triface/hw/hw_adc.c +++ b/app/triface/hw/hw_adc.c @@ -39,7 +39,7 @@ * \author Andrea Grandi */ -#include "hw_adc.h" +#include "hw/hw_adc.h" #include diff --git a/app/triface/hw/hw_input.h b/app/triface/hw/hw_input.h index 608e731b..e63a9038 100644 --- a/app/triface/hw/hw_input.h +++ b/app/triface/hw/hw_input.h @@ -42,6 +42,8 @@ #ifndef HW_INPUT_H #define HW_INPUT_H +#include + /* Set pins as input and enable pull-up */ #define INPUT_INIT_D do \ { \ diff --git a/app/triface/protocol.c b/app/triface/protocol.c index 57fefa4c..c84c429f 100644 --- a/app/triface/protocol.c +++ b/app/triface/protocol.c @@ -45,8 +45,8 @@ #include "protocol.h" #include "cmd_ctor.h" // MAKE_CMD, REGISTER_CMD #include "verstag.h" -#include "hw_adc.h" -#include "hw_input.h" +#include "hw/hw_adc.h" +#include "hw/hw_input.h" #include #include @@ -65,8 +65,6 @@ #include #include -#include "appconfig.h" - // Define the format string for ADC #define ADC_FORMAT_STR "dddd" diff --git a/app/triface/triface.c b/app/triface/triface.c index eb47d8fa..270619bc 100644 --- a/app/triface/triface.c +++ b/app/triface/triface.c @@ -41,18 +41,21 @@ */ +#include "protocol.h" +#include "hw/hw_input.h" +#include "hw/hw_adc.h" +#include "cfg/cfg_ser.h" + +#include + #include #include #include #include -#include #include #include -#include "protocol.h" -#include "hw_input.h" -#include "hw_adc.h" static KFileSerial fd_ser; @@ -74,8 +77,8 @@ int main(void) TagPacket pkt; /* Open the main communication port */ - ser_init(&fd_ser, CONFIG_SER_HOSTPORT); - ser_setbaudrate(&fd_ser, CONFIG_SER_HOSTPORTBAUDRATE); + ser_init(&fd_ser, CONFIG_TRIFACE_PORT); + ser_setbaudrate(&fd_ser, CONFIG_TRIFACE_BAUDRATE); ser_init(pkt.tag_ser, TAG_SER_PORT); ser_setbaudrate(pkt.tag_ser, TAG_SER_BAUDRATE); diff --git a/app/triface/triface.mk b/app/triface/triface.mk index d4eb2f3d..2368fdbc 100644 --- a/app/triface/triface.mk +++ b/app/triface/triface.mk @@ -26,6 +26,7 @@ triface_CSRC = \ app/triface/hw/hw_adc.c \ bertos/drv/timer.c \ bertos/drv/ser.c \ + bertos/drv/buzzer.c \ bertos/cpu/avr/drv/ser_avr.c \ bertos/cpu/avr/drv/sipo.c \ bertos/mware/formatwr.c \ @@ -36,7 +37,6 @@ triface_CSRC = \ bertos/mware/event.c \ bertos/kern/kfile.c \ bertos/net/keytag.c \ - bertos/drv/buzzer.c \ # triface_PCSRC += bertos/mware/formatwr.c