Missing file
This commit is contained in:
parent
5a07631752
commit
292e69a468
1 changed files with 32 additions and 0 deletions
32
platform/stepper-robot/usb-main.c
Normal file
32
platform/stepper-robot/usb-main.c
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <debug-uart.h>
|
||||||
|
#include <sys/process.h>
|
||||||
|
#include <sys/procinit.h>
|
||||||
|
#include <etimer.h>
|
||||||
|
#include <sys/autostart.h>
|
||||||
|
#include <clock.h>
|
||||||
|
|
||||||
|
unsigned int idle_count = 0;
|
||||||
|
|
||||||
|
int
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
dbg_setup_uart();
|
||||||
|
printf("Initialising\n");
|
||||||
|
|
||||||
|
clock_init();
|
||||||
|
process_init();
|
||||||
|
process_start(&etimer_process, NULL);
|
||||||
|
autostart_start(autostart_processes);
|
||||||
|
printf("Processes running\n");
|
||||||
|
while(1) {
|
||||||
|
do {
|
||||||
|
} while(process_run() > 0);
|
||||||
|
idle_count++;
|
||||||
|
/* Idle! */
|
||||||
|
/* Stop processor clock */
|
||||||
|
*AT91C_PMC_SCDR |= AT91C_PMC_PCK;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in a new issue