forked from strongercjd/STM32F207VCT6
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3bb465a
commit 00a92e8
Showing
14 changed files
with
5,259 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
|
||
<workspace> | ||
<project> | ||
<path>$WS_DIR$\Project.ewp</path> | ||
</project> | ||
<batchBuild/> | ||
</workspace> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/*###ICF### Section handled by ICF editor, don't touch! ****/ | ||
/*-Editor annotation file-*/ | ||
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ | ||
/*-Specials-*/ | ||
define symbol __ICFEDIT_intvec_start__ = 0x08000000; | ||
/*-Memory Regions-*/ | ||
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000; | ||
define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF; | ||
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; | ||
define symbol __ICFEDIT_region_RAM_end__ = 0x20020000; | ||
/*-Sizes-*/ | ||
define symbol __ICFEDIT_size_cstack__ = 0x400; | ||
define symbol __ICFEDIT_size_heap__ = 0x200; | ||
/**** End of ICF editor section. ###ICF###*/ | ||
|
||
|
||
define memory mem with size = 4G; | ||
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; | ||
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; | ||
|
||
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; | ||
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; | ||
|
||
initialize by copy { readwrite }; | ||
do not initialize { section .noinit }; | ||
|
||
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; | ||
|
||
place in ROM_region { readonly }; | ||
place in RAM_region { readwrite, | ||
block CSTACK, block HEAP }; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#ifndef __LCD_DISP_H | ||
#define __LCD_DISP_H | ||
|
||
#include "stm32f2xx.h" | ||
|
||
|
||
|
||
/******************************* LMT028 显示屏的FSMC地址 ***************************/ | ||
//#define macEXMC_Addr_LMT028_CMD ( ( uint32_t ) 0x60000000 ) //FSMC_Bank1_NORSRAM1用于LCD命令操作的地址 | ||
//#define macEXMC_Addr_LMT028_DATA ( ( uint32_t ) 0x60010000 ) //FSMC_Bank1_NORSRAM1用于LCD数据操作的地址 | ||
|
||
typedef struct | ||
{ | ||
uint8_t LCD_CMD;//用于LCD命令操作 | ||
uint8_t LCD_DATA;//用于LCD数据操作 | ||
} LCD_TypeDef; | ||
#define LCD_BASE ((uint32_t)(0x60000000 | 0x0000FFFF)) | ||
#define LCD ((LCD_TypeDef *) LCD_BASE) | ||
|
||
|
||
#define LCD_RD_GPIO GPIOD | ||
#define LCD_WR_GPIO GPIOD | ||
#define LCD_CS_GPIO GPIOD | ||
#define LCD_DC_GPIO GPIOD | ||
|
||
#define LCD_RST_GPIO GPIOC | ||
#define LCD_BK_GPIO GPIOC | ||
#define LCD_FRAME_GPIO GPIOC | ||
|
||
#define LCD_RD_Pin GPIO_Pin_4 | ||
#define LCD_WR_Pin GPIO_Pin_5 | ||
#define LCD_CS_Pin GPIO_Pin_7 | ||
#define LCD_DC_Pin GPIO_Pin_11 | ||
#define LCD_RST_Pin GPIO_Pin_6 | ||
#define LCD_BK_Pin GPIO_Pin_7 | ||
#define LCD_FRAME_Pin GPIO_Pin_8 | ||
|
||
|
||
|
||
|
||
#define LCD_red 0xf800 | ||
#define LCD_grenn 0x07e0 | ||
#define LCD_blue 0x001f | ||
#define LCD_yellow 0xffe0 | ||
#define LCD_purple 0x780f | ||
#define LCD_drgay 0x7bef | ||
#define LCD_cyan 0x07ff | ||
#define LCD_olive 0x7be0 | ||
#define LCD_black 0x0000 | ||
|
||
|
||
void LCD_Init (void); | ||
void LMT028_Init (void); | ||
void LMT028_GPIO_Config (void); | ||
void LMT028_FSMC_Config (void); | ||
void LMT028_Rst (void); | ||
void LMT028_REG_Config (void); | ||
void LMT028_Write_Cmd (uint8_t usCmd); | ||
void LMT028_Write_Data (uint8_t usData); | ||
void LCD_DrawPoint(uint16_t x,uint16_t y,uint16_t color); | ||
void clear_lcd_area(uint16_t X,uint16_t Y,uint16_t width,uint16_t height); | ||
void Delay1ms(uint16_t k); | ||
void SysCtlDelay(unsigned long ulCount); | ||
void timer3_init(void); | ||
void Set_Pen_Color(uint16_t Pen_Color); | ||
void Set_Back_Color(uint16_t Pen_Color); | ||
void LCD_DrawLine(uint16_t x1,uint16_t y1,uint16_t x2,uint16_t y2,uint16_t color); | ||
void LCD_ShowString(uint16_t x,uint16_t y,char *s); | ||
void LCD_ShowChar(uint16_t x,uint16_t y,uint16_t num,uint16_t size,uint16_t mode); | ||
#endif |
Oops, something went wrong.