Detect NV14 vs EL18 at boot

This commit is contained in:
Raphael Coeffic
2022-08-11 12:15:46 +02:00
committed by Raphael Coeffic
parent e8d82348e0
commit 56eb564b86
4 changed files with 61 additions and 22 deletions
+9
View File
@@ -128,6 +128,15 @@ void boardInit()
__enable_irq();
#endif
// detect NV14 vs EL18
if (GPIO_ReadInputDataBit(INTMODULE_PWR_GPIO, INTMODULE_PWR_GPIO_PIN) == Bit_SET) {
// pull-up connected: EL18
hardwareOptions.pcbrev = PCBREV_EL18;
} else {
// pull-down connected: NV14
hardwareOptions.pcbrev = PCBREV_NV14;
}
#if defined(DEBUG)
serialInit(SP_AUX1, UART_MODE_DEBUG);
#endif