Generic STM32F103 platform
This commit is contained in:
parent
a1199721a6
commit
217eaaa071
5 changed files with 147 additions and 0 deletions
40
platform/stm32test/contiki-main.c
Normal file
40
platform/stm32test/contiki-main.c
Normal file
|
@ -0,0 +1,40 @@
|
|||
#include <stm32f10x_map.h>
|
||||
#include <stm32f10x_dma.h>
|
||||
#include <gpio.h>
|
||||
#include <nvic.h>
|
||||
#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 */
|
||||
/* asm("wfi"::); */
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue