rename predefine SOAL_LEVEL_SENSOR instead of SOAP_LEVEL
This commit is contained in:
parent
00db8a3d78
commit
b93715277e
Core
LoRaWAN/App
STM32CubeIDE
|
@ -224,8 +224,8 @@
|
|||
|
||||
|
||||
#define MajorVer 24U
|
||||
#define MinorVer 03U
|
||||
#define SubMinorVer 8U
|
||||
#define MinorVer 04U
|
||||
#define SubMinorVer 18U
|
||||
#define FirmwareVersion 3U
|
||||
#define YUNHORN_STS_MAX_NVM_CFG_SIZE 64U
|
||||
#define YUNHORN_STS_AC_CODE_SIZE 20U
|
||||
|
|
|
@ -571,7 +571,7 @@ void STS_SENSOR_NVM_CFG(void);
|
|||
|
||||
|
||||
|
||||
#if defined(SOAP_LEVEL)
|
||||
#if defined(SOAP_LEVEL_SENSOR)
|
||||
void YUNHORN_STS_R4_SENSOR_Read(STS_R0_SensorDataTypeDef *r4_data);
|
||||
void YUNHORN_STS_R4_SENSOR_Init(void);
|
||||
#endif
|
||||
|
|
|
@ -150,11 +150,16 @@ void MX_GPIO_Init(void)
|
|||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
HAL_GPIO_Init(LED1_GPIO_Port, &GPIO_InitStruct);
|
||||
|
||||
GPIO_InitStruct.Pin = MEMS_POWER_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
HAL_GPIO_Init(MEMS_POWER_GPIO_Port, &GPIO_InitStruct);
|
||||
|
||||
|
||||
/* ============== SOAP LEVEL DETECTION ========================= */
|
||||
|
||||
#if defined(SOAP_LEVEL)
|
||||
#if defined(SOAP_LEVEL_SENSOR)
|
||||
|
||||
HAL_GPIO_WritePin(SOAP_SWITCH_GPIO_Port, SOAP_SWITCH_Pin, GPIO_PIN_RESET);
|
||||
|
||||
|
|
|
@ -353,7 +353,7 @@ void STS_YunhornSTSEventP6_Process(void)
|
|||
LED_OFF;
|
||||
#endif
|
||||
/* 1. Sensor Power On */
|
||||
#if defined(SOAP_LEVEL)
|
||||
#if defined(SOAP_LEVEL_SENSOR)
|
||||
HAL_GPIO_WritePin(SOAP_SWITCH_GPIO_Port, SOAP_SWITCH_Pin, GPIO_PIN_SET);
|
||||
|
||||
HAL_Delay(1000);
|
||||
|
@ -574,7 +574,7 @@ void STS_SENSOR_MEMS_Reset(uint8_t cnt)
|
|||
|
||||
void YUNHORN_STS_R4_SENSOR_Read(STS_R0_SensorDataTypeDef *r4_data)
|
||||
{
|
||||
#ifdef SOAP_LEVEL
|
||||
#ifdef SOAP_LEVEL_SENSOR
|
||||
r4_data->on_off_event = (sts_soap_level_state==0x0)? 1:0;
|
||||
r4_data->measure_tech = 0x0; // capacity measure
|
||||
#endif
|
||||
|
@ -592,7 +592,7 @@ void YUNHORN_STS_R4_SENSOR_Init(void)
|
|||
#if defined(YUNHORN_STS_R4_ENABLED)
|
||||
void STS_R0_SENSOR_Read(STS_R0_SensorDataTypeDef *r0_data)
|
||||
{
|
||||
#ifdef SOAP_LEVEL
|
||||
#ifdef SOAP_LEVEL_SENSOR
|
||||
r0_data->on_off_event = sts_soap_level_state;
|
||||
r0_data->measure_tech = 0; /* 0: capacit, 1:dTof, 2: ultrasonic */
|
||||
#elif defined(TOF_1)||defined(TOF_2)||defined(TOF_3)
|
||||
|
|
|
@ -587,7 +587,7 @@ void LoRaWAN_Init(void)
|
|||
UTIL_SEQ_RegTask((1 << CFG_SEQ_Task_YunhornSTSEventP4), UTIL_SEQ_RFU, STS_YunhornSTSEventP4_Process);
|
||||
#endif
|
||||
// UTIL_SEQ_RegTask((1 << CFG_SEQ_Task_YunhornSTSEventP5), UTIL_SEQ_RFU, STS_YunhornSTSEventP5_Process);
|
||||
#ifdef SOAP_LEVEL
|
||||
#ifdef SOAP_LEVEL_SENSOR
|
||||
UTIL_SEQ_RegTask((1 << CFG_SEQ_Task_YunhornSTSEventP6), UTIL_SEQ_RFU, STS_YunhornSTSEventP6_Process);
|
||||
#endif
|
||||
// UTIL_SEQ_RegTask((1 << CFG_SEQ_Task_YunhornSTSEventP7), UTIL_SEQ_RFU, STS_YunhornSTSEventP7_Process);
|
||||
|
@ -639,7 +639,7 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
|
|||
switch (GPIO_Pin)
|
||||
{
|
||||
case BUT1_Pin:
|
||||
#ifdef SOAP_LEVEL
|
||||
#ifdef SOAP_LEVEL_SENSOR
|
||||
UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_YunhornSTSEventP6), CFG_SEQ_Prio_0);
|
||||
UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent), CFG_SEQ_Prio_0);
|
||||
#endif
|
||||
|
@ -788,7 +788,7 @@ static void SendTxData(void)
|
|||
//uint16_t batteryLevelmV = SYS_GetBatteryLevel();
|
||||
//sensor_t sensor_data;
|
||||
|
||||
#if defined(SOAP_LEVEL)
|
||||
#if defined(SOAP_LEVEL_SENSOR)
|
||||
STS_R0_SensorDataTypeDef r4_data;
|
||||
#endif
|
||||
|
||||
|
@ -805,7 +805,7 @@ static void SendTxData(void)
|
|||
STS_O5_SENSOR_Read(&oo_data);
|
||||
#endif
|
||||
|
||||
#if defined(SOAP_LEVEL)
|
||||
#if defined(SOAP_LEVEL_SENSOR)
|
||||
//STS_YunhornSTSEventP6_Process();
|
||||
UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_YunhornSTSEventP6), CFG_SEQ_Prio_0);
|
||||
|
||||
|
@ -844,7 +844,7 @@ static void SendTxData(void)
|
|||
#if defined(STS_O5)
|
||||
AppData.Buffer[i++] = (uint8_t)(oo_data.state_sensor1_on_off)&0xff;
|
||||
|
||||
#elif defined(SOAP_LEVEL)
|
||||
#elif defined(SOAP_LEVEL_SENSOR)
|
||||
AppData.Buffer[i++] = (uint8_t)(0x02); //length of the following value
|
||||
AppData.Buffer[i++] = (uint8_t)(r4_data.measure_tech)&0xff; //#11
|
||||
AppData.Buffer[i++] = (uint8_t)(r4_data.on_off_event)&0xff; //#11
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.1022522097" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.value.og" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.2089215826" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="CORE_CM4"/>
|
||||
<listOptionValue builtIn="false" value="SOAP_LEVEL_SENSOR"/>
|
||||
<listOptionValue builtIn="false" value="YUNHORN_STS_RANDOM"/>
|
||||
<listOptionValue builtIn="false" value="STM32WLE5xx"/>
|
||||
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
|
||||
|
@ -84,6 +85,9 @@
|
|||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.directories.738986838" name="Library search path (-L)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.directories" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="../../../../../../../Middlewares/ST/STM32_Cryptographic/lib"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.otherflags.1325833990" name="Other flags" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.otherflags" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="-z noexecstack"/>
|
||||
</option>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.796162615" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
|
@ -184,6 +188,9 @@
|
|||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.directories.422845458" name="Library search path (-L)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.directories" useByScannerDiscovery="false" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="../../../../../../../Middlewares/ST/STM32_Cryptographic/lib"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.otherflags.168568674" name="Other flags" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.otherflags" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="-z noexecstack"/>
|
||||
</option>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.715223353" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="188690963369024153" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-877539789554811708" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
@ -16,7 +16,7 @@
|
|||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="188690963369024153" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-877539789554811708" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
|
|
@ -77,7 +77,7 @@ main-build: STS_RR_R125.elf secondary-outputs
|
|||
|
||||
# Tool invocations
|
||||
STS_RR_R125.elf STS_RR_R125.map: $(OBJS) $(USER_OBJS) D:\ONEDRIVE\STM32WLV13\Projects\NUCLEO-WL55JC\Applications\LoRaWAN\STS_RR_R125\STM32CubeIDE\STM32WLE5CCUX_FLASH.ld makefile objects.list $(OPTIONAL_TOOL_DEPS)
|
||||
arm-none-eabi-gcc -o "STS_RR_R125.elf" @"objects.list" $(USER_OBJS) $(LIBS) -mcpu=cortex-m4 -T"D:\ONEDRIVE\STM32WLV13\Projects\NUCLEO-WL55JC\Applications\LoRaWAN\STS_RR_R125\STM32CubeIDE\STM32WLE5CCUX_FLASH.ld" --specs=nosys.specs -Wl,-Map="STS_RR_R125.map" -Wl,--gc-sections -static -L../../../../../../../Middlewares/ST/STM32_Cryptographic/lib --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
|
||||
arm-none-eabi-gcc -o "STS_RR_R125.elf" @"objects.list" $(USER_OBJS) $(LIBS) -mcpu=cortex-m4 -T"D:\ONEDRIVE\STM32WLV13\Projects\NUCLEO-WL55JC\Applications\LoRaWAN\STS_RR_R125\STM32CubeIDE\STM32WLE5CCUX_FLASH.ld" --specs=nosys.specs -Wl,-Map="STS_RR_R125.map" -Wl,--gc-sections -static -L../../../../../../../Middlewares/ST/STM32_Cryptographic/lib -z noexecstack --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
|
||||
@echo 'Finished building target: $@'
|
||||
@echo ' '
|
||||
|
||||
|
|
Loading…
Reference in New Issue