X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=examples%2Fstm32p103%2Fmain.c;fp=examples%2Fstm32p103%2Fmain.c;h=0000000000000000000000000000000000000000;hb=ccd15e30330f168e9c48aab01b8efb81e4b39998;hp=483852e2148263abc988f5ca505c9402424687c0;hpb=391b4f8d9c82c413f2cd11fb3ba3aeb311f62184;p=bertos.git diff --git a/examples/stm32p103/main.c b/examples/stm32p103/main.c deleted file mode 100644 index 483852e2..00000000 --- a/examples/stm32p103/main.c +++ /dev/null @@ -1,82 +0,0 @@ -/** - * \file - * - * - * \brief STM32-P103 Cortex-M3 testcase - * - * \author Andrea Righi - */ - -#include "cfg/compiler.h" -#include -#include -#include -#include - -#define LED_PIN (1 << 12) - -static void led_init(void) -{ - /* Enable clocking on GPIOA and GPIOC */ - RCC->APB2ENR |= RCC_APB2_GPIOC; - /* Configure the LED pin as GPIO */ - stm32_gpioPinConfig((struct stm32_gpio *)GPIOC_BASE, - LED_PIN, GPIO_MODE_OUT_PP, GPIO_SPEED_50MHZ); -} - -static void NORETURN led_process(void) -{ - int i; - - for (i = 0; ; i = !i) - { - stm32_gpioPinWrite((struct stm32_gpio *)GPIOC_BASE, LED_PIN, i); - timer_delay(250); - } -} - -int main(void) -{ - int i; - - IRQ_ENABLE; - kdbg_init(); - timer_init(); - proc_init(); - led_init(); - - proc_new(led_process, NULL, KERN_MINSTACKSIZE, NULL); - for (i = 0; ; i = !i) - { - kputs("BeRTOS up & running!\n"); - timer_delay(500); - } -}