Midnight Sun Firmware
Loading...
Searching...
No Matches
relays.h
1#pragma once
2
3/************************************************************************************************
4 * @file relays.h
5 *
6 * @brief Header file for Relays
7 *
8 * @date 2025-02-06
9 * @author Midnight Sun Team #24 - MSXVI
10 ************************************************************************************************/
11
12/* Standard library Headers */
13
14/* Inter-component Headers */
15#include "bms_carrier.h"
16#include "gpio.h"
17#include "gpio_interrupts.h"
18#include "interrupts.h"
19
20/* Intra-component Headers */
21
29#define BMS_CLOSE_RELAYS_DELAY_MS 250U
31#define NUM_BMS_RELAYS 3U
33#define KILLSWITCH_EVENT_IT 3U
34
49};
50
60
65void bms_open_solar();
66
71void bms_close_solar();
72
77void bms_relay_fault(void);
78
StatusCode
StatusCodes for various errors.
Definition: status.h:27
void bms_relay_fault(void)
Open the POS, NEG and SOLAR relay.
Definition: relays.c:72
void bms_close_solar()
Close the SOLAR relay.
Definition: relays.c:67
StatusCode relays_init(BmsStorage *storage)
Close POS, NEG, and SOLAR relays in sequence.
Definition: relays.c:82
void bms_open_solar()
Open the SOLAR relay.
Definition: relays.c:63
Battery management system storage.
Definition: bms_carrier.h:50
Port and pin data.
Definition: gpio.h:112
Relay storage.
Definition: relays.h:38
GpioAddress neg_relay_sense
Definition: relays.h:43
GpioAddress pos_relay_sense
Definition: relays.h:40
GpioAddress killswitch_sense
Definition: relays.h:48
GpioAddress neg_relay_en
Definition: relays.h:42
GpioAddress solar_relay_en
Definition: relays.h:45
GpioAddress solar_relay_sense
Definition: relays.h:46
GpioAddress pos_relay_en
Definition: relays.h:39