#ifndef _BLV_NOR_DEV_CURTAINFUN_
#define _BLV_NOR_DEV_CURTAINFUN_


#include "stdint.h"
#include "BLV_All_Dev_Init.h"


typedef struct 
{
	uint8_t DevCurtainState;     //窗帘当前状态   1开  2关  6停止
	uint8_t DevCurtainStateLast;     //窗帘当前状态   1开  2关  6停止
	uint8_t DevCurtainStateNext;  //窗帘互切之前，保存的状态
	
	uint8_t DevCurtainAction;    //窗帘产生的动作   1开  2关  6停止  用完就清空
	
	uint8_t DevCurtainDelayFlag;	//窗帘控制标志位
	uint8_t DevCurtainDelayLastState;	//
	uint8_t DevCurtainDelayState;	//窗帘延时控制状态
	uint32_t DevCurtainDelayTime;	//窗帘延时时间
	uint32_t DevCurtainDelayTick;	//窗帘延时时间戳
  
	//Dev_Name_Struct DevNameStruct;//窗帘别名 每个回路16个字节别名     //仅支持30个回路别名	2025-10-14 取消

}__attribute__ ((__packed__))NOR_CURTAIN_INFO;						//窗帘的结构体参数


void BLV_Nor_Dev_Curtain_Init(uint8_t devaddr);
void BLV_Nor_Dev_Curtain_Logic_Init(LOGICFILE_DEVICE_INFO *dev_info,uint8_t *data,uint16_t data_len);

uint16_t Curtain_Loop_Save_State(uint32_t devaddr, uint16_t DevOutputLoop);

#endif












