
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
//-------------------------------------------------------//
// Project Code : ALE300K03-21-LGE-GEN2.0-BE-CPU1
// File Name : DigitalIO.h
// Created on : 2022. 10. 30.
// Description :
// Author : KimJeongWoo
// Last modified Date :
//-------------------------------------------------------//
#ifndef MAIN_RESOURCE_INCLUDE_DIGITALIO_H_
#define MAIN_RESOURCE_INCLUDE_DIGITALIO_H_
#ifdef __cplusplus
extern "C" {
#endif
#define NORMAL_OPEN 0
#define NORMAL_CLOSE 1
extern void InitDigitalIOSet(void);
extern void DigitalInput(void);
extern void DigitalOutput(void);
void InitDigitalInput(void);
void InitDigitalOutput(void);
extern void ReadDioExor(void);
extern void WriteDioExor(void);
extern void ResetDioExor(void);
extern int FlagWrDioExor;
extern int FlagRstDioExor;
extern long int BufferDoutExorAll;
union uDinRawData
{
Uint32 all;
};
struct sDinList
{
Uint16 Button :1; //0
Uint16 Door_chk :1; //1
Uint16 rsd1 :6; //2~7
Uint16 rsd2 :8; //8~15
Uint16 FT_CH1_UV :1; //0
Uint16 FT_CH1_VIS :1; //1
Uint16 FT_CH1_IR :1; //2
Uint16 FT_CH2_UV :1; //3
Uint16 FT_CH2_VIS :1; //4
Uint16 FT_CH2_IR :1; //5
Uint16 FT_CH3_UV :1; //6
Uint16 FT_CH3_VIS :1; //7
Uint16 FT_CH3_IR :1; //8
Uint16 FT_CH4_UV :1; //9
Uint16 FT_CH4_VIS :1; //10
Uint16 FT_CH4_IR :1; //11
Uint16 rsd3 :4; //12
};
union uDinData
{
Uint32 all;
struct sDinList bit;
};
union uDinExor
{
Uint32 all;
struct sDinList bit;
};
struct sDin
{
union uDinRawData DataRaw;
union uDinData Data;
union uDinExor Exor;
};
struct sDoutList
{
Uint16 Ch00 :1; // 0x0001 (Red)
Uint16 Ch01 :1; // 0x0002
Uint16 Ch02 :1; // 0x0004 (LED1)
Uint16 Ch03 :1; // 0x0008 (LED2)
Uint16 Ch04 :1; // 0x0010
Uint16 Ch05 :1; // 0x0020
Uint16 Ch06 :1; // 0x0040
Uint16 Ch07 :1; // 0x0080
Uint16 Ch08 :1; // 0x0100 //충전건 Lock
Uint16 Ch09 :1; // 0x0200
Uint16 Ch20 :1; // 0x0400
Uint16 Ch21 :1; // 0x0800 //충전건 Unlock
Uint16 Ch22 :1; // 0x1000
Uint16 Ch23 :1; // 0x2000
Uint16 Ch24 :1; // 0x4000
Uint16 Ch25 :1; // 0x8000
};
union uDOUT_DATA
{
Uint16 all;
struct sDoutList bit;
};
union uDOUT_EXOR
{
Uint16 all;
struct sDoutList bit;
};
struct sDOUT
{
union uDOUT_DATA Data;
union uDOUT_EXOR Exor;
};
extern struct sDin Din;
extern struct sDOUT Dout;
#ifdef __cplusplus
}
#endif /* extern "C" */
#endif /* MAIN_RESOURCE_INCLUDE_DIGITALIO_H_ */