parent
11ccc7496e
commit
d0048dcfb2
@ -1,4 +0,0 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project version="4"> |
||||
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" /> |
||||
</project> |
@ -1,8 +0,0 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project version="4"> |
||||
<component name="ProjectModuleManager"> |
||||
<modules> |
||||
<module fileurl="file://$PROJECT_DIR$/.idea/proj.iml" filepath="$PROJECT_DIR$/.idea/proj.iml" /> |
||||
</modules> |
||||
</component> |
||||
</project> |
@ -1,2 +0,0 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<module classpath="CMake" type="CPP_MODULE" version="4" /> |
@ -1,239 +0,0 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project version="4"> |
||||
<component name="CMakeRunConfigurationManager" shouldGenerate="true" shouldDeleteObsolete="true" buildAllGenerated="true"> |
||||
<generated> |
||||
<config projectName="proj" targetName="proj" /> |
||||
</generated> |
||||
</component> |
||||
<component name="CMakeSettings"> |
||||
<configurations> |
||||
<configuration CONFIG_NAME="Debug" /> |
||||
</configurations> |
||||
</component> |
||||
<component name="ChangeListManager"> |
||||
<list default="true" id="38654d8d-41ef-479b-814f-5f05e90ab5b0" name="Default" comment=""> |
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> |
||||
</list> |
||||
<ignored path="$PROJECT_DIR$/cmake-build-debug/" /> |
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> |
||||
<option name="TRACKING_ENABLED" value="true" /> |
||||
<option name="SHOW_DIALOG" value="false" /> |
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" /> |
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> |
||||
<option name="LAST_RESOLUTION" value="IGNORE" /> |
||||
</component> |
||||
<component name="FileEditorManager"> |
||||
<leaf> |
||||
<file leaf-file-name="CMakeLists.txt" pinned="false" current-in-tab="false"> |
||||
<entry file="file://$PROJECT_DIR$/CMakeLists.txt"> |
||||
<provider selected="true" editor-type-id="text-editor"> |
||||
<state relative-caret-position="-1173"> |
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
||||
<folding /> |
||||
</state> |
||||
</provider> |
||||
</entry> |
||||
</file> |
||||
<file leaf-file-name="main.c" pinned="false" current-in-tab="true"> |
||||
<entry file="file://$PROJECT_DIR$/Src/main.c"> |
||||
<provider selected="true" editor-type-id="text-editor"> |
||||
<state relative-caret-position="-1003"> |
||||
<caret line="37" column="0" lean-forward="false" selection-start-line="37" selection-start-column="0" selection-end-line="37" selection-end-column="0" /> |
||||
<folding /> |
||||
</state> |
||||
</provider> |
||||
</entry> |
||||
</file> |
||||
</leaf> |
||||
</component> |
||||
<component name="Git.Settings"> |
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> |
||||
</component> |
||||
<component name="IdeDocumentHistory"> |
||||
<option name="CHANGED_PATHS"> |
||||
<list> |
||||
<option value="$PROJECT_DIR$/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_def.h" /> |
||||
<option value="$PROJECT_DIR$/Src/main.c" /> |
||||
<option value="$PROJECT_DIR$/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal.h" /> |
||||
</list> |
||||
</option> |
||||
</component> |
||||
<component name="ProjectFrameBounds" extendedState="6"> |
||||
<option name="x" value="329" /> |
||||
<option name="y" value="246" /> |
||||
<option name="width" value="1280" /> |
||||
<option name="height" value="798" /> |
||||
</component> |
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" /> |
||||
<component name="ProjectView"> |
||||
<navigator currentView="ProjectPane" proportions="" version="1"> |
||||
<flattenPackages /> |
||||
<showMembers /> |
||||
<showModules /> |
||||
<showLibraryContents /> |
||||
<hideEmptyPackages /> |
||||
<abbreviatePackageNames /> |
||||
<autoscrollToSource /> |
||||
<autoscrollFromSource /> |
||||
<sortByType /> |
||||
<manualOrder /> |
||||
<foldersAlwaysOnTop value="true" /> |
||||
</navigator> |
||||
<panes> |
||||
<pane id="ProjectPane"> |
||||
<subPane> |
||||
<expand> |
||||
<path> |
||||
<item name="proj" type="dad4c3:CidrFilesViewHelper$MyProjectTreeStructure$1" /> |
||||
<item name="proj" type="462c0819:PsiDirectoryNode" /> |
||||
</path> |
||||
<path> |
||||
<item name="proj" type="dad4c3:CidrFilesViewHelper$MyProjectTreeStructure$1" /> |
||||
<item name="proj" type="462c0819:PsiDirectoryNode" /> |
||||
<item name="Drivers" type="462c0819:PsiDirectoryNode" /> |
||||
</path> |
||||
<path> |
||||
<item name="proj" type="dad4c3:CidrFilesViewHelper$MyProjectTreeStructure$1" /> |
||||
<item name="proj" type="462c0819:PsiDirectoryNode" /> |
||||
<item name="Src" type="462c0819:PsiDirectoryNode" /> |
||||
</path> |
||||
</expand> |
||||
<select /> |
||||
</subPane> |
||||
</pane> |
||||
</panes> |
||||
</component> |
||||
<component name="PropertiesComponent"> |
||||
<property name="WebServerToolWindowFactoryState" value="false" /> |
||||
</component> |
||||
<component name="RunDashboard"> |
||||
<option name="ruleStates"> |
||||
<list> |
||||
<RuleState> |
||||
<option name="name" value="ConfigurationTypeDashboardGroupingRule" /> |
||||
</RuleState> |
||||
<RuleState> |
||||
<option name="name" value="StatusDashboardGroupingRule" /> |
||||
</RuleState> |
||||
</list> |
||||
</option> |
||||
</component> |
||||
<component name="RunManager" selected="Application.proj"> |
||||
<configuration name="Build All" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" CONFIG_NAME="Debug" EXPLICIT_BUILD_TARGET_NAME="all"> |
||||
<envs /> |
||||
</configuration> |
||||
<configuration name="proj" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="proj" TARGET_NAME="proj" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="proj" RUN_TARGET_NAME="proj"> |
||||
<envs /> |
||||
</configuration> |
||||
<list size="2"> |
||||
<item index="0" class="java.lang.String" itemvalue="Application.Build All" /> |
||||
<item index="1" class="java.lang.String" itemvalue="Application.proj" /> |
||||
</list> |
||||
</component> |
||||
<component name="ShelveChangesManager" show_recycled="false"> |
||||
<option name="remove_strategy" value="false" /> |
||||
</component> |
||||
<component name="TaskManager"> |
||||
<task active="true" id="Default" summary="Default task"> |
||||
<changelist id="38654d8d-41ef-479b-814f-5f05e90ab5b0" name="Default" comment="" /> |
||||
<created>1509630149534</created> |
||||
<option name="number" value="Default" /> |
||||
<option name="presentableId" value="Default" /> |
||||
<updated>1509630149534</updated> |
||||
<workItem from="1509630151155" duration="770000" /> |
||||
</task> |
||||
<servers /> |
||||
</component> |
||||
<component name="TimeTrackingManager"> |
||||
<option name="totallyTimeSpent" value="770000" /> |
||||
</component> |
||||
<component name="ToolWindowManager"> |
||||
<frame x="329" y="246" width="1366" height="738" extended-state="6" /> |
||||
<editor active="true" /> |
||||
<layout> |
||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> |
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> |
||||
<window_info id="CMake" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> |
||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" /> |
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> |
||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> |
||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> |
||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> |
||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> |
||||
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" /> |
||||
<window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> |
||||
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> |
||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> |
||||
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> |
||||
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> |
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> |
||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> |
||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> |
||||
</layout> |
||||
</component> |
||||
<component name="VcsContentAnnotationSettings"> |
||||
<option name="myLimit" value="2678400000" /> |
||||
</component> |
||||
<component name="XDebuggerManager"> |
||||
<breakpoint-manager /> |
||||
<watches-manager /> |
||||
</component> |
||||
<component name="editorHistoryManager"> |
||||
<entry file="file://$PROJECT_DIR$/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_def.h"> |
||||
<provider selected="true" editor-type-id="text-editor"> |
||||
<state relative-caret-position="425"> |
||||
<caret line="49" column="20" lean-forward="true" selection-start-line="49" selection-start-column="20" selection-end-line="49" selection-end-column="20" /> |
||||
<folding /> |
||||
</state> |
||||
</provider> |
||||
</entry> |
||||
<entry file="file://$PROJECT_DIR$/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_pwr.h"> |
||||
<provider selected="true" editor-type-id="text-editor"> |
||||
<state relative-caret-position="442"> |
||||
<caret line="44" column="15" lean-forward="true" selection-start-line="44" selection-start-column="15" selection-end-line="44" selection-end-column="15" /> |
||||
<folding /> |
||||
</state> |
||||
</provider> |
||||
</entry> |
||||
<entry file="file://$PROJECT_DIR$/Inc/stm32l0xx_hal_conf.h"> |
||||
<provider selected="true" editor-type-id="text-editor"> |
||||
<state relative-caret-position="-2448"> |
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
||||
<folding /> |
||||
</state> |
||||
</provider> |
||||
</entry> |
||||
<entry file="file://$PROJECT_DIR$/Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l073xx.h"> |
||||
<provider selected="true" editor-type-id="text-editor"> |
||||
<state relative-caret-position="-1836"> |
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
||||
<folding /> |
||||
</state> |
||||
</provider> |
||||
</entry> |
||||
<entry file="file://$PROJECT_DIR$/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal.h"> |
||||
<provider selected="true" editor-type-id="text-editor"> |
||||
<state relative-caret-position="401"> |
||||
<caret line="46" column="8" lean-forward="false" selection-start-line="46" selection-start-column="8" selection-end-line="46" selection-end-column="8" /> |
||||
<folding /> |
||||
</state> |
||||
</provider> |
||||
</entry> |
||||
<entry file="file://$PROJECT_DIR$/CMakeLists.txt"> |
||||
<provider selected="true" editor-type-id="text-editor"> |
||||
<state relative-caret-position="-1173"> |
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
||||
<folding /> |
||||
</state> |
||||
</provider> |
||||
</entry> |
||||
<entry file="file://$PROJECT_DIR$/Src/main.c"> |
||||
<provider selected="true" editor-type-id="text-editor"> |
||||
<state relative-caret-position="-1003"> |
||||
<caret line="37" column="0" lean-forward="false" selection-start-line="37" selection-start-column="0" selection-end-line="37" selection-end-column="0" /> |
||||
<folding /> |
||||
</state> |
||||
</provider> |
||||
</entry> |
||||
</component> |
||||
</project> |
@ -0,0 +1,147 @@ |
||||
/*
|
||||
/ _____) _ | | |
||||
( (____ _____ ____ _| |_ _____ ____| |__ |
||||
\____ \| ___ | (_ _) ___ |/ ___) _ \
|
||||
_____) ) ____| | | || |_| ____( (___| | | | |
||||
(______/|_____)_|_|_| \__)_____)\____)_| |_| |
||||
(C)2015 Semtech |
||||
|
||||
Description: End device commissioning parameters |
||||
|
||||
License: Revised BSD License, see LICENSE.TXT file include in the project |
||||
|
||||
Maintainer: Miguel Luis and Gregory Cristian |
||||
*/ |
||||
/******************************************************************************
|
||||
* @file commissioning.h |
||||
* @author MCD Application Team |
||||
* @version V1.1.2 |
||||
* @date 08-September-2017 |
||||
* @brief End device commissioning parameters |
||||
****************************************************************************** |
||||
* @attention |
||||
* |
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics International N.V.
|
||||
* All rights reserved.</center></h2> |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted, provided that the following conditions are met: |
||||
* |
||||
* 1. Redistribution of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer. |
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, |
||||
* this list of conditions and the following disclaimer in the documentation |
||||
* and/or other materials provided with the distribution. |
||||
* 3. Neither the name of STMicroelectronics nor the names of other
|
||||
* contributors to this software may be used to endorse or promote products
|
||||
* derived from this software without specific written permission. |
||||
* 4. This software, including modifications and/or derivative works of this
|
||||
* software, must execute solely and exclusively on microcontroller or |
||||
* microprocessor devices manufactured by or for STMicroelectronics. |
||||
* 5. Redistribution and use of this software other than as permitted under
|
||||
* this license is void and will automatically terminate your rights under
|
||||
* this license.
|
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY |
||||
* RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
|
||||
* SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
****************************************************************************** |
||||
*/ |
||||
/* Define to prevent recursive inclusion -------------------------------------*/ |
||||
#ifndef __LORA_COMMISSIONING_H__ |
||||
#define __LORA_COMMISSIONING_H__ |
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
|
||||
/* Exported types ------------------------------------------------------------*/ |
||||
/* Exported constants --------------------------------------------------------*/ |
||||
/* External variables --------------------------------------------------------*/ |
||||
/* Exported macros -----------------------------------------------------------*/ |
||||
/* Exported functions ------------------------------------------------------- */
|
||||
/*!
|
||||
* When set to 1 the application uses the Over-the-Air activation procedure |
||||
* When set to 0 the application uses the Personalization activation procedure |
||||
*/ |
||||
#define OVER_THE_AIR_ACTIVATION 1 |
||||
|
||||
/*!
|
||||
* Indicates if the end-device is to be connected to a private or public network |
||||
*/ |
||||
#define LORAWAN_PUBLIC_NETWORK true |
||||
|
||||
/*!
|
||||
* When set to 1 DevEui is LORAWAN_DEVICE_EUI |
||||
* When set to 0 DevEui is automatically generated by calling |
||||
* BoardGetUniqueId function |
||||
*/ |
||||
#define STATIC_DEVICE_EUI 0 |
||||
|
||||
/*!
|
||||
* Mote device IEEE EUI (big endian) |
||||
* |
||||
* \remark see STATIC_DEVICE_EUI comments |
||||
*/ |
||||
#define LORAWAN_DEVICE_EUI { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 } |
||||
|
||||
|
||||
/*!
|
||||
* Application IEEE EUI (big endian) |
||||
*/ |
||||
#define LORAWAN_APPLICATION_EUI { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 } |
||||
|
||||
/*!
|
||||
* AES encryption/decryption cipher application key |
||||
*/ |
||||
#define LORAWAN_APPLICATION_KEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C } |
||||
|
||||
#if( OVER_THE_AIR_ACTIVATION == 0 ) |
||||
|
||||
/*!
|
||||
* Current network ID |
||||
*/ |
||||
#define LORAWAN_NETWORK_ID ( uint32_t )0 |
||||
|
||||
/*!
|
||||
* When set to 1 DevAdd is LORAWAN_DEVICE_ADDRESS |
||||
* When set to 0 DevAdd is automatically generated using |
||||
* a pseudo random generator seeded with a value derived from |
||||
* BoardUniqueId value |
||||
*/ |
||||
#define STATIC_DEVICE_ADDRESS 0 |
||||
/*!
|
||||
* Device address on the network (big endian) |
||||
* |
||||
* \remark see STATIC_DEVICE_ADDRESS comments |
||||
*/ |
||||
#define LORAWAN_DEVICE_ADDRESS ( uint32_t )0x0100000a |
||||
|
||||
/*!
|
||||
* AES encryption/decryption cipher network session key |
||||
*/ |
||||
#define LORAWAN_NWKSKEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C } |
||||
|
||||
/*!
|
||||
* AES encryption/decryption cipher application session key |
||||
*/ |
||||
#define LORAWAN_APPSKEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C } |
||||
|
||||
#endif /* OVER_THE_AIR_ACTIVATION == 0 */ |
||||
|
||||
|
||||
#ifdef __cplusplus |
||||
} |
||||
#endif |
||||
|
||||
#endif /* __LORA_COMMISSIONING_H__ */ |
@ -0,0 +1,125 @@ |
||||
/******************************************************************************
|
||||
* @file debug.h |
||||
* @author MCD Application Team |
||||
* @version V1.1.2 |
||||
* @date 08-September-2017 |
||||
* @brief Header for driver debug.c module |
||||
****************************************************************************** |
||||
* @attention |
||||
* |
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics International N.V.
|
||||
* All rights reserved.</center></h2> |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted, provided that the following conditions are met: |
||||
* |
||||
* 1. Redistribution of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer. |
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, |
||||
* this list of conditions and the following disclaimer in the documentation |
||||
* and/or other materials provided with the distribution. |
||||
* 3. Neither the name of STMicroelectronics nor the names of other
|
||||
* contributors to this software may be used to endorse or promote products
|
||||
* derived from this software without specific written permission. |
||||
* 4. This software, including modifications and/or derivative works of this
|
||||
* software, must execute solely and exclusively on microcontroller or |
||||
* microprocessor devices manufactured by or for STMicroelectronics. |
||||
* 5. Redistribution and use of this software other than as permitted under
|
||||
* this license is void and will automatically terminate your rights under
|
||||
* this license.
|
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY |
||||
* RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
|
||||
* SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
****************************************************************************** |
||||
*/ |
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/ |
||||
#ifndef __DEBUG_H__ |
||||
#define __DEBUG_H__ |
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
|
||||
/* Includes ------------------------------------------------------------------*/ |
||||
|
||||
|
||||
|
||||
#include <string.h> |
||||
#include <stdio.h> |
||||
#include "hw_conf.h" |
||||
#include "vcom.h" |
||||
|
||||
/* Exported types ------------------------------------------------------------*/ |
||||
/* Exported constants --------------------------------------------------------*/ |
||||
/* External variables --------------------------------------------------------*/ |
||||
/* Exported macros -----------------------------------------------------------*/ |
||||
/* Exported functions ------------------------------------------------------- */
|
||||
|
||||
void DBG_Init( void ); |
||||
|
||||
void Error_Handler( void ); |
||||
|
||||
#ifdef DEBUG |
||||
|
||||
#define DBG_GPIO_WRITE( gpio, n, x ) HAL_GPIO_WritePin( gpio, n, (GPIO_PinState)(x) ) |
||||
|
||||
#define DBG_GPIO_SET( gpio, n ) gpio->BSRR = n |
||||
|
||||
#define DBG_GPIO_RST( gpio, n ) gpio->BRR = n |
||||
|
||||
#define DBG_RTC_OUTPUT RTC_OUTPUT_DISABLE; /* RTC_OUTPUT_ALARMA on PC13 */ |
||||
|
||||
#define DBG( x ) do{ x } while(0) |
||||
|
||||
#ifdef TRACE |
||||
|
||||
#define DBG_PRINTF(...) vcom_Send(__VA_ARGS__) |
||||
|
||||
#define DBG_PRINTF_CRITICAL(...) vcom_Send_Lp(__VA_ARGS__) |
||||
|
||||
#else /*TRACE*/ |
||||
|
||||
#define DBG_PRINTF(...) |
||||
|
||||
#define DBG_PRINTF_CRITICAL(...) |
||||
|
||||
#endif /*TRACE*/ |
||||
|
||||
|
||||
#else /* DEBUG */ |
||||
|
||||
#define DBG_GPIO_WRITE( gpio, n, x ) |
||||
|
||||
#define DBG_GPIO_SET( gpio, n ) |
||||
|
||||
#define DBG_GPIO_RST( gpio, n ) |
||||
|
||||
#define DBG( x ) do{ } while(0) |
||||
|
||||
#define DBG_PRINTF(...) |
||||
|
||||
#define DBG_PRINTF_CRITICAL(...) |
||||
|
||||
#define DBG_RTC_OUTPUT RTC_OUTPUT_DISABLE; |
||||
|
||||
#endif /* DEBUG */ |
||||
|
||||
#ifdef __cplusplus |
||||
} |
||||
#endif |
||||
|
||||
#endif /* __DEBUG_H__*/ |
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
@ -0,0 +1,88 @@ |
||||
/*
|
||||
/ _____) _ | | |
||||
( (____ _____ ____ _| |_ _____ ____| |__ |
||||
\____ \| ___ | (_ _) ___ |/ ___) _ \
|
||||
_____) ) ____| | | || |_| ____( (___| | | | |
||||
(______/|_____)_|_|_| \__)_____)\____)_| |_| |
||||
(C)2013 Semtech |
||||
|
||||
Description: contains all hardware driver |
||||
|
||||
License: Revised BSD License, see LICENSE.TXT file include in the project |
||||
|
||||
Maintainer: Miguel Luis and Gregory Cristian |
||||
*/ |
||||
/******************************************************************************
|
||||
* @file hw.h |
||||
* @author MCD Application Team |
||||
* @version V1.1.2 |
||||
* @date 08-September-2017 |
||||
* @brief contains all hardware driver |
||||
****************************************************************************** |
||||
* @attention |
||||
* |
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics International N.V.
|
||||
* All rights reserved.</center></h2> |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted, provided that the following conditions are met: |
||||
* |
||||
* 1. Redistribution of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer. |
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, |
||||
* this list of conditions and the following disclaimer in the documentation |
||||
* and/or other materials provided with the distribution. |
||||
* 3. Neither the name of STMicroelectronics nor the names of other
|
||||
* contributors to this software may be used to endorse or promote products
|
||||
* derived from this software without specific written permission. |
||||
* 4. This software, including modifications and/or derivative works of this
|
||||
* software, must execute solely and exclusively on microcontroller or |
||||
* microprocessor devices manufactured by or for STMicroelectronics. |
||||
* 5. Redistribution and use of this software other than as permitted under
|
||||
* this license is void and will automatically terminate your rights under
|
||||
* this license.
|
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY |
||||
* RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
|
||||
* SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
****************************************************************************** |
||||
*/ |
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/ |
||||
#ifndef __HW_H__ |
||||
#define __HW_H__ |
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
/* Includes ------------------------------------------------------------------*/ |
||||
#include <math.h> |
||||
#include <stdbool.h> |
||||
#include <stdint.h> |
||||
#include "stm32l0xx.h" |
||||
#include "stm32l0xx_hal.h" |
||||
#include "stm32l0xx_hw_conf.h" |
||||
#include "hw_conf.h" |
||||
#include "hw_gpio.h" |
||||
#include "hw_spi.h" |
||||
#include "hw_rtc.h" |
||||
#include "hw_msp.h" |
||||
#include "debug.h" |
||||
|
||||
#ifdef __cplusplus |
||||
} |
||||
#endif |
||||
|
||||
#endif /* __HW_H__ */ |
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
||||
|
@ -0,0 +1,148 @@ |
||||
/*
|
||||
/ _____) _ | | |
||||
( (____ _____ ____ _| |_ _____ ____| |__ |
||||
\____ \| ___ | (_ _) ___ |/ ___) _ \
|
||||
_____) ) ____| | | || |_| ____( (___| | | | |
||||
(______/|_____)_|_|_| \__)_____)\____)_| |_| |
||||
(C)2013 Semtech |
||||
|
||||
Description: contains hardaware configuration Macros and Constants |
||||
|
||||
License: Revised BSD License, see LICENSE.TXT file include in the project |
||||
|
||||
Maintainer: Miguel Luis and Gregory Cristian |
||||
*/ |
||||
/******************************************************************************
|
||||
* @file hw_conf.h |
||||
* @author MCD Application Team |
||||
* @version V1.1.2 |
||||
* @date 08-September-2017 |
||||
* @brief contains hardware configuration Macros and Constants |
||||
****************************************************************************** |
||||
* @attention |
||||
* |
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics International N.V.
|
||||
* All rights reserved.</center></h2> |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted, provided that the following conditions are met: |
||||
* |
||||
* 1. Redistribution of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer. |
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, |
||||
* this list of conditions and the following disclaimer in the documentation |
||||
* and/or other materials provided with the distribution. |
||||
* 3. Neither the name of STMicroelectronics nor the names of other
|
||||
* contributors to this software may be used to endorse or promote products
|
||||
* derived from this software without specific written permission. |
||||
* 4. This software, including modifications and/or derivative works of this
|
||||
* software, must execute solely and exclusively on microcontroller or |
||||
* microprocessor devices manufactured by or for STMicroelectronics. |
||||
* 5. Redistribution and use of this software other than as permitted under
|
||||
* this license is void and will automatically terminate your rights under
|
||||
* this license.
|
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY |
||||
* RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
|
||||
* SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
****************************************************************************** |
||||
*/ |
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/ |
||||
#ifndef __HW_CONF_H__ |
||||
#define __HW_CONF_H__ |
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
|
||||
/* Includes ------------------------------------------------------------------*/ |
||||
|
||||
#ifdef USE_STM32F0XX_NUCLEO |
||||
#include "stm32f0xx_hal.h" |
||||
#include "stm32f0xx_nucleo.h" |
||||
#include "stm32f0xx_hal_conf.h" |
||||
#error "create stm32f0xx_hw_conf.h " |
||||
#endif |
||||
|
||||
#ifdef USE_STM32F1XX_NUCLEO |
||||
#include "stm32f1xx_hal.h" |
||||
#include "stm32f1xx_nucleo.h" |
||||
#include "stm32f1xx_hal_conf.h" |
||||
#error "create stm32f1xx_hw_conf.h " |
||||
#endif |
||||
|
||||
#ifdef USE_STM32F3XX_NUCLEO |
||||
#include "stm32f3xx_hal.h" |
||||
#include "stm32f3xx_nucleo.h" |
||||
#include "stm32f3xx_hal_conf.h" |
||||
#error "create stm32f3xx_hw_conf.h " |
||||
#endif |
||||
|
||||
#ifdef USE_STM32F4XX_NUCLEO |
||||
#include "stm32f4xx_hal.h" |
||||
#include "stm32f4xx_nucleo.h" |
||||
#include "stm32f4xx_hal_conf.h" |
||||
#error "create stm32f4xx_hw_conf.h " |
||||
#endif |
||||
|
||||
#ifdef USE_STM32L0XX_NUCLEO |
||||
#include "stm32l0xx_hal.h" |
||||
#include "stm32l0xx_nucleo.h" |
||||
#include "stm32l0xx_hal_conf.h" |
||||
#include "stm32l0xx_hw_conf.h" |
||||
#endif |
||||
|
||||
#ifdef USE_STM32L1XX_NUCLEO |
||||
#include "stm32l1xx_hal.h" |
||||
#include "stm32l1xx_nucleo.h" |
||||
#include "stm32l1xx_hal_conf.h" |
||||
#include "stm32l1xx_hw_conf.h" |
||||
#endif |
||||
|
||||
#ifdef USE_STM32L4XX_NUCLEO |
||||
#include "stm32l4xx_hal.h" |
||||
#include "stm32l4xx_nucleo.h" |
||||
#include "stm32l4xx_hal_conf.h" |
||||
#include "stm32l4xx_hw_conf.h" |
||||
#endif |
||||
|
||||
#ifdef USE_B_L072Z_LRWAN1 |
||||
#include "stm32l0xx_hal.h" |
||||
#include "b-l072z-lrwan1.h" |
||||
#include "stm32l0xx_hal_conf.h" |
||||
#include "mlm32l0xx_hw_conf.h" |
||||
#endif |
||||
|
||||
/* --------Preprocessor compile swicth------------ */ |
||||
/* debug swicthes in debug.h */ |
||||
//#define DEBUG
|
||||
//#define TRACE
|
||||
|
||||
/* uncomment below line to never enter lowpower modes in main.c*/ |
||||
//#define LOW_POWER_DISABLE
|
||||
|
||||
/* debug swicthes in bsp.c */ |
||||
//#define SENSOR_ENABLED
|
||||
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/ |
||||
/* Exported constants --------------------------------------------------------*/ |
||||
|
||||
#ifdef __cplusplus |
||||
} |
||||
#endif |
||||
|
||||
#endif /* __HW_CONF_H__ */ |
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
@ -0,0 +1,154 @@ |
||||
/*
|
||||
/ _____) _ | | |
||||
( (____ _____ ____ _| |_ _____ ____| |__ |
||||
\____ \| ___ | (_ _) ___ |/ ___) _ \
|
||||
_____) ) ____| | | || |_| ____( (___| | | | |
||||
(______/|_____)_|_|_| \__)_____)\____)_| |_| |
||||
(C)2013 Semtech |
||||
|
||||
Description: Bleeper board GPIO driver implementation |
||||
|
||||
License: Revised BSD License, see LICENSE.TXT file include in the project |
||||
|
||||
Maintainer: Miguel Luis and Gregory Cristian |
||||
*/ |
||||
/******************************************************************************
|
||||
* @file hw_gpio.h |
||||
* @author MCD Application Team |
||||
* @version V1.1.2 |
||||
* @date 08-September-2017 |
||||
* @brief Header for driver hw_rtc.c module |
||||
****************************************************************************** |
||||
* @attention |
||||
* |
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics International N.V.
|
||||
* All rights reserved.</center></h2> |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted, provided that the following conditions are met: |
||||
* |
||||
* 1. Redistribution of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer. |
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, |
||||
* this list of conditions and the following disclaimer in the documentation |
||||
* and/or other materials provided with the distribution. |
||||
* 3. Neither the name of STMicroelectronics nor the names of other
|
||||
* contributors to this software may be used to endorse or promote products
|
||||
* derived from this software without specific written permission. |
||||
* 4. This software, including modifications and/or derivative works of this
|
||||
* software, must execute solely and exclusively on microcontroller or |
||||
* microprocessor devices manufactured by or for STMicroelectronics. |
||||
* 5. Redistribution and use of this software other than as permitted under
|
||||
* this license is void and will automatically terminate your rights under
|
||||
* this license.
|
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY |
||||
* RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
|
||||
* SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
****************************************************************************** |
||||
*/ |
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/ |
||||
#ifndef __HW_GPIO_H__ |
||||
#define __HW_GPIO_H__ |
||||
|
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/ |
||||
|
||||
typedef void( GpioIrqHandler )( void ); |
||||
|
||||
/* Exported constants --------------------------------------------------------*/ |
||||
/* External variables --------------------------------------------------------*/ |
||||
/* Exported macros -----------------------------------------------------------*/ |
||||
/* Exported functions ------------------------------------------------------- */
|
||||
|
||||
|
||||
/*!
|
||||
* GPIO IRQ handler function prototype |
||||
*/ |
||||
|
||||
|
||||
IRQn_Type MSP_GetIRQn( uint16_t gpioPin); |
||||
|
||||
|
||||
/*!
|
||||
* @brief Initializes the given GPIO object |
||||
* |
||||
* @param GPIOx: where x can be (A..E and H) |
||||
* @param GPIO_Pin: specifies the port bit to be written. |
||||
* This parameter can be one of GPIO_PIN_x where x can be (0..15). |
||||
* All port bits are not necessarily available on all GPIOs. |
||||
* @param [IN] initStruct GPIO_InitTypeDef intit structure |
||||
* @retval none |
||||
*/ |
||||
void HW_GPIO_Init( GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_InitTypeDef* initStruct); |
||||
|
||||
/*!
|
||||
* @brief Records the interrupt handler for the GPIO object |
||||
* |
||||
* @param GPIOx: where x can be (A..E and H)
|
||||
* @param GPIO_Pin: specifies the port bit to be written. |
||||
* This parameter can be one of GPIO_PIN_x where x can be (0..15). |
||||
* All port bits are not necessarily available on all GPIOs. |
||||
* @param [IN] prio NVIC priority (0 is highest) |
||||
* @param [IN] irqHandler points to the function to execute |
||||
* @retval none |
||||
*/ |
||||
void HW_GPIO_SetIrq( GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, uint32_t prio, GpioIrqHandler *irqHandler ); |
||||
|
||||
/*!
|
||||
* @brief Execute the interrupt from the object |
||||
* |
||||
* @param GPIOx: where x can be (A..E and H)
|
||||
* @param GPIO_Pin: specifies the port bit to be written. |
||||
* This parameter can be one of GPIO_PIN_x where x can be (0..15). |
||||
* All port bits are not necessarily available on all GPIOs. |
||||
* @retval none |
||||
*/ |
||||
void HW_GPIO_IrqHandler( uint16_t GPIO_Pin ); |
||||
|
||||
/*!
|
||||
* @brief Writes the given value to the GPIO output |
||||
* |
||||
* @param GPIO_Pin: specifies the port bit to be written. |
||||
* This parameter can be one of GPIO_PIN_x where x can be (0..15). |
||||
* All port bits are not necessarily available on all GPIOs. |
||||
* @param [IN] value New GPIO output value |
||||
* @retval none |
||||
*/ |
||||
void HW_GPIO_Write( GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, uint32_t value ); |
||||
|
||||
/*!
|
||||
* @brief Reads the current GPIO input value |
||||
* |
||||
* @param GPIOx: where x can be (A..E and H)
|
||||
* @param GPIO_Pin: specifies the port bit to be written. |
||||
* This parameter can be one of GPIO_PIN_x where x can be (0..15). |
||||
* All port bits are not necessarily available on all GPIOs. |
||||
* @retval value Current GPIO input value |
||||
*/ |
||||
uint32_t HW_GPIO_Read( GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin ); |
||||
|
||||
#ifdef __cplusplus |
||||
} |
||||
#endif |
||||
|
||||
#endif /* __HW_GPIO_H__ */ |
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
||||
|
@ -0,0 +1,221 @@ |
||||
|
||||
/*
|
||||
/ _____) _ | | |
||||
( (____ _____ ____ _| |_ _____ ____| |__ |
||||
\____ \| ___ | (_ _) ___ |/ ___) _ \
|
||||
_____) ) ____| | | || |_| ____( (___| | | | |
||||
(______/|_____)_|_|_| \__)_____)\____)_| |_| |
||||
(C)2013 Semtech |
||||
|
||||
Description: Header for driver hw msp module |
||||
|
||||
License: Revised BSD License, see LICENSE.TXT file include in the project |
||||
|
||||
Maintainer: Miguel Luis and Gregory Cristian |
||||
*/ |
||||
/******************************************************************************
|
||||
* @file hw_msp.h |
||||
* @author MCD Application Team |
||||
* @version V1.1.2 |
||||
* @date 08-September-2017 |
||||
* @brief Header for driver hw msp module |
||||
****************************************************************************** |
||||
* @attention |
||||
* |
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics International N.V.
|
||||
* All rights reserved.</center></h2> |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted, provided that the following conditions are met: |
||||
* |
||||
* 1. Redistribution of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer. |
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, |
||||
* this list of conditions and the following disclaimer in the documentation |
||||
* and/or other materials provided with the distribution. |
||||
* 3. Neither the name of STMicroelectronics nor the names of other
|
||||
* contributors to this software may be used to endorse or promote products
|
||||
* derived from this software without specific written permission. |
||||
* 4. This software, including modifications and/or derivative works of this
|
||||
* software, must execute solely and exclusively on microcontroller or |
||||
* microprocessor devices manufactured by or for STMicroelectronics. |
||||
* 5. Redistribution and use of this software other than as permitted under
|
||||
* this license is void and will automatically terminate your rights under
|
||||
* this license.
|
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY |
||||
* RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
|
||||
* SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
****************************************************************************** |
||||
*/ |
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/ |
||||
|
||||
#ifndef __HW_MSP_H__ |
||||
#define __HW_MSP_H__ |
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
|
||||
/* Includes ------------------------------------------------------------------*/ |
||||
/* Exported types ------------------------------------------------------------*/ |
||||
/* Exported constants --------------------------------------------------------*/ |
||||
|
||||
#define VDDA_VREFINT_CAL ((uint32_t) 3000) |
||||
#define BAT_CR2032 ((uint32_t) 3000) |
||||
#define VDD_BAT BAT_CR2032 |
||||
#define VDD_MIN 1800 |
||||
|
||||
/* External variables --------------------------------------------------------*/ |
||||
/* Exported macros -----------------------------------------------------------*/ |
||||
|
||||
/*!
|
||||
* \brief GPIOs Macro |
||||
*/ |
||||
|
||||