EVE 1.0
Atomic primitives
Collaboration diagram for Atomic primitives:

Functions

uint32_t atomic_xchg32 (volatile uint32_t *p, uint32_t value)
 
uint16_t atomic_xchg16 (volatile uint16_t *p, uint16_t value)
 
uint8_t atomic_xchg8 (volatile uint8_t *p, uint8_t value)
 
bool atomic_xchg_bool (volatile bool *p, bool value)
 
uint32_t atomic_add32 (volatile uint32_t *p, int32_t delta)
 
uint16_t atomic_add16 (volatile uint16_t *p, int16_t delta)
 
uint8_t atomic_add8 (volatile uint8_t *p, int8_t delta)
 
uint32_t atomic_or32 (volatile uint32_t *p, uint32_t value)
 
uint16_t atomic_or16 (volatile uint16_t *p, uint16_t value)
 
uint8_t atomic_or8 (volatile uint8_t *p, uint8_t value)
 
uint32_t atomic_and32 (volatile uint32_t *p, uint32_t value)
 
uint16_t atomic_and16 (volatile uint16_t *p, uint16_t value)
 
uint8_t atomic_and8 (volatile uint8_t *p, uint8_t value)
 
uint32_t atomic_xor32 (volatile uint32_t *p, uint32_t value)
 
uint16_t atomic_xor16 (volatile uint16_t *p, uint16_t value)
 
uint8_t atomic_xor8 (volatile uint8_t *p, uint8_t value)
 

Detailed Description

EVE atomic primitives set

Function Documentation

uint32_t atomic_xchg32 ( volatile uint32_t *  p,
uint32_t  value 
)

Atomically sets the value of a variable to value and returns the old value: 32 bit version.

Parameters
pThe atomic variable.
valueThe value to set.
Returns
The old value of the atomic variable.
uint16_t atomic_xchg16 ( volatile uint16_t *  p,
uint16_t  value 
)

Atomically sets thevalue of a variable to value and returns the old value: 16 bit version.

Parameters
pThe atomic variable.
valueThe value to set.
Returns
The old value of the atomic variable.
uint8_t atomic_xchg8 ( volatile uint8_t *  p,
uint8_t  value 
)

Atomically sets thevalue of a variable to value and returns the old value: 8 bit version.

Parameters
pThe atomic variable.
valueThe value to set.
Returns
The old value of the atomic variable.
bool atomic_xchg_bool ( volatile bool *  p,
bool  value 
)

Atomically sets thevalue of a variable to value and returns the old value: bool version.

Parameters
pThe atomic variable.
valueThe value to set.
Returns
The old value of the atomic variable.
uint32_t atomic_add32 ( volatile uint32_t *  p,
int32_t  delta 
)

Atomically adds delta to the current value of a variable: 32 bit version.

Parameters
pThe atomic variable.
deltaThe delta to add.
Returns
The new value of the atomic variable.
uint16_t atomic_add16 ( volatile uint16_t *  p,
int16_t  delta 
)

Atomically adds delta to the current value of a variable: 16 bit version.

Parameters
pThe atomic variable.
deltaThe delta to add.
Returns
The new value of the atomic variable.
uint8_t atomic_add8 ( volatile uint8_t *  p,
int8_t  delta 
)

Atomically adds delta to the current value of a variable: 8 bit version.

Parameters
pThe atomic variable.
deltaThe delta to add.
Returns
The new value of the atomic variable.
uint32_t atomic_or32 ( volatile uint32_t *  p,
uint32_t  value 
)

Atomically ORs value with the current value of a variable: 32 bit version.

Parameters
pThe atomic variable.
valueThe value to binary OR with the variable.
Returns
The updated value of the atomic variable.
uint16_t atomic_or16 ( volatile uint16_t *  p,
uint16_t  value 
)

Atomically ORs value with the current value of a variable: 16 bit version.

Parameters
pThe atomic variable.
valueThe value to binary OR with the variable.
Returns
The updated value of the atomic variable.
uint8_t atomic_or8 ( volatile uint8_t *  p,
uint8_t  value 
)

Atomically ORs value with the current value of a variable: 8 bit version.

Parameters
pThe atomic variable.
valueThe value to binary OR with the variable.
Returns
The updated value of the atomic variable.
uint32_t atomic_and32 ( volatile uint32_t *  p,
uint32_t  value 
)

Atomically ANDs value with the current value of a variable: 32 bit version.

Parameters
pThe atomic variable.
valueThe value to binary AND with the variable.
Returns
The updated value of the atomic variable.
uint16_t atomic_and16 ( volatile uint16_t *  p,
uint16_t  value 
)

Atomically ANDs value with the current value of a variable: 16 bit version.

Parameters
pThe atomic variable.
valueThe value to binary AND with the variable.
Returns
The updated value of the atomic variable.
uint8_t atomic_and8 ( volatile uint8_t *  p,
uint8_t  value 
)

Atomically ANDs value with the current value of a variable: 8 bit version.

Parameters
pThe atomic variable.
valueThe value to binary AND with the variable.
Returns
The updated value of the atomic variable.
uint32_t atomic_xor32 ( volatile uint32_t *  p,
uint32_t  value 
)

Atomically XORs value with the current value of a variable: 32 bit version.

Parameters
pThe atomic variable.
valueThe value to binary XOR with the variable.
Returns
The updated value of the atomic variable.
uint16_t atomic_xor16 ( volatile uint16_t *  p,
uint16_t  value 
)

Atomically XORs value with the current value of a variable: 16 bit version.

Parameters
pThe atomic variable.
valueThe value to binary XOR with the variable.
Returns
The updated value of the atomic variable.

Referenced by GpioExtPinToggle(), and GpioExtPortToggle().

uint8_t atomic_xor8 ( volatile uint8_t *  p,
uint8_t  value 
)

Atomically XORs value with the current value of a variable: 8 bit version.

Parameters
pThe atomic variable.
valueThe value to binary XOR with the variable.
Returns
The updated value of the atomic variable.