##// END OF EJS Templates
More cleanup, added subdirectories inside include dir, cleaned include tree,...
More cleanup, added subdirectories inside include dir, cleaned include tree, Doxygen configured, started doxygen documentation.

File last commit:

r64:b702edc52366 dev_alexis
r72:6ad096835359 dev_alexis
Show More
bsp.c
126 lines | 3.0 KiB | text/x-c | CLexer
jeandet@pc-de-jeandet3.lab-lpp.local
Cleaned source tree....
r16 /*------------------------------------------------------------------------------
-- This file is a part of the libuc, microcontroler library
-- Copyright (C) 2011, Alexis Jeandet
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
jeandet@pc-de-jeandet3.lab-lpp.local
Cleaned source tree....
r16 -------------------------------------------------------------------------------
-- Author : Alexis Jeandet
Jeandet Alexis
sync
r64 -- Mail : alexis.jeandet@member.fsf.org
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 <streamdevices.h>
#include <malloc.h>
#include <gpio.h>
#include <uart.h>
#include <stdio.h>
uint32_t OSC0 =8000000;
uint32_t INTOSC =16000000;
uint32_t RTCOSC =32768;
uint32_t currentCpuFreq=0;
extern streamdevice* __opnfiles__[__MAX_OPENED_FILES__];
jeandet@pc-de-jeandet3.lab-lpp.local
Cleaned source tree....
r16
float VREF0 =(float)3.3;
int bsp_init()
{
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 int i=0;
for(i=0;i<32;i++)
{
__opnfiles__[i] = NULL;
}
bsp_GPIO_init();
bsp_uart_init();
printf("\r================================================================\n\r");
printf("================================================================\n\r");
printf(BSP);
printf(" initialised\n\r");
printf("================================================================\n\r");
return 1;
jeandet@pc-de-jeandet3.lab-lpp.local
Cleaned source tree....
r16 }
void bsp_GPIO_init()
{
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Sync
r42 gpio_t gpio1 = gpioopen(PC6);//gpioopen(LED1); //PD9 D=> 0x0300 9 => 0x0009
gpio_t gpio2 = gpioopen(PC7);//gpioopen(LED2);
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 gpiosetspeed(&gpio1,gpiohighspeed);
gpiosetspeed(&gpio2,gpiohighspeed);
gpiosetdir(&gpio1,gpiooutdir);
gpiosetdir(&gpio2,gpiooutdir);
jeandet@pc-de-jeandet3.lab-lpp.local
Cleaned source tree....
r16 }
void bsp_uart_init()
{
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 if(__opnfiles__[1]==NULL)
{
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
sync
r25 //uart_t* uart1 = (uart_t*)malloc(sizeof(uart_t));
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 streamdevice* fd1 = (streamdevice*)malloc(sizeof(streamdevice));
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Sync
r42 uart_t uart = uartopenandconfig(uart3,uartparitynone | uart8bits | uartonestop,115200,LED2,LED1,-1,-1);
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
sync
r25 uartmkstreamdev(uart,fd1);
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 __opnfiles__[1] = fd1;
}
else
{
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Sync
r42 uartopenandconfig(uart3,uartparitynone | uart8bits | uartonestop,115200,LED2,LED1,-1,-1);
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 }
jeandet@pc-de-jeandet3.lab-lpp.local
Cleaned source tree....
r16 }
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 void bsp_spi_init()
jeandet@pc-de-jeandet3.lab-lpp.local
Cleaned source tree....
r16 {
}
void bsp_iic_init()
{
}
void bsp_SD_init()
{
}
void vs10XXclearXCS(){}
void vs10XXsetXCS(){}
int vs10XXDREQ()
{
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 return 1;
jeandet@pc-de-jeandet3.lab-lpp.local
Cleaned source tree....
r16 }
void bsppowersdcard(char onoff) //always ON
{
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18
jeandet@pc-de-jeandet3.lab-lpp.local
Cleaned source tree....
r16 }
char bspsdcardpresent()
{
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 return 0;
jeandet@pc-de-jeandet3.lab-lpp.local
Cleaned source tree....
r16 }
char bspsdcardwriteprotected()
{
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18 return 0;
jeandet@pc-de-jeandet3.lab-lpp.local
Cleaned source tree....
r16 }
void bspsdcardselect(char YESNO)
{
jeandet@pc-de-jeandet3.LAB-LPP.LOCAL
Now uses qmake to compile an Qt-creator compatible!
r18
jeandet@pc-de-jeandet3.lab-lpp.local
Cleaned source tree....
r16 }