//------------------------------------------------------------------------------- // File Name: inout.c // Brief: // Version: 1.0.0 // Create Date: 2021/07/21 // Create by: Marshal Lee // Copyright: // Copyright (c) 2021, Richpeace Co., LTD. // All rights reserved. // // Modify by: Marshal Lee // Modify Date: 2021/07/21 //------------------------------------------------------------------------------- #include "inout.h" #include "funcs.h" //-------------通讯部分------------------------- OUTPUT_FUNCS(En485Out, RS485_EN); // 485输出允许 OUTPUT_FUNCS(En485_2_Out, RS485_2_EN); // 485输出允许 //-----------------电机控制信号--------------------- // Moto1 OUTPUT_FUNCS(Moto1Step, MT_STEP); OUTPUT_FUNCS(Moto1Dir, MT_DIR); OUTPUT_FUNCS(Moto1En, MT_SON); //----------------------------------------- INPUT_FUNCS(InputAP,AP); INPUT_FUNCS(InputBP,BP); INPUT_FUNCS(InputZP,ZP); //-----------------输出信号--------------------- OUTPUT_FUNCS(SysLed, SYS_LED); OUTPUT_FUNCS(ErrLed, ERR_LED); OUTPUT_FUNCS(OutputPWM1, OUTPWM1); OUTPUT_FUNCS(OutputPWM2, OUTPWM2); OUTPUT_FUNCS(Output1, OUTPUT1); OUTPUT_FUNCS(Output2, OUTPUT2); OUTPUT_FUNCS(Output3, OUTPUT3); OUTPUT_FUNCS(Output4, OUTPUT4); OUTPUT_FUNCS(Output5, OUTPUT5); OUTPUT_FUNCS(Output6, OUTPUT6); OUTPUT_FUNCS(Output7, OUTPUT7); OUTPUT_FUNCS(Output8, OUTPUT8); //-----------------输入信号--------------------- INPUT_FUNCS(Input1,INPUT1); INPUT_FUNCS(Input2,INPUT2); INPUT_FUNCS(Input3,INPUT3); INPUT_FUNCS(Input4,INPUT4); INPUT_FUNCS(Input5,INPUT5); INPUT_FUNCS(Input6,INPUT6); INPUT_FUNCS(Input7,INPUT7); INPUT_FUNCS(Input8,INPUT8); //-----------------拨码开关--------------------- INPUT_FUNCS(Switch1,SW1); INPUT_FUNCS(Switch2,SW2); INPUT_FUNCS(Switch3,SW3); INPUT_FUNCS(Switch4,SW4); void SetOutputNull(void) { //输出空操作 } u8 GetInputNullOn(void) { //输入空操作 return Bit_RESET; } u8 GetInputNullOff(void) { //输入空操作 return Bit_SET; }