*** empty log message ***

This commit is contained in:
Antoine Drouin
2007-10-01 18:03:00 +00:00
parent 12d40e35a8
commit 464188f273
3 changed files with 78 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
<!-- dc motor controller -->
<airframe name="dc_mc">
<makefile>
ARCHI=avr
main.ARCHDIR=$(ARCHI)
main.ARCH = atmega8
main.TARGET = main
main.TARGETDIR = main
# to check : 16MHz reso
main.LOW_FUSE = 2e
main.HIGH_FUSE = cb
main.EXT_FUSE = ff
main.LOCK_FUSE = ff
main.CFLAGS += -DCONFIG=\"conf_dc_mc.h\"
main.srcs = main_dc_mc.c
main.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(10e-2)'
main.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
main.CFLAGS += -DLED
#-DTIME_LED=1
main.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B38400
main.srcs += $(SRC_ARCH)/uart_hw.c
</makefile>
</airframe>
+12
View File
@@ -0,0 +1,12 @@
#ifndef CONF_DC_MC_H
#define CONF_DC_MC_H
/* clock in MHz */
#define CLOCK 16
#define LED_1_BANK C
#define LED_1_PIN 3
#endif /* CONF_DC_MC_H */
+33
View File
@@ -0,0 +1,33 @@
#include "std.h"
#include "sys_time.h"
#include "led.h"
#include "uart.h"
#include "print.h"
#include "interrupt_hw.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 ) {
sys_time_init();
led_init();
uart0_init_tx();
int_enable();
}
static inline void main_periodic_task( void ) {
LED_TOGGLE(1);
Uart0PrintString("demo3 running since ");
Uart0PrintHex16(cpu_time_sec);
Uart0PrintString(" seconds\n");
}