Files
433_STM32/Core/Inc/relay_control.h

73 lines
1.7 KiB
C
Raw Normal View History

/**
******************************************************************************
* @file relay_control.h
* @brief
* @author Application Layer
* @version 1.0
******************************************************************************
* @attention
*
* PA15连接继电器控制端
******************************************************************************
*/
#ifndef __RELAY_CONTROL_H
#define __RELAY_CONTROL_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <stdbool.h>
#define RELAY_COUNT 1
#define RELAY_MIN_INTERVAL 100
/**
* @brief
* @note
* @param
* @retval
*/
void Relay_Init(void);
/**
* @brief
* @note
* @param relay_id: (1-4)1
* @param state: true=, false=
* @retval
*/
void Relay_SetState(uint8_t relay_id, bool state);
/**
* @brief
* @note GPIO输出状态
* @param relay_id: (1-4)
* @retval true=, false=
*/
bool Relay_GetState(uint8_t relay_id);
/**
* @brief
* @note
* @param relay_id: (1-4)
* @retval
*/
void Relay_Toggle(uint8_t relay_id);
/**
* @brief
* @note
* @param
* @retval
*/
uint32_t Relay_GetToggleCount(void);
#ifdef __cplusplus
}
#endif
#endif