Created ADC branch

This commit is contained in:
philsson 2016-09-12 16:50:44 +02:00
parent 7b2ead9c30
commit 40e7c07f20
6 changed files with 918 additions and 897 deletions

View File

@ -6,7 +6,7 @@
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="1489874316490887047" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="1758116234699011172" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
@ -18,7 +18,7 @@
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="1489874316490887047" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="1758116234699011172" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>

View File

@ -1,2 +1,6 @@
/makefile
/objects.list
/objects.mk
/sources.mk
/src/
/startup/

View File

@ -30,13 +30,13 @@ endif
all: UAV-ControlSystem.elf
dependents:
-cd C:/git/UAV-Control-System/revolution_hal_lib/Debug && $(MAKE) all
-cd C:/Users/Philip/Documents/GitHub/UAV-Control-System/revolution_hal_lib/Debug && $(MAKE) all
# Tool invocations
UAV-ControlSystem.elf: $(OBJS) $(USER_OBJS) C:/git/UAV-Control-System/revolution_hal_lib/Debug/librevolution_hal_lib.a
UAV-ControlSystem.elf: $(OBJS) $(USER_OBJS) C:/Users/Philip/Documents/GitHub/UAV-Control-System/revolution_hal_lib/Debug/librevolution_hal_lib.a
@echo 'Building target: $@'
@echo 'Invoking: MCU GCC Linker'
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -L"C:\git\UAV-Control-System\revolution_hal_lib\Debug" -T"C:\git\UAV-Control-System\UAV-ControlSystem\LinkerScript.ld" -Wl,-Map=output.map -Wl,--gc-sections -lm -o "UAV-ControlSystem.elf" @"objects.list" $(USER_OBJS) $(LIBS)
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -L"C:\Users\Philip\Documents\GitHub\UAV-Control-System\revolution_hal_lib\Debug" -T"C:\Users\Philip\Documents\GitHub\UAV-Control-System\UAV-ControlSystem\LinkerScript.ld" -Wl,-Map=output.map -Wl,--gc-sections -lm -o "UAV-ControlSystem.elf" @"objects.list" $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '
$(MAKE) --no-print-directory post-build
@ -54,6 +54,6 @@ post-build:
.PHONY: all clean dependents
.SECONDARY: post-build
C:/git/UAV-Control-System/revolution_hal_lib/Debug/librevolution_hal_lib.a:
C:/Users/Philip/Documents/GitHub/UAV-Control-System/revolution_hal_lib/Debug/librevolution_hal_lib.a:
-include ../makefile.targets

File diff suppressed because it is too large Load Diff

View File

@ -117,6 +117,23 @@ static void SystemClock_Config(void)
}
}
void ConfigureADC()
{
GPIO_InitTypeDef gpioInit;
__GPIOC_CLK_ENABLE();
__ADC1_CLK_ENABLE();
gpioInit.Pin = GPIO_PIN_1;
gpioInit.Mode = GPIO_MODE_ANALOG;
gpioInit.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOC,&gpioInit);
HAL_NVIC_SetPriority(ADC_IRQn,0,0);
HAL_NVIC_EnableIRQ(ADC_IRQn);
}
/**
* @brief This function is executed in case of error occurrence.