*** empty log message ***

This commit is contained in:
Antoine Drouin
2007-05-28 17:24:50 +00:00
parent b65abf7a3b
commit cdf6ec69d4
3 changed files with 109 additions and 0 deletions
+29
View File
@@ -109,6 +109,35 @@ demo5.srcs += downlink.c pprz_transport.c
demo5.CFLAGS += -DDATALINK=PPRZ -DPPRZ_UART=Uart0
#
# Serial link over USB
#
demo6.ARCHDIR = $(ARCHI)
demo6.ARCH = arm7tdmi
demo6.TARGET = demo6
demo6.TARGETDIR = demo6
demo6.CFLAGS += -DCONFIG=\"conf_demo.h\"
demo6.srcs = main_demo6.c
demo6.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(10e-2)'
demo6.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
demo6.CFLAGS += -DLED
demo6.srcs += $(SRC_ARCH)/armVIC.c
demo6.CFLAGS += -DUSE_USB_SERIAL -DUSB_SERIAL_BAUD=B38400
#demo6.srcs += $(SRC_ARCH)/uart_hw.c
demo6.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=UsbS
demo6.srcs += downlink.c pprz_transport.c
//demo6.CFLAGS += -DDATALINK=PPRZ -DPPRZ_UART=Uart0
</makefile>
</airframe>
+34
View File
@@ -0,0 +1,34 @@
#include "std.h"
#include "init_hw.h"
#include "sys_time.h"
#include "led.h"
#include "interrupt_hw.h"
#include "usb_serial.h"
#include "messages.h"
#include "downlink.h"
static inline void main_init( void );
static inline void main_periodic_task( void );
int main( void ) {
main_init();
while(1) {
if (sys_time_periodic())
main_periodic_task();
}
return 0;
}
static inline void main_init( void ) {
hw_init();
sys_time_init();
led_init();
usb_serial_init();
int_enable();
}
static inline void main_periodic_task( void ) {
LED_TOGGLE(1);
DOWNLINK_SEND_TAKEOFF(&cpu_time_sec);
}
+46
View File
@@ -0,0 +1,46 @@
/*
* Paparazzi $Id$
*
* Copyright (C) 2006 Pascal Brisset, Antoine Drouin, Michel Gorraz
*
* This file is part of paparazzi.
*
* paparazzi is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* paparazzi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
/** \file uart.h
* \brief arch independant UART (Universal Asynchronous Receiver/Transmitter) API
*
*/
#ifndef USB_S_H
#define USB_S_H
#include <inttypes.h>
#include "std.h"
//#include "usb_serial_hw.h"
void usb_serial_init( void );
void usb_serial_transmit( unsigned char data );
bool_t usb_serial_check_free_space( uint8_t len);
#define UsbSInit() usb_serial_init()
#define UsbSCheckFreeSpace(_x) usb_serial_check_free_space(_x)
#define UsbSTransmit(_x) usb_serial_transmit(_x)
#define UsbSSendMessage() {}
#endif /* USB_S_H */