/* * FPGA_SSI_Comm.h * * Created on: Apr 22, 2018 * Author: avi */ #ifndef DRIVERS_FPGA_FPGA_SSI_COMM_H_ #define DRIVERS_FPGA_FPGA_SSI_COMM_H_ #include "drivers/SSI_Comm/SSI_Comm.h" typedef struct // 24bit { unsigned short Position:14; unsigned char Gen_status:2; unsigned char Det_status:8; }SSI_DANCER_ENC; SSI_DANCER_ENC DANCER_ENC[NUM_OF_ROTENC]; SSI_DANCER_ENC Dryer_ENC; bool Dancer_Busy[NUM_OF_ROTENC]; typedef struct { uint32_t Speed; bool Busy; }SpeedSensorResponseStruct; SpeedSensorResponseStruct SpeedSensorResponseS; typedef struct { uint32_t Position; bool Busy; }Dryer_ENCResponseStruct; Dryer_ENCResponseStruct DryerENCResponseS; typedef struct { volatile short * TX_Reg; volatile short * RX_M; volatile short * RX_L; volatile short * SSI_Busy; } FpgaDancerMap_t; #ifdef FOUR_WINDERS uint8_t FPGA_SSI_Transmit(Dancers_4_Winders _RotEncId); uint8_t FPGA_SSI_Receive(Dancers_4_Winders _RotEncId); #else uint8_t FPGA_SSI_Transmit(HardwareDancerType _RotEncId); uint8_t FPGA_SSI_Receive(HardwareDancerType _RotEncId); #endif uint8_t FPGA_SSI_Speed_Sensor_Transnit(); uint32_t FPGA_SSI_Speed_Sensor_Receive(); uint8_t FPGA_SSI_Dryer_ENC_Transnit(); uint32_t FPGA_SSI_Dryer_ENC_Receive(); #endif /* DRIVERS_FPGA_FPGA_SSI_COMM_H_ */