Compare commits
2 commits
4efafac696
...
26e44a6d5b
Author | SHA1 | Date | |
---|---|---|---|
26e44a6d5b | |||
73141578cd |
20 changed files with 473 additions and 81 deletions
29
.gitignore
vendored
Normal file
29
.gitignore
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
*.obj
|
||||
*.o
|
||||
*.bin
|
||||
*.list
|
||||
*.map
|
||||
*.mk
|
||||
*.makefile
|
||||
*.o
|
||||
*.su
|
||||
*.d
|
||||
*.elf
|
||||
*.scvd
|
||||
*.crf
|
||||
*.map
|
||||
*.sct
|
||||
*.dbgconf
|
||||
*.axf
|
||||
*.htm
|
||||
*.lnp
|
||||
*.dep
|
||||
*.uvguix.*
|
||||
*.lst
|
||||
*.iex
|
||||
**/Objects/
|
||||
**/Listings/
|
||||
**/Debug/
|
||||
|
||||
|
||||
|
67
driver/Driver_ADC.c
Normal file
67
driver/Driver_ADC.c
Normal file
|
@ -0,0 +1,67 @@
|
|||
#include "stm32f10x.h"
|
||||
#include "stdio.h"
|
||||
#include "Driver_ADC.h"
|
||||
void erreur (void)
|
||||
{
|
||||
while(1);
|
||||
}
|
||||
|
||||
void (*ADC1_2_fx) (void) = &erreur;
|
||||
|
||||
|
||||
/**
|
||||
*************************************************************************************************
|
||||
* @brief Activation et configuration de l'ADC1.
|
||||
* @param -> Priorité de l'intérruption.
|
||||
* @Note -> Fonction à lancer systématiquement avant d’aller plus en détail dans les conf plus fines (PWM, codeur inc...)
|
||||
*************************************************************************************************
|
||||
*/
|
||||
void driver_adc_1_init (char Prio, void (*IT_function)(void))
|
||||
{
|
||||
//On règle la fréquence à 12Mhz
|
||||
RCC->CFGR |= RCC_CFGR_ADCPRE_DIV6;
|
||||
//Validation de l'horloge ACD1
|
||||
RCC->APB2ENR |= RCC_APB2ENR_ADC1EN;
|
||||
//Activation de l'external trig
|
||||
ADC1->CR2 |= ADC_CR2_EXTTRIG;
|
||||
//Activation SWSTART
|
||||
ADC1->CR2 |= ADC_CR2_EXTSEL;
|
||||
//Validation de l'horloge ACD1
|
||||
RCC->APB2ENR |= RCC_APB2ENR_ADC1EN;
|
||||
//Activation de l'ADC1
|
||||
ADC1->CR2 |= ADC_CR2_ADON;
|
||||
//Fixe le nb de conversion, ici 1
|
||||
ADC1->SQR1 &= ADC_SQR1_L;
|
||||
//Numéro de voie à convertir
|
||||
ADC1->SQR3 |= 1;
|
||||
//Lancement de la calibration
|
||||
ADC1->CR2 |= ADC_CR2_CAL;
|
||||
//Attente de la fin de la calibration
|
||||
while((ADC1->CR2 & ADC_CR2_CAL));
|
||||
//Activation de l'intéruption sur le flag EOC
|
||||
ADC1->CR1 |= ADC_CR1_EOCIE;
|
||||
//Activation de l'intéruption et configuration du niveau de priorité
|
||||
NVIC_EnableIRQ(ADC1_2_IRQn);
|
||||
NVIC_SetPriority(ADC1_2_IRQn, Prio);
|
||||
//Fonction à appeler à l'intéruption
|
||||
ADC1_2_fx = IT_function;
|
||||
}
|
||||
|
||||
void driver_adc_1_launch_read (void)
|
||||
{
|
||||
//Lancement de la conversion
|
||||
ADC1->CR2 |= ADC_CR2_SWSTART;
|
||||
}
|
||||
|
||||
uint16_t driver_adc_1_read (void)
|
||||
{
|
||||
//Retour de la conversion
|
||||
return ADC1->DR &~ ((0x0F) << 12);
|
||||
}
|
||||
void ADC1_2_IRQHandler(void)
|
||||
{
|
||||
//On abaisse le flag pour la prochaine lecture
|
||||
ADC1->SR &= ~ADC_SR_EOC;
|
||||
//On lance la fonction de l'utilisateur
|
||||
(*ADC1_2_fx)();
|
||||
}
|
9
driver/Driver_ADC.h
Normal file
9
driver/Driver_ADC.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#ifndef DRIVER_ADC_H
|
||||
#define DRIVER_ADC_H
|
||||
#include "stm32f10x.h"
|
||||
|
||||
void driver_adc_1_init (char Prio, void (*IT_function)(void));
|
||||
void driver_adc_1_launch_read (void);
|
||||
uint16_t driver_adc_1_read (void);
|
||||
|
||||
#endif
|
40
projet-voilier/Driver_ADC.c
Normal file
40
projet-voilier/Driver_ADC.c
Normal file
|
@ -0,0 +1,40 @@
|
|||
#include "Driver_ADC.h"
|
||||
#include "stm32f10x.h"
|
||||
#include "stdio.h"
|
||||
|
||||
void init_adc1 (void)
|
||||
{
|
||||
//Activation de l'external trig
|
||||
ADC1->CR2 |= ADC_CR2_EXTTRIG;
|
||||
//Activation SWSTART
|
||||
ADC1->CR2 |= ADC_CR2_EXTSEL;
|
||||
//On règle la fréquence à 12Mhz
|
||||
RCC->CFGR |= RCC_CFGR_ADCPRE_DIV6;
|
||||
//Activation de l'ADC
|
||||
ADC1->CR2 |= ADC_CR2_ADON;
|
||||
//Fixe le nb de conversion, ici 1
|
||||
ADC1->SQR1 &= ADC_SQR1_L;
|
||||
//Numéro de voie à convertir
|
||||
ADC1->SQR3 |= 1;
|
||||
//Lancement de la calibration
|
||||
ADC1->CR2 |= ADC_CR2_CAL;
|
||||
//Attente de la fin de la calibration
|
||||
while((ADC1->CR2 & ADC_CR2_CAL));
|
||||
//Activation de l'intéruption sur le flag EOC
|
||||
ADC1->CR1 |= ADC_CR1_EOCIE;
|
||||
}
|
||||
|
||||
void launch_read_adc1 (void)
|
||||
{
|
||||
//Lancement de la conversion
|
||||
ADC1->CR2 |= ADC_CR2_SWSTART;
|
||||
}
|
||||
|
||||
int read_adc1 (void)
|
||||
{
|
||||
|
||||
//On abaisse le flag pour la prochaine lecture
|
||||
ADC1->SR &= ~ADC_SR_EOC;
|
||||
//Retour de la conversion
|
||||
return ADC1->DR &~ ((0x0F) << 12);
|
||||
}
|
|
@ -63,6 +63,12 @@ Removing Unused input sections from the image.
|
|||
Removing driver_timer.o(i.MyTimer_Stop), (10 bytes).
|
||||
Removing driver_timer.o(i.__NVIC_EnableIRQ), (34 bytes).
|
||||
Removing driver_timer.o(i.__NVIC_SetPriority), (40 bytes).
|
||||
Removing driver_adc.o(.rev16_text), (4 bytes).
|
||||
Removing driver_adc.o(.revsh_text), (4 bytes).
|
||||
Removing driver_adc.o(.rrx_text), (6 bytes).
|
||||
Removing driver_adc.o(i.init_adc1), (132 bytes).
|
||||
Removing driver_adc.o(i.launch_read_adc1), (20 bytes).
|
||||
Removing driver_adc.o(i.read_adc1), (28 bytes).
|
||||
Removing startup_stm32f10x_md.o(HEAP), (512 bytes).
|
||||
Removing system_stm32f10x.o(.rev16_text), (4 bytes).
|
||||
Removing system_stm32f10x.o(.revsh_text), (4 bytes).
|
||||
|
@ -70,7 +76,7 @@ Removing Unused input sections from the image.
|
|||
Removing system_stm32f10x.o(i.SystemCoreClockUpdate), (164 bytes).
|
||||
Removing system_stm32f10x.o(.data), (20 bytes).
|
||||
|
||||
24 unused section(s) (total 1112 bytes) removed from the image.
|
||||
30 unused section(s) (total 1306 bytes) removed from the image.
|
||||
|
||||
==============================================================================
|
||||
|
||||
|
@ -80,23 +86,25 @@ Image Symbol Table
|
|||
|
||||
Symbol Name Value Ov Type Size Object(Section)
|
||||
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry10a.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry9b.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry9a.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry8b.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry12b.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry8a.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry7b.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry7a.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry5.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry2.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry12a.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry11b.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry11a.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry12b.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry5.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry7a.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry8a.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry8b.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry9a.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry7b.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry9b.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry2.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry10a.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry10b.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry11a.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry.o ABSOLUTE
|
||||
../clib/microlib/init/entry.s 0x00000000 Number 0 entry11b.o ABSOLUTE
|
||||
..\\driver\\Driver_ADC.c 0x00000000 Number 0 driver_adc.o ABSOLUTE
|
||||
..\\driver\\Driver_GPIO.c 0x00000000 Number 0 driver_gpio.o ABSOLUTE
|
||||
..\\driver\\Driver_Timer.c 0x00000000 Number 0 driver_timer.o ABSOLUTE
|
||||
..\driver\Driver_ADC.c 0x00000000 Number 0 driver_adc.o ABSOLUTE
|
||||
..\driver\Driver_GPIO.c 0x00000000 Number 0 driver_gpio.o ABSOLUTE
|
||||
..\driver\Driver_Timer.c 0x00000000 Number 0 driver_timer.o ABSOLUTE
|
||||
RTE\Device\STM32F103RB\startup_stm32f10x_md.s 0x00000000 Number 0 startup_stm32f10x_md.o ABSOLUTE
|
||||
|
@ -248,41 +256,41 @@ Memory Map of the image
|
|||
|
||||
Exec Addr Load Addr Size Type Attr Idx E Section Name Object
|
||||
|
||||
0x08000000 0x08000000 0x000000ec Data RO 197 RESET startup_stm32f10x_md.o
|
||||
0x080000ec 0x080000ec 0x00000000 Code RO 248 * .ARM.Collect$$$$00000000 mc_w.l(entry.o)
|
||||
0x080000ec 0x080000ec 0x00000004 Code RO 251 .ARM.Collect$$$$00000001 mc_w.l(entry2.o)
|
||||
0x080000f0 0x080000f0 0x00000004 Code RO 254 .ARM.Collect$$$$00000004 mc_w.l(entry5.o)
|
||||
0x080000f4 0x080000f4 0x00000000 Code RO 256 .ARM.Collect$$$$00000008 mc_w.l(entry7b.o)
|
||||
0x080000f4 0x080000f4 0x00000000 Code RO 258 .ARM.Collect$$$$0000000A mc_w.l(entry8b.o)
|
||||
0x080000f4 0x080000f4 0x00000008 Code RO 259 .ARM.Collect$$$$0000000B mc_w.l(entry9a.o)
|
||||
0x080000fc 0x080000fc 0x00000004 Code RO 266 .ARM.Collect$$$$0000000E mc_w.l(entry12b.o)
|
||||
0x08000100 0x08000100 0x00000000 Code RO 261 .ARM.Collect$$$$0000000F mc_w.l(entry10a.o)
|
||||
0x08000100 0x08000100 0x00000000 Code RO 263 .ARM.Collect$$$$00000011 mc_w.l(entry11a.o)
|
||||
0x08000100 0x08000100 0x00000004 Code RO 252 .ARM.Collect$$$$00002712 mc_w.l(entry2.o)
|
||||
0x08000104 0x08000104 0x00000024 Code RO 198 * .text startup_stm32f10x_md.o
|
||||
0x08000128 0x08000128 0x00000024 Code RO 267 .text mc_w.l(init.o)
|
||||
0x0800014c 0x0800014c 0x00000004 Code RO 115 i.Bug driver_timer.o
|
||||
0x08000150 0x08000150 0x00000108 Code RO 63 i.MyGPIO_Init driver_gpio.o
|
||||
0x08000258 0x08000258 0x0000000c Code RO 66 i.MyGPIO_Set driver_gpio.o
|
||||
0x08000264 0x08000264 0x00000008 Code RO 205 i.SetSysClock system_stm32f10x.o
|
||||
0x0800026c 0x0800026c 0x000000e0 Code RO 206 i.SetSysClockTo72 system_stm32f10x.o
|
||||
0x0800034c 0x0800034c 0x00000060 Code RO 208 i.SystemInit system_stm32f10x.o
|
||||
0x080003ac 0x080003ac 0x00000020 Code RO 120 i.TIM2_IRQHandler driver_timer.o
|
||||
0x080003cc 0x080003cc 0x00000020 Code RO 121 i.TIM3_IRQHandler driver_timer.o
|
||||
0x080003ec 0x080003ec 0x00000020 Code RO 122 i.TIM4_IRQHandler driver_timer.o
|
||||
0x0800040c 0x0800040c 0x0000000e Code RO 271 i.__scatterload_copy mc_w.l(handlers.o)
|
||||
0x0800041a 0x0800041a 0x00000002 Code RO 272 i.__scatterload_null mc_w.l(handlers.o)
|
||||
0x0800041c 0x0800041c 0x0000000e Code RO 273 i.__scatterload_zeroinit mc_w.l(handlers.o)
|
||||
0x08000000 0x08000000 0x000000ec Data RO 236 RESET startup_stm32f10x_md.o
|
||||
0x080000ec 0x080000ec 0x00000000 Code RO 287 * .ARM.Collect$$$$00000000 mc_w.l(entry.o)
|
||||
0x080000ec 0x080000ec 0x00000004 Code RO 290 .ARM.Collect$$$$00000001 mc_w.l(entry2.o)
|
||||
0x080000f0 0x080000f0 0x00000004 Code RO 293 .ARM.Collect$$$$00000004 mc_w.l(entry5.o)
|
||||
0x080000f4 0x080000f4 0x00000000 Code RO 295 .ARM.Collect$$$$00000008 mc_w.l(entry7b.o)
|
||||
0x080000f4 0x080000f4 0x00000000 Code RO 297 .ARM.Collect$$$$0000000A mc_w.l(entry8b.o)
|
||||
0x080000f4 0x080000f4 0x00000008 Code RO 298 .ARM.Collect$$$$0000000B mc_w.l(entry9a.o)
|
||||
0x080000fc 0x080000fc 0x00000004 Code RO 305 .ARM.Collect$$$$0000000E mc_w.l(entry12b.o)
|
||||
0x08000100 0x08000100 0x00000000 Code RO 300 .ARM.Collect$$$$0000000F mc_w.l(entry10a.o)
|
||||
0x08000100 0x08000100 0x00000000 Code RO 302 .ARM.Collect$$$$00000011 mc_w.l(entry11a.o)
|
||||
0x08000100 0x08000100 0x00000004 Code RO 291 .ARM.Collect$$$$00002712 mc_w.l(entry2.o)
|
||||
0x08000104 0x08000104 0x00000024 Code RO 237 * .text startup_stm32f10x_md.o
|
||||
0x08000128 0x08000128 0x00000024 Code RO 306 .text mc_w.l(init.o)
|
||||
0x0800014c 0x0800014c 0x00000004 Code RO 118 i.Bug driver_timer.o
|
||||
0x08000150 0x08000150 0x00000108 Code RO 66 i.MyGPIO_Init driver_gpio.o
|
||||
0x08000258 0x08000258 0x0000000c Code RO 69 i.MyGPIO_Set driver_gpio.o
|
||||
0x08000264 0x08000264 0x00000008 Code RO 244 i.SetSysClock system_stm32f10x.o
|
||||
0x0800026c 0x0800026c 0x000000e0 Code RO 245 i.SetSysClockTo72 system_stm32f10x.o
|
||||
0x0800034c 0x0800034c 0x00000060 Code RO 247 i.SystemInit system_stm32f10x.o
|
||||
0x080003ac 0x080003ac 0x00000020 Code RO 123 i.TIM2_IRQHandler driver_timer.o
|
||||
0x080003cc 0x080003cc 0x00000020 Code RO 124 i.TIM3_IRQHandler driver_timer.o
|
||||
0x080003ec 0x080003ec 0x00000020 Code RO 125 i.TIM4_IRQHandler driver_timer.o
|
||||
0x0800040c 0x0800040c 0x0000000e Code RO 310 i.__scatterload_copy mc_w.l(handlers.o)
|
||||
0x0800041a 0x0800041a 0x00000002 Code RO 311 i.__scatterload_null mc_w.l(handlers.o)
|
||||
0x0800041c 0x0800041c 0x0000000e Code RO 312 i.__scatterload_zeroinit mc_w.l(handlers.o)
|
||||
0x0800042a 0x0800042a 0x00000002 PAD
|
||||
0x0800042c 0x0800042c 0x0000002c Code RO 4 i.main main.o
|
||||
0x08000458 0x08000458 0x00000020 Data RO 269 Region$$Table anon$$obj.o
|
||||
0x08000458 0x08000458 0x00000020 Data RO 308 Region$$Table anon$$obj.o
|
||||
|
||||
|
||||
Execution Region ER_RW (Exec base: 0x20000000, Load base: 0x08000478, Size: 0x0000000c, Max: 0xffffffff, ABSOLUTE)
|
||||
|
||||
Exec Addr Load Addr Size Type Attr Idx E Section Name Object
|
||||
|
||||
0x20000000 0x08000478 0x0000000c Data RW 125 .data driver_timer.o
|
||||
0x20000000 0x08000478 0x0000000c Data RW 128 .data driver_timer.o
|
||||
|
||||
|
||||
Execution Region ER_ZI (Exec base: 0x2000000c, Load base: 0x08000484, Size: 0x00000404, Max: 0xffffffff, ABSOLUTE)
|
||||
|
@ -290,7 +298,7 @@ Memory Map of the image
|
|||
Exec Addr Load Addr Size Type Attr Idx E Section Name Object
|
||||
|
||||
0x2000000c 0x08000484 0x00000004 PAD
|
||||
0x20000010 - 0x00000400 Zero RW 195 STACK startup_stm32f10x_md.o
|
||||
0x20000010 - 0x00000400 Zero RW 234 STACK startup_stm32f10x_md.o
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -9,3 +9,4 @@
|
|||
.\objects\main.o: C:\Programdata\Keil\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include\system_stm32f10x.h
|
||||
.\objects\main.o: ..\driver\Driver_GPIO.h
|
||||
.\objects\main.o: ..\driver\Driver_Timer.h
|
||||
.\objects\main.o: ..\driver\Driver_ADC.h
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -28,9 +28,10 @@ Project File Date: 03/22/2023
|
|||
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
|
||||
Rebuild target 'reel'
|
||||
assembling startup_stm32f10x_md.s...
|
||||
compiling main.c...
|
||||
compiling Driver_GPIO.c...
|
||||
compiling Driver_ADC.c...
|
||||
compiling system_stm32f10x.c...
|
||||
compiling Driver_GPIO.c...
|
||||
compiling main.c...
|
||||
compiling Driver_Timer.c...
|
||||
linking...
|
||||
Program Size: Code=876 RO-data=268 RW-data=12 ZI-data=1028
|
||||
|
@ -61,10 +62,10 @@ Package Vendor: Keil
|
|||
* Component: ARM::CMSIS:CORE:5.4.0
|
||||
|
||||
* Component: Keil::Device:Startup:1.0.0
|
||||
Source file: Device\Source\ARM\startup_stm32f10x_md.s
|
||||
Source file: Device\Source\ARM\STM32F1xx_OPT.s
|
||||
Include file: RTE_Driver\Config\RTE_Device.h
|
||||
Source file: Device\Source\system_stm32f10x.c
|
||||
Source file: Device\Source\ARM\startup_stm32f10x_md.s
|
||||
Source file: Device\Source\ARM\STM32F1xx_OPT.s
|
||||
Build Time Elapsed: 00:00:01
|
||||
</pre>
|
||||
</body>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Dependencies for Project 'projet-voilier', Target 'reel': (DO NOT MODIFY !)
|
||||
CompilerVersion: 5060960::V5.06 update 7 (build 960)::.\ARMCC
|
||||
F (.\src\main.c)(0x641B042E)(-c --cpu Cortex-M3 -D__EVAL -D__MICROLIB -g -O0 --apcs=interwork --split_sections -I .\src -I ..\driver
-I.\RTE\Device\STM32F103RB
-I.\RTE\_reel
-IC:\Programdata\Keil\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include
-IC:\Programdata\Keil\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include
-D__UVISION_VERSION="534" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o .\objects\main.o --omf_browse .\objects\main.crf --depend .\objects\main.d)
|
||||
F (.\src\main.c)(0x641B1ED7)(-c --cpu Cortex-M3 -D__EVAL -D__MICROLIB -g -O0 --apcs=interwork --split_sections -I .\src -I ..\driver
-I.\RTE\Device\STM32F103RB
-I.\RTE\_reel
-IC:\Programdata\Keil\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include
-IC:\Programdata\Keil\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include
-D__UVISION_VERSION="534" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o .\objects\main.o --omf_browse .\objects\main.crf --depend .\objects\main.d)
|
||||
I (C:\Programdata\Keil\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include\stm32f10x.h)(0x58258CCC)
|
||||
I (.\RTE\_reel\RTE_Components.h)(0x641B02F1)
|
||||
I (C:\Programdata\Keil\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F2582)
|
||||
|
@ -11,6 +11,7 @@ I (C:\Programdata\Keil\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.
|
|||
I (C:\Programdata\Keil\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include\system_stm32f10x.h)(0x58258CCC)
|
||||
I (..\driver\Driver_GPIO.h)(0x641864E8)
|
||||
I (..\driver\Driver_Timer.h)(0x6419C780)
|
||||
I (..\driver\Driver_ADC.h)(0x641B1EE6)
|
||||
F (..\driver\Driver_GPIO.c)(0x64186DCB)(-c --cpu Cortex-M3 -D__EVAL -D__MICROLIB -g -O0 --apcs=interwork --split_sections -I .\src -I ..\driver
-I.\RTE\Device\STM32F103RB
-I.\RTE\_reel
-IC:\Programdata\Keil\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include
-IC:\Programdata\Keil\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include
-D__UVISION_VERSION="534" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o .\objects\driver_gpio.o --omf_browse .\objects\driver_gpio.crf --depend .\objects\driver_gpio.d)
|
||||
I (..\driver\Driver_GPIO.h)(0x641864E8)
|
||||
I (C:\Programdata\Keil\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include\stm32f10x.h)(0x58258CCC)
|
||||
|
@ -35,6 +36,18 @@ I (C:\Programdata\Keil\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.
|
|||
I (C:\Programdata\Keil\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include\system_stm32f10x.h)(0x58258CCC)
|
||||
I (C:\Keil_v5\ARM\ARMCC\include\stdio.h)(0x5E8E9122)
|
||||
F (..\driver\Driver_Timer.h)(0x6419C780)()
|
||||
F (..\driver\Driver_ADC.c)(0x641B1EBA)(-c --cpu Cortex-M3 -D__EVAL -D__MICROLIB -g -O0 --apcs=interwork --split_sections -I .\src -I ..\driver
-I.\RTE\Device\STM32F103RB
-I.\RTE\_reel
-IC:\Programdata\Keil\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include
-IC:\Programdata\Keil\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include
-D__UVISION_VERSION="534" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o .\objects\driver_adc.o --omf_browse .\objects\driver_adc.crf --depend .\objects\driver_adc.d)
|
||||
I (..\driver\Driver_ADC.h)(0x641B1EE6)
|
||||
I (C:\Programdata\Keil\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include\stm32f10x.h)(0x58258CCC)
|
||||
I (.\RTE\_reel\RTE_Components.h)(0x641B02F1)
|
||||
I (C:\Programdata\Keil\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\core_cm3.h)(0x5E8F2582)
|
||||
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5E8E9122)
|
||||
I (C:\Programdata\Keil\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_version.h)(0x5E8F2582)
|
||||
I (C:\Programdata\Keil\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_compiler.h)(0x5E835B22)
|
||||
I (C:\Programdata\Keil\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include\cmsis_armcc.h)(0x5E8F2582)
|
||||
I (C:\Programdata\Keil\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include\system_stm32f10x.h)(0x58258CCC)
|
||||
I (C:\Keil_v5\ARM\ARMCC\include\stdio.h)(0x5E8E9122)
|
||||
F (..\driver\Driver_ADC.h)(0x641B1EE6)()
|
||||
F (RTE\Device\STM32F103RB\RTE_Device.h)(0x59283406)()
|
||||
F (RTE\Device\STM32F103RB\startup_stm32f10x_md.s)(0x58258CCC)(--cpu Cortex-M3 --pd "__EVAL SETA 1" -g --apcs=interwork --pd "__MICROLIB SETA 1"
-I.\RTE\Device\STM32F103RB
-I.\RTE\_reel
-IC:\Programdata\Keil\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include
-IC:\Programdata\Keil\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include
--pd "__UVISION_VERSION SETA 534" --pd "_RTE_ SETA 1" --pd "STM32F10X_MD SETA 1" --pd "_RTE_ SETA 1"
--list .\listings\startup_stm32f10x_md.lst --xref -o .\objects\startup_stm32f10x_md.o --depend .\objects\startup_stm32f10x_md.d)
|
||||
F (RTE\Device\STM32F103RB\system_stm32f10x.c)(0x58258CCC)(-c --cpu Cortex-M3 -D__EVAL -D__MICROLIB -g -O0 --apcs=interwork --split_sections -I .\src -I ..\driver
-I.\RTE\Device\STM32F103RB
-I.\RTE\_reel
-IC:\Programdata\Keil\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include
-IC:\Programdata\Keil\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include
-D__UVISION_VERSION="534" -D_RTE_ -DSTM32F10X_MD -D_RTE_
-o .\objects\system_stm32f10x.o --omf_browse .\objects\system_stm32f10x.crf --depend .\objects\system_stm32f10x.d)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<title>Static Call Graph - [.\Objects\projet-voilier_reel.axf]</title></head>
|
||||
<body><HR>
|
||||
<H1>Static Call Graph for image .\Objects\projet-voilier_reel.axf</H1><HR>
|
||||
<BR><P>#<CALLGRAPH># ARM Linker, 5060960: Last Updated: Wed Mar 22 14:35:43 2023
|
||||
<BR><P>#<CALLGRAPH># ARM Linker, 5060960: Last Updated: Wed Mar 22 16:29:44 2023
|
||||
<BR><P>
|
||||
<H3>Maximum Stack Usage = 28 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
|
||||
Call chain for Maximum Stack Depth:</H3>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
".\objects\main.o"
|
||||
".\objects\driver_gpio.o"
|
||||
".\objects\driver_timer.o"
|
||||
".\objects\driver_adc.o"
|
||||
".\objects\startup_stm32f10x_md.o"
|
||||
".\objects\system_stm32f10x.o"
|
||||
--library_type=microlib --ro-base 0x08000000 --entry 0x08000000 --rw-base 0x20000000 --entry Reset_Handler --first __Vectors --strict --summary_stderr --info summarysizes --map --load_addr_map_info --xref --callgraph --symbols
|
||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -26,7 +26,7 @@
|
|||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<TargetOption>
|
||||
<CLKADS>12000000</CLKADS>
|
||||
<CLKADS>8000000</CLKADS>
|
||||
<OPTTT>
|
||||
<gFlags>1</gFlags>
|
||||
<BeepAtEnd>1</BeepAtEnd>
|
||||
|
@ -79,8 +79,8 @@
|
|||
</OPTFL>
|
||||
<CpuCode>18</CpuCode>
|
||||
<DebugOpt>
|
||||
<uSim>0</uSim>
|
||||
<uTrg>1</uTrg>
|
||||
<uSim>1</uSim>
|
||||
<uTrg>0</uTrg>
|
||||
<sLdApp>1</sLdApp>
|
||||
<sGomain>1</sGomain>
|
||||
<sRbreak>1</sRbreak>
|
||||
|
@ -117,25 +117,96 @@
|
|||
<pMon>BIN\UL2CM3.DLL</pMon>
|
||||
</DebugOpt>
|
||||
<TargetDriverDllRegistry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>ARMRTXEVENTFLAGS</Key>
|
||||
<Name>-L70 -Z18 -C0 -M0 -T1</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>DLGDARM</Key>
|
||||
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=75,104,496,531,0)(121=-1,-1,-1,-1,0)(122=75,104,496,531,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(234=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=1125,344,1728,1095,1)(151=-1,-1,-1,-1,0)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>ARMDBGFLAGS</Key>
|
||||
<Name>-T0</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>UL2CM3</Key>
|
||||
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128 -FS08000000 -FL020000 -FP0($$Device:STM32F103RB$Flash\STM32F10x_128.FLM))</Name>
|
||||
</SetRegEntry>
|
||||
</TargetDriverDllRegistry>
|
||||
<Breakpoint/>
|
||||
<Breakpoint>
|
||||
<Bp>
|
||||
<Number>0</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>23</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>134219356</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>.\src\main.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\projet_voilier\src/main.c\23</Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>1</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>9</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>134219402</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>.\src\main.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\projet_voilier\src/main.c\9</Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>2</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>62</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>134218310</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>..\driver\Driver_ADC.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\projet_voilier\../driver/Driver_ADC.c\62</Expression>
|
||||
</Bp>
|
||||
</Breakpoint>
|
||||
<WatchWindow1>
|
||||
<Ww>
|
||||
<count>0</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>val</ItemText>
|
||||
</Ww>
|
||||
</WatchWindow1>
|
||||
<Tracepoint>
|
||||
<THDelay>0</THDelay>
|
||||
</Tracepoint>
|
||||
<DebugFlag>
|
||||
<trace>0</trace>
|
||||
<periodic>1</periodic>
|
||||
<aLwin>0</aLwin>
|
||||
<aLwin>1</aLwin>
|
||||
<aCover>0</aCover>
|
||||
<aSer1>0</aSer1>
|
||||
<aSer2>0</aSer2>
|
||||
<aPa>0</aPa>
|
||||
<viewmode>0</viewmode>
|
||||
<viewmode>1</viewmode>
|
||||
<vrSel>0</vrSel>
|
||||
<aSym>0</aSym>
|
||||
<aTbox>0</aTbox>
|
||||
|
@ -181,7 +252,7 @@
|
|||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<TargetOption>
|
||||
<CLKADS>12000000</CLKADS>
|
||||
<CLKADS>8000000</CLKADS>
|
||||
<OPTTT>
|
||||
<gFlags>1</gFlags>
|
||||
<BeepAtEnd>1</BeepAtEnd>
|
||||
|
@ -280,7 +351,7 @@
|
|||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>DLGTARM</Key>
|
||||
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=75,104,496,509,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=120,153,405,449,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)</Name>
|
||||
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=75,104,496,509,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=120,153,405,449,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=1048,459,1651,1093,1)(151=-1,-1,-1,-1,0)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
|
@ -303,7 +374,63 @@
|
|||
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128 -FS08000000 -FL020000 -FP0($$Device:STM32F103RB$Flash\STM32F10x_128.FLM))</Name>
|
||||
</SetRegEntry>
|
||||
</TargetDriverDllRegistry>
|
||||
<Breakpoint/>
|
||||
<Breakpoint>
|
||||
<Bp>
|
||||
<Number>0</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>62</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>134218062</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>..\driver\Driver_ADC.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\projet_voilier_reel\../driver/Driver_ADC.c\62</Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>1</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>27</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>134219156</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>.\src\main.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\projet_voilier_reel\src/main.c\27</Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>2</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>64</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>0</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>0</BreakIfRCount>
|
||||
<Filename>..\driver\Driver_ADC.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression></Expression>
|
||||
</Bp>
|
||||
</Breakpoint>
|
||||
<WatchWindow1>
|
||||
<Ww>
|
||||
<count>0</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>val</ItemText>
|
||||
</Ww>
|
||||
</WatchWindow1>
|
||||
<Tracepoint>
|
||||
<THDelay>0</THDelay>
|
||||
</Tracepoint>
|
||||
|
@ -430,6 +557,30 @@
|
|||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>6</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\driver\Driver_ADC.c</PathWithFileName>
|
||||
<FilenameWithoutPath>Driver_ADC.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>7</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\driver\Driver_ADC.h</PathWithFileName>
|
||||
<FilenameWithoutPath>Driver_ADC.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
|
@ -442,7 +593,7 @@
|
|||
|
||||
<Group>
|
||||
<GroupName>::Device</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>1</RteFlg>
|
||||
|
|
|
@ -413,6 +413,16 @@
|
|||
<FileType>5</FileType>
|
||||
<FilePath>..\driver\Driver_Timer.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>Driver_ADC.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\Driver_ADC.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>Driver_ADC.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\driver\Driver_ADC.h</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
|
@ -830,6 +840,16 @@
|
|||
<FileType>5</FileType>
|
||||
<FilePath>..\driver\Driver_Timer.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>Driver_ADC.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\Driver_ADC.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>Driver_ADC.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\driver\Driver_ADC.h</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
|
|
|
@ -1,14 +1,30 @@
|
|||
#include "stm32f10x.h"
|
||||
#include "Driver_GPIO.h"
|
||||
#include "Driver_Timer.h"
|
||||
#include "Driver_ADC.h"
|
||||
|
||||
void toto (void)
|
||||
{
|
||||
static uint16_t val;
|
||||
val = driver_adc_1_read();
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
||||
MyGPIO_Struct_TypeDef LED;
|
||||
MyGPIO_Struct_TypeDef GPIO_ADC1;
|
||||
|
||||
LED.GPIO_Pin = 5;
|
||||
LED.GPIO_Conf = Out_Ppull;
|
||||
LED.GPIO = GPIOA;
|
||||
MyGPIO_Init(&LED);
|
||||
MyGPIO_Set(LED.GPIO, LED.GPIO_Pin);
|
||||
|
||||
GPIO_ADC1.GPIO_Pin = 1;
|
||||
GPIO_ADC1.GPIO_Conf = In_Analog;
|
||||
GPIO_ADC1.GPIO = GPIOC;
|
||||
MyGPIO_Init(&GPIO_ADC1);
|
||||
|
||||
driver_adc_1_init(0x01,&toto);
|
||||
driver_adc_1_launch_read();
|
||||
while(1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue