資源簡介
loraWan協議棧,外加SX1272/73,SX1276/77/78/79和SX1261/2無線電驅動程序

代碼片段和文件信息
/*
?/?_____)?????????????_??????????????|?|
(?(____??_____?____?_|?|_?_____??____|?|__
?\____?\|?___?|????(_???_)?___?|/?___)??_?\
?_____)?)?____|?|?|?||?|_|?____(?(___|?|?|?|
(______/|_____)_|_|_|?\__)_____)\____)_|?|_|
????(C)2013?Semtech
Description:?LoRaMote?board?USB?DFU?bootloader
License:?Revised?BSD?License?see?LICENSE.TXT?file?include?in?the?project
Maintainer:?Miguel?Luis?and?Gregory?Cristian
*/
#include?“board.h“
#include?“usbd_core.h“
#include?“usbd_desc.h“
#include?“usbd_dfu.h“
#include?“usbd_dfu_flash.h“
extern?PCD_HandleTypeDef?hpcd;
USBD_HandleTypeDef?USBD_Device;
pFunction?JumpToApplication;
uint32_t?JumpAddress;
/*
?*?Board?peripherals?objects
?*/
Gpio_t?Led1;
Gpio_t?Led2;
Gpio_t?Led3;
I2c_t?I2c;
void?SystemClockConfig(?void?);
static?void?DelayLoop(?volatile?uint32_t?nCount?)
{
????volatile?uint32_t?index?=?0;
????for(?index?=?(?5000?*?nCount?);?index?!=?0;?index--?)
????{
????}
}
int?main(?void?)
{
????uint8_t?regValue?=?0;
????uint8_t?status?=?0;
????uint16_t?offset?=?0;
????
????/*?STM32L1xx?HAL?library?initialization:
?????????-?Configure?the?Flash?prefetch
?????????-?Systick?timer?is?configured?by?default?as?source?of?time?base?but?user?
???????????can?eventually?implement?his?proper?time?base?source?(a?general?purpose?
???????????timer?for?example?or?other?time?source)?keeping?in?mind?that?Time?base?
???????????duration?should?be?kept?1ms?since?PPP_TIMEOUT_VALUEs?are?defined?and?
???????????handled?in?milliseconds?basis.
?????????-?Set?NVIC?Group?Priority?to?4
?????????-?Low?Level?Initialization
???????*/
????HAL_Init(?);
????SystemClockConfig(?);
????I2cInit(?&I2c?I2C_SCL?I2C_SDA?);
????
????GpioInit(?&Led1?LED_1?PIN_OUTPUT?PIN_PUSH_PULL?PIN_NO_PULL?1?);
????GpioInit(?&Led2?LED_2?PIN_OUTPUT?PIN_PUSH_PULL?PIN_NO_PULL?1?);
????GpioInit(?&Led3?LED_3?PIN_OUTPUT?PIN_PUSH_PULL?PIN_NO_PULL?1?);
????
????//?Init?SAR
????SX9500Init(?);
????DelayLoop(?100?);
????SX9500Write(?SX9500_REG_IRQMSK?0x10?);
????SX9500Write(?SX9500_REG_IRQSRC?0x10?);
????
????do
????{
????????SX9500Read(?SX9500_REG_IRQSRC?&status?);
????}while(?(?status?&?0x10?)?==?0x00?);?//?While?compensation?for?CS0?is?pending
????
????//?Read?1st?sensor?offset
????SX9500Read(?SX9500_REG_OFFSETMSB?(?uint8_t*?)®Value?);
????offset?=?regValue?<8;
????SX9500Read(?SX9500_REG_OFFSETLSB?(?uint8_t*?)®Value?);
????offset?|=?regValue;
????
????if(?offset?2000?)
????{?/*?Test?if?user?code?is?programmed?starting?from?address?0x08007000?*/
????????if(?(?(?*(?volatile?uint32_t*?)USBD_DFU_APP_DEFAULT_ADD?)?&?0x2FFE0000?)?==?0x20000000?)
????????{
????????????/*?Jump?to?user?application?*/
????????????JumpAddress?=?*(?volatile?uint32_t*?)?(?USBD_DFU_APP_DEFAULT_ADD?+?4?);
????????????JumpToApplication?=?(?pFunction?)?JumpAddress;
????????????/*?Initialize?user?application‘s?Stack?Pointer?*/
????????????__set_MSP(?*(?volatile?uint32_t*?)?USBD
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-09-22?15:47??LoRaMac-node-master\
?????文件?????????203??2016-09-22?15:47??LoRaMac-node-master\.gitignore
?????目錄???????????0??2016-09-22?15:47??LoRaMac-node-master\Doc\
?????文件??????512945??2016-09-22?15:47??LoRaMac-node-master\Doc\LoRaMote-schematic.pdf
?????文件?????1526329??2016-09-22?15:47??LoRaMac-node-master\Doc\SensorNode-schematic.pdf
?????文件??????718857??2016-09-22?15:47??LoRaMac-node-master\Doc\iM880A_Datasheet.pdf
?????目錄???????????0??2016-09-22?15:47??LoRaMac-node-master\Keil\
?????目錄???????????0??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\
?????目錄???????????0??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\Bootloader\
?????文件???????24083??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\Bootloader\BootLoader.uvopt
?????文件???????24857??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\Bootloader\BootLoader.uvproj
?????目錄???????????0??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\LoRaMac\
?????目錄???????????0??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\LoRaMac\classA\
?????文件???????39277??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\LoRaMac\classA\LoRaMac-api-v3.uvopt
?????文件??????107706??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\LoRaMac\classA\LoRaMac-api-v3.uvproj
?????文件???????38838??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\LoRaMac\classA\LoRaMac.uvopt
?????文件??????106850??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\LoRaMac\classA\LoRaMac.uvproj
?????目錄???????????0??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\LoRaMac\classB\
?????文件???????39277??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\LoRaMac\classB\LoRaMac-api-v3.uvopt
?????文件??????107706??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\LoRaMac\classB\LoRaMac-api-v3.uvproj
?????文件???????38838??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\LoRaMac\classB\LoRaMac.uvopt
?????文件??????106850??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\LoRaMac\classB\LoRaMac.uvproj
?????目錄???????????0??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\LoRaMac\classC\
?????文件???????39277??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\LoRaMac\classC\LoRaMac-api-v3.uvopt
?????文件??????107706??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\LoRaMac\classC\LoRaMac-api-v3.uvproj
?????文件???????38838??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\LoRaMac\classC\LoRaMac.uvopt
?????文件??????106850??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\LoRaMac\classC\LoRaMac.uvproj
?????目錄???????????0??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\ping-pong\
?????文件???????60828??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\ping-pong\Ping-Pong.uvopt
?????文件??????204287??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\ping-pong\Ping-Pong.uvproj
?????目錄???????????0??2016-09-22?15:47??LoRaMac-node-master\Keil\LoRaMote\rx-sensi\
............此處省略665個文件信息
- 上一篇:ssh框架實現網上招聘
- 下一篇:Verilog時鐘帶鬧鈴等功能
評論
共有 條評論