comparison Small_CPU/Src/baseCPU2.c @ 554:3328189786e7

Added external ADC interface functionality (MCP3424): Added communication protocoll to read data from external ADC. At the moment 16bit and 18bit resolutions are supported. External data will be read and forwarded depending on the conversion time of the ADC.
author Ideenmodellierer
date Thu, 12 Nov 2020 19:46:03 +0100
parents 02e7e11fdbe8
children 06ec1da5e105
comparison
equal deleted inserted replaced
553:43a2dd4ba30f 554:3328189786e7
139 #include "pressure.h" 139 #include "pressure.h"
140 #include "batteryGasGauge.h" 140 #include "batteryGasGauge.h"
141 #include "batteryCharger.h" 141 #include "batteryCharger.h"
142 #include "scheduler.h" 142 #include "scheduler.h"
143 #include "tm_stm32f4_otp.h" 143 #include "tm_stm32f4_otp.h"
144 #include "externalInterface.h"
144 145
145 // From Common/Inc: 146 // From Common/Inc:
146 #include "calc_crush.h" 147 #include "calc_crush.h"
147 #include "decom.h" 148 #include "decom.h"
148 #include "FirmwareData.h" 149 #include "FirmwareData.h"
395 case MODE_POWERUP: 396 case MODE_POWERUP:
396 case MODE_BOOT: 397 case MODE_BOOT:
397 // ReInit_battery_charger_status_pins(); 398 // ReInit_battery_charger_status_pins();
398 compass_init(0, 7); 399 compass_init(0, 7);
399 accelerator_init(); 400 accelerator_init();
401 externalInterface_Init();
400 402
401 if (global.mode == MODE_BOOT) { 403 if (global.mode == MODE_BOOT) {
402 GPIO_Power_MainCPU_OFF(); 404 GPIO_Power_MainCPU_OFF();
403 HAL_Delay(100); // for GPIO_Power_MainCPU_ON(); 405 HAL_Delay(100); // for GPIO_Power_MainCPU_ON();
404 GPIO_Power_MainCPU_ON(); 406 GPIO_Power_MainCPU_ON();