Merge from BeRTOS. Reformat. Clean up.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 27 May 2008 14:43:07 +0000 (14:43 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 27 May 2008 14:43:07 +0000 (14:43 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1387 38d2e660-2303-0410-9eaa-f027e97ec537

app/triface/hw/hw_adc.c
app/triface/hw/hw_input.h
app/triface/protocol.c
app/triface/triface.c
app/triface/triface.mk

index 7b9d667bc32407c8c55ac665ea5c206eb450e0b4..4d521383968c5c17c6090e00e18e1ab5b5ae135a 100644 (file)
@@ -39,7 +39,7 @@
  * \author Andrea Grandi <andrea@develer.com>
  */
 
-#include "hw_adc.h"
+#include "hw/hw_adc.h"
 
 
 #include <cfg/macros.h>
index 608e731b4d9d65bbce0f8e8a8dc3be837bbcbdb5..e63a90386043db704607c38e87d36a2a3919e965 100644 (file)
@@ -42,6 +42,8 @@
 #ifndef HW_INPUT_H
 #define HW_INPUT_H
 
+#include <avr/io.h>
+
 /* Set pins as input and enable pull-up */
 #define INPUT_INIT_D do                                        \
 {                                                              \
index 57fefa4c7127440595f2344136a351270d07511d..c84c429f13a0140f7d80a53e3f2f56012c41bc03 100644 (file)
@@ -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 <drv/timer.h>
 #include <drv/ser.h>
@@ -65,8 +65,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "appconfig.h"
-
 // Define the format string for ADC
 #define ADC_FORMAT_STR "dddd"
 
index eb47d8fad0f5c67f77c31de895c0d67ff506b62b..270619bcc666f8dd5d7b21e00c655e0c58609d49 100644 (file)
  */
 
 
+#include "protocol.h"
+#include "hw/hw_input.h"
+#include "hw/hw_adc.h"
+#include "cfg/cfg_ser.h"
+
+#include <cfg/macros.h>
+
 #include <drv/timer.h>
 #include <drv/buzzer.h>
 #include <drv/ser.h>
 #include <drv/sipo.h>
 
-#include <cfg/macros.h>
 #include <mware/parser.h>
 #include <net/keytag.h>
 
-#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);
index d4eb2f3d3e9165489805cc12966aca9950cb59c3..2368fdbcf20df2cc8767ce27b8c281e1b7e3894c 100644 (file)
@@ -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