Compare commits
3 Commits
764e5a9d91
...
0f836996ca
Author | SHA1 | Date |
---|---|---|
|
0f836996ca | |
|
cf3a92f937 | |
|
e2a0f3c384 |
|
@ -25,7 +25,7 @@
|
||||||
#include "usart_if.h"
|
#include "usart_if.h"
|
||||||
|
|
||||||
/* USER CODE BEGIN Includes */
|
/* USER CODE BEGIN Includes */
|
||||||
|
#include "gpio.h"
|
||||||
/* USER CODE END Includes */
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
/* External variables ---------------------------------------------------------*/
|
/* External variables ---------------------------------------------------------*/
|
||||||
|
@ -97,7 +97,6 @@ void PWR_EnterStopMode(void)
|
||||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_All, GPIO_PIN_RESET);
|
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_All, GPIO_PIN_RESET);
|
||||||
//HAL_GPIO_WritePin(GPIOC, GPIO_PIN_All, GPIO_PIN_RESET);
|
//HAL_GPIO_WritePin(GPIOC, GPIO_PIN_All, GPIO_PIN_RESET);
|
||||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_All, GPIO_PIN_RESET);
|
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_All, GPIO_PIN_RESET);
|
||||||
HAL_GPIO_DeInit(GPIOA,GPIO_PIN_0);
|
|
||||||
HAL_SuspendTick();
|
HAL_SuspendTick();
|
||||||
/* Clear Status Flag before entering STOP/STANDBY Mode */
|
/* Clear Status Flag before entering STOP/STANDBY Mode */
|
||||||
LL_PWR_ClearFlag_C1STOP_C1STB();
|
LL_PWR_ClearFlag_C1STOP_C1STB();
|
||||||
|
|
|
@ -446,9 +446,19 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
|
||||||
{
|
{
|
||||||
case BUT1_Pin:
|
case BUT1_Pin:
|
||||||
/* Note: when "EventType == TX_ON_TIMER" this GPIO is not initialized */
|
/* Note: when "EventType == TX_ON_TIMER" this GPIO is not initialized */
|
||||||
//if (EventType == TX_ON_EVENT)
|
|
||||||
|
HAL_Delay(10); //eliminate bouncing back 5ms
|
||||||
|
door_status = HAL_GPIO_ReadPin(GPIOA,GPIO_PIN_0);
|
||||||
|
|
||||||
|
if (door_status != door_previous_status)
|
||||||
{
|
{
|
||||||
door_changed_flag = 1;
|
door_changed_flag = 1;
|
||||||
|
door_previous_status = door_status;
|
||||||
|
}
|
||||||
|
|
||||||
|
//if (EventType == TX_ON_EVENT)
|
||||||
|
{
|
||||||
|
// door_changed_flag =1;
|
||||||
UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent), CFG_SEQ_Prio_0);
|
UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent), CFG_SEQ_Prio_0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -558,12 +568,7 @@ static void SendTxData(void)
|
||||||
sensor_t sensor_data;
|
sensor_t sensor_data;
|
||||||
UTIL_TIMER_Time_t nextTxIn = 0;
|
UTIL_TIMER_Time_t nextTxIn = 0;
|
||||||
|
|
||||||
door_status = HAL_GPIO_ReadPin(GPIOA,GPIO_PIN_0);
|
|
||||||
door_changed_flag = 0;
|
|
||||||
if (door_status != door_previous_status)
|
|
||||||
{
|
|
||||||
door_previous_status = door_status;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (door_changed_flag ==1 )
|
if (door_changed_flag ==1 )
|
||||||
|
@ -702,9 +707,10 @@ static void OnTxTimerEvent(void *context)
|
||||||
#endif
|
#endif
|
||||||
MX_GPIO_Init();
|
MX_GPIO_Init();
|
||||||
door_status = HAL_GPIO_ReadPin(GPIOA,GPIO_PIN_0);
|
door_status = HAL_GPIO_ReadPin(GPIOA,GPIO_PIN_0);
|
||||||
//door_changed_flag = 0;
|
|
||||||
//if (door_status != door_previous_status)
|
if (door_status != door_previous_status)
|
||||||
{
|
{
|
||||||
|
door_changed_flag = 1;
|
||||||
door_previous_status = door_status;
|
door_previous_status = door_status;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -151,6 +151,7 @@
|
||||||
<listOptionValue builtIn="false" value="../../../../../../../Drivers/CMSIS/Include"/>
|
<listOptionValue builtIn="false" value="../../../../../../../Drivers/CMSIS/Include"/>
|
||||||
<listOptionValue builtIn="false" value="../../../../../../../Drivers/BSP/STM32WLxx_Nucleo"/>
|
<listOptionValue builtIn="false" value="../../../../../../../Drivers/BSP/STM32WLxx_Nucleo"/>
|
||||||
</option>
|
</option>
|
||||||
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.otherflags.2006508446" name="Other flags" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.otherflags" useByScannerDiscovery="true" valueType="stringList"/>
|
||||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1477344818" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c"/>
|
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1477344818" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c"/>
|
||||||
</tool>
|
</tool>
|
||||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.1464259023" name="MCU G++ Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler">
|
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.1464259023" name="MCU G++ Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler">
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
</natures>
|
</natures>
|
||||||
<linkedResources>
|
<linkedResources>
|
||||||
<link>
|
<link>
|
||||||
<name>LoRaWAN_End_Node.ioc</name>
|
<name>WL55JC_AS923.ioc</name>
|
||||||
<type>1</type>
|
<type>1</type>
|
||||||
<locationURI>copy_PARENT/LoRaWAN_End_Node.ioc</locationURI>
|
<locationURI>copy_PARENT/LoRaWAN_End_Node.ioc</locationURI>
|
||||||
</link>
|
</link>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
2F62501ED4689FB349E356AB974DBE57=95112E708683D54F6AC1ADC68D917C29
|
2F62501ED4689FB349E356AB974DBE57=E4D60684DA61280BD06389F4CFDF2587
|
||||||
8DF89ED150041C4CBC7CB9A9CAA90856=95112E708683D54F6AC1ADC68D917C29
|
8DF89ED150041C4CBC7CB9A9CAA90856=E4D60684DA61280BD06389F4CFDF2587
|
||||||
DC22A860405A8BF2F2C095E5B6529F12=708FD40520C1EE5CFD2122309291F653
|
DC22A860405A8BF2F2C095E5B6529F12=74CD6EB106FB50B767E4FE71225C7638
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
|
|
|
@ -91,13 +91,13 @@ SECTIONS
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
.ARM.extab : {
|
.ARM.extab(READONLY) : {
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
.ARM : {
|
.ARM(READONLY) : {
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
__exidx_start = .;
|
__exidx_start = .;
|
||||||
*(.ARM.exidx*)
|
*(.ARM.exidx*)
|
||||||
|
@ -105,7 +105,7 @@ SECTIONS
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
.preinit_array :
|
.preinit_array(READONLY) :
|
||||||
{
|
{
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||||
|
@ -114,7 +114,7 @@ SECTIONS
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
.init_array :
|
.init_array(READONLY) :
|
||||||
{
|
{
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
PROVIDE_HIDDEN (__init_array_start = .);
|
PROVIDE_HIDDEN (__init_array_start = .);
|
||||||
|
@ -124,7 +124,7 @@ SECTIONS
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
.fini_array :
|
.fini_array(READONLY) :
|
||||||
{
|
{
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||||
|
|
Loading…
Reference in New Issue