#include #include #include #include #include static long ledConvAdcAmpl(subRecord *psub) { unsigned inp = (unsigned)(psub->a); psub->val = (inp & 0x4)?1.:0.; return 0; } static long ledConvLock(subRecord *psub) { unsigned inp = (unsigned)(psub->a); inp &= 0x3; psub->val = (inp == 0x1)? 1.:0.; return 0; } static long ledConvError(subRecord *psub) { unsigned inp = (unsigned)(psub->a); inp &= 0x3; psub->val = (inp != 0x1 && inp != 0x2)? 1.:0.; return 0; } epicsRegisterFunction(ledConvAdcAmpl); epicsRegisterFunction(ledConvLock); epicsRegisterFunction(ledConvError);