/*----------------------------------------------------------------------------*/ static bool setDescriptor(uint8_t channel, const struct I2cBase *state, struct I2cBase *interface) { assert(channel < ARRAY_SIZE(descriptors)); return compareExchangePointer((void **)(descriptors + channel), state, interface); }
/*----------------------------------------------------------------------------*/ bool dmaSetInstance(uint8_t stream, struct DmaBase *object) { assert(object); assert(stream < ARRAY_SIZE(instances)); void *expected = 0; return compareExchangePointer(&instances[stream], &expected, object); }
/*----------------------------------------------------------------------------*/ static bool setDescriptor(const struct Eeprom *state, struct Eeprom *interface) { return compareExchangePointer((void **)&descriptor, state, interface); }
/*----------------------------------------------------------------------------*/ static bool setDescriptor(struct WdtBase *timer) { return compareExchangePointer((void **)&descriptor, 0, timer); }