added LightState Switch

This commit is contained in:
2024-05-20 17:44:56 +02:00
parent e995e1bd01
commit 25fb6d0a1e
8 changed files with 100 additions and 16 deletions

View File

@@ -76,3 +76,11 @@ void BSP_GPIO_EE24WriteProtectOn() {
void BSP_GPIO_EE24WriteProtectOff() {
HAL_GPIO_WritePin(EEPROM_WC_GPIO_Port, EEPROM_WC_Pin, GPIO_PIN_RESET);
}
/**
* @brief Checks if the headlight is on.
* @return true if the headlight is on, false otherwise.
*/
bool BSP_GPIO_HeadLightIsSet() {
return HAL_GPIO_ReadPin(Headlight_Detect_GPIO_Port, Headlight_Detect_Pin) == GPIO_PIN_SET;
}