Driverlib common API
Module: Driverlib (AM13E230X) APIs
Functions
Name |
|
|---|---|
void |
error(const char * filename, uint32_t line) |
__STATIC_INLINE void |
DL_Common_updateReg(volatile uint32_t * reg, uint32_t val, uint32_t mask) |
__STATIC_INLINE void |
DL_Common_regWr32(volatile uint32_t * regPtr, uint32_t val) |
__STATIC_INLINE void |
DL_Common_regWr16(volatile uint16_t * regPtr, uint16_t val) |
__STATIC_INLINE void |
DL_Common_regWr8(volatile uint8_t * regPtr, uint8_t val) |
__STATIC_INLINE uint32_t |
DL_Common_regRd32(const volatile uint32_t * regPtr) |
__STATIC_INLINE uint16_t |
DL_Common_regRd16(const volatile uint16_t * regPtr) |
__STATIC_INLINE uint8_t |
DL_Common_regRd8(const volatile uint8_t * regPtr) |
__STATIC_INLINE void |
DL_Common_regWr32WithOffset(volatile uint32_t * regPtr, uint32_t wordOffset, uint32_t val) |
__STATIC_INLINE void |
DL_Common_regWr16WithOffset(volatile uint16_t * regPtr, uint32_t halfWordOffset, uint16_t val) |
__STATIC_INLINE void |
DL_Common_regWr8WithOffset(volatile uint8_t * regPtr, uint32_t byteOffset, uint8_t val) |
__STATIC_INLINE uint32_t |
DL_Common_regRd32WithOffset(const volatile uint32_t * regPtr, uint32_t wordOffset) |
__STATIC_INLINE uint16_t |
DL_Common_regRd16WithOffset(const volatile uint16_t * regPtr, uint32_t halfWordOffset) |
__STATIC_INLINE uint8_t |
DL_Common_regRd8WithOffset(const volatile uint8_t * regPtr, uint32_t byteOffset) |
__STATIC_INLINE void |
DL_Common_reg32FldInsert(volatile uint32_t * regPtr, uint32_t val, uint32_t shift, uint32_t mask) |
__STATIC_INLINE void |
DL_Common_reg16FldInsert(volatile uint16_t * regPtr, uint16_t val, uint32_t shift, uint16_t mask) |
__STATIC_INLINE void |
DL_Common_reg8FldInsert(volatile uint8_t * regPtr, uint8_t val, uint32_t shift, uint8_t mask) |
__STATIC_INLINE uint32_t |
DL_Common_reg32FldExtract(const volatile uint32_t * regPtr, uint32_t shift, uint32_t mask) |
__STATIC_INLINE uint16_t |
DL_Common_reg16FldExtract(const volatile uint16_t * regPtr, uint32_t shift, uint16_t mask) |
__STATIC_INLINE uint8_t |
DL_Common_reg8FldExtract(const volatile uint8_t * regPtr, uint32_t shift, uint8_t mask) |
__STATIC_INLINE void |
DL_Common_reg32FldInsertWithOffset(volatile uint32_t * regPtr, uint32_t wordOffset, uint32_t val, uint32_t shift, uint32_t mask) |
__STATIC_INLINE void |
DL_Common_reg16FldInsertWithOffset(volatile uint16_t * regPtr, uint32_t halfWordOffset, uint16_t val, uint32_t shift, uint16_t mask) |
__STATIC_INLINE void |
DL_Common_reg8FldInsertWithOffset(volatile uint8_t * regPtr, uint32_t byteOffset, uint8_t val, uint32_t shift, uint8_t mask) |
__STATIC_INLINE uint32_t |
DL_Common_reg32FldExtractWithOffset(const volatile uint32_t * regPtr, uint32_t wordOffset, uint32_t shift, uint32_t mask) |
__STATIC_INLINE uint16_t |
DL_Common_reg16FldExtractWithOffset(const volatile uint16_t * regPtr, uint32_t halfWordOffset, uint32_t shift, uint16_t mask) |
__STATIC_INLINE uint8_t |
DL_Common_reg8FldExtractWithOffset(const volatile uint8_t * regPtr, uint32_t byteOffset, uint32_t shift, uint8_t mask) |
__STATIC_INLINE void |
DL_Common_reg32SetBits(volatile uint32_t * regPtr, uint32_t mask) |
__STATIC_INLINE void |
DL_Common_reg16SetBits(volatile uint16_t * regPtr, uint16_t mask) |
__STATIC_INLINE void |
DL_Common_reg8SetBits(volatile uint8_t * regPtr, uint8_t mask) |
__STATIC_INLINE void |
DL_Common_reg32ClearBits(volatile uint32_t * regPtr, uint32_t mask) |
__STATIC_INLINE void |
DL_Common_reg16ClearBits(volatile uint16_t * regPtr, uint16_t mask) |
__STATIC_INLINE void |
DL_Common_reg8ClearBits(volatile uint8_t * regPtr, uint8_t mask) |
__STATIC_INLINE void |
DL_Common_reg32SetBitsWithOffset(volatile uint32_t * regPtr, uint32_t wordOffset, uint32_t mask) |
__STATIC_INLINE void |
DL_Common_reg16SetBitsWithOffset(volatile uint16_t * regPtr, uint32_t halfWordOffset, uint16_t mask) |
__STATIC_INLINE void |
DL_Common_reg8SetBitsWithOffset(volatile uint8_t * regPtr, uint32_t byteOffset, uint8_t mask) |
__STATIC_INLINE void |
DL_Common_reg32ClearBitsWithOffset(volatile uint32_t * regPtr, uint32_t wordOffset, uint32_t mask) |
__STATIC_INLINE void |
DL_Common_reg16ClearBitsWithOffset(volatile uint16_t * regPtr, uint32_t halfWordOffset, uint16_t mask) |
__STATIC_INLINE void |
DL_Common_reg8ClearBitsWithOffset(volatile uint8_t * regPtr, uint32_t byteOffset, uint8_t mask) |
__STATIC_INLINE bool |
DL_Common_reg32CheckBit(const volatile uint32_t * regPtr, uint8_t bitPosition) |
__STATIC_INLINE bool |
DL_Common_reg16CheckBit(const volatile uint16_t * regPtr, uint8_t bitPosition) |
__STATIC_INLINE bool |
DL_Common_reg8CheckBit(const volatile uint8_t * regPtr, uint8_t bitPosition) |
__STATIC_INLINE bool |
DL_Common_reg32CheckBitWithOffset(const volatile uint32_t * regPtr, uint32_t wordOffset, uint8_t bitPosition) |
__STATIC_INLINE bool |
DL_Common_reg16CheckBitWithOffset(const volatile uint16_t * regPtr, uint32_t halfWordOffset, uint8_t bitPosition) |
__STATIC_INLINE bool |
DL_Common_reg8CheckBitWithOffset(const volatile uint8_t * regPtr, uint32_t byteOffset, uint8_t bitPosition) |
void |
DL_Common_delayCycles(uint32_t cycles) |
Defines
Name |
|
|---|---|
DL_STATUS_OK |
|
DL_STATUS_FAIL |
|
HWREG(x) |
|
HWREGH(x) |
|
HWREGB(x) |
|
ASSERT(expr) |
Detailed Description
APIs used across multiple DriverLib modules
Functions Documentation
function error
void __error__(
const char * filename,
uint32_t line
)
RAMFUNC macro is added before a function to execute the function from RAM.
Parameters:
filename File Name
line Line number
Error function that is called when an invalid argument is passed to an API
It is the application’s responsibility to define the error function. A weak definition of the function is available in dl_common.c file
function DL_Common_updateReg
__STATIC_INLINE void DL_Common_updateReg(
volatile uint32_t * reg,
uint32_t val,
uint32_t mask
)
Writes value to specified register - retaining bits unaffected by mask.
Parameters:
reg Pointer to the register overlay for the peripheral.
val Value to be written to the register.
mask Mask defines which bits will be altered.
function DL_Common_regWr32
__STATIC_INLINE void DL_Common_regWr32(
volatile uint32_t * regPtr,
uint32_t val
)
Write a 32-bit value to a hardware register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
val Unsigned 32-bit value to be written to the register.
function DL_Common_regWr16
__STATIC_INLINE void DL_Common_regWr16(
volatile uint16_t * regPtr,
uint16_t val
)
Write a 16-bit value to a hardware register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
val Unsigned 16-bit value to be written to the register.
function DL_Common_regWr8
__STATIC_INLINE void DL_Common_regWr8(
volatile uint8_t * regPtr,
uint8_t val
)
Write a 8-bit value to a hardware register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
val Unsigned 8-bit value to be written to the register.
function DL_Common_regRd32
__STATIC_INLINE uint32_t DL_Common_regRd32(
const volatile uint32_t * regPtr
)
Read a 32-bit value from a hardware register and returns the value.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
Return: Unsigned 32-bit value read from the register.
function DL_Common_regRd16
__STATIC_INLINE uint16_t DL_Common_regRd16(
const volatile uint16_t * regPtr
)
Read a 16-bit value from a hardware register and returns the value.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
Return: Unsigned 16-bit value read from the register.
function DL_Common_regRd8
__STATIC_INLINE uint8_t DL_Common_regRd8(
const volatile uint8_t * regPtr
)
Read a 8-bit value from a hardware register and returns the value.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
Return: Unsigned 8-bit value read from the register.
function DL_Common_regWr32WithOffset
__STATIC_INLINE void DL_Common_regWr32WithOffset(
volatile uint32_t * regPtr,
uint32_t wordOffset,
uint32_t val
)
Write a 32-bit value to a hardware register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
wordOffset Offset to be added to the register pointer (in terms of 32-bit words).
val Unsigned 32-bit value to be written to the register.
function DL_Common_regWr16WithOffset
__STATIC_INLINE void DL_Common_regWr16WithOffset(
volatile uint16_t * regPtr,
uint32_t halfWordOffset,
uint16_t val
)
Write a 16-bit value to a hardware register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
halfWordOffset Offset to be added to the register pointer (in terms of 16-bit words).
val Unsigned 16-bit value to be written to the register.
function DL_Common_regWr8WithOffset
__STATIC_INLINE void DL_Common_regWr8WithOffset(
volatile uint8_t * regPtr,
uint32_t byteOffset,
uint8_t val
)
Write a 8-bit value to a hardware register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
byteOffset Offset to be added to the register pointer (in terms of bytes).
val Unsigned 8-bit value to be written to the register.
function DL_Common_regRd32WithOffset
__STATIC_INLINE uint32_t DL_Common_regRd32WithOffset(
const volatile uint32_t * regPtr,
uint32_t wordOffset
)
Read a 32-bit value from a hardware register at an offset and returns the value.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
wordOffset Offset to be added to the register pointer (in terms of 32-bit words).
Return: Unsigned 32-bit value read from the register.
function DL_Common_regRd16WithOffset
__STATIC_INLINE uint16_t DL_Common_regRd16WithOffset(
const volatile uint16_t * regPtr,
uint32_t halfWordOffset
)
Read a 16-bit value from a hardware register at an offset and returns the value.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
halfWordOffset Offset to be added to the register pointer (in terms of 16-bit words).
Return: Unsigned 16-bit value read from the register.
function DL_Common_regRd8WithOffset
__STATIC_INLINE uint8_t DL_Common_regRd8WithOffset(
const volatile uint8_t * regPtr,
uint32_t byteOffset
)
Read a 8-bit value from a hardware register at an offset and returns the value.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
byteOffset Offset to be added to the register pointer (in terms of bytes).
Return: Unsigned 8-bit value read from the register.
function DL_Common_reg32FldInsert
__STATIC_INLINE void DL_Common_reg32FldInsert(
volatile uint32_t * regPtr,
uint32_t val,
uint32_t shift,
uint32_t mask
)
Insert value to the specified field of the 32 bit register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
val Value to be written to the field.
shift Bit field shift from LSB.
mask Mask define which bits will be altered.
This function reads a 32 bit register, modifies specific set of bits and writes back to the register.
function DL_Common_reg16FldInsert
__STATIC_INLINE void DL_Common_reg16FldInsert(
volatile uint16_t * regPtr,
uint16_t val,
uint32_t shift,
uint16_t mask
)
Insert value to the specified field of the 16 bit register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
val Value to be written to the field.
shift Bit field shift from LSB.
mask Mask define which bits will be altered.
This function reads a 16 bit register, modifies specific set of bits and writes back to the register.
function DL_Common_reg8FldInsert
__STATIC_INLINE void DL_Common_reg8FldInsert(
volatile uint8_t * regPtr,
uint8_t val,
uint32_t shift,
uint8_t mask
)
Insert value to the specified field of the 8 bit register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
val Value to be written to the field.
shift Bit field shift from LSB.
mask Mask define which bits will be altered.
This function reads a 8 bit register, modifies specific set of bits and writes back to the register.
function DL_Common_reg32FldExtract
__STATIC_INLINE uint32_t DL_Common_reg32FldExtract(
const volatile uint32_t * regPtr,
uint32_t shift,
uint32_t mask
)
Extract value from a specified field of the 32 bit register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
shift Bit field shift from LSB.
mask Mask define which bits will be altered.
Return: Bit-field value (absolute value - shifted to LSB position).
This function reads a 32 bit register, masks specific set of bits and returns the bit field value.
function DL_Common_reg16FldExtract
__STATIC_INLINE uint16_t DL_Common_reg16FldExtract(
const volatile uint16_t * regPtr,
uint32_t shift,
uint16_t mask
)
Extract value from a specified field of the 16 bit register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
shift Bit field shift from LSB.
mask Mask define which bits will be altered.
Return: Bit-field value (absolute value - shifted to LSB position).
This function reads a 16 bit register, masks specific set of bits and returns the bit field value.
function DL_Common_reg8FldExtract
__STATIC_INLINE uint8_t DL_Common_reg8FldExtract(
const volatile uint8_t * regPtr,
uint32_t shift,
uint8_t mask
)
Extract value from a specified field of the 8 bit register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
shift Bit field shift from LSB.
mask Mask define which bits will be altered.
Return: Bit-field value (absolute value - shifted to LSB position).
This function reads a 8 bit register, masks specific set of bits and returns the bit field value.
function DL_Common_reg32FldInsertWithOffset
__STATIC_INLINE void DL_Common_reg32FldInsertWithOffset(
volatile uint32_t * regPtr,
uint32_t wordOffset,
uint32_t val,
uint32_t shift,
uint32_t mask
)
Insert value to the specified field of a 32 bit register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
wordOffset Offset to be added to the register pointer (in terms of 32-bit words).
val Value to be written to the field.
shift Bit field shift from LSB.
mask Mask define which bits will be altered.
This function reads a 32 bit register at the given offset, modifies specific set of bits and writes back to the register.
function DL_Common_reg16FldInsertWithOffset
__STATIC_INLINE void DL_Common_reg16FldInsertWithOffset(
volatile uint16_t * regPtr,
uint32_t halfWordOffset,
uint16_t val,
uint32_t shift,
uint16_t mask
)
Insert value to the specified field of a 16 bit register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
halfWordOffset Offset to be added to the register pointer (in terms of 16-bit words).
val Value to be written to the field.
shift Bit field shift from LSB.
mask Mask define which bits will be altered.
This function reads a 16 bit register at the given offset, modifies specific set of bits and writes back to the register.
function DL_Common_reg8FldInsertWithOffset
__STATIC_INLINE void DL_Common_reg8FldInsertWithOffset(
volatile uint8_t * regPtr,
uint32_t byteOffset,
uint8_t val,
uint32_t shift,
uint8_t mask
)
Insert value to the specified field of an 8 bit register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
byteOffset Offset to be added to the register pointer (in terms of bytes).
val Value to be written to the field.
shift Bit field shift from LSB.
mask Mask define which bits will be altered.
This function reads an 8 bit register at the given offset, modifies specific set of bits and writes back to the register.
function DL_Common_reg32FldExtractWithOffset
__STATIC_INLINE uint32_t DL_Common_reg32FldExtractWithOffset(
const volatile uint32_t * regPtr,
uint32_t wordOffset,
uint32_t shift,
uint32_t mask
)
Extract value from a specified field of a 32 bit register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
wordOffset Offset to be added to the register pointer (in terms of 32-bit words).
shift Bit field shift from LSB.
mask Mask define which bits will be extracted.
Return: Bit-field value (absolute value - shifted to LSB position).
This function reads a 32 bit register at the given offset, masks specific set of bits and returns the bit field value.
function DL_Common_reg16FldExtractWithOffset
__STATIC_INLINE uint16_t DL_Common_reg16FldExtractWithOffset(
const volatile uint16_t * regPtr,
uint32_t halfWordOffset,
uint32_t shift,
uint16_t mask
)
Extract value from a specified field of a 16 bit register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
halfWordOffset Offset to be added to the register pointer (in terms of 16-bit words).
shift Bit field shift from LSB.
mask Mask define which bits will be extracted.
Return: Bit-field value (absolute value - shifted to LSB position).
This function reads a 16 bit register at the given offset, masks specific set of bits and returns the bit field value.
function DL_Common_reg8FldExtractWithOffset
__STATIC_INLINE uint8_t DL_Common_reg8FldExtractWithOffset(
const volatile uint8_t * regPtr,
uint32_t byteOffset,
uint32_t shift,
uint8_t mask
)
Extract value from a specified field of an 8 bit register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
byteOffset Offset to be added to the register pointer (in terms of bytes).
shift Bit field shift from LSB.
mask Mask define which bits will be extracted.
Return: Bit-field value (absolute value - shifted to LSB position).
This function reads an 8 bit register at the given offset, masks specific set of bits and returns the bit field value.
function DL_Common_reg32SetBits
__STATIC_INLINE void DL_Common_reg32SetBits(
volatile uint32_t * regPtr,
uint32_t mask
)
Set the bits specified by the mask for a 32 bit register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
mask Mask define which bits will be set.
This function reads a 32 bit register, sets the specified set of bits and writes back to the register.
function DL_Common_reg16SetBits
__STATIC_INLINE void DL_Common_reg16SetBits(
volatile uint16_t * regPtr,
uint16_t mask
)
Set the bits specified by the mask for a 16 bit register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
mask Mask define which bits will be set.
This function reads a 16 bit register, sets the specified set of bits and writes back to the register.
function DL_Common_reg8SetBits
__STATIC_INLINE void DL_Common_reg8SetBits(
volatile uint8_t * regPtr,
uint8_t mask
)
Set the bits specified by the mask for a 8 bit register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
mask Mask define which bits will be set.
This function reads a 8 bit register, sets the specified set of bits and writes back to the register.
function DL_Common_reg32ClearBits
__STATIC_INLINE void DL_Common_reg32ClearBits(
volatile uint32_t * regPtr,
uint32_t mask
)
Clear the bits specified by the mask for a 32 bit register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
mask Mask define which bits will be cleared.
This function reads a 32 bit register, clears the specified set of bits and writes back to the register.
function DL_Common_reg16ClearBits
__STATIC_INLINE void DL_Common_reg16ClearBits(
volatile uint16_t * regPtr,
uint16_t mask
)
Clear the bits specified by the mask for a 16 bit register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
mask Mask define which bits will be cleared.
This function reads a 16 bit register, clears the specified set of bits and writes back to the register.
function DL_Common_reg8ClearBits
__STATIC_INLINE void DL_Common_reg8ClearBits(
volatile uint8_t * regPtr,
uint8_t mask
)
Clear the bits specified by the mask for a 8 bit register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
mask Mask define which bits will be cleared.
This function reads a 8 bit register, clears the specified set of bits and writes back to the register.
function DL_Common_reg32SetBitsWithOffset
__STATIC_INLINE void DL_Common_reg32SetBitsWithOffset(
volatile uint32_t * regPtr,
uint32_t wordOffset,
uint32_t mask
)
Set the bits specified by the mask for a 32 bit register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
wordOffset Offset to be added to the register pointer (in terms of 32-bit words).
mask Mask define which bits will be set.
This function reads a 32 bit register at the given offset, sets the specified set of bits and writes back to the register.
function DL_Common_reg16SetBitsWithOffset
__STATIC_INLINE void DL_Common_reg16SetBitsWithOffset(
volatile uint16_t * regPtr,
uint32_t halfWordOffset,
uint16_t mask
)
Set the bits specified by the mask for a 16 bit register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
halfWordOffset Offset to be added to the register pointer (in terms of 16-bit words).
mask Mask define which bits will be set.
This function reads a 16 bit register at the given offset, sets the specified set of bits and writes back to the register.
function DL_Common_reg8SetBitsWithOffset
__STATIC_INLINE void DL_Common_reg8SetBitsWithOffset(
volatile uint8_t * regPtr,
uint32_t byteOffset,
uint8_t mask
)
Set the bits specified by the mask for a 8 bit register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
byteOffset Offset to be added to the register pointer (in terms of bytes).
mask Mask define which bits will be set.
This function reads an 8 bit register at the given offset, sets the specified set of bits and writes back to the register.
function DL_Common_reg32ClearBitsWithOffset
__STATIC_INLINE void DL_Common_reg32ClearBitsWithOffset(
volatile uint32_t * regPtr,
uint32_t wordOffset,
uint32_t mask
)
Clear the bits specified by the mask for a 32 bit register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
wordOffset Offset to be added to the register pointer (in terms of 32-bit words).
mask Mask define which bits will be cleared.
This function reads a 32 bit register at the given offset, clears the specified set of bits and writes back to the register.
function DL_Common_reg16ClearBitsWithOffset
__STATIC_INLINE void DL_Common_reg16ClearBitsWithOffset(
volatile uint16_t * regPtr,
uint32_t halfWordOffset,
uint16_t mask
)
Clear the bits specified by the mask for a 16 bit register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
halfWordOffset Offset to be added to the register pointer (in terms of 16-bit words).
mask Mask define which bits will be cleared.
This function reads a 16 bit register at the given offset, clears the specified set of bits and writes back to the register.
function DL_Common_reg8ClearBitsWithOffset
__STATIC_INLINE void DL_Common_reg8ClearBitsWithOffset(
volatile uint8_t * regPtr,
uint32_t byteOffset,
uint8_t mask
)
Clear the bits specified by the mask for a 8 bit register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
byteOffset Offset to be added to the register pointer (in terms of bytes).
mask Mask define which bits will be cleared.
This function reads an 8 bit register at the given offset, clears the specified set of bits and writes back to the register.
function DL_Common_reg32CheckBit
__STATIC_INLINE bool DL_Common_reg32CheckBit(
const volatile uint32_t * regPtr,
uint8_t bitPosition
)
Check if a specific bit is set in a 32 bit register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
bitPosition Bit position to check (0-31).
Return: true if the bit is set, false otherwise.
This function reads a 32 bit register and returns true if the bit at the specified position is set, false otherwise.
function DL_Common_reg16CheckBit
__STATIC_INLINE bool DL_Common_reg16CheckBit(
const volatile uint16_t * regPtr,
uint8_t bitPosition
)
Check if a specific bit is set in a 16 bit register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
bitPosition Bit position to check (0-15).
Return: true if the bit is set, false otherwise.
This function reads a 16 bit register and returns true if the bit at the specified position is set, false otherwise.
function DL_Common_reg8CheckBit
__STATIC_INLINE bool DL_Common_reg8CheckBit(
const volatile uint8_t * regPtr,
uint8_t bitPosition
)
Check if a specific bit is set in an 8 bit register.
Parameters:
regPtr Pointer to the register overlay for the peripheral.
bitPosition Bit position to check (0-7).
Return: true if the bit is set, false otherwise.
This function reads an 8 bit register and returns true if the bit at the specified position is set, false otherwise.
function DL_Common_reg32CheckBitWithOffset
__STATIC_INLINE bool DL_Common_reg32CheckBitWithOffset(
const volatile uint32_t * regPtr,
uint32_t wordOffset,
uint8_t bitPosition
)
Check if a specific bit is set in a 32 bit register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
wordOffset Offset to be added to the register pointer (in terms of 32-bit words).
bitPosition Bit position to check (0-31).
Return: true if the bit is set, false otherwise.
This function reads a 32 bit register at the given offset and returns true if the bit at the specified position is set, false otherwise.
function DL_Common_reg16CheckBitWithOffset
__STATIC_INLINE bool DL_Common_reg16CheckBitWithOffset(
const volatile uint16_t * regPtr,
uint32_t halfWordOffset,
uint8_t bitPosition
)
Check if a specific bit is set in a 16 bit register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
halfWordOffset Offset to be added to the register pointer (in terms of 16-bit words).
bitPosition Bit position to check (0-15).
Return: true if the bit is set, false otherwise.
This function reads a 16 bit register at the given offset and returns true if the bit at the specified position is set, false otherwise.
function DL_Common_reg8CheckBitWithOffset
__STATIC_INLINE bool DL_Common_reg8CheckBitWithOffset(
const volatile uint8_t * regPtr,
uint32_t byteOffset,
uint8_t bitPosition
)
Check if a specific bit is set in an 8 bit register at an offset.
Parameters:
regPtr Pointer to the base register overlay for the peripheral.
byteOffset Offset to be added to the register pointer (in terms of bytes).
bitPosition Bit position to check (0-7).
Return: true if the bit is set, false otherwise.
This function reads an 8 bit register at the given offset and returns true if the bit at the specified position is set, false otherwise.
function DL_Common_delayCycles
void DL_Common_delayCycles(
uint32_t cycles
)
Consumes the number of CPU cycles specified.
Parameters:
cycles Floor number of cycles to delay. Specifying zero will result in the maximum possible delay. Note that guarantees at least this number of cycles will be delayed, not that exactly this number of cycles will be delayed. If a more precise number of cycle delay value is needed, GPTimer is recommended.
Typical variance from this function is 10 cycles or less assuming that the function is located in flash and that caching is enabled. Disabling caching may result in wait-states when fetching from flash. Other variance occurs due:
Amount of register stacking/unstacking around API entry/exit
Value of cycles relative to 4-cycle loop counter
Placement of code on a 2- or 4-byte aligned boundary
Macros Documentation
define DL_STATUS_OK
#define DL_STATUS_OK (0)
STATUS OK.
define DL_STATUS_FAIL
#define DL_STATUS_FAIL (1)
STATUS FAIL.
define HWREG
#define HWREG(
x
)
(*((volatile uint32_t *)(x)))
Reads a register as uint32_t.
define HWREGH
#define HWREGH(
x
)
(*((volatile uint16_t *)(x)))
Reads a register as uint16_t.
define HWREGB
#define HWREGB(
x
)
(*((volatile uint8_t *)(x)))
Reads a register as uint8_t.
define ASSERT
#define ASSERT(
expr
)
if (!(expr)) \
{ \
__error__(__FILE__, __LINE__); \
}
Assertion macro. error should be defined by application.