28 for(
size_t n=0; n<nops; n++)
32 for(
size_t i=0; i<op.
ncycles; i++) {
33 epicsUInt8 O = this->
cycle(op.
in ? op.
in[i] : 0);
57 typedef std::map<std::string, SPIDevice> devices_t;
60 SPIRegistry *
volatile registry;
64 SPIRegistry *ret = registry;
66 ret =
new SPIRegistry;
76 SPIRegistry *reg(getReg());
77 SCOPED_LOCK2(reg->mutex,G);
78 SPIRegistry::devices_t::const_iterator it = reg->devices.find(name);
79 if(it!=reg->devices.end()) {
88 SPIRegistry *reg(getReg());
89 SCOPED_LOCK2(reg->mutex,G);
90 reg->devices[name] = dev;
95 SPIRegistry *reg(getReg());
96 SCOPED_LOCK2(reg->mutex,G);
97 reg->devices.erase(name);
static void registerDev(const std::string &name, const SPIDevice &)
double timeout() const
timeout in seconds for an individual cycle()
virtual epicsUInt8 cycle(epicsUInt8 in)=0
virtual void cycles(size_t nops, const Operation *ops)
static void unregisterDev(const std::string &name)
void setTimeout(double t)
static bool lookupDev(const std::string &name, SPIDevice *)
virtual void select(unsigned id)=0
Select numbered device. 0 clears selection.