Обновлена IRS

This commit is contained in:
2026-04-16 14:06:03 +03:00
parent da4dfbfae5
commit 273398ba16
7 changed files with 435 additions and 111 deletions

View File

@@ -1,11 +1,22 @@
#include "IIMU.h"
#include "stm32g4xx.h"
#include "I2C.h"
#include "ICM20948.h"
#include "GPIO.h"
IMU_Info IMUInfo;
IMU_Calib_Data CalibDataIMU;
void IMU_InitPower()
{
GPIO_InitPin(GPIO_PIN_13 | GPIO_PORT_C | GPIO_OUTPUT | GPIO_SET); // POWER ON 3V3 (nPC13)
for (volatile int i = 0; i < 1000000; i ++) {};
GPIOC->BSRR = GPIO_BSRR_BR13;
for (volatile int i = 0; i < 1000000; i ++) {};
}
void IMU_SetReg(unsigned char Addr, unsigned char Reg, unsigned char Value)
{
unsigned char reg[2];