##// 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:

r71:608b7f0e27c2 dev_alexis
r72:6ad096835359 dev_alexis
Show More
bsp.c
204 lines | 4.2 KiB | text/x-c | CLexer
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60 /*------------------------------------------------------------------------------
-- This file is a part of the libuc, microcontroler library
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71 -- Copyright (C) 2013, Alexis Jeandet
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60 --
-- 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
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-------------------------------------------------------------------------------
-- Author : Alexis Jeandet
Jeandet Alexis
sync
r64 -- Mail : alexis.jeandet@member.fsf.org
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60 -------------------------------------------------------------------------------*/
#include "bsp.h"
#include <streamdevices.h>
#include <malloc.h>
#include <gpio.h>
#include <uart.h>
#include <stdio.h>
#include <stm32f4xx_gpio.h>
#include <stm32f4xx_fsmc.h>
#include <i2c.h>
#include <core.h>
#include <terminal.h>
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71 #include "bsp_gpio.h"
#include "bsp_i2c.h"
#include "bsp_i2c.h"
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60
uint32_t OSC0 =8000000;
uint32_t INTOSC =16000000;
uint32_t RTCOSC =32768;
uint32_t currentCpuFreq=0;
extern streamdevice* __opnfiles__[__MAX_OPENED_FILES__];
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60 LCD_IF_t lcdIF0={
.init = &bsp_FSMC_init,
.writereg = &bsp_lcd0_write_reg,
.readreg = &bsp_lcd0_read_reg,
.writeGRAM = &bsp_lcd0_writeGRAM,
.readGRAM = &bsp_lcd0_readGRAM
};
LCD_t lcd0={
.interface = &lcdIF0,
.init = &ili9328init,
.paint = &ili9328paint,
.paintText = &ili9328paintText,
.paintFilRect = &ili9328paintFilRect,
Jeandet Alexis
Some bug fixed on ILI9328 driver, 16 bit mode working well, 8 bit mode still...
r66 .getPix = &ili9328getPix,
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60 .refreshenable = &ili9328refreshenable,
.width= 240,
.height = 320
};
terminal_t terminal0;
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60
float VREF0 =(float)3.3;
volatile vs10XXDev audioCodec0;
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71 ADS7843_t TC0;
Fat32 library partially working, can read a file.
r62 sdcardDev sdcard2;
blkdevice sdcard2blkdev;
dikpartition sdcard2Part1;
FAT32fs sdcard2FAT32part1;
dikpartition sdcard2Part2;
FAT32fs sdcard2FAT32part2;
dikpartition sdcard2Part3;
FAT32fs sdcard2FAT32part3;
dikpartition sdcard2Part4;
FAT32fs sdcard2FAT32part4;
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60 int bsp_init()
{
int i=0;
for(i=0;i<__MAX_OPENED_FILES__;i++)
{
__opnfiles__[i] = NULL;
}
bsp_GPIO_init();
bsp_uart_init();
bsp_iic_init();
bsp_FSMC_init();
bsp_GTerm_init();
bsp_spi_init();
bsp_SD_init();
bsp_Audio_init();
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71 bsp_TC_init();
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60 printf("\r=====================\n\r");
printf( "=====================\n\r");
printf(BSP);
printf(" initialised\n\r");
printf( "=====================\n\r");
Jeandet Alexis
Some bug fixed on ILI9328 driver, 16 bit mode working well, 8 bit mode still...
r66 #if __BYTE_ORDER__==__ORDER_BIG_ENDIAN__
printf( "BIG ENDIAN MACHINE\n\r");
#else
printf( "LITLE ENDIAN MACHINE\n\r");
#endif
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60 return 1;
}
void bsp_GPIO_init()
{
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71 gpio_t GPIO_Out_init_List[]={LED1,LED2,LCD_RESET,LCD_BACKL,VS1053xCS,VS1053xDCS,\
VS1053xRESET,SDCARD2CS,LCD_RS,LCD_CS,TC_CS};
gpio_t GPIO_In_init_List[]={VS1053DREQ,SDCARD2CD,BP3,TC_BUSY};
bsp_gpio_set_outputs(GPIO_Out_init_List,11);
bsp_gpio_set_inputs(GPIO_In_init_List,4);
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60 gpioclr(VS1053xRESET);
gpioset(VS1053xCS);
gpioset(VS1053xDCS);
gpioset(SDCARD2CS);
gpioclr(LCD_RESET);
gpioclr(LCD_BACKL);
}
void bsp_uart_init()
{
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60 }
Jeandet Alexis
Some bug fixed on ILI9328 driver, 16 bit mode working well, 8 bit mode still...
r66
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71 int bsp_TC_init()
{
ads7843init(&TC0,TC_SPI,tcsetncs,tcbusy);
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60 }
void bsp_iic_init()
{
// i2copenandconfig(i2c2,0,10000,PF0,PF1);
}
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71
void tcsetncs(char val)
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60 {
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71 if(val)
gpioset(TC_CS);
else
gpioclr(TC_CS);
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60 }
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71 int tcbusy()
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60 {
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71 return gpiogetval(TC_BUSY);
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60 }
void bsp_GTerm_init()
{
if(__opnfiles__[1]==NULL)
{
streamdevice* fd1 = (streamdevice*)malloc(sizeof(streamdevice));
Removed error on fat32 library, seems now to be able navigate among sectors in...
r68 terminal_init(&terminal0 ,&lcd0,&ComicSansMS_8,fd1);
Huge cleanup, removed "out of dir building" now libuc contains qmake and...
r71 terminal_settextColor(&terminal0,0);
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
r60 __opnfiles__[1] = fd1;
}
else
{
}
}