Infineon MOTIX™ MCU TLE987x Device Family SDK
Functions
sfr_access.h File Reference

Go to the source code of this file.

Detailed Description

SFR low level access library.

Version
V0.1.4
Date
02. Jan 2025
Note
This File is MISRA compliant.

Include Graph

Include dependency graph for sfr_access.h:

Include Graph

This graph shows which files directly or indirectly include this file:

Functions

INLINE void Field_Wrt8all (volatile uint8 *reg, uint8 val)
 This function writes an 8-bit register directly, no mask/position needed. More...
 
INLINE void Field_Wrt8 (volatile uint8 *reg, uint8 pos, uint8 msk, uint8 val)
 This function writes a bit field in a 8-bit register. More...
 
INLINE void Field_Wrt16 (volatile uint16 *reg, uint16 pos, uint16 msk, uint16 val)
 This function writes a bit field in a 16-bit register. More...
 
INLINE void Field_Wrt32 (volatile uint32 *reg, uint32 pos, uint32 msk, uint32 val)
 This function writes a bit field in a 32-bit register. More...
 
INLINE void Field_Mod8 (volatile uint8 *reg, uint8 pos, uint8 msk, uint8 val)
 This function writes a bit field in a 8-bit register. More...
 
INLINE void Field_Mod16 (volatile uint16 *reg, uint16 pos, uint16 msk, uint16 val)
 This function writes a bit field in a 16-bit register. More...
 
INLINE void Field_Mod32 (volatile uint32 *reg, uint32 pos, uint32 msk, uint32 val)
 This function writes a bit field in a 32-bit register. More...
 
INLINE void Field_Inv8 (volatile uint8 *reg, uint8 msk)
 This function inverts a bit field in a 8-bit register. More...
 
INLINE void Field_Inv16 (volatile uint16 *reg, uint16 msk)
 This function inverts a bit field in a 16-bit register. More...
 
INLINE void Field_Inv32 (volatile uint32 *reg, uint32 msk)
 This function inverts a bit field in a 32-bit register. More...
 
INLINE void Field_Clr8 (volatile uint8 *reg, uint8 msk)
 This function clears a bit field in a 8-bit register. More...
 
INLINE void Field_Clr16 (volatile uint16 *reg, uint16 msk)
 This function clears a bit field in a 16-bit register. More...
 
INLINE void Field_Clr32 (volatile uint32 *reg, uint32 msk)
 This function clears a bit field in a 32-bit register. More...
 
INLINE uint8 u1_Field_Rd8 (const volatile uint8 *reg, uint8 pos, uint8 msk)
 This function reads a 1-bit field of a 8-bit register. More...
 
INLINE uint8 u1_Field_Rd16 (const volatile uint16 *reg, uint16 pos, uint16 msk)
 This function reads a 1-bit field of a 16-bit register. More...
 
INLINE uint8 u1_Field_Rd32 (const volatile uint32 *reg, uint32 pos, uint32 msk)
 This function reads a 1-bit field of a 32-bit register. More...
 
INLINE uint8 u8_Field_Rd8 (const volatile uint8 *reg, uint8 pos, uint8 msk)
 This function reads a 8-bit field of a 8-bit register. More...
 
INLINE uint8 u8_Field_Rd16 (const volatile uint16 *reg, uint16 pos, uint16 msk)
 This function reads a 8-bit field of a 16-bit register. More...
 
INLINE uint8 u8_Field_Rd32 (const volatile uint32 *reg, uint32 pos, uint32 msk)
 This function reads a 8-bit field of a 32-bit register. More...
 
INLINE uint16 u16_Field_Rd16 (const volatile uint16 *reg, uint16 pos, uint16 msk)
 This function reads a 16-bit field of a 16-bit register. More...
 
INLINE uint16 u16_Field_Rd32 (const volatile uint32 *reg, uint32 pos, uint32 msk)
 This function reads a 16-bit field of a 32-bit register. More...
 
INLINE uint32 u32_Field_Rd32 (const volatile uint32 *reg, uint32 pos, uint32 msk)
 This function reads a 32-bit field of a 32-bit register. More...
 

Function Documentation

◆ Field_Clr16()

INLINE void Field_Clr16 ( volatile uint16 reg,
uint16  msk 
)

This function clears a bit field in a 16-bit register.

Note
This is a read-modify-write access.
Parameters
regpointer to an 16-bit register
mskmask of the bit field within the register

◆ Field_Clr32()

INLINE void Field_Clr32 ( volatile uint32 reg,
uint32  msk 
)

This function clears a bit field in a 32-bit register.

Note
This is a read-modify-write access.
Parameters
regpointer to an 32-bit register
mskmask of the bit field within the register

◆ Field_Clr8()

INLINE void Field_Clr8 ( volatile uint8 reg,
uint8  msk 
)

This function clears a bit field in a 8-bit register.

Note
This is a read-modify-write access.
Parameters
regpointer to an 8-bit register
mskmask of the bit field within the register

◆ Field_Inv16()

INLINE void Field_Inv16 ( volatile uint16 reg,
uint16  msk 
)

This function inverts a bit field in a 16-bit register.

Note
This is a read-invert-write access.
Parameters
regpointer to an 16-bit register
mskmask of the bit field within the register

◆ Field_Inv32()

INLINE void Field_Inv32 ( volatile uint32 reg,
uint32  msk 
)

This function inverts a bit field in a 32-bit register.

Note
This is a read-invert-write access.
Parameters
regpointer to an 32-bit register
mskmask of the bit field within the register

◆ Field_Inv8()

INLINE void Field_Inv8 ( volatile uint8 reg,
uint8  msk 
)

This function inverts a bit field in a 8-bit register.

Note
This is a read-invert-write access.
Parameters
regpointer to an 8-bit register
mskmask of the bit field within the register

◆ Field_Mod16()

INLINE void Field_Mod16 ( volatile uint16 reg,
uint16  pos,
uint16  msk,
uint16  val 
)

This function writes a bit field in a 16-bit register.

Note
This is a read-modify-write access.
Parameters
regpointer to an 16-bit register
mskmask of the bit field within the register
posbit position of the bit field within the register
valvalue to be written to bitfield

◆ Field_Mod32()

INLINE void Field_Mod32 ( volatile uint32 reg,
uint32  pos,
uint32  msk,
uint32  val 
)

This function writes a bit field in a 32-bit register.

Note
This is a read-modify-write access.
Parameters
regpointer to an 32-bit register
mskmask of the bit field within the register
posbit position of the bit field within the register
valvalue to be written to bitfield

◆ Field_Mod8()

INLINE void Field_Mod8 ( volatile uint8 reg,
uint8  pos,
uint8  msk,
uint8  val 
)

This function writes a bit field in a 8-bit register.

Note
This is a read-modify-write access.
Parameters
regpointer to an 8-bit register
mskmask of the bit field within the register
posbit position of the bit field within the register
valvalue to be written to bitfield

◆ Field_Wrt16()

INLINE void Field_Wrt16 ( volatile uint16 reg,
uint16  pos,
uint16  msk,
uint16  val 
)

This function writes a bit field in a 16-bit register.

Note
This is a direct write, no read-modify-write.
Parameters
regpointer to an 16-bit register
mskmask of the bit field within the register
posbit position of the bit field within the register
valvalue to be written to bitfield

◆ Field_Wrt32()

INLINE void Field_Wrt32 ( volatile uint32 reg,
uint32  pos,
uint32  msk,
uint32  val 
)

This function writes a bit field in a 32-bit register.

Note
This is a direct write, no read-modify-write.
Parameters
regpointer to an 32-bit register
mskmask of the bit field within the register
posbit position of the bit field within the register
valvalue to be written to bitfield

◆ Field_Wrt8()

INLINE void Field_Wrt8 ( volatile uint8 reg,
uint8  pos,
uint8  msk,
uint8  val 
)

This function writes a bit field in a 8-bit register.

Note
This is a direct write, no read-modify-write.
Parameters
regpointer to an 8-bit register
mskmask of the bit field within the register
posbit position of the bit field within the register
valvalue to be written to bitfield

◆ Field_Wrt8all()

INLINE void Field_Wrt8all ( volatile uint8 reg,
uint8  val 
)

This function writes an 8-bit register directly, no mask/position needed.

Note
This is a direct write, no read-modify-write.
Parameters
regpointer to an 8-bit register
valvalue to be written

◆ u16_Field_Rd16()

INLINE uint16 u16_Field_Rd16 ( const volatile uint16 reg,
uint16  pos,
uint16  msk 
)

This function reads a 16-bit field of a 16-bit register.

Parameters
regpointer to a register
mskmask of the bit field within the register
posbit position of the bit field within the register
Returns
uint16

◆ u16_Field_Rd32()

INLINE uint16 u16_Field_Rd32 ( const volatile uint32 reg,
uint32  pos,
uint32  msk 
)

This function reads a 16-bit field of a 32-bit register.

Parameters
regpointer to a register
mskmask of the bit field within the register
posbit position of the bit field within the register
Returns
uint16

◆ u1_Field_Rd16()

INLINE uint8 u1_Field_Rd16 ( const volatile uint16 reg,
uint16  pos,
uint16  msk 
)

This function reads a 1-bit field of a 16-bit register.

Parameters
regpointer to a register
mskmask of the bit field within the register
posbit position of the bit field within the register
Returns
bool

◆ u1_Field_Rd32()

INLINE uint8 u1_Field_Rd32 ( const volatile uint32 reg,
uint32  pos,
uint32  msk 
)

This function reads a 1-bit field of a 32-bit register.

Parameters
regpointer to a register
mskmask of the bit field within the register
posbit position of the bit field within the register
Returns
bool

◆ u1_Field_Rd8()

INLINE uint8 u1_Field_Rd8 ( const volatile uint8 reg,
uint8  pos,
uint8  msk 
)

This function reads a 1-bit field of a 8-bit register.

Parameters
regpointer to a register
mskmask of the bit field within the register
posbit position of the bit field within the register
Returns
bool

◆ u32_Field_Rd32()

INLINE uint32 u32_Field_Rd32 ( const volatile uint32 reg,
uint32  pos,
uint32  msk 
)

This function reads a 32-bit field of a 32-bit register.

Parameters
regpointer to a register
mskmask of the bit field within the register
posbit position of the bit field within the register
Returns
uint32

◆ u8_Field_Rd16()

INLINE uint8 u8_Field_Rd16 ( const volatile uint16 reg,
uint16  pos,
uint16  msk 
)

This function reads a 8-bit field of a 16-bit register.

Parameters
regpointer to a register
mskmask of the bit field within the register
posbit position of the bit field within the register
Returns
uint8

◆ u8_Field_Rd32()

INLINE uint8 u8_Field_Rd32 ( const volatile uint32 reg,
uint32  pos,
uint32  msk 
)

This function reads a 8-bit field of a 32-bit register.

Parameters
regpointer to a register
mskmask of the bit field within the register
posbit position of the bit field within the register
Returns
uint8

◆ u8_Field_Rd8()

INLINE uint8 u8_Field_Rd8 ( const volatile uint8 reg,
uint8  pos,
uint8  msk 
)

This function reads a 8-bit field of a 8-bit register.

Parameters
regpointer to a register
mskmask of the bit field within the register
posbit position of the bit field within the register
Returns
uint8