TinySTM
1.0.5
|
STM wrapper functions for different data types. More...
Go to the source code of this file.
Functions | |
uint8_t | stm_load_u8 (volatile uint8_t *addr) |
Transactional load of an unsigned 8-bit value. More... | |
uint16_t | stm_load_u16 (volatile uint16_t *addr) |
Transactional load of an unsigned 16-bit value. More... | |
uint32_t | stm_load_u32 (volatile uint32_t *addr) |
Transactional load of an unsigned 32-bit value. More... | |
uint64_t | stm_load_u64 (volatile uint64_t *addr) |
Transactional load of an unsigned 64-bit value. More... | |
char | stm_load_char (volatile char *addr) |
Transactional load of a char value. More... | |
unsigned char | stm_load_uchar (volatile unsigned char *addr) |
Transactional load of an unsigned char value. More... | |
short | stm_load_short (volatile short *addr) |
Transactional load of a short value. More... | |
unsigned short | stm_load_ushort (volatile unsigned short *addr) |
Transactional load of an unsigned short value. More... | |
int | stm_load_int (volatile int *addr) |
Transactional load of an int value. More... | |
unsigned int | stm_load_uint (volatile unsigned int *addr) |
Transactional load of an unsigned int value. More... | |
long | stm_load_long (volatile long *addr) |
Transactional load of a long value. More... | |
unsigned long | stm_load_ulong (volatile unsigned long *addr) |
Transactional load of an unsigned long value. More... | |
float | stm_load_float (volatile float *addr) |
Transactional load of a float value. More... | |
double | stm_load_double (volatile double *addr) |
Transactional load of a double value. More... | |
void * | stm_load_ptr (volatile void **addr) |
Transactional load of a pointer value. More... | |
void | stm_load_bytes (volatile uint8_t *addr, uint8_t *buf, size_t size) |
Transactional load of a memory region. More... | |
void | stm_store_u8 (volatile uint8_t *addr, uint8_t value) |
Transactional store of an unsigned 8-bit value. More... | |
void | stm_store_u16 (volatile uint16_t *addr, uint16_t value) |
Transactional store of an unsigned 16-bit value. More... | |
void | stm_store_u32 (volatile uint32_t *addr, uint32_t value) |
Transactional store of an unsigned 32-bit value. More... | |
void | stm_store_u64 (volatile uint64_t *addr, uint64_t value) |
Transactional store of an unsigned 64-bit value. More... | |
void | stm_store_char (volatile char *addr, char value) |
Transactional store of a char value. More... | |
void | stm_store_uchar (volatile unsigned char *addr, unsigned char value) |
Transactional store of an unsigned char value. More... | |
void | stm_store_short (volatile short *addr, short value) |
Transactional store of a short value. More... | |
void | stm_store_ushort (volatile unsigned short *addr, unsigned short value) |
Transactional store of an unsigned short value. More... | |
void | stm_store_int (volatile int *addr, int value) |
Transactional store of an int value. More... | |
void | stm_store_uint (volatile unsigned int *addr, unsigned int value) |
Transactional store of an unsigned int value. More... | |
void | stm_store_long (volatile long *addr, long value) |
Transactional store of a long value. More... | |
void | stm_store_ulong (volatile unsigned long *addr, unsigned long value) |
Transactional store of an unsigned long value. More... | |
void | stm_store_float (volatile float *addr, float value) |
Transactional store of a float value. More... | |
void | stm_store_double (volatile double *addr, double value) |
Transactional store of a double value. More... | |
void | stm_store_ptr (volatile void **addr, void *value) |
Transactional store of a pointer value. More... | |
void | stm_store_bytes (volatile uint8_t *addr, uint8_t *buf, size_t size) |
Transactional store of a memory region. More... | |
void | stm_set_bytes (volatile uint8_t *addr, uint8_t byte, size_t count) |
Transactional write of a byte to a memory region. More... | |
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 | ( | 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 | ( | volatile char * | addr) |
Transactional load of a char value.
addr | Address of the memory location. |
double stm_load_double | ( | volatile double * | addr) |
Transactional load of a double value.
addr | Address of the memory location. |
float stm_load_float | ( | volatile float * | addr) |
Transactional load of a float value.
addr | Address of the memory location. |
int stm_load_int | ( | volatile int * | addr) |
Transactional load of an int value.
addr | Address of the memory location. |
long stm_load_long | ( | volatile long * | addr) |
Transactional load of a long value.
addr | Address of the memory location. |
void* stm_load_ptr | ( | volatile void ** | addr) |
Transactional load of a pointer value.
addr | Address of the memory location. |
short stm_load_short | ( | volatile short * | addr) |
Transactional load of a short value.
addr | Address of the memory location. |
uint16_t stm_load_u16 | ( | volatile uint16_t * | addr) |
Transactional load of an unsigned 16-bit value.
addr | Address of the memory location. |
uint32_t stm_load_u32 | ( | volatile uint32_t * | addr) |
Transactional load of an unsigned 32-bit value.
addr | Address of the memory location. |
uint64_t stm_load_u64 | ( | volatile uint64_t * | addr) |
Transactional load of an unsigned 64-bit value.
addr | Address of the memory location. |
uint8_t stm_load_u8 | ( | volatile uint8_t * | addr) |
Transactional load of an unsigned 8-bit value.
addr | Address of the memory location. |
unsigned char stm_load_uchar | ( | volatile unsigned char * | addr) |
Transactional load of an unsigned char value.
addr | Address of the memory location. |
unsigned int stm_load_uint | ( | volatile unsigned int * | addr) |
Transactional load of an unsigned int value.
addr | Address of the memory location. |
unsigned long stm_load_ulong | ( | volatile unsigned long * | addr) |
Transactional load of an unsigned long value.
addr | Address of the memory location. |
unsigned short stm_load_ushort | ( | volatile unsigned short * | addr) |
Transactional load of an unsigned short value.
addr | Address of the memory location. |
void stm_set_bytes | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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 | ( | 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. |