@@ -0,0 +1,53 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the libuc, microcontroler library | |||
|
3 | -- Copyright (C) 2012, Alexis Jeandet | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | ------------------------------------------------------------------------------- | |||
|
19 | -- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@gmail.com | |||
|
21 | -------------------------------------------------------------------------------*/ | |||
|
22 | #ifndef GENERICLCD_CONTROLER_H | |||
|
23 | #define GENERICLCD_CONTROLER_H | |||
|
24 | ||||
|
25 | #include <uhandle.h> | |||
|
26 | #include <stdint.h> | |||
|
27 | ||||
|
28 | ||||
|
29 | typedef struct LCD_IF_t | |||
|
30 | { | |||
|
31 | int (*init)(); | |||
|
32 | void (*writereg)(uint32_t reg,uint32_t data); | |||
|
33 | uint32_t (*readreg)(uint32_t reg); | |||
|
34 | void (*writeGRAM)(void* buffer,uint32_t count); | |||
|
35 | void (*readGRAM)(void* buffer,uint32_t count); | |||
|
36 | }LCD_IF_t; | |||
|
37 | ||||
|
38 | typedef struct LCD_t | |||
|
39 | { | |||
|
40 | LCD_IF_t* interface; | |||
|
41 | int (*init)(struct LCD_t* LCD); | |||
|
42 | void (*paint)(struct LCD_t* LCD,void* buffer,uint16_t Xpos,uint16_t Ypos,uint16_t Width,uint16_t Height); | |||
|
43 | uint16_t width; | |||
|
44 | uint16_t height; | |||
|
45 | }LCD_t; | |||
|
46 | ||||
|
47 | ||||
|
48 | #endif /*GENERICLCD_CONTROLER_H*/ | |||
|
49 | ||||
|
50 | ||||
|
51 | ||||
|
52 | ||||
|
53 |
@@ -0,0 +1,88 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the libuc, microcontroler library | |||
|
3 | -- Copyright (C) 2012, Alexis Jeandet | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | ------------------------------------------------------------------------------- | |||
|
19 | -- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@gmail.com | |||
|
21 | -------------------------------------------------------------------------------*/ | |||
|
22 | #ifndef ILI9328_H | |||
|
23 | #define ILI9328_H | |||
|
24 | ||||
|
25 | #include <uhandle.h> | |||
|
26 | #include <genericLCD_Controler.h> | |||
|
27 | ||||
|
28 | extern int ili9328init(struct LCD_t* LCD); | |||
|
29 | extern void ili9328paint_t(LCD_t* LCD,void* buffer,uint16_t Xpos,uint16_t Ypos,uint16_t Width,uint16_t Height); | |||
|
30 | ||||
|
31 | #define ILI9328_REGISTER_DRIVERCODEREAD ((uint16_t) 0x0000 ) | |||
|
32 | #define ILI9328_REGISTER_DRIVEROUTPUTCONTROL1 ((uint16_t) 0x0001 ) | |||
|
33 | #define ILI9328_REGISTER_LCDDRIVINGCONTROL ((uint16_t) 0x0002 ) | |||
|
34 | #define ILI9328_REGISTER_ENTRYMODE ((uint16_t) 0x0003 ) | |||
|
35 | #define ILI9328_REGISTER_RESIZECONTROL ((uint16_t) 0x0004 ) | |||
|
36 | #define ILI9328_REGISTER_DISPLAYCONTROL1 ((uint16_t) 0x0007 ) | |||
|
37 | #define ILI9328_REGISTER_DISPLAYCONTROL2 ((uint16_t) 0x0008 ) | |||
|
38 | #define ILI9328_REGISTER_DISPLAYCONTROL3 ((uint16_t) 0x0009 ) | |||
|
39 | #define ILI9328_REGISTER_DISPLAYCONTROL4 ((uint16_t) 0x000A ) | |||
|
40 | #define ILI9328_REGISTER_RGBDISPLAYINTERFACECONTROL1 ((uint16_t) 0x000C ) | |||
|
41 | #define ILI9328_REGISTER_FRAMEMAKERPOSITION ((uint16_t) 0x000D ) | |||
|
42 | #define ILI9328_REGISTER_RGBDISPLAYINTERFACECONTROL2 ((uint16_t) 0x000F ) | |||
|
43 | #define ILI9328_REGISTER_POWERCONTROL1 ((uint16_t) 0x0010 ) | |||
|
44 | #define ILI9328_REGISTER_POWERCONTROL2 ((uint16_t) 0x0011 ) | |||
|
45 | #define ILI9328_REGISTER_POWERCONTROL3 ((uint16_t) 0x0012 ) | |||
|
46 | #define ILI9328_REGISTER_POWERCONTROL4 ((uint16_t) 0x0013 ) | |||
|
47 | #define ILI9328_REGISTER_HORIZONTALGRAMADDRESSSET ((uint16_t) 0x0020 ) | |||
|
48 | #define ILI9328_REGISTER_VERTICALGRAMADDRESSSET ((uint16_t) 0x0021 ) | |||
|
49 | #define ILI9328_REGISTER_WRITEDATATOGRAM ((uint16_t) 0x0022 ) | |||
|
50 | #define ILI9328_REGISTER_POWERCONTROL7 ((uint16_t) 0x0029 ) | |||
|
51 | #define ILI9328_REGISTER_FRAMERATEANDCOLORCONTROL ((uint16_t) 0x002B ) | |||
|
52 | #define ILI9328_REGISTER_GAMMACONTROL1 ((uint16_t) 0x0030 ) | |||
|
53 | #define ILI9328_REGISTER_GAMMACONTROL2 ((uint16_t) 0x0031 ) | |||
|
54 | #define ILI9328_REGISTER_GAMMACONTROL3 ((uint16_t) 0x0032 ) | |||
|
55 | #define ILI9328_REGISTER_GAMMACONTROL4 ((uint16_t) 0x0035 ) | |||
|
56 | #define ILI9328_REGISTER_GAMMACONTROL5 ((uint16_t) 0x0036 ) | |||
|
57 | #define ILI9328_REGISTER_GAMMACONTROL6 ((uint16_t) 0x0037 ) | |||
|
58 | #define ILI9328_REGISTER_GAMMACONTROL7 ((uint16_t) 0x0038 ) | |||
|
59 | #define ILI9328_REGISTER_GAMMACONTROL8 ((uint16_t) 0x0039 ) | |||
|
60 | #define ILI9328_REGISTER_GAMMACONTROL9 ((uint16_t) 0x003C ) | |||
|
61 | #define ILI9328_REGISTER_GAMMACONTROL10 ((uint16_t) 0x003D ) | |||
|
62 | #define ILI9328_REGISTER_HORIZONTALADDRESSSTARTPOSITION ((uint16_t) 0x0050 ) | |||
|
63 | #define ILI9328_REGISTER_HORIZONTALADDRESSENDPOSITION ((uint16_t) 0x0051 ) | |||
|
64 | #define ILI9328_REGISTER_VERTICALADDRESSSTARTPOSITION ((uint16_t) 0x0052 ) | |||
|
65 | #define ILI9328_REGISTER_VERTICALADDRESSENDPOSITION ((uint16_t) 0x0053 ) | |||
|
66 | #define ILI9328_REGISTER_DRIVEROUTPUTCONTROL2 ((uint16_t) 0x0060 ) | |||
|
67 | #define ILI9328_REGISTER_BASEIMAGEDISPLAYCONTROL ((uint16_t) 0x0061 ) | |||
|
68 | #define ILI9328_REGISTER_VERTICALSCROLLCONTROL ((uint16_t) 0x006A ) | |||
|
69 | #define ILI9328_REGISTER_PARTIALIMAGE1DISPLAYPOSITION ((uint16_t) 0x0080 ) | |||
|
70 | #define ILI9328_REGISTER_PARTIALIMAGE1AREASTARTLINE ((uint16_t) 0x0081 ) | |||
|
71 | #define ILI9328_REGISTER_PARTIALIMAGE1AREAENDLINE ((uint16_t) 0x0082 ) | |||
|
72 | #define ILI9328_REGISTER_PARTIALIMAGE2DISPLAYPOSITION ((uint16_t) 0x0083 ) | |||
|
73 | #define ILI9328_REGISTER_PARTIALIMAGE2AREASTARTLINE ((uint16_t) 0x0084 ) | |||
|
74 | #define ILI9328_REGISTER_PARTIALIMAGE2AREAENDLINE ((uint16_t) 0x0085 ) | |||
|
75 | #define ILI9328_REGISTER_PANELINTERFACECONTROL1 ((uint16_t) 0x0090 ) | |||
|
76 | #define ILI9328_REGISTER_PANELINTERFACECONTROL2 ((uint16_t) 0x0092 ) | |||
|
77 | #define ILI9328_REGISTER_PANELINTERFACECONTROL4 ((uint16_t) 0x0095 ) | |||
|
78 | #define ILI9328_REGISTER_OTPVCMPROGRAMMINGCONTROL ((uint16_t) 0x00A1 ) | |||
|
79 | #define ILI9328_REGISTER_OTPVCMSTATUSANDENABLE ((uint16_t) 0x00A2 ) | |||
|
80 | #define ILI9328_REGISTER_OTPPROGRAMMINGIDKEY ((uint16_t) 0x00A5 ) | |||
|
81 | ||||
|
82 | ||||
|
83 | #endif | |||
|
84 | ||||
|
85 | ||||
|
86 | ||||
|
87 | ||||
|
88 |
@@ -0,0 +1,90 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the libuc, microcontroler library | |||
|
3 | -- Copyright (C) 2012, Alexis Jeandet | |||
|
4 | -- | |||
|
5 | -- This program is free software; you can redistribute it and/or modify | |||
|
6 | -- it under the terms of the GNU General Public License as published by | |||
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
15 | -- You should have received a copy of the GNU General Public License | |||
|
16 | -- along with this program; if not, write to the Free Software | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | ------------------------------------------------------------------------------- | |||
|
19 | -- Author : Alexis Jeandet | |||
|
20 | -- Mail : alexis.jeandet@gmail.com | |||
|
21 | -------------------------------------------------------------------------------*/ | |||
|
22 | #include <ili9328.h> | |||
|
23 | #include <stdio.h> | |||
|
24 | #include <stddef.h> | |||
|
25 | ||||
|
26 | #define _delay_(del) for(volatile int _d_e_l_=0;_d_e_l_<(del);_d_e_l_++); | |||
|
27 | ||||
|
28 | void ili9328paint_t(LCD_t* LCD,void* buffer,uint16_t Xpos,uint16_t Ypos,uint16_t Width,uint16_t Height) | |||
|
29 | { | |||
|
30 | if((LCD!=NULL) && (LCD->interface!=NULL) && (LCD->interface->writeGRAM!=NULL) && (LCD->width<(Xpos+Width)) && (LCD->height<(Ypos+Height))) | |||
|
31 | { | |||
|
32 | uint16_t* castedBuff=(uint16_t*)buffer; | |||
|
33 | for(int i=0;i<Height;i++) | |||
|
34 | { | |||
|
35 | LCD->interface->writeGRAM(castedBuff+(i*Width),Width); | |||
|
36 | } | |||
|
37 | } | |||
|
38 | } | |||
|
39 | ||||
|
40 | int ili9328init(struct LCD_t* LCD) | |||
|
41 | { | |||
|
42 | if((LCD!=NULL) && (LCD->interface!=NULL) && (LCD->interface->writereg!=NULL)) | |||
|
43 | { | |||
|
44 | LCD->interface->writereg(ILI9328_REGISTER_DRIVEROUTPUTCONTROL1, 0x0100); // Driver Output Control Register (R01h) | |||
|
45 | LCD->interface->writereg(ILI9328_REGISTER_LCDDRIVINGCONTROL, 0x0700); // LCD Driving Waveform Control (R02h) | |||
|
46 | LCD->interface->writereg(ILI9328_REGISTER_ENTRYMODE, 0x1030); // Entry Mode (R03h) | |||
|
47 | LCD->interface->writereg(ILI9328_REGISTER_DISPLAYCONTROL2, 0x0302); | |||
|
48 | LCD->interface->writereg(ILI9328_REGISTER_DISPLAYCONTROL3, 0x0000); | |||
|
49 | LCD->interface->writereg(ILI9328_REGISTER_DISPLAYCONTROL4, 0x0000); // Fmark On | |||
|
50 | LCD->interface->writereg(ILI9328_REGISTER_POWERCONTROL1, 0x0000); // Power Control 1 (R10h) | |||
|
51 | LCD->interface->writereg(ILI9328_REGISTER_POWERCONTROL2, 0x0007); // Power Control 2 (R11h) | |||
|
52 | LCD->interface->writereg(ILI9328_REGISTER_POWERCONTROL3, 0x0000); // Power Control 3 (R12h) | |||
|
53 | LCD->interface->writereg(ILI9328_REGISTER_POWERCONTROL4, 0x0000); // Power Control 4 (R13h) | |||
|
54 | _delay_(10000000); | |||
|
55 | LCD->interface->writereg(ILI9328_REGISTER_POWERCONTROL1, 0x14B0); // Power Control 1 (R10h) | |||
|
56 | _delay_(5000000); | |||
|
57 | LCD->interface->writereg(ILI9328_REGISTER_POWERCONTROL2, 0x0007); // Power Control 2 (R11h) | |||
|
58 | _delay_(5000000); | |||
|
59 | LCD->interface->writereg(ILI9328_REGISTER_POWERCONTROL3, 0x008E); // Power Control 3 (R12h) | |||
|
60 | LCD->interface->writereg(ILI9328_REGISTER_POWERCONTROL4, 0x0C00); // Power Control 4 (R13h) | |||
|
61 | LCD->interface->writereg(ILI9328_REGISTER_POWERCONTROL7, 0x0015); // NVM read data 2 (R29h) | |||
|
62 | _delay_(5000000); | |||
|
63 | LCD->interface->writereg(ILI9328_REGISTER_GAMMACONTROL1, 0x0000); // Gamma Control 1 | |||
|
64 | LCD->interface->writereg(ILI9328_REGISTER_GAMMACONTROL2, 0x0107); // Gamma Control 2 | |||
|
65 | LCD->interface->writereg(ILI9328_REGISTER_GAMMACONTROL3, 0x0000); // Gamma Control 3 | |||
|
66 | LCD->interface->writereg(ILI9328_REGISTER_GAMMACONTROL4, 0x0203); // Gamma Control 4 | |||
|
67 | LCD->interface->writereg(ILI9328_REGISTER_GAMMACONTROL5, 0x0402); // Gamma Control 5 | |||
|
68 | LCD->interface->writereg(ILI9328_REGISTER_GAMMACONTROL6, 0x0000); // Gamma Control 6 | |||
|
69 | LCD->interface->writereg(ILI9328_REGISTER_GAMMACONTROL7, 0x0207); // Gamma Control 7 | |||
|
70 | LCD->interface->writereg(ILI9328_REGISTER_GAMMACONTROL8, 0x0000); // Gamma Control 8 | |||
|
71 | LCD->interface->writereg(ILI9328_REGISTER_GAMMACONTROL9, 0x0203); // Gamma Control 9 | |||
|
72 | LCD->interface->writereg(ILI9328_REGISTER_GAMMACONTROL10, 0x0403); // Gamma Control 10 | |||
|
73 | LCD->interface->writereg(ILI9328_REGISTER_HORIZONTALADDRESSSTARTPOSITION, 0x0000); // Window Horizontal RAM Address Start (R50h) | |||
|
74 | LCD->interface->writereg(ILI9328_REGISTER_HORIZONTALADDRESSENDPOSITION, 240 - 1); // Window Horizontal RAM Address End (R51h) | |||
|
75 | LCD->interface->writereg(ILI9328_REGISTER_VERTICALADDRESSSTARTPOSITION, 0X0000); // Window Vertical RAM Address Start (R52h) | |||
|
76 | LCD->interface->writereg(ILI9328_REGISTER_VERTICALADDRESSENDPOSITION, 320 - 1); // Window Vertical RAM Address End (R53h) | |||
|
77 | LCD->interface->writereg(ILI9328_REGISTER_DRIVEROUTPUTCONTROL2, 0xa700); // Driver Output Control (R60h) | |||
|
78 | LCD->interface->writereg(ILI9328_REGISTER_BASEIMAGEDISPLAYCONTROL, 0x0003); // Driver Output Control (R61h) - enable VLE | |||
|
79 | LCD->interface->writereg(ILI9328_REGISTER_PANELINTERFACECONTROL1, 0X0010); // Panel Interface Control 1 (R90h) | |||
|
80 | // Display On | |||
|
81 | LCD->interface->writereg(ILI9328_REGISTER_DISPLAYCONTROL1, 0x0133); // Display Control (R07h) | |||
|
82 | _delay_(5000000); | |||
|
83 | LCD->interface->writereg(ILI9328_REGISTER_ENTRYMODE, 0x1030); | |||
|
84 | LCD->interface->writereg(ILI9328_REGISTER_DRIVEROUTPUTCONTROL1, 0x0100); | |||
|
85 | //ili9328WriteCmd(ILI9328_REGISTER_WRITEDATATOGRAM); | |||
|
86 | } | |||
|
87 | return 0; | |||
|
88 | } | |||
|
89 | ||||
|
90 |
@@ -0,0 +1,11 | |||||
|
1 | TEMPLATE = lib | |||
|
2 | CONFIG += console | |||
|
3 | CONFIG -= qt | |||
|
4 | TARGET = ili9328 | |||
|
5 | include($$(libuc2)/rules/stm32f4-arm-none-eabi-gcc/rules.pri) | |||
|
6 | ||||
|
7 | SOURCES += \ | |||
|
8 | ili9328.c | |||
|
9 | ||||
|
10 | HEADERS += \ | |||
|
11 | $$(libuc2)/lib/includes/GRAPHIC/CONTROLERS/ili9328.h |
@@ -1,92 +1,97 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the libuc, microcontroler library |
|
2 | -- This file is a part of the libuc, microcontroler library | |
3 | -- Copyright (C) 2011, Alexis Jeandet |
|
3 | -- Copyright (C) 2011, Alexis Jeandet | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
7 | -- the Free Software Foundation; either version 3 of the License, or |
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |
8 | -- (at your option) any later version. |
|
8 | -- (at your option) any later version. | |
9 | -- |
|
9 | -- | |
10 | -- This program is distributed in the hope that it will be useful, |
|
10 | -- This program is distributed in the hope that it will be useful, | |
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | -- GNU General Public License for more details. |
|
13 | -- GNU General Public License for more details. | |
14 | -- |
|
14 | -- | |
15 | -- You should have received a copy of the GNU General Public License |
|
15 | -- You should have received a copy of the GNU General Public License | |
16 | -- along with this program; if not, write to the Free Software |
|
16 | -- along with this program; if not, write to the Free Software | |
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | ------------------------------------------------------------------------------- |
|
18 | ------------------------------------------------------------------------------- | |
19 | -- Author : Alexis Jeandet |
|
19 | -- Author : Alexis Jeandet | |
20 | -- Mail : alexis.jeandet@gmail.com |
|
20 | -- Mail : alexis.jeandet@gmail.com | |
21 | -------------------------------------------------------------------------------*/ |
|
21 | -------------------------------------------------------------------------------*/ | |
22 | #ifndef BSP_H |
|
22 | #ifndef BSP_H | |
23 | #define BSP_H |
|
23 | #define BSP_H | |
24 | #include <stm32f4xx.h> |
|
24 | #include <stm32f4xx.h> | |
25 | #include <stm32f4xx_gpio.h> |
|
25 | #include <stm32f4xx_gpio.h> | |
26 | #include <stm32f4xx_rcc.h> |
|
26 | #include <stm32f4xx_rcc.h> | |
27 | #include <gpio.h> |
|
27 | #include <gpio.h> | |
|
28 | #include <ili9328.h> | |||
|
29 | #include <genericLCD_Controler.h> | |||
28 |
|
30 | |||
29 | #define __MAX_OPENED_FILES__ 4 |
|
31 | #define __MAX_OPENED_FILES__ 4 | |
30 | #define __FS_ROOT_SIZE__ 4 |
|
32 | #define __FS_ROOT_SIZE__ 4 | |
31 | /* |
|
33 | /* | |
32 | #ifndef PD8 |
|
34 | #ifndef PD8 | |
33 | #define PD8 |
|
35 | #define PD8 | |
34 | #endif |
|
36 | #endif | |
35 | #ifndef PD9 |
|
37 | #ifndef PD9 | |
36 | #define PD9 |
|
38 | #define PD9 | |
37 | #endif |
|
39 | #endif | |
38 | */ |
|
40 | */ | |
39 |
|
41 | |||
|
42 | ||||
40 | #define LED1 PF6 |
|
43 | #define LED1 PF6 | |
41 | #define LED2 PF7 |
|
44 | #define LED2 PF7 | |
42 | #define LED3 PF8 |
|
45 | #define LED3 PF8 | |
43 |
|
46 | |||
44 | #define PSU_DISABLE PH2 |
|
47 | #define PSU_DISABLE PH2 | |
45 | #define PSU_ALERT_5V PF2 |
|
48 | #define PSU_ALERT_5V PF2 | |
46 | #define PSU_ALERT_1_5V PF3 |
|
49 | #define PSU_ALERT_1_5V PF3 | |
47 | #define PSU_ALERT_3_3V PF4 |
|
50 | #define PSU_ALERT_3_3V PF4 | |
48 |
|
51 | |||
49 | extern float VREF0; |
|
52 | extern float VREF0; | |
50 |
|
53 | |||
51 | extern uint32_t currentCpuFreq; |
|
54 | extern uint32_t currentCpuFreq; | |
|
55 | extern LCD_t lcd0; | |||
|
56 | ||||
52 |
|
57 | |||
53 | extern int bsp_init(); |
|
58 | extern int bsp_init(); | |
54 |
|
59 | |||
55 | extern void bsp_GPIO_init(); |
|
60 | extern void bsp_GPIO_init(); | |
56 | extern void bsp_uart_init(); |
|
61 | extern void bsp_uart_init(); | |
57 | extern void bsp_iic_init(); |
|
62 | extern void bsp_iic_init(); | |
58 | extern void bsp_spi_init(); |
|
63 | extern void bsp_spi_init(); | |
59 | extern void bsp_SD_init(); |
|
64 | extern void bsp_SD_init(); | |
60 | extern void bsp_FSMC_init(); |
|
65 | extern void bsp_FSMC_init(); | |
61 |
|
66 | |||
62 | /* VS1053 */ |
|
67 | /* VS1053 */ | |
63 | extern void clearXCS(); |
|
68 | extern void clearXCS(); | |
64 | extern void setXCS(); |
|
69 | extern void setXCS(); | |
65 | extern int vs10XXDREQ(); |
|
70 | extern int vs10XXDREQ(); | |
66 |
|
71 | |||
67 | /* SD CARD */ |
|
72 | /* SD CARD */ | |
68 | void bsppowersdcard(char onoff); |
|
73 | void bsppowersdcard(char onoff); | |
69 | char bspsdcardpresent(); |
|
74 | char bspsdcardpresent(); | |
70 | void bspsdcardselect(char YESNO); |
|
75 | void bspsdcardselect(char YESNO); | |
71 | char bspsdcardwriteprotected(); |
|
76 | char bspsdcardwriteprotected(); | |
72 |
|
77 | |||
73 | #endif |
|
78 | #endif | |
74 |
|
79 | |||
75 |
|
80 | |||
76 |
|
81 | |||
77 |
|
82 | |||
78 |
|
83 | |||
79 |
|
84 | |||
80 |
|
85 | |||
81 |
|
86 | |||
82 |
|
87 | |||
83 |
|
88 | |||
84 |
|
89 | |||
85 |
|
90 | |||
86 |
|
91 | |||
87 |
|
92 | |||
88 |
|
93 | |||
89 |
|
94 | |||
90 |
|
95 | |||
91 |
|
96 | |||
92 |
|
97 |
@@ -1,211 +1,226 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the libuc, microcontroler library |
|
2 | -- This file is a part of the libuc, microcontroler library | |
3 | -- Copyright (C) 2011, Alexis Jeandet |
|
3 | -- Copyright (C) 2011, Alexis Jeandet | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
7 | -- the Free Software Foundation; either version 3 of the License, or |
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |
8 | -- (at your option) any later version. |
|
8 | -- (at your option) any later version. | |
9 | -- |
|
9 | -- | |
10 | -- This program is distributed in the hope that it will be useful, |
|
10 | -- This program is distributed in the hope that it will be useful, | |
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | -- GNU General Public License for more details. |
|
13 | -- GNU General Public License for more details. | |
14 | -- |
|
14 | -- | |
15 | -- You should have received a copy of the GNU General Public License |
|
15 | -- You should have received a copy of the GNU General Public License | |
16 | -- along with this program; if not, write to the Free Software |
|
16 | -- along with this program; if not, write to the Free Software | |
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | ------------------------------------------------------------------------------- |
|
18 | ------------------------------------------------------------------------------- | |
19 | -- Author : Alexis Jeandet |
|
19 | -- Author : Alexis Jeandet | |
20 | -- Mail : alexis.jeandet@gmail.com |
|
20 | -- Mail : alexis.jeandet@gmail.com | |
21 | -------------------------------------------------------------------------------*/ |
|
21 | -------------------------------------------------------------------------------*/ | |
22 | #include "bsp.h" |
|
22 | #include "bsp.h" | |
23 | #include <streamdevices.h> |
|
23 | #include <streamdevices.h> | |
24 | #include <malloc.h> |
|
24 | #include <malloc.h> | |
25 | #include <gpio.h> |
|
25 | #include <gpio.h> | |
26 | #include <uart.h> |
|
26 | #include <uart.h> | |
27 | #include <stdio.h> |
|
27 | #include <stdio.h> | |
28 | #include <stm32f4xx_gpio.h> |
|
28 | #include <stm32f4xx_gpio.h> | |
29 | #include <stm32f4xx_fsmc.h> |
|
29 | #include <stm32f4xx_fsmc.h> | |
30 | #include <i2c.h> |
|
30 | #include <i2c.h> | |
31 | uint32_t OSC0 =8000000; |
|
31 | uint32_t OSC0 =8000000; | |
32 | uint32_t INTOSC =16000000; |
|
32 | uint32_t INTOSC =16000000; | |
33 | uint32_t RTCOSC =32768; |
|
33 | uint32_t RTCOSC =32768; | |
34 | uint32_t currentCpuFreq=0; |
|
34 | uint32_t currentCpuFreq=0; | |
35 | extern streamdevice* __opnfiles__[__MAX_OPENED_FILES__]; |
|
35 | extern streamdevice* __opnfiles__[__MAX_OPENED_FILES__]; | |
|
36 | LCD_t lcd0; | |||
|
37 | LCD_IF_t lcdIF0; | |||
|
38 | ||||
|
39 | volatile int16_t* lcd0_CMD=(volatile int16_t*)0x60000000; | |||
|
40 | volatile int16_t* lcd0_DATA=(volatile int16_t*)(0x60000000+(1<<20)); | |||
36 |
|
41 | |||
37 | float VREF0 =(float)3.3; |
|
42 | float VREF0 =(float)3.3; | |
38 |
|
43 | |||
39 | int bsp_init() |
|
44 | int bsp_init() | |
40 | { |
|
45 | { | |
41 | int i=0; |
|
46 | int i=0; | |
42 | for(i=0;i<32;i++) |
|
47 | for(i=0;i<32;i++) | |
43 | { |
|
48 | { | |
44 | __opnfiles__[i] = NULL; |
|
49 | __opnfiles__[i] = NULL; | |
45 | } |
|
50 | } | |
46 | bsp_GPIO_init(); |
|
51 | bsp_GPIO_init(); | |
47 | bsp_uart_init(); |
|
52 | bsp_uart_init(); | |
48 | bsp_iic_init(); |
|
53 | bsp_iic_init(); | |
49 | bsp_FSMC_init(); |
|
54 | bsp_FSMC_init(); | |
50 | printf("\r================================================================\n\r"); |
|
55 | printf("\r================================================================\n\r"); | |
51 | printf("================================================================\n\r"); |
|
56 | printf("================================================================\n\r"); | |
52 | printf(BSP); |
|
57 | printf(BSP); | |
53 | printf(" initialised\n\r"); |
|
58 | printf(" initialised\n\r"); | |
54 | printf("================================================================\n\r"); |
|
59 | printf("================================================================\n\r"); | |
55 | return 1; |
|
60 | return 1; | |
56 | } |
|
61 | } | |
57 |
|
62 | |||
58 | void bsp_GPIO_init() |
|
63 | void bsp_GPIO_init() | |
59 | { |
|
64 | { | |
60 | gpio_t gpio1 = gpioopen(LED1); |
|
65 | gpio_t gpio1 = gpioopen(LED1); | |
61 | gpio_t gpio2 = gpioopen(LED2); |
|
66 | gpio_t gpio2 = gpioopen(LED2); | |
62 | gpio_t gpio3 = gpioopen(LED3); |
|
67 | gpio_t gpio3 = gpioopen(LED3); | |
63 | gpio_t gpio4 = gpioopen(PSU_DISABLE); |
|
68 | gpio_t gpio4 = gpioopen(PSU_DISABLE); | |
64 | gpio_t gpio5 = gpioopen(PSU_ALERT_5V); |
|
69 | gpio_t gpio5 = gpioopen(PSU_ALERT_5V); | |
65 | gpio_t gpio6 = gpioopen(PSU_ALERT_1_5V); |
|
70 | gpio_t gpio6 = gpioopen(PSU_ALERT_1_5V); | |
66 | gpio_t gpio7 = gpioopen(PSU_ALERT_3_3V); |
|
71 | gpio_t gpio7 = gpioopen(PSU_ALERT_3_3V); | |
67 | gpiosetspeed(&gpio1,gpiohighspeed); |
|
72 | gpiosetspeed(&gpio1,gpiohighspeed); | |
68 | gpiosetspeed(&gpio2,gpiohighspeed); |
|
73 | gpiosetspeed(&gpio2,gpiohighspeed); | |
69 | gpiosetspeed(&gpio3,gpiohighspeed); |
|
74 | gpiosetspeed(&gpio3,gpiohighspeed); | |
70 | gpiosetspeed(&gpio4,gpiohighspeed); |
|
75 | gpiosetspeed(&gpio4,gpiohighspeed); | |
71 | gpiosetspeed(&gpio5,gpiohighspeed); |
|
76 | gpiosetspeed(&gpio5,gpiohighspeed); | |
72 | gpiosetspeed(&gpio6,gpiohighspeed); |
|
77 | gpiosetspeed(&gpio6,gpiohighspeed); | |
73 | gpiosetspeed(&gpio7,gpiohighspeed); |
|
78 | gpiosetspeed(&gpio7,gpiohighspeed); | |
74 | gpioclr(PSU_DISABLE); |
|
79 | gpioclr(PSU_DISABLE); | |
75 | gpiosetdir(&gpio1,gpiooutdir); |
|
80 | gpiosetdir(&gpio1,gpiooutdir); | |
76 | gpiosetdir(&gpio3,gpiooutdir); |
|
81 | gpiosetdir(&gpio3,gpiooutdir); | |
77 | gpiosetdir(&gpio2,gpiooutdir); |
|
82 | gpiosetdir(&gpio2,gpiooutdir); | |
78 | gpiosetdir(&gpio4,gpiooutdir); |
|
83 | gpiosetdir(&gpio4,gpiooutdir); | |
79 | gpiosetdir(&gpio5,gpioindir); |
|
84 | gpiosetdir(&gpio5,gpioindir); | |
80 | gpiosetdir(&gpio6,gpioindir); |
|
85 | gpiosetdir(&gpio6,gpioindir); | |
81 | gpiosetdir(&gpio7,gpioindir); |
|
86 | gpiosetdir(&gpio7,gpioindir); | |
82 | gpioclr(PSU_DISABLE); |
|
87 | gpioclr(PSU_DISABLE); | |
83 | } |
|
88 | } | |
84 |
|
89 | |||
85 | void bsp_uart_init() |
|
90 | void bsp_uart_init() | |
86 | { |
|
91 | { | |
87 | if(__opnfiles__[1]==NULL) |
|
92 | if(__opnfiles__[1]==NULL) | |
88 | { |
|
93 | { | |
89 | //uart_t* uart1 = (uart_t*)malloc(sizeof(uart_t)); |
|
94 | //uart_t* uart1 = (uart_t*)malloc(sizeof(uart_t)); | |
90 | streamdevice* fd1 = (streamdevice*)malloc(sizeof(streamdevice)); |
|
95 | streamdevice* fd1 = (streamdevice*)malloc(sizeof(streamdevice)); | |
91 | uart_t uart = uartopenandconfig(uart1,uartparitynone | uart8bits | uartonestop,115200,PA9,PA10,-1,-1); |
|
96 | uart_t uart = uartopenandconfig(uart1,uartparitynone | uart8bits | uartonestop,115200,PA9,PA10,-1,-1); | |
92 | uartmkstreamdev(uart,fd1); |
|
97 | uartmkstreamdev(uart,fd1); | |
93 | __opnfiles__[1] = fd1; |
|
98 | __opnfiles__[1] = fd1; | |
94 | } |
|
99 | } | |
95 | else |
|
100 | else | |
96 | { |
|
101 | { | |
97 | uartopenandconfig(0,uartparitynone | uart8bits | uartonestop,115200,PA9,PA10,-1,-1); |
|
102 | uartopenandconfig(0,uartparitynone | uart8bits | uartonestop,115200,PA9,PA10,-1,-1); | |
98 | } |
|
103 | } | |
99 | } |
|
104 | } | |
100 |
|
105 | |||
101 |
|
106 | void bsp_lcd0_write_reg(uint32_t reg,uint32_t data); | ||
102 | void bsp_FSMC_init() |
|
107 | void bsp_FSMC_init() | |
103 | { |
|
108 | { | |
104 | #define GPIOGETPORT(gpio) ((GPIO_TypeDef*)(((((uint32_t)gpio) & (uint32_t)0x0000FF00)*(uint32_t)4) + (uint32_t)GPIOA)) |
|
109 | #define GPIOGETPORT(gpio) ((GPIO_TypeDef*)(((((uint32_t)gpio) & (uint32_t)0x0000FF00)*(uint32_t)4) + (uint32_t)GPIOA)) | |
105 | #define GPIOPORTNUM(gpio) (((uint32_t)(gpio) & (uint32_t)0x0000FF00)>>(uint32_t)8) |
|
110 | #define GPIOPORTNUM(gpio) (((uint32_t)(gpio) & (uint32_t)0x0000FF00)>>(uint32_t)8) | |
106 |
|
111 | |||
107 | gpio_t LCD_DBxList[]={PD14,PD15,PD0,PD1,PE7,PE8,PE9,PE10,PE11,PE12,PE13,PE14,PE15\ |
|
112 | gpio_t LCD_DBxList[]={PD14,PD15,PD0,PD1,PE7,PE8,PE9,PE10,PE11,PE12,PE13,PE14,PE15\ | |
108 | ,PD8,PD9,PD10,PD4,PD5,PD7,PE4}; |
|
113 | ,PD8,PD9,PD10,PD4,PD5,PD7,PE4}; | |
109 | for(int i=0;i<20;i++) |
|
114 | for(int i=0;i<20;i++) | |
110 | { |
|
115 | { | |
111 | gpio_t LCD_DBx = gpioopen(LCD_DBxList[i]); |
|
116 | gpio_t LCD_DBx = gpioopen(LCD_DBxList[i]); | |
112 | LCD_DBx |= gpiohighspeed | gpioaf | gpiopushpulltype | gpionopulltype; |
|
117 | LCD_DBx |= gpiohighspeed | gpioaf | gpiopushpulltype | gpionopulltype; | |
113 | gpiosetconfig(&LCD_DBx); |
|
118 | gpiosetconfig(&LCD_DBx); | |
114 | GPIO_PinAFConfig(GPIOGETPORT(LCD_DBx), (uint8_t)(LCD_DBx & 0xF), GPIO_AF_FSMC); |
|
119 | GPIO_PinAFConfig(GPIOGETPORT(LCD_DBx), (uint8_t)(LCD_DBx & 0xF), GPIO_AF_FSMC); | |
115 | } |
|
120 | } | |
116 |
|
121 | |||
117 | FSMC_NORSRAMInitTypeDef FSMC_NORSRAMInitStructure; |
|
122 | FSMC_NORSRAMInitTypeDef FSMC_NORSRAMInitStructure; | |
118 | FSMC_NORSRAMTimingInitTypeDef p; |
|
123 | FSMC_NORSRAMTimingInitTypeDef p; | |
119 |
|
124 | |||
120 | /* Enable FSMC clock */ |
|
125 | /* Enable FSMC clock */ | |
121 | RCC_AHB3PeriphClockCmd(RCC_AHB3Periph_FSMC, ENABLE); |
|
126 | RCC_AHB3PeriphClockCmd(RCC_AHB3Periph_FSMC, ENABLE); | |
122 |
|
127 | |||
123 | /*-- FSMC Configuration ------------------------------------------------------*/ |
|
128 | /*-- FSMC Configuration ------------------------------------------------------*/ | |
124 | /*----------------------- SRAM Bank 3 ----------------------------------------*/ |
|
129 | /*----------------------- SRAM Bank 3 ----------------------------------------*/ | |
125 | /* FSMC_Bank1_NORSRAM4 configuration */ |
|
130 | /* FSMC_Bank1_NORSRAM4 configuration */ | |
126 | p.FSMC_AddressSetupTime = 5; |
|
131 | p.FSMC_AddressSetupTime = 5; | |
127 | p.FSMC_AddressHoldTime = 0; |
|
132 | p.FSMC_AddressHoldTime = 0; | |
128 | p.FSMC_DataSetupTime = 9; |
|
133 | p.FSMC_DataSetupTime = 9; | |
129 | p.FSMC_BusTurnAroundDuration = 0; |
|
134 | p.FSMC_BusTurnAroundDuration = 0; | |
130 | p.FSMC_CLKDivision = 0; |
|
135 | p.FSMC_CLKDivision = 0; | |
131 | p.FSMC_DataLatency = 0; |
|
136 | p.FSMC_DataLatency = 0; | |
132 | p.FSMC_AccessMode = FSMC_AccessMode_A; |
|
137 | p.FSMC_AccessMode = FSMC_AccessMode_A; | |
133 | /* Color LCD configuration ------------------------------------ |
|
138 | /* Color LCD configuration ------------------------------------ | |
134 | LCD configured as follow: |
|
139 | LCD configured as follow: | |
135 | - Data/Address MUX = Disable |
|
140 | - Data/Address MUX = Disable | |
136 | - Memory Type = SRAM |
|
141 | - Memory Type = SRAM | |
137 | - Data Width = 16bit |
|
142 | - Data Width = 16bit | |
138 | - Write Operation = Enable |
|
143 | - Write Operation = Enable | |
139 | - Extended Mode = Enable |
|
144 | - Extended Mode = Enable | |
140 | - Asynchronous Wait = Disable */ |
|
145 | - Asynchronous Wait = Disable */ | |
141 |
|
146 | |||
142 | FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM1; |
|
147 | FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM1; | |
143 | FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; |
|
148 | FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable; | |
144 | FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_SRAM; |
|
149 | FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_SRAM; | |
145 | FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; |
|
150 | FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b; | |
146 | FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; |
|
151 | FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable; | |
147 | FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable; |
|
152 | FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable; | |
148 | FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; |
|
153 | FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low; | |
149 | FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; |
|
154 | FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable; | |
150 | FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; |
|
155 | FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState; | |
151 | FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; |
|
156 | FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable; | |
152 | FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; |
|
157 | FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; | |
153 | FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; |
|
158 | FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable; | |
154 | FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; |
|
159 | FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; | |
155 | FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p; |
|
160 | FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p; | |
156 | FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p; |
|
161 | FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p; | |
157 |
|
162 | |||
158 | FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure); |
|
163 | FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure); | |
159 |
|
164 | |||
160 | /* Enable FSMC NOR/SRAM Bank3 */ |
|
165 | /* Enable FSMC NOR/SRAM Bank3 */ | |
161 | FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM1, ENABLE); |
|
166 | FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM1, ENABLE); | |
|
167 | lcdIF0.writereg=&bsp_lcd0_write_reg; | |||
|
168 | lcd0.interface=&lcdIF0; | |||
|
169 | lcd0.init=&ili9328init; | |||
|
170 | lcd0.init(&lcd0); | |||
162 | } |
|
171 | } | |
163 |
|
172 | |||
164 | void bsp_spi_init() |
|
173 | void bsp_spi_init() | |
165 | { |
|
174 | { | |
166 |
|
175 | |||
167 | } |
|
176 | } | |
168 |
|
177 | |||
169 |
|
178 | |||
170 | void bsp_iic_init() |
|
179 | void bsp_iic_init() | |
171 | { |
|
180 | { | |
172 | i2copenandconfig(i2c2,0,400000,PF0,PF1); |
|
181 | i2copenandconfig(i2c2,0,400000,PF0,PF1); | |
173 | } |
|
182 | } | |
174 |
|
183 | |||
175 | void bsp_SD_init() |
|
184 | void bsp_SD_init() | |
176 | { |
|
185 | { | |
177 |
|
186 | |||
178 | } |
|
187 | } | |
179 |
|
188 | |||
180 | void vs10XXclearXCS(){} |
|
189 | void vs10XXclearXCS(){} | |
181 | void vs10XXsetXCS(){} |
|
190 | void vs10XXsetXCS(){} | |
182 | int vs10XXDREQ() |
|
191 | int vs10XXDREQ() | |
183 | { |
|
192 | { | |
184 | return 1; |
|
193 | return 1; | |
185 | } |
|
194 | } | |
186 |
|
195 | |||
187 |
|
196 | |||
188 | void bsppowersdcard(char onoff) //always ON |
|
197 | void bsppowersdcard(char onoff) //always ON | |
189 | { |
|
198 | { | |
190 |
|
199 | |||
191 | } |
|
200 | } | |
192 |
|
201 | |||
193 | char bspsdcardpresent() |
|
202 | char bspsdcardpresent() | |
194 | { |
|
203 | { | |
195 | return 0; |
|
204 | return 0; | |
196 | } |
|
205 | } | |
197 |
|
206 | |||
198 | char bspsdcardwriteprotected() |
|
207 | char bspsdcardwriteprotected() | |
199 | { |
|
208 | { | |
200 | return 0; |
|
209 | return 0; | |
201 | } |
|
210 | } | |
202 |
|
211 | |||
203 | void bspsdcardselect(char YESNO) |
|
212 | void bspsdcardselect(char YESNO) | |
204 | { |
|
213 | { | |
205 |
|
214 | |||
206 | } |
|
215 | } | |
207 |
|
216 | |||
208 |
|
217 | |||
|
218 | void bsp_lcd0_write_reg(uint32_t reg,uint32_t data) | |||
|
219 | { | |||
|
220 | *lcd0_CMD=(uint16_t)reg; | |||
|
221 | *lcd0_DATA=(uint16_t)data; | |||
|
222 | } | |||
209 |
|
223 | |||
210 |
|
224 | |||
211 |
|
225 | |||
|
226 |
@@ -1,57 +1,68 | |||||
1 | #include <stdio.h> |
|
1 | #include <stdio.h> | |
2 | #include <fat32.h> |
|
2 | #include <fat32.h> | |
3 | #include <gpio.h> |
|
3 | #include <gpio.h> | |
4 | #include <uart.h> |
|
4 | #include <uart.h> | |
5 | #include <stm32f4xx.h> |
|
5 | #include <stm32f4xx.h> | |
6 | #include <bsp.h> |
|
6 | #include <bsp.h> | |
7 | #include <i2c.h> |
|
7 | #include <i2c.h> | |
8 | #include <CS43L22.h> |
|
8 | #include <CS43L22.h> | |
9 | #include <ina226.h> |
|
9 | #include <ina226.h> | |
10 |
|
10 | |||
11 |
|
11 | |||
12 | extern streamdevice* __opnfiles__[]; |
|
12 | extern streamdevice* __opnfiles__[]; | |
13 |
|
13 | |||
14 | int main() |
|
14 | int main() | |
15 | { |
|
15 | { | |
16 | INA226_t ina5VSens,ina33VSens,ina15VSens; |
|
16 | INA226_t ina5VSens,ina33VSens,ina15VSens; | |
17 | gpioset(PSU_DISABLE); |
|
17 | gpioset(PSU_DISABLE); | |
18 | volatile int16_t* regtest=(volatile int16_t*)0x60000000; |
|
18 | volatile int16_t* regtest=(volatile int16_t*)0x60000000; | |
19 | volatile int16_t* regtest2=(volatile int16_t*)(0x60000000+(1<<20)); |
|
19 | volatile int16_t* regtest2=(volatile int16_t*)(0x60000000+(1<<20)); | |
20 | //ina226open(&ina5VSens,i2c2,INA226_MODE_SHUNT_VOLTAGE_CONTINUOUS|INA226_AVERAGES_16|INA226_BUS_CONV_8244us|INA226_SHUNT_CONV_8244us,0,0,15,1000000); |
|
20 | //ina226open(&ina5VSens,i2c2,INA226_MODE_SHUNT_VOLTAGE_CONTINUOUS|INA226_AVERAGES_16|INA226_BUS_CONV_8244us|INA226_SHUNT_CONV_8244us,0,0,15,1000000); | |
21 | //ina226open(&ina15VSens,i2c2,INA226_MODE_SHUNT_VOLTAGE_CONTINUOUS|INA226_AVERAGES_16|INA226_BUS_CONV_8244us|INA226_SHUNT_CONV_8244us,1,0,15,1000000); |
|
21 | //ina226open(&ina15VSens,i2c2,INA226_MODE_SHUNT_VOLTAGE_CONTINUOUS|INA226_AVERAGES_16|INA226_BUS_CONV_8244us|INA226_SHUNT_CONV_8244us,1,0,15,1000000); | |
22 | *regtest=0; |
|
22 | *regtest=(int16_t)0; | |
23 | printf("LCD ID=%x\n\r",0xFFFF&(*regtest2)); |
|
23 | printf("LCD ID=%x\n\r",0xFFFF&(*regtest2)); | |
|
24 | *regtest=(int16_t)ILI9328_REGISTER_ENTRYMODE; | |||
|
25 | printf("ILI9328_REGISTER_ENTRYMODE=%x\n\r",0xFFFF&(*regtest2)); | |||
|
26 | *regtest=(int16_t)0x20; | |||
|
27 | *regtest2=(int16_t)0x0; | |||
|
28 | *regtest=(int16_t)0x21; | |||
|
29 | *regtest2=(int16_t)0x0; | |||
|
30 | *regtest=(int16_t)0x22; | |||
|
31 | for(volatile int i=0;i<1024*64;i++) | |||
|
32 | { | |||
|
33 | *regtest2=(int16_t)i; | |||
|
34 | } | |||
24 | if(-1==ina226open(&ina33VSens,i2c2,INA226_MODE_SHUNT_VOLTAGE_CONTINUOUS|INA226_AVERAGES_16|INA226_BUS_CONV_8244us|INA226_SHUNT_CONV_8244us,0,1,15,1000000)) |
|
35 | if(-1==ina226open(&ina33VSens,i2c2,INA226_MODE_SHUNT_VOLTAGE_CONTINUOUS|INA226_AVERAGES_16|INA226_BUS_CONV_8244us|INA226_SHUNT_CONV_8244us,0,1,15,1000000)) | |
25 | { |
|
36 | { | |
26 | printf("Can't open 3.3V monitor\n\r"); |
|
37 | printf("Can't open 3.3V monitor\n\r"); | |
27 | } |
|
38 | } | |
28 |
|
39 | |||
29 | int current5V,current33V,current15V; |
|
40 | int current5V,current33V,current15V; | |
30 | printf("\t5V\t3.3V\n\r"); |
|
41 | printf("\t5V\t3.3V\n\r"); | |
31 | while(1) |
|
42 | while(1) | |
32 | { |
|
43 | { | |
33 | for(volatile int i=0;i<1024*1024;i++); |
|
44 | for(volatile int i=0;i<1024*1024;i++); | |
34 | gpioset(LED1); |
|
45 | gpioset(LED1); | |
35 | gpioclr(LED2); |
|
46 | gpioclr(LED2); | |
36 | for(volatile int i=0;i<1024*1024;i++); |
|
47 | for(volatile int i=0;i<1024*1024;i++); | |
37 | gpioclr(LED1); |
|
48 | gpioclr(LED1); | |
38 | gpioset(LED2); |
|
49 | gpioset(LED2); | |
39 | //current5V = ina226getCurrent(&ina5VSens); |
|
50 | //current5V = ina226getCurrent(&ina5VSens); | |
40 | current33V = ina226getCurrent(&ina33VSens); |
|
51 | current33V = ina226getCurrent(&ina33VSens); | |
41 | //current15V = ina226getCurrent(&ina15VSens); |
|
52 | //current15V = ina226getCurrent(&ina15VSens); | |
42 | //current = ina226getReg(&Psens1,INA226_Current_Reg); |
|
53 | //current = ina226getReg(&Psens1,INA226_Current_Reg); | |
43 | //printf("%duA %dmA\t%duA %dmA\n\r",current5V,current5V/1000,current33V,current33V/1000); |
|
54 | //printf("%duA %dmA\t%duA %dmA\n\r",current5V,current5V/1000,current33V,current33V/1000); | |
44 | printf("%duA %dmA\n\r",current33V,current33V/1000); |
|
55 | printf("%duA %dmA\n\r",current33V,current33V/1000); | |
45 | } |
|
56 | } | |
46 | printf("hello world\n\r"); |
|
57 | printf("hello world\n\r"); | |
47 | return 0; |
|
58 | return 0; | |
48 | } |
|
59 | } | |
49 |
|
60 | |||
50 |
|
61 | |||
51 |
|
62 | |||
52 |
|
63 | |||
53 |
|
64 | |||
54 |
|
65 | |||
55 |
|
66 | |||
56 |
|
67 | |||
57 |
|
68 |
@@ -1,10 +1,13 | |||||
1 | TEMPLATE = dir |
|
1 | TEMPLATE = subdirs | |
2 | SUBDIRS += HEXVIEWER \ |
|
2 | ||
3 |
|
|
3 | SUBDIRS += FILE_SYSTEM \ | |
|
4 | AUDIO \ | |||
|
5 | POWER \ | |||
|
6 | GRAPHIC | |||
4 |
|
7 | |||
5 |
|
8 | |||
6 |
|
9 | |||
7 |
|
10 | |||
8 |
|
11 | |||
9 |
|
12 | |||
10 |
|
13 |
@@ -1,14 +1,12 | |||||
1 | TEMPLATE = subdirs |
|
1 | TEMPLATE = subdirs | |
2 | CONFIG += ordered |
|
2 | CONFIG += ordered | |
3 |
|
3 | |||
4 | SUBDIRS += stm32f4 |
|
4 | SUBDIRS += stm32f4 | |
5 |
|
5 | |||
6 |
SUBDIRS += common |
|
6 | SUBDIRS += common | |
7 | common/AUDIO \ |
|
|||
8 | common/POWER |
|
|||
9 |
|
7 | |||
10 | # common/STREAMDEVICES \ |
|
8 | # common/STREAMDEVICES \ | |
11 | # common/STRINGS \ |
|
9 | # common/STRINGS \ | |
12 | # stm32f4 \ |
|
10 | # stm32f4 \ | |
13 | # common |
|
11 | # common | |
14 |
|
12 |
@@ -1,215 +1,217 | |||||
1 | #--------------------------------------------------------------------------------- |
|
1 | #--------------------------------------------------------------------------------- | |
2 | # LIBRARY DEFINITIONS |
|
2 | # LIBRARY DEFINITIONS | |
3 | #--------------------------------------------------------------------------------- |
|
3 | #--------------------------------------------------------------------------------- | |
4 | LIBUC_LIBS_DIR = $$libuc2/lib |
|
4 | LIBUC_LIBS_DIR = $$libuc2/lib | |
5 |
|
5 | |||
6 | INCLUDEPATH += $$LIBUC_LIBS_DIR/includes \ |
|
6 | INCLUDEPATH += $$LIBUC_LIBS_DIR/includes \ | |
|
7 | $$LIBUC_LIBS_DIR/includes/GRAPHIC/CONTROLERS \ | |||
7 | $$LIBUC_LIBS_DIR/includes/$$ARCH |
|
8 | $$LIBUC_LIBS_DIR/includes/$$ARCH | |
8 |
|
9 | |||
9 | LIBUC_BIN_LIBS_DIR = $$LIBUC_LIBS_DIR/bin/$$ARCH |
|
10 | LIBUC_BIN_LIBS_DIR = $$LIBUC_LIBS_DIR/bin/$$ARCH | |
10 |
|
11 | |||
|
12 | ||||
11 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ |
|
13 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ | |
12 | -lCS43L22 -lina226 |
|
14 | -lCS43L22 -lina226 -lili9328 | |
13 |
|
15 | |||
14 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ |
|
16 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ | |
15 | -lsdcard |
|
17 | -lsdcard | |
16 |
|
18 | |||
17 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ |
|
19 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ | |
18 | -lfat32 |
|
20 | -lfat32 | |
19 |
|
21 | |||
20 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ |
|
22 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ | |
21 | -lmbr |
|
23 | -lmbr | |
22 |
|
24 | |||
23 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ |
|
25 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ | |
24 | -luart |
|
26 | -luart | |
25 |
|
27 | |||
26 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ |
|
28 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ | |
27 | -li2c |
|
29 | -li2c | |
28 |
|
30 | |||
29 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ |
|
31 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ | |
30 | -lgpio |
|
32 | -lgpio | |
31 |
|
33 | |||
32 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ |
|
34 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ | |
33 | -lspi |
|
35 | -lspi | |
34 |
|
36 | |||
35 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ |
|
37 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ | |
36 | -lcpu |
|
38 | -lcpu | |
37 |
|
39 | |||
38 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ |
|
40 | LIBS += -L$$LIBUC_LIBS_DIR/bin/$$ARCH \ | |
39 | -lcore |
|
41 | -lcore | |
40 |
|
42 | |||
41 |
|
43 | |||
42 |
|
44 | |||
43 |
|
45 | |||
44 | LIBUC_LIBS_CORE = -L $(LIBUC_LIBS_DIR_CORE) -static -lcore |
|
46 | LIBUC_LIBS_CORE = -L $(LIBUC_LIBS_DIR_CORE) -static -lcore | |
45 | LIBUC_LIBS_DIR_CORE = $(LIBUC_LIBS_DIR) |
|
47 | LIBUC_LIBS_DIR_CORE = $(LIBUC_LIBS_DIR) | |
46 | LIBUC_LIBS_DIR_CORE_CMD = -L $(LIBUC_LIBS_DIR_CORE) |
|
48 | LIBUC_LIBS_DIR_CORE_CMD = -L $(LIBUC_LIBS_DIR_CORE) | |
47 | LIBUC_INC_DIR_CORE = $(LIBUC_INC_DIR) |
|
49 | LIBUC_INC_DIR_CORE = $(LIBUC_INC_DIR) | |
48 | LIBUC_INC_DIR_CORE_CMD = |
|
50 | LIBUC_INC_DIR_CORE_CMD = | |
49 |
|
51 | |||
50 | LIBUC_LIBS_CPU = -static -lcpu |
|
52 | LIBUC_LIBS_CPU = -static -lcpu | |
51 | LIBUC_LIBS_DIR_CPU = $(LIBUC_LIBS_DIR) |
|
53 | LIBUC_LIBS_DIR_CPU = $(LIBUC_LIBS_DIR) | |
52 | LIBUC_LIBS_DIR_CPU_CMD = -L $(LIBUC_LIBS_DIR_CPU) |
|
54 | LIBUC_LIBS_DIR_CPU_CMD = -L $(LIBUC_LIBS_DIR_CPU) | |
53 | LIBUC_INC_DIR_CPU = $(LIBUC_INC_DIR)/$(ARCH) |
|
55 | LIBUC_INC_DIR_CPU = $(LIBUC_INC_DIR)/$(ARCH) | |
54 | LIBUC_INC_DIR_CPU_CMD = -I $(LIBUC_INC_DIR_CPU) |
|
56 | LIBUC_INC_DIR_CPU_CMD = -I $(LIBUC_INC_DIR_CPU) | |
55 |
|
57 | |||
56 | LIBUC_LIBS_GPIO = -static -lgpio |
|
58 | LIBUC_LIBS_GPIO = -static -lgpio | |
57 | LIBUC_LIBS_DIR_GPIO = $(LIBUC_LIBS_DIR) |
|
59 | LIBUC_LIBS_DIR_GPIO = $(LIBUC_LIBS_DIR) | |
58 | LIBUC_LIBS_DIR_GPIO_CMD = -L $(LIBUC_LIBS_DIR_GPIO) |
|
60 | LIBUC_LIBS_DIR_GPIO_CMD = -L $(LIBUC_LIBS_DIR_GPIO) | |
59 | LIBUC_INC_DIR_GPIO = $(LIBUC_INC_DIR) |
|
61 | LIBUC_INC_DIR_GPIO = $(LIBUC_INC_DIR) | |
60 | LIBUC_INC_DIR_GPIO_CMD = |
|
62 | LIBUC_INC_DIR_GPIO_CMD = | |
61 |
|
63 | |||
62 | LIBUC_LIBS_APB = -static -lapb |
|
64 | LIBUC_LIBS_APB = -static -lapb | |
63 | LIBUC_LIBS_DIR_APB = $(LIBUC_LIBS_DIR) |
|
65 | LIBUC_LIBS_DIR_APB = $(LIBUC_LIBS_DIR) | |
64 | LIBUC_LIBS_DIR_APB_CMD = -L $(LIBUC_LIBS_DIR_APB) |
|
66 | LIBUC_LIBS_DIR_APB_CMD = -L $(LIBUC_LIBS_DIR_APB) | |
65 | LIBUC_INC_DIR_APB = $(LIBUC_INC_DIR) |
|
67 | LIBUC_INC_DIR_APB = $(LIBUC_INC_DIR) | |
66 | LIBUC_INC_DIR_APB_CMD = |
|
68 | LIBUC_INC_DIR_APB_CMD = | |
67 |
|
69 | |||
68 | LIBUC_LIBS_UCSTRINGS = -static -lucstrings |
|
70 | LIBUC_LIBS_UCSTRINGS = -static -lucstrings | |
69 | LIBUC_LIBS_DIR_UCSTRINGS = $(LIBUC_LIBS_DIR) |
|
71 | LIBUC_LIBS_DIR_UCSTRINGS = $(LIBUC_LIBS_DIR) | |
70 | LIBUC_LIBS_DIR_UCSTRINGS_CMD = -L $(LIBUC_LIBS_DIR_UCSTRINGS) |
|
72 | LIBUC_LIBS_DIR_UCSTRINGS_CMD = -L $(LIBUC_LIBS_DIR_UCSTRINGS) | |
71 | LIBUC_INC_DIR_UCSTRINGS = $(LIBUC_INC_DIR) |
|
73 | LIBUC_INC_DIR_UCSTRINGS = $(LIBUC_INC_DIR) | |
72 | LIBUC_INC_DIR_UCSTRINGS_CMD = |
|
74 | LIBUC_INC_DIR_UCSTRINGS_CMD = | |
73 |
|
75 | |||
74 | LIBUC_LIBS_UART = -static -luart |
|
76 | LIBUC_LIBS_UART = -static -luart | |
75 | LIBUC_LIBS_DIR_UART = $(LIBUC_LIBS_DIR) |
|
77 | LIBUC_LIBS_DIR_UART = $(LIBUC_LIBS_DIR) | |
76 | LIBUC_LIBS_DIR_UART_CMD = -L $(LIBUC_LIBS_DIR_UART) |
|
78 | LIBUC_LIBS_DIR_UART_CMD = -L $(LIBUC_LIBS_DIR_UART) | |
77 | LIBUC_INC_DIR_UART = $(LIBUC_INC_DIR) |
|
79 | LIBUC_INC_DIR_UART = $(LIBUC_INC_DIR) | |
78 | LIBUC_INC_DIR_UART_CMD = |
|
80 | LIBUC_INC_DIR_UART_CMD = | |
79 |
|
81 | |||
80 | LIBUC_LIBS_SPI = -static -lspi |
|
82 | LIBUC_LIBS_SPI = -static -lspi | |
81 | LIBUC_LIBS_DIR_SPI = $(LIBUC_LIBS_DIR) |
|
83 | LIBUC_LIBS_DIR_SPI = $(LIBUC_LIBS_DIR) | |
82 | LIBUC_LIBS_DIR_SPI_CMD = -L $(LIBUC_LIBS_DIR_SPI) |
|
84 | LIBUC_LIBS_DIR_SPI_CMD = -L $(LIBUC_LIBS_DIR_SPI) | |
83 | LIBUC_INC_DIR_SPI = $(LIBUC_INC_DIR) |
|
85 | LIBUC_INC_DIR_SPI = $(LIBUC_INC_DIR) | |
84 | LIBUC_INC_DIR_SPI_CMD = |
|
86 | LIBUC_INC_DIR_SPI_CMD = | |
85 |
|
87 | |||
86 | LIBUC_LIBS_SSP = -static -lssp |
|
88 | LIBUC_LIBS_SSP = -static -lssp | |
87 | LIBUC_LIBS_DIR_SSP = $(LIBUC_LIBS_DIR) |
|
89 | LIBUC_LIBS_DIR_SSP = $(LIBUC_LIBS_DIR) | |
88 | LIBUC_LIBS_DIR_SSP_CMD = -L $(LIBUC_LIBS_DIR_SSP) |
|
90 | LIBUC_LIBS_DIR_SSP_CMD = -L $(LIBUC_LIBS_DIR_SSP) | |
89 | LIBUC_INC_DIR_SSP = $(LIBUC_INC_DIR) |
|
91 | LIBUC_INC_DIR_SSP = $(LIBUC_INC_DIR) | |
90 | LIBUC_INC_DIR_SSP_CMD = |
|
92 | LIBUC_INC_DIR_SSP_CMD = | |
91 |
|
93 | |||
92 | LIBUC_LIBS_IIC = -static -liic |
|
94 | LIBUC_LIBS_IIC = -static -liic | |
93 | LIBUC_LIBS_DIR_IIC = $(LIBUC_LIBS_DIR) |
|
95 | LIBUC_LIBS_DIR_IIC = $(LIBUC_LIBS_DIR) | |
94 | LIBUC_LIBS_DIR_IIC_CMD = -L $(LIBUC_LIBS_DIR_IIC) |
|
96 | LIBUC_LIBS_DIR_IIC_CMD = -L $(LIBUC_LIBS_DIR_IIC) | |
95 | LIBUC_INC_DIR_IIC = $(LIBUC_INC_DIR) |
|
97 | LIBUC_INC_DIR_IIC = $(LIBUC_INC_DIR) | |
96 | LIBUC_INC_DIR_IIC_CMD = |
|
98 | LIBUC_INC_DIR_IIC_CMD = | |
97 |
|
99 | |||
98 | LIBUC_LIBS_ADC = -static -ladc |
|
100 | LIBUC_LIBS_ADC = -static -ladc | |
99 | LIBUC_LIBS_DIR_ADC = $(LIBUC_LIBS_DIR) |
|
101 | LIBUC_LIBS_DIR_ADC = $(LIBUC_LIBS_DIR) | |
100 | LIBUC_LIBS_DIR_ADC_CMD = -L $(LIBUC_LIBS_DIR_ADC) |
|
102 | LIBUC_LIBS_DIR_ADC_CMD = -L $(LIBUC_LIBS_DIR_ADC) | |
101 | LIBUC_INC_DIR_ADC = $(LIBUC_INC_DIR) |
|
103 | LIBUC_INC_DIR_ADC = $(LIBUC_INC_DIR) | |
102 | LIBUC_INC_DIR_ADC_CMD = |
|
104 | LIBUC_INC_DIR_ADC_CMD = | |
103 |
|
105 | |||
104 | LIBUC_LIBS_24LC0X = -static -l24lc0X |
|
106 | LIBUC_LIBS_24LC0X = -static -l24lc0X | |
105 | LIBUC_LIBS_DIR_24LC0X = $(LIBUC_LIBS_DIR) |
|
107 | LIBUC_LIBS_DIR_24LC0X = $(LIBUC_LIBS_DIR) | |
106 | LIBUC_LIBS_DIR_24LC0X_CMD = -L $(LIBUC_LIBS_DIR_24LC0X) |
|
108 | LIBUC_LIBS_DIR_24LC0X_CMD = -L $(LIBUC_LIBS_DIR_24LC0X) | |
107 | LIBUC_INC_DIR_24LC0X = $(LIBUC_INC_DIR) |
|
109 | LIBUC_INC_DIR_24LC0X = $(LIBUC_INC_DIR) | |
108 | LIBUC_INC_DIR_24LC0X_CMD = |
|
110 | LIBUC_INC_DIR_24LC0X_CMD = | |
109 |
|
111 | |||
110 | LIBUC_LIBS_SDCARD = -static -lsdcard |
|
112 | LIBUC_LIBS_SDCARD = -static -lsdcard | |
111 | LIBUC_LIBS_DIR_SDCARD = $(LIBUC_LIBS_DIR) |
|
113 | LIBUC_LIBS_DIR_SDCARD = $(LIBUC_LIBS_DIR) | |
112 | LIBUC_LIBS_DIR_SDCARD_CMD = -L $(LIBUC_LIBS_DIR_SDCARD) |
|
114 | LIBUC_LIBS_DIR_SDCARD_CMD = -L $(LIBUC_LIBS_DIR_SDCARD) | |
113 | LIBUC_INC_DIR_SDCARD = $(LIBUC_INC_DIR) |
|
115 | LIBUC_INC_DIR_SDCARD = $(LIBUC_INC_DIR) | |
114 | LIBUC_INC_DIR_SDCARD_CMD = |
|
116 | LIBUC_INC_DIR_SDCARD_CMD = | |
115 |
|
117 | |||
116 | LIBUC_LIBS_VS10XX = -static -lvs10XX |
|
118 | LIBUC_LIBS_VS10XX = -static -lvs10XX | |
117 | LIBUC_LIBS_DIR_VS10XX = $(LIBUC_LIBS_DIR) |
|
119 | LIBUC_LIBS_DIR_VS10XX = $(LIBUC_LIBS_DIR) | |
118 | LIBUC_LIBS_DIR_VS10XX_CMD = -L $(LIBUC_LIBS_DIR_VS10XX) |
|
120 | LIBUC_LIBS_DIR_VS10XX_CMD = -L $(LIBUC_LIBS_DIR_VS10XX) | |
119 | LIBUC_INC_DIR_VS10XX = $(LIBUC_INC_DIR) |
|
121 | LIBUC_INC_DIR_VS10XX = $(LIBUC_INC_DIR) | |
120 | LIBUC_INC_DIR_VS10XX_CMD = |
|
122 | LIBUC_INC_DIR_VS10XX_CMD = | |
121 |
|
123 | |||
122 | LIBUC_LIBS_BLKDEVICE = -static -lblkdevice |
|
124 | LIBUC_LIBS_BLKDEVICE = -static -lblkdevice | |
123 | LIBUC_LIBS_DIR_BLKDEVICE = $(LIBUC_LIBS_DIR) |
|
125 | LIBUC_LIBS_DIR_BLKDEVICE = $(LIBUC_LIBS_DIR) | |
124 | LIBUC_LIBS_DIR_BLKDEVICE_CMD = -L $(LIBUC_LIBS_DIR_BLKDEVICE) |
|
126 | LIBUC_LIBS_DIR_BLKDEVICE_CMD = -L $(LIBUC_LIBS_DIR_BLKDEVICE) | |
125 | LIBUC_INC_DIR_BLKDEVICE = $(LIBUC_INC_DIR) |
|
127 | LIBUC_INC_DIR_BLKDEVICE = $(LIBUC_INC_DIR) | |
126 | LIBUC_INC_DIR_BLKDEVICE_CMD = |
|
128 | LIBUC_INC_DIR_BLKDEVICE_CMD = | |
127 |
|
129 | |||
128 | LIBUC_LIBS_FAT32 = -static -lfat32 |
|
130 | LIBUC_LIBS_FAT32 = -static -lfat32 | |
129 | LIBUC_LIBS_DIR_FAT32 = $(LIBUC_LIBS_DIR) |
|
131 | LIBUC_LIBS_DIR_FAT32 = $(LIBUC_LIBS_DIR) | |
130 | LIBUC_LIBS_DIR_FAT32_CMD = -L $(LIBUC_LIBS_DIR_FAT32) |
|
132 | LIBUC_LIBS_DIR_FAT32_CMD = -L $(LIBUC_LIBS_DIR_FAT32) | |
131 | LIBUC_INC_DIR_FAT32 = $(LIBUC_INC_DIR) |
|
133 | LIBUC_INC_DIR_FAT32 = $(LIBUC_INC_DIR) | |
132 | LIBUC_INC_DIR_FAT32_CMD = |
|
134 | LIBUC_INC_DIR_FAT32_CMD = | |
133 |
|
135 | |||
134 | LIBUC_LIBS_UHANDLE = -static -luhandle |
|
136 | LIBUC_LIBS_UHANDLE = -static -luhandle | |
135 | LIBUC_LIBS_DIR_UHANDLE = $(LIBUC_LIBS_DIR) |
|
137 | LIBUC_LIBS_DIR_UHANDLE = $(LIBUC_LIBS_DIR) | |
136 | LIBUC_LIBS_DIR_UHANDLE_CMD = -L $(LIBUC_LIBS_DIR_UHANDLE) |
|
138 | LIBUC_LIBS_DIR_UHANDLE_CMD = -L $(LIBUC_LIBS_DIR_UHANDLE) | |
137 | LIBUC_INC_DIR_UHANDLE = $(LIBUC_INC_DIR) |
|
139 | LIBUC_INC_DIR_UHANDLE = $(LIBUC_INC_DIR) | |
138 | LIBUC_INC_DIR_UHANDLE_CMD = |
|
140 | LIBUC_INC_DIR_UHANDLE_CMD = | |
139 |
|
141 | |||
140 | LIBUC_LIBS_STREAMDEVICES = -static -lstreamdevices |
|
142 | LIBUC_LIBS_STREAMDEVICES = -static -lstreamdevices | |
141 | LIBUC_LIBS_DIR_STREAMDEVICES = $(LIBUC_LIBS_DIR) |
|
143 | LIBUC_LIBS_DIR_STREAMDEVICES = $(LIBUC_LIBS_DIR) | |
142 | LIBUC_LIBS_DIR_STREAMDEVICES_CMD = -L $(LIBUC_LIBS_DIR_STREAMDEVICES) |
|
144 | LIBUC_LIBS_DIR_STREAMDEVICES_CMD = -L $(LIBUC_LIBS_DIR_STREAMDEVICES) | |
143 | LIBUC_INC_DIR_STREAMDEVICES = $(LIBUC_INC_DIR) |
|
145 | LIBUC_INC_DIR_STREAMDEVICES = $(LIBUC_INC_DIR) | |
144 | LIBUC_INC_DIR_STREAMDEVICES_CMD = |
|
146 | LIBUC_INC_DIR_STREAMDEVICES_CMD = | |
145 |
|
147 | |||
146 | LIBUC_LIBS_HEXVIEWER = -static -lhexviewer |
|
148 | LIBUC_LIBS_HEXVIEWER = -static -lhexviewer | |
147 | LIBUC_LIBS_DIR_HEXVIEWER = $(LIBUC_LIBS_DIR) |
|
149 | LIBUC_LIBS_DIR_HEXVIEWER = $(LIBUC_LIBS_DIR) | |
148 | LIBUC_LIBS_DIR_HEXVIEWER_CMD = -L $(LIBUC_LIBS_DIR_HEXVIEWER) |
|
150 | LIBUC_LIBS_DIR_HEXVIEWER_CMD = -L $(LIBUC_LIBS_DIR_HEXVIEWER) | |
149 | LIBUC_INC_DIR_HEXVIEWER = $(LIBUC_INC_DIR) |
|
151 | LIBUC_INC_DIR_HEXVIEWER = $(LIBUC_INC_DIR) | |
150 | LIBUC_INC_DIR_HEXVIEWER_CMD = |
|
152 | LIBUC_INC_DIR_HEXVIEWER_CMD = | |
151 |
|
153 | |||
152 | LIBUC_LIBS_MBR = -static -lmbr |
|
154 | LIBUC_LIBS_MBR = -static -lmbr | |
153 | LIBUC_LIBS_DIR_MBR = $(LIBUC_LIBS_DIR) |
|
155 | LIBUC_LIBS_DIR_MBR = $(LIBUC_LIBS_DIR) | |
154 | LIBUC_LIBS_DIR_MBR_CMD = -L $(LIBUC_LIBS_DIR_MBR) |
|
156 | LIBUC_LIBS_DIR_MBR_CMD = -L $(LIBUC_LIBS_DIR_MBR) | |
155 | LIBUC_INC_DIR_MBR = $(LIBUC_INC_DIR) |
|
157 | LIBUC_INC_DIR_MBR = $(LIBUC_INC_DIR) | |
156 | LIBUC_INC_DIR_MBR_CMD = |
|
158 | LIBUC_INC_DIR_MBR_CMD = | |
157 |
|
159 | |||
158 | LIBUC_LIBS_UCDIRENT = -static -lucdirent |
|
160 | LIBUC_LIBS_UCDIRENT = -static -lucdirent | |
159 | LIBUC_LIBS_DIR_UCDIRENT = $(LIBUC_LIBS_DIR) |
|
161 | LIBUC_LIBS_DIR_UCDIRENT = $(LIBUC_LIBS_DIR) | |
160 | LIBUC_LIBS_DIR_UCDIRENT_CMD = -L $(LIBUC_LIBS_DIR_UCDIRENT) |
|
162 | LIBUC_LIBS_DIR_UCDIRENT_CMD = -L $(LIBUC_LIBS_DIR_UCDIRENT) | |
161 | LIBUC_INC_DIR_UCDIRENT = $(LIBUC_INC_DIR) |
|
163 | LIBUC_INC_DIR_UCDIRENT = $(LIBUC_INC_DIR) | |
162 | LIBUC_INC_DIR_UCDIRENT_CMD = |
|
164 | LIBUC_INC_DIR_UCDIRENT_CMD = | |
163 |
|
165 | |||
164 | LIBUC_LIBS_FS = -static -lfs |
|
166 | LIBUC_LIBS_FS = -static -lfs | |
165 | LIBUC_LIBS_DIR_FS = $(LIBUC_LIBS_DIR) |
|
167 | LIBUC_LIBS_DIR_FS = $(LIBUC_LIBS_DIR) | |
166 | LIBUC_LIBS_DIR_FS_CMD = -L $(LIBUC_LIBS_DIR_FS) |
|
168 | LIBUC_LIBS_DIR_FS_CMD = -L $(LIBUC_LIBS_DIR_FS) | |
167 | LIBUC_INC_DIR_FS = $(LIBUC_INC_DIR) |
|
169 | LIBUC_INC_DIR_FS = $(LIBUC_INC_DIR) | |
168 | LIBUC_INC_DIR_FS_CMD = |
|
170 | LIBUC_INC_DIR_FS_CMD = | |
169 |
|
171 | |||
170 | LIBUC_LIBS_FSEXPLORER = -static -lfsexplorer |
|
172 | LIBUC_LIBS_FSEXPLORER = -static -lfsexplorer | |
171 | LIBUC_LIBS_DIR_FSEXPLORER = $(LIBUC_LIBS_DIR) |
|
173 | LIBUC_LIBS_DIR_FSEXPLORER = $(LIBUC_LIBS_DIR) | |
172 | LIBUC_LIBS_DIR_FSEXPLORER_CMD = -L $(LIBUC_LIBS_DIR_FSEXPLORER) |
|
174 | LIBUC_LIBS_DIR_FSEXPLORER_CMD = -L $(LIBUC_LIBS_DIR_FSEXPLORER) | |
173 | LIBUC_INC_DIR_FSEXPLORER = $(LIBUC_INC_DIR) |
|
175 | LIBUC_INC_DIR_FSEXPLORER = $(LIBUC_INC_DIR) | |
174 | LIBUC_INC_DIR_FSEXPLORER_CMD = |
|
176 | LIBUC_INC_DIR_FSEXPLORER_CMD = | |
175 |
|
177 | |||
176 | LIBUC_LIBS_DIR_ALLFS_CMD = $(LIBUC_LIBS_DIR_UCDIRENT_CMD) $(LIBUC_LIBS_DIR_FS_CMD) $(LIBUC_LIBS_DIR_MBR_CMD) $(LIBUC_LIBS_DIR_FAT32_CMD) $(LIBUC_LIBS_DIR_SDCARD_CMD) $(LIBUC_LIBS_DIR_BLKDEVICE_CMD) |
|
178 | LIBUC_LIBS_DIR_ALLFS_CMD = $(LIBUC_LIBS_DIR_UCDIRENT_CMD) $(LIBUC_LIBS_DIR_FS_CMD) $(LIBUC_LIBS_DIR_MBR_CMD) $(LIBUC_LIBS_DIR_FAT32_CMD) $(LIBUC_LIBS_DIR_SDCARD_CMD) $(LIBUC_LIBS_DIR_BLKDEVICE_CMD) | |
177 | LIBUC_INC_DIR_ALLFS_CMD = $(LIBUC_INC_DIR_UCDIRENT_CMD) $(LIBUC_INC_DIR_FS_CMD) $(LIBUC_INC_DIR_MBR_CMD) $(LIBUC_INC_DIR_FAT32_CMD) $(LIBUC_INC_DIR_SDCARD_CMD) $(LIBUC_INC_DIR_BLKDEVICE_CMD) |
|
179 | LIBUC_INC_DIR_ALLFS_CMD = $(LIBUC_INC_DIR_UCDIRENT_CMD) $(LIBUC_INC_DIR_FS_CMD) $(LIBUC_INC_DIR_MBR_CMD) $(LIBUC_INC_DIR_FAT32_CMD) $(LIBUC_INC_DIR_SDCARD_CMD) $(LIBUC_INC_DIR_BLKDEVICE_CMD) | |
178 | LIBUC_LIBS_ALLFS = $(LIBUC_LIBS_UCDIRENT) $(LIBUC_LIBS_FS) $(LIBUC_LIBS_MBR) $(LIBUC_LIBS_FAT32) $(LIBUC_LIBS_SDCARD) $(LIBUC_LIBS_BLKDEVICE) |
|
180 | LIBUC_LIBS_ALLFS = $(LIBUC_LIBS_UCDIRENT) $(LIBUC_LIBS_FS) $(LIBUC_LIBS_MBR) $(LIBUC_LIBS_FAT32) $(LIBUC_LIBS_SDCARD) $(LIBUC_LIBS_BLKDEVICE) | |
179 |
|
181 | |||
180 |
|
182 | |||
181 | LIBUC_LIBS_ADS127X = -static -lads127X |
|
183 | LIBUC_LIBS_ADS127X = -static -lads127X | |
182 | LIBUC_LIBS_DIR_ADS127X = $(LIBUC_LIBS_DIR) |
|
184 | LIBUC_LIBS_DIR_ADS127X = $(LIBUC_LIBS_DIR) | |
183 | LIBUC_LIBS_DIR_ADS127X_CMD = -L $(LIBUC_LIBS_DIR_ADS127X) |
|
185 | LIBUC_LIBS_DIR_ADS127X_CMD = -L $(LIBUC_LIBS_DIR_ADS127X) | |
184 | LIBUC_INC_DIR_ADS127X = $(LIBUC_INC_DIR) |
|
186 | LIBUC_INC_DIR_ADS127X = $(LIBUC_INC_DIR) | |
185 | LIBUC_INC_DIR_ADS127X_CMD = |
|
187 | LIBUC_INC_DIR_ADS127X_CMD = | |
186 |
|
188 | |||
187 |
|
189 | |||
188 | LIBUC_LIBS_NXPLIB = -static -lnxplib |
|
190 | LIBUC_LIBS_NXPLIB = -static -lnxplib | |
189 | LIBUC_LIBS_DIR_NXPLIB = $(LIBUC_LIBS_DIR) |
|
191 | LIBUC_LIBS_DIR_NXPLIB = $(LIBUC_LIBS_DIR) | |
190 | LIBUC_LIBS_DIR_NXPLIB_CMD = -L $(LIBUC_LIBS_DIR_NXPLIB) |
|
192 | LIBUC_LIBS_DIR_NXPLIB_CMD = -L $(LIBUC_LIBS_DIR_NXPLIB) | |
191 | LIBUC_INC_DIR_NXPLIB = $(LIBUC_INC_DIR)/LPCXXXX |
|
193 | LIBUC_INC_DIR_NXPLIB = $(LIBUC_INC_DIR)/LPCXXXX | |
192 | LIBUC_INC_DIR_NXPLIB_CMD = -I $(LIBUC_INC_DIR_NXPLIB) |
|
194 | LIBUC_INC_DIR_NXPLIB_CMD = -I $(LIBUC_INC_DIR_NXPLIB) | |
193 |
|
195 | |||
194 | LIBUC_LIBS_ARMMATH = -static -larmmath |
|
196 | LIBUC_LIBS_ARMMATH = -static -larmmath | |
195 | LIBUC_LIBS_DIR_ARMMATH = $(LIBUC_LIBS_DIR) |
|
197 | LIBUC_LIBS_DIR_ARMMATH = $(LIBUC_LIBS_DIR) | |
196 | LIBUC_LIBS_DIR_ARMMATH_CMD = -L $(LIBUC_LIBS_DIR_ARMMATH) |
|
198 | LIBUC_LIBS_DIR_ARMMATH_CMD = -L $(LIBUC_LIBS_DIR_ARMMATH) | |
197 | LIBUC_INC_DIR_ARMMATH = $(LIBUC_INC_DIR)/ARM |
|
199 | LIBUC_INC_DIR_ARMMATH = $(LIBUC_INC_DIR)/ARM | |
198 | LIBUC_INC_DIR_ARMMATH_CMD = $(LIBUC_INC_DIR_ARMMATH) |
|
200 | LIBUC_INC_DIR_ARMMATH_CMD = $(LIBUC_INC_DIR_ARMMATH) | |
199 |
|
201 | |||
200 |
|
202 | |||
201 |
|
203 | |||
202 |
|
204 | |||
203 |
|
205 | |||
204 |
|
206 | |||
205 |
|
207 | |||
206 |
|
208 | |||
207 |
|
209 | |||
208 |
|
210 | |||
209 |
|
211 | |||
210 |
|
212 | |||
211 |
|
213 | |||
212 |
|
214 | |||
213 |
|
215 | |||
214 |
|
216 | |||
215 |
|
217 |
General Comments 0
You need to be logged in to leave comments.
Login now