#ifndef _RELAY_H #define _RELAY_H #include "sys.h" ////////////////////////////////////////////////////////////////////////////////// //This program is for educational purposes only, without the author's permission, may not be used for any other purpose //ALIENTEK STM32F407 Development Board //LED driver code //Hot Atomic @ALIENTEK //Forum: www.openedv.com //Date created: 2014/6/10 //Version: V1.0 //All rights reserved pirated reserved. //Copyright(C) Guangzhou wing electronic technology limited company 2014-2024 //All rights reserved ////////////////////////////////////////////////////////////////////////////////// // Relay port definitions (KT mBMS-16S Rev1.0.3 reference: Active-Low control) // Charge Relay: PC9 (CHARGE_CONTROL) #define CHG_RLY_ON PCout(9) = 0; #define CHG_RLY_OFF PCout(9) = 1; // Discharge Relay: PD13 (DISCHARGE_CONTROL) #define DSG_RLY_ON PDout(13) = 0; #define DSG_RLY_OFF PDout(13) = 1; // Pre-charge Relay: PD15 (PRECHARGE_CONTROL) #define PRE_CHG_RLY_ON PDout(15) = 0; #define PRE_CHG_RLY_OFF PDout(15) = 1; void Relay_Init(void); //Initialize void Relay_On(u8 id); void Relay_Off(u8 id); u8 Relay_Status(u8 id); #endif