資源簡介
在官方的基礎(chǔ)上進行的修改,是基于freertos系統(tǒng)的。其中有修改的部分。

代碼片段和文件信息
#include?“stm32f10x_conf.h“
#include?“ili_lcd.h“
void?bsp_init(void)
{
GPIO_InitTypeDef?GPIO_InitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIODENABLE);
/*?2?bit?for?pre-emption?priority?2?bits?for?subpriority?*/
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
//PD13~15輸出驅(qū)動led,配置成開漏輸出
GPIO_InitStructure.GPIO_Pin?=?GPIO_Pin_13?+?GPIO_Pin_14?+?GPIO_Pin_15;
GPIO_InitStructure.GPIO_Speed?=?GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode?=?GPIO_Mode_Out_OD;
GPIO_Init(GPIOD?&GPIO_InitStructure);
GPIOD->BSRR?=?GPIO_BSRR_BS13?;
GPIOD->BSRR?=?GPIO_BSRR_BS14?;
GPIOD->BSRR?=?GPIO_BSRR_BS15?;
lcd_init();
}
void?LED_Toggle(unsigned?char?led)
{
unsigned?long?pins;
pins?=?GPIO_ReadOutputData(GPIOD);
switch(led)
{
case?0:
LED_Toggle(1);
LED_Toggle(2);
LED_Toggle(3);
break;
case?1:
if(?pins?&?GPIO_Pin_13)
GPIOD->BRR?=?GPIO_BRR_BR13?;
else
GPIOD->BSRR?=?GPIO_BSRR_BS13?;
break;
case?2:
if(?pins?&?GPIO_Pin_14)
GPIOD->BRR?=?GPIO_BRR_BR14?;
else
GPIOD->BSRR?=?GPIO_BSRR_BS14?;
break;
case?3:
if(?pins?&?GPIO_Pin_15)
GPIOD->BRR?=?GPIO_BRR_BR15?;
else
GPIOD->BSRR?=?GPIO_BSRR_BS15?;
break;
default:
break;
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1256??2012-11-01?21:36??STM32F107\Demo\bsp.c
?????文件????????195??2012-10-25?10:54??STM32F107\Demo\bsp.h
?????文件??????11424??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\api_lib.pbi.cout
?????文件??????11424??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\api_msg.pbi.cout
?????文件??????11429??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\autoip.pbi.cout
?????文件??????11393??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\bsp.pbi.cout
?????文件?????499113??2012-12-21?14:57??STM32F107\Demo\Debug\Obj\croutine.pbi
?????文件??????11421??2012-12-21?14:57??STM32F107\Demo\Debug\Obj\croutine.pbi.cout
?????文件??????11422??2012-12-17?15:50??STM32F107\Demo\Debug\Obj\dhcp.pbi.cout
?????文件??????11421??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\dns.pbi.cout
?????文件??????11420??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\err.pbi.cout
?????文件??????11425??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\etharp.pbi.cout
?????文件??????11443??2012-12-18?16:25??STM32F107\Demo\Debug\Obj\ethernetif.pbi.cout
?????文件??????11395??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\fonts.pbi.cout
?????文件?????593292??2012-12-21?14:57??STM32F107\Demo\Debug\Obj\heap_4.pbi
?????文件??????11436??2012-12-21?14:57??STM32F107\Demo\Debug\Obj\heap_4.pbi.cout
?????文件??????11427??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\icmp.pbi.cout
?????文件??????11427??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\igmp.pbi.cout
?????文件??????11397??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\ili_lcd.pbi.cout
?????文件??????11427??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\inet.pbi.cout
?????文件??????11434??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\inet_chksum.pbi.cout
?????文件??????11422??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\init.pbi.cout
?????文件??????11425??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\ip.pbi.cout
?????文件??????11430??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\ip_addr.pbi.cout
?????文件??????11430??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\ip_frag.pbi.cout
?????文件?????452966??2012-12-21?14:57??STM32F107\Demo\Debug\Obj\list.pbi
?????文件??????11417??2012-12-21?14:57??STM32F107\Demo\Debug\Obj\list.pbi.cout
?????文件??????11394??2012-12-18?16:26??STM32F107\Demo\Debug\Obj\main.pbi.cout
?????文件??????11421??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\mem.pbi.cout
?????文件??????11422??2012-12-17?22:01??STM32F107\Demo\Debug\Obj\memp.pbi.cout
............此處省略408個文件信息
評論
共有 條評論