資源簡介
STM32L1系列的LoRa驅動,STM32L1 LoRa Keil。
STM32L1系列的LoRa驅動,STM32L1 LoRa Keil。

代碼片段和文件信息
#include?“board.h“
//全局變量定義
uint8_t?Sensor_Module_Address;
void?Pwr_Ctrl(void)
{
GPIO_InitTypeDef?GPIO_InitStructure;
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOBENABLE);
GPIO_InitStructure.GPIO_Pin?=?GPIO_Pin_8; ? //PC1接LED
??GPIO_InitStructure.GPIO_Mode?=?GPIO_Mode_OUT;
??GPIO_InitStructure.GPIO_OType?=?GPIO_OType_PP;
??GPIO_InitStructure.GPIO_PuPd?=?GPIO_PuPd_UP;
??GPIO_InitStructure.GPIO_Speed?=?GPIO_Speed_10MHz;?????????
??GPIO_Init(GPIOB?&GPIO_InitStructure); ?????????????????//初始化外設GPIO?
GPIO_SetBits(GPIOBGPIO_Pin_8);
}
/*
?*?函數名:RCC_Configuration(void)
?*?描述??:時鐘配置?使用內部的HSI?16MHz時鐘
?*?輸入??:無
?*?輸出??:無
?*/
void?RCC_Configuration(void)
{??
??/*?Enable?HSI?Clock?*/
??RCC_HSICmd(ENABLE);
??
??/*!??while?(RCC_GetFlagStatus(RCC_FLAG_HSIRDY)?==?RESET){}
??
??RCC_SYSCLKConfig(RCC_SYSCLKSource_HSI);
??
??RCC_MSIRangeConfig(RCC_MSIRange_6);
??RCC_HSEConfig(RCC_HSE_OFF);??
??if(RCC_GetFlagStatus(RCC_FLAG_HSERDY)?!=?RESET?)
??{
????while(1);
??}
}
/*
?*?函數名:Board_init(void)
?*?描述??:iot板初始化?LED、OLED、Key還有其它GPIO端口
?*?輸入??:無
?*?輸出??:無
?*/
void?Board_init(void)
{
uint8_t?t;
uint8_t?System_start[]=“IOT?system?start‘‘‘‘‘‘‘‘\n\r“;
RCC_Configuration();
delay_init(); ???? ???????//延時函數初始化
NVIC_Configuration();? ?????//設置NVIC中斷分組2:2位搶占優先級,2位響應優先級?
//Sensor_Check_GPIO_Init();
Sensor_LED_Init();
LED_Init();???????????????????//初始化板上的LED
OLED_Init(); ???????????//初始化OLED??
//Key_InterruptMode_Init();????//初始化IOT板上的4個按鍵?中斷方式
Pwr_Ctrl();
usart1_init();???????????????//?初始化usart_1
t=?sizeof(System_start)+1;
usart1_sendbyte(System_startt);
}
/*
?*?函數名:Sensor_Check_GPIO_Init(void)
?*?描述??:按鍵值處理
?*?輸入??:無
?*?輸出??:無
?*/
void?Sensor_Check_GPIO_Init(void)?//IO初始化
{
? GPIO_InitTypeDef?GPIO_InitStructure;
EXTI_InitTypeDef?EXTI_InitStructure;
??NVIC_InitTypeDef?NVIC_InitStructure;
//init?GPIOC.13??上拉輸入?SENSOR_EN
? RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOCENABLE);
GPIO_InitStructure.GPIO_Pin??=?GPIO_Pin_13;
GPIO_InitStructure.GPIO_Mode?=?GPIO_Mode_IN;
??GPIO_InitStructure.GPIO_PuPd?=?GPIO_PuPd_UP;
GPIO_InitStructure.GPIO_Speed?=?GPIO_Speed_40MHz;
??GPIO_Init(GPIOC?&GPIO_InitStructure);
//?Connect?Button?EXTI?Line?to??GPIO?Pin?13
RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG?ENABLE);
SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOCEXTI_PinSource13);
EXTI_InitStructure.EXTI_Line?=?EXTI_Line13?;??
??EXTI_InitStructure.EXTI_Mode?=?EXTI_Mode_Interrupt;
??EXTI_InitStructure.EXTI_Trigger?=?EXTI_Trigger_Falling;??
??EXTI_InitStructure.EXTI_LineCmd?=?ENABLE;
??EXTI_Init(&EXTI_InitStructure);
??NVIC_InitStructure.NVIC_IRQChannel?=?EXTI15_10_IRQn?;
??NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority?=?0x00;
??NVIC_InitStructure.NVIC_IRQChannelSubPriority?=?0x00;
??NVIC_InitStructure.NVIC_IRQChannelCmd?=?ENABLE;
??NVIC_Init(&NVIC_InitStructure);
//EXTI_GenerateSWInterrupt(EXTI_Line13);
//?ADD3:?ADD2?:?A
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????157??2016-04-14?14:02??STM32L1_SX1278_Keil5\.git\config
?????文件?????????73??2016-04-14?14:02??STM32L1_SX1278_Keil5\.git\desc
?????文件?????????23??2016-04-14?14:02??STM32L1_SX1278_Keil5\.git\HEAD
?????文件????????452??2016-04-14?14:02??STM32L1_SX1278_Keil5\.git\hooks\applypatch-msg.sample
?????文件????????896??2016-04-14?14:02??STM32L1_SX1278_Keil5\.git\hooks\commit-msg.sample
?????文件????????160??2016-04-14?14:02??STM32L1_SX1278_Keil5\.git\hooks\post-commit.sample
?????文件????????552??2016-04-14?14:02??STM32L1_SX1278_Keil5\.git\hooks\post-receive.sample
?????文件????????189??2016-04-14?14:02??STM32L1_SX1278_Keil5\.git\hooks\post-update.sample
?????文件????????398??2016-04-14?14:02??STM32L1_SX1278_Keil5\.git\hooks\pre-applypatch.sample
?????文件???????1704??2016-04-14?14:02??STM32L1_SX1278_Keil5\.git\hooks\pre-commit.sample
?????文件???????4951??2016-04-14?14:02??STM32L1_SX1278_Keil5\.git\hooks\pre-reba
?????文件???????1239??2016-04-14?14:02??STM32L1_SX1278_Keil5\.git\hooks\prepare-commit-msg.sample
?????文件???????3611??2016-04-14?14:02??STM32L1_SX1278_Keil5\.git\hooks\update.sample
?????文件????????240??2016-04-14?14:02??STM32L1_SX1278_Keil5\.git\info\exclude
?????文件???????5317??2016-04-12?20:07??STM32L1_SX1278_Keil5\Iot_board\Board\board.c
?????文件????????829??2016-04-13?18:42??STM32L1_SX1278_Keil5\Iot_board\Board\board.h
?????文件???????1606??2014-06-02?20:08??STM32L1_SX1278_Keil5\Iot_board\EXTI\exti.c
?????文件????????582??2011-09-15?16:11??STM32L1_SX1278_Keil5\Iot_board\EXTI\exti.h
?????文件??????10003??2016-04-05?15:47??STM32L1_SX1278_Keil5\Iot_board\I2C\I2C.c
?????文件???????2752??2016-04-05?15:47??STM32L1_SX1278_Keil5\Iot_board\I2C\I2C.h
?????文件???????6740??2016-04-05?12:18??STM32L1_SX1278_Keil5\Iot_board\KEY\key.c
?????文件???????1827??2016-04-05?12:18??STM32L1_SX1278_Keil5\Iot_board\KEY\key.h
?????文件???????1200??2016-04-05?13:44??STM32L1_SX1278_Keil5\Iot_board\LED\led.c
?????文件???????1117??2016-04-05?13:45??STM32L1_SX1278_Keil5\Iot_board\LED\led.h
?????文件??????11894??2016-03-28?19:04??STM32L1_SX1278_Keil5\Iot_board\OLED\bmp.h
?????文件???????7061??2016-03-29?15:41??STM32L1_SX1278_Keil5\Iot_board\OLED\OLED.c
?????文件???????2562??2016-03-29?17:16??STM32L1_SX1278_Keil5\Iot_board\OLED\OLED.h
?????文件??????15068??2016-03-28?10:59??STM32L1_SX1278_Keil5\Iot_board\OLED\oledfont.h
?????文件??????30770??2016-04-14?14:00??STM32L1_SX1278_Keil5\Iot_board\rf\SX1276.C
?????文件???????6730??2016-04-14?13:25??STM32L1_SX1278_Keil5\Iot_board\rf\Sx1276.h
............此處省略347個文件信息
評論
共有 條評論