add LSM9DS1 accelerometer + magnetometer testing and cleanup functions

This commit is contained in:
2025-03-13 21:27:22 +02:00
parent 8878d1fd10
commit 01d4b75921
5 changed files with 151 additions and 3 deletions
+9 -2
View File
@@ -32,6 +32,7 @@
#include "LIS302DL.h"
#include "DHT11.h"
#include "MP45DT02.h"
#include "LSM9DS1.h"
/* USER CODE END Includes */
@@ -75,7 +76,9 @@ void ((*executors[])(void)) = {
SST25VF016B_run_test,
LIS302DL_run_test,
LIS302DL_run_test_dynamic,
MP45DT02_run_test
MP45DT02_run_test,
LSM9DS1_test_accel,
LSM9DS1_test_magnet
};
void ((*cleanup_functions[])(void)) = {
@@ -87,6 +90,8 @@ void ((*cleanup_functions[])(void)) = {
NULL,
NULL,
NULL,
NULL,
LSM9DS1_cleanup_accel,
NULL
};
@@ -99,6 +104,8 @@ int delay_between_runs[] = {
-1,
-1,
200,
-1,
-1,
-1
};
@@ -126,7 +133,7 @@ static void MX_I2S2_Init(void);
void switch_to_next_test(void)
{
current_executor_id += 1;
current_executor_id %= 9;
current_executor_id %= 11;
}
void buttons_switch_to_interrupt(void)