STM wrapper functions for different data types. More...
Go to the source code of this file.
Defines | |
#define | FUNC_ATTR(STR) STR |
Functions | |
uint8_t | stm_load_u8 (TXPARAMS volatile uint8_t *addr) |
Transactional load of an unsigned 8-bit value. | |
uint16_t | stm_load_u16 (TXPARAMS volatile uint16_t *addr) |
Transactional load of an unsigned 16-bit value. | |
uint32_t | stm_load_u32 (TXPARAMS volatile uint32_t *addr) |
Transactional load of an unsigned 32-bit value. | |
uint64_t | stm_load_u64 (TXPARAMS volatile uint64_t *addr) |
Transactional load of an unsigned 64-bit value. | |
char | stm_load_char (TXPARAMS volatile char *addr) |
Transactional load of a char value. | |
unsigned char | stm_load_uchar (TXPARAMS volatile unsigned char *addr) |
Transactional load of an unsigned char value. | |
short | stm_load_short (TXPARAMS volatile short *addr) |
Transactional load of a short value. | |
unsigned short | stm_load_ushort (TXPARAMS volatile unsigned short *addr) |
Transactional load of an unsigned short value. | |
int | stm_load_int (TXPARAMS volatile int *addr) |
Transactional load of an int value. | |
unsigned int | stm_load_uint (TXPARAMS volatile unsigned int *addr) |
Transactional load of an unsigned int value. | |
long | stm_load_long (TXPARAMS volatile long *addr) |
Transactional load of a long value. | |
unsigned long | stm_load_ulong (TXPARAMS volatile unsigned long *addr) |
Transactional load of an unsigned long value. | |
float | stm_load_float (TXPARAMS volatile float *addr) |
Transactional load of a float value. | |
double | stm_load_double (TXPARAMS volatile double *addr) |
Transactional load of a double value. | |
void * | stm_load_ptr (TXPARAMS volatile void **addr) |
Transactional load of a pointer value. | |
void | stm_load_bytes (TXPARAMS volatile uint8_t *addr, uint8_t *buf, size_t size) |
Transactional load of a memory region. | |
void | stm_store_u8 (TXPARAMS volatile uint8_t *addr, uint8_t value) |
Transactional store of an unsigned 8-bit value. | |
void | stm_store_u16 (TXPARAMS volatile uint16_t *addr, uint16_t value) |
Transactional store of an unsigned 16-bit value. | |
void | stm_store_u32 (TXPARAMS volatile uint32_t *addr, uint32_t value) |
Transactional store of an unsigned 32-bit value. | |
void | stm_store_u64 (TXPARAMS volatile uint64_t *addr, uint64_t value) |
Transactional store of an unsigned 64-bit value. | |
void | stm_store_char (TXPARAMS volatile char *addr, char value) |
Transactional store of a char value. | |
void | stm_store_uchar (TXPARAMS volatile unsigned char *addr, unsigned char value) |
Transactional store of an unsigned char value. | |
void | stm_store_short (TXPARAMS volatile short *addr, short value) |
Transactional store of a short value. | |
void | stm_store_ushort (TXPARAMS volatile unsigned short *addr, unsigned short value) |
Transactional store of an unsigned short value. | |
void | stm_store_int (TXPARAMS volatile int *addr, int value) |
Transactional store of an int value. | |
void | stm_store_uint (TXPARAMS volatile unsigned int *addr, unsigned int value) |
Transactional store of an unsigned int value. | |
void | stm_store_long (TXPARAMS volatile long *addr, long value) |
Transactional store of a long value. | |
void | stm_store_ulong (TXPARAMS volatile unsigned long *addr, unsigned long value) |
Transactional store of an unsigned long value. | |
void | stm_store_float (TXPARAMS volatile float *addr, float value) |
Transactional store of a float value. | |
void | stm_store_double (TXPARAMS volatile double *addr, double value) |
Transactional store of a double value. | |
void | stm_store_ptr (TXPARAMS volatile void **addr, void *value) |
Transactional store of a pointer value. | |
void | stm_store_bytes (TXPARAMS volatile uint8_t *addr, uint8_t *buf, size_t size) |
Transactional store of a memory region. | |
void | stm_set_bytes (TXPARAMS volatile uint8_t *addr, uint8_t byte, size_t count) |
Transactional write of a byte to a memory region. |
STM wrapper functions for different data types.
This library defines transactional loads/store functions for unsigned data types of various sizes and for basic C data types.
void stm_load_bytes | ( | TXPARAMS volatile uint8_t * | addr, | |
uint8_t * | buf, | |||
size_t | size | |||
) |
Transactional load of a memory region.
The address of the region does not need to be word aligned and its size may be longer than a word. The values are copied into the provided buffer, which must be allocated by the caller.
addr | Address of the memory location. | |
buf | Buffer for storing the read bytes. | |
size | Number of bytes to read. |
char stm_load_char | ( | TXPARAMS volatile char * | addr | ) |
Transactional load of a char value.
addr | Address of the memory location. |
double stm_load_double | ( | TXPARAMS volatile double * | addr | ) |
Transactional load of a double value.
addr | Address of the memory location. |
float stm_load_float | ( | TXPARAMS volatile float * | addr | ) |
Transactional load of a float value.
addr | Address of the memory location. |
int stm_load_int | ( | TXPARAMS volatile int * | addr | ) |
Transactional load of an int value.
addr | Address of the memory location. |
long stm_load_long | ( | TXPARAMS volatile long * | addr | ) |
Transactional load of a long value.
addr | Address of the memory location. |
void* stm_load_ptr | ( | TXPARAMS volatile void ** | addr | ) |
Transactional load of a pointer value.
addr | Address of the memory location. |
short stm_load_short | ( | TXPARAMS volatile short * | addr | ) |
Transactional load of a short value.
addr | Address of the memory location. |
uint16_t stm_load_u16 | ( | TXPARAMS volatile uint16_t * | addr | ) |
Transactional load of an unsigned 16-bit value.
addr | Address of the memory location. |
uint32_t stm_load_u32 | ( | TXPARAMS volatile uint32_t * | addr | ) |
Transactional load of an unsigned 32-bit value.
addr | Address of the memory location. |
uint64_t stm_load_u64 | ( | TXPARAMS volatile uint64_t * | addr | ) |
Transactional load of an unsigned 64-bit value.
addr | Address of the memory location. |
uint8_t stm_load_u8 | ( | TXPARAMS volatile uint8_t * | addr | ) |
Transactional load of an unsigned 8-bit value.
addr | Address of the memory location. |
unsigned char stm_load_uchar | ( | TXPARAMS volatile unsigned char * | addr | ) |
Transactional load of an unsigned char value.
addr | Address of the memory location. |
unsigned int stm_load_uint | ( | TXPARAMS volatile unsigned int * | addr | ) |
Transactional load of an unsigned int value.
addr | Address of the memory location. |
unsigned long stm_load_ulong | ( | TXPARAMS volatile unsigned long * | addr | ) |
Transactional load of an unsigned long value.
addr | Address of the memory location. |
unsigned short stm_load_ushort | ( | TXPARAMS volatile unsigned short * | addr | ) |
Transactional load of an unsigned short value.
addr | Address of the memory location. |
void stm_set_bytes | ( | TXPARAMS volatile uint8_t * | addr, | |
uint8_t | byte, | |||
size_t | count | |||
) |
Transactional write of a byte to a memory region.
The address of the region does not need to be word aligned and its size may be longer than a word. The provided byte is repeatedly copied to the whole memory region.
addr | Address of the memory location. | |
byte | Byte to write. | |
count | Number of bytes to write. |
void stm_store_bytes | ( | TXPARAMS volatile uint8_t * | addr, | |
uint8_t * | buf, | |||
size_t | size | |||
) |
Transactional store of a memory region.
The address of the region does not need to be word aligned and its size may be longer than a word. The values are copied from the provided buffer.
addr | Address of the memory location. | |
buf | Buffer with the bytes to write. | |
size | Number of bytes to write. |
void stm_store_char | ( | TXPARAMS volatile char * | addr, | |
char | value | |||
) |
Transactional store of a char value.
addr | Address of the memory location. | |
value | Value to be written. |
void stm_store_double | ( | TXPARAMS volatile double * | addr, | |
double | value | |||
) |
Transactional store of a double value.
addr | Address of the memory location. | |
value | Value to be written. |
void stm_store_float | ( | TXPARAMS volatile float * | addr, | |
float | value | |||
) |
Transactional store of a float value.
addr | Address of the memory location. | |
value | Value to be written. |
void stm_store_int | ( | TXPARAMS volatile int * | addr, | |
int | value | |||
) |
Transactional store of an int value.
addr | Address of the memory location. | |
value | Value to be written. |
void stm_store_long | ( | TXPARAMS volatile long * | addr, | |
long | value | |||
) |
Transactional store of a long value.
addr | Address of the memory location. | |
value | Value to be written. |
void stm_store_ptr | ( | TXPARAMS volatile void ** | addr, | |
void * | value | |||
) |
Transactional store of a pointer value.
addr | Address of the memory location. | |
value | Value to be written. |
void stm_store_short | ( | TXPARAMS volatile short * | addr, | |
short | value | |||
) |
Transactional store of a short value.
addr | Address of the memory location. | |
value | Value to be written. |
void stm_store_u16 | ( | TXPARAMS volatile uint16_t * | addr, | |
uint16_t | value | |||
) |
Transactional store of an unsigned 16-bit value.
addr | Address of the memory location. | |
value | Value to be written. |
void stm_store_u32 | ( | TXPARAMS volatile uint32_t * | addr, | |
uint32_t | value | |||
) |
Transactional store of an unsigned 32-bit value.
addr | Address of the memory location. | |
value | Value to be written. |
void stm_store_u64 | ( | TXPARAMS volatile uint64_t * | addr, | |
uint64_t | value | |||
) |
Transactional store of an unsigned 64-bit value.
addr | Address of the memory location. | |
value | Value to be written. |
void stm_store_u8 | ( | TXPARAMS volatile uint8_t * | addr, | |
uint8_t | value | |||
) |
Transactional store of an unsigned 8-bit value.
addr | Address of the memory location. | |
value | Value to be written. |
void stm_store_uchar | ( | TXPARAMS volatile unsigned char * | addr, | |
unsigned char | value | |||
) |
Transactional store of an unsigned char value.
addr | Address of the memory location. | |
value | Value to be written. |
void stm_store_uint | ( | TXPARAMS volatile unsigned int * | addr, | |
unsigned int | value | |||
) |
Transactional store of an unsigned int value.
addr | Address of the memory location. | |
value | Value to be written. |
void stm_store_ulong | ( | TXPARAMS volatile unsigned long * | addr, | |
unsigned long | value | |||
) |
Transactional store of an unsigned long value.
addr | Address of the memory location. | |
value | Value to be written. |
void stm_store_ushort | ( | TXPARAMS volatile unsigned short * | addr, | |
unsigned short | value | |||
) |
Transactional store of an unsigned short value.
addr | Address of the memory location. | |
value | Value to be written. |