##// END OF EJS Templates
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port instead of the desired bit).

File last commit:

r18:bd9ab647f70a default
r60:17402611bd25 dev_alexis
Show More
main.c
59 lines | 1.3 KiB | text/x-c | CLexer
jeandet@pc-de-jeandet3.lab-lpp.local
Cleaned source tree....
r16 #include <bsp.h>
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 #include <gpio.h>
#include <uart.h>
jeandet@pc-de-jeandet3.lab-lpp.local
Cleaned source tree....
r16 #include <stm32f4xx_rcc.h>
#include <stm32f4xx_gpio.h>
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 #include <streamdevices.h>
#include <libucstrings.h>
#include <stdio.h>
#define delay for(volatile int i=0;i<1024*256;i++)
//streamdevice* stdo;
jeandet@pc-de-jeandet3.lab-lpp.local
Cleaned source tree....
r16
int main()
{
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18
gpio_t gpio1,gpio2,gpio3;
gpio1 = gpioopen(PD13);
gpio2 = gpioopen(PD14);
gpio3 = gpioopen(PD15);
gpiosetdir(&gpio1,gpiooutdir);
gpiosetdir(&gpio2,gpiooutdir);
gpiosetdir(&gpio3,gpiooutdir);
//libucprintf("test\n\r");
int i=0;
printf("hello world\n\r");
printf("hello world\n\r");
printf("Value Float=%f\n\r",0.23);
uart_t* uart1 = malloc(sizeof(uart_t));
free(uart1);
FILE *test=fopen("UART3","w+");
uartopenandconfig(2,uart1,uartparitynone | uart8bits | uartonestop,115200,PD8,PD9,-1,-1);
fprintf(test,"Value Float=%f\n\r",0.23);
while(1)
{
gpioset(gpio1);
delay;
gpioset(gpio2);
delay;
gpioset(gpio3);
delay;
gpioclr(gpio1);
delay;
gpioclr(gpio2);
delay;
gpioclr(gpio3);
delay;
//uartputc(&uart1,0x5A);
//spiputw(&spi1,0x0F);
//libucfprintf(&fd1,"i= %d 0x%x\n\r",i,i);
i++;
//uartputc(&Xbee,i++);
}
return 0;
jeandet@pc-de-jeandet3.lab-lpp.local
Cleaned source tree....
r16 }