V1.0
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
#include "AMS_HighLevel.h"
|
||||
#include "TMP1075.h"
|
||||
#include "errors.h"
|
||||
#include "main.h"
|
||||
#include "stm32f3xx_hal.h"
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
@ -189,11 +190,11 @@ void sm_set_relay(Relay relay, bool closed){
|
||||
GPIO_PinState state = closed ? GPIO_PIN_SET : GPIO_PIN_RESET;
|
||||
switch (relay) {
|
||||
case RELAY_MAIN:
|
||||
HAL_GPIO_WritePin(RELAY_EN_GPIO_Port, RELAY_EN_Pin, state);
|
||||
HAL_GPIO_WritePin(RELAY_ENABLE_GPIO_Port, RELAY_ENABLE_Pin, state);
|
||||
relay_closed = closed;
|
||||
break;
|
||||
case RELAY_PRECHARGE:
|
||||
HAL_GPIO_WritePin(PRECHARGE_EN_GPIO_Port, PRECHARGE_EN_Pin, state);
|
||||
HAL_GPIO_WritePin(PRECHARGE_ENABLE_GPIO_Port, PRECHARGE_ENABLE_Pin, state);
|
||||
precharge_closed = closed;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user