Ejemplo n.º 1
0
/*----------------------------------------------------------------------------*/
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);
}
Ejemplo n.º 2
0
/*----------------------------------------------------------------------------*/
bool dmaSetInstance(uint8_t stream, struct DmaBase *object)
{
  assert(object);
  assert(stream < ARRAY_SIZE(instances));

  void *expected = 0;
  return compareExchangePointer(&instances[stream], &expected, object);
}
Ejemplo n.º 3
0
/*----------------------------------------------------------------------------*/
static bool setDescriptor(const struct Eeprom *state, struct Eeprom *interface)
{
  return compareExchangePointer((void **)&descriptor, state, interface);
}
Ejemplo n.º 4
0
/*----------------------------------------------------------------------------*/
static bool setDescriptor(struct WdtBase *timer)
{
  return compareExchangePointer((void **)&descriptor, 0, timer);
}