Projet-Voilier-3/projet-voilier/src/main.c
Sanchez Manon c930991ccb Ajout du Driver_IMU, pour la gestion de l'accéléromètre.
Les fichiers Driver_SPI sont des versions personnelles non fonctionelle de la gestion du SPI.
C'est la bibliothèque MySPI qui est utilisée dans le projet.

Ajout de commentaires dans tous les fichiers driver en format doxygen.
2023-04-05 16:39:01 +02:00

43 lines
724 B
C

#include "stm32f10x.h"
#include "Driver_GPIO.h"
#include "Driver_Timer.h"
#include "Driver_ADC.h"
#include "MySPI.h"
#include "IMU.h"
void toto (void)
{
static uint16_t val;
val = driver_adc_1_read();
}
int main() {
char DATAX0 = 0x32;
unsigned char values[6];
/*
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();
*/
source_IMU_init();
while(1)
{
source_IMU_read(DATAX0, 6, values);
}
}