Functions | |
static void | ADI8RegWrite (uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val) |
Write an 8 bit value to a register in an ADI slave. More... | |
static void | ADI16RegWrite (uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Val) |
Write a 16 bit value to 2 registers in the ADI slave. More... | |
static void | ADI32RegWrite (uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val) |
Write a 32 bit value to 4 registers in the ADI slave. More... | |
static uint32_t | ADI8RegRead (uint32_t ui32Base, uint32_t ui32Reg) |
Read the value of an 8 bit register in the ADI slave. More... | |
static uint32_t | ADI16RegRead (uint32_t ui32Base, uint32_t ui32Reg) |
Read the value in a 16 bit register. More... | |
static uint32_t | ADI32RegRead (uint32_t ui32Base, uint32_t ui32Reg) |
Read the value in a 32 bit register. More... | |
static void | ADI8BitsSet (uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val) |
Set specific bits in a single 8 bit ADI register. More... | |
static void | ADI16BitsSet (uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Val) |
Set specific bits in 2 x 8 bit ADI slave registers. More... | |
static void | ADI32BitsSet (uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val) |
Set specific bits in 4 x 8 bit ADI slave registers. More... | |
static void | ADI8BitsClear (uint32_t ui32Base, uint32_t ui32Reg, uint8_t ui8Val) |
Clear specific bits in an 8 bit ADI register. More... | |
static void | ADI16BitsClear (uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Val) |
Clear specific bits in two 8 bit ADI register. More... | |
static void | ADI32BitsClear (uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val) |
Clear specific bits in four 8 bit ADI register. More... | |
static void | ADI4SetValBit (uint32_t ui32Base, uint32_t ui32Reg, bool bWriteHigh, uint8_t ui8Mask, uint8_t ui8Val) |
Set a value on any 4 bits inside an 8 bit register in the ADI slave. More... | |
static void | ADI8SetValBit (uint32_t ui32Base, uint32_t ui32Reg, uint16_t ui16Mask, uint16_t ui16Val) |
Set a value on any bits inside an 8 bit register in the ADI slave. More... | |
static void | ADI16SetValBit (uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask, uint32_t ui32Val) |
Set a value on any bits inside an 2 x 8 bit register aligned on a half-word (byte) boundary in the ADI slave. More... | |
The API functions can be grouped like this:
Write:
Read:
|
inlinestatic |
Clear specific bits in two 8 bit ADI register.
This function will clear bits in 2 registers in the analog domain. The access to the registers in the analog domain is either 8, 16 or 32 bit aligned, but arranged in chunks of 32 bits. You can only do 16 bit access on registers 0-1 / 2-3, etc. Similarly 32 bit accesses are always performed on register 0-3 / 4-7 etc. Addresses for the registers and values being written to the registers will be truncated according to this access scheme.
ui32Base | is ADI base address. |
ui32Reg | is the base registers to clear the bits in. |
ui16Val | is the 16 bit one-hot encoded value specifying which bits to clear in the registers. |
Definition at line 661 of file adi.h.
|
inlinestatic |
Set specific bits in 2 x 8 bit ADI slave registers.
This function will set bits in 2 registers in the analog domain. The access to the registers in the analog domain is either 8, 16 or 32 bit aligned, but arranged in chunks of 32 bits. You can only do 16 bit access on registers 0-1 / 2-3, etc. Similarly 32 bit accesses are always performed on register 0-3 / 4-7 etc. Addresses for the registers and values being written to the registers will be truncated according to this access scheme.
ui32Base | is ADI base address. |
ui32Reg | is the base register to assert the bits in. |
ui16Val | is the 16 bit one-hot encoded value specifying which bits to set in the registers. |
Definition at line 490 of file adi.h.
|
inlinestatic |
Read the value in a 16 bit register.
This function will read 2 x 8 bit registers in the analog domain and return the value as the lower 16 bits of an uint32_t
. The access to the registers in the analog domain is either 8, 16 or 32 bit aligned. You can only do 16 bit access on registers 0-1 / 2-3, etc. Similarly 32 bit accesses are always performed on register 0-3 / 4-7, etc. Addresses for the registers and values being written to the registers will be truncated according to this access scheme.
ui32Base | is ADI base address. |
ui32Reg | is the 16 bit register to read. |
uint32_t
.Definition at line 343 of file adi.h.
|
inlinestatic |
Write a 16 bit value to 2 registers in the ADI slave.
This function will write a value to 2 consecutive registers in the analog domain. The access to the registers in the analog domain is either 8, 16 or 32 bit aligned. You can only do 16 bit access on registers 0-1 / 2-3, etc. Similarly 32 bit accesses are always performed on register 0-3 / 4-7, etc. Addresses for the registers and values being written to the registers will be truncated according to this access scheme.
ui32Base | is ADI base address. |
ui32Reg | is the register to write. |
ui16Val | is the 16 bit value to write to the register. |
Definition at line 210 of file adi.h.
|
inlinestatic |
Set a value on any bits inside an 2 x 8 bit register aligned on a half-word (byte) boundary in the ADI slave.
This function allows 2 byte (16 bit) access to the ADI slave registers.
Use this function to write any value in the range 0-15 bits aligned on a half-word (byte) boundary. Fx. for writing the value 0b101 to bits 1 and 3 the ui32Val
= 0x000A and the ui32Mask
= 0x000E. Bits 0 and 5-15 will not be affected by the operation, as the corresponding bits are not set in the ui32Mask
.
ui32Base | is the base address of the ADI port. |
ui32Reg | is the Least Significant Register in the ADI slave that will be affected by the write operation. |
ui32Mask | is the mask defining which of the 16 bit that should be overwritten. The mask must be defined in the lower half of the 32 bits. |
ui32Val | is the value to write. The value must be defined in the lower half of the 32 bits. |
Definition at line 895 of file adi.h.
|
inlinestatic |
Clear specific bits in four 8 bit ADI register.
This function will clear bits in 4 registers in the analog domain. The access to the registers in the analog domain is either 8, 16 or 32 bit aligned, but arranged in chunks of 32 bits. You can only do 16 bit access on registers 0-1 / 2-3, etc. Similarly 32 bit accesses are always performed on register 0-3 / 4-7 etc. Addresses for the registers and values being written to the registers will be truncated according to this access scheme.
ui32Base | is ADI base address. |
ui32Reg | is the base registers to clear the bits in. |
ui32Val | is the 32 bit one-hot encoded value specifying which bits to clear in the registers. |
Definition at line 718 of file adi.h.
|
inlinestatic |
Set specific bits in 4 x 8 bit ADI slave registers.
This function will set bits in 4 registers in the analog domain. The access to the registers in the analog domain is either 8, 16 or 32 bit aligned, but arranged in chunks of 32 bits. You can only do 16 bit access on registers 0-1 / 2-3, etc. Similarly 32 bit accesses are always performed on register 0-3 / 4-7 etc. Addresses for the registers and values being written to the registers will be truncated according to this access scheme.
ui32Base | is ADI base address. |
ui32Reg | is the base register to assert the bits in. |
ui32Val | is the 32 bit one-hot encoded value specifying which bits to set in the registers. |
Definition at line 547 of file adi.h.
|
inlinestatic |
Read the value in a 32 bit register.
This function will read 4 x 8 bit registers in the analog domain and return the value as an uint32_t
. The access to the registers in the analog domain is either 8, 16 or 32 bit aligned. You can only do 16 bit access on registers 0-1 / 2-3, etc. Similarly 32 bit accesses are always performed on register 0-3 / 4-7, etc. Addresses for the registers and values being written to the registers will be truncated according to this access scheme.
ui32Base | is ADI base address. |
ui32Reg | is the 32 bit register to read. |
Definition at line 384 of file adi.h.
|
inlinestatic |
Write a 32 bit value to 4 registers in the ADI slave.
This function will write a value to 4 consecutive registers in the analog domain. The access to the registers in the analog domain is either 8, 16 or 32 bit aligned. You can only do 16 bit access on registers 0-1 / 2-3, etc. Similarly 32 bit accesses are always performed on register 0-3 / 4-7, etc. Addresses for the registers and values being written to the registers will be truncated according to this access scheme.
ui32Base | is ADI base address. |
ui32Reg | is the register to write. |
ui32Val | is the 32 bit value to write to the register. |
Definition at line 260 of file adi.h.
|
inlinestatic |
Set a value on any 4 bits inside an 8 bit register in the ADI slave.
This function allows halfbyte (4 bit) access to the ADI slave registers. The parameter bWriteHigh
determines whether to write to the lower or higher part of the 8 bit register.
Use this function to write any value in the range 0-3 bits aligned on a half byte boundary. Fx. for writing the value 0b101 to bits 1 to 3 the ui8Val
= 0xA and the ui8Mask
= 0xE. Bit 0 will not be affected by the operation, as the corresponding bit is not set in the ui8Mask
.
ui32Base | is the base address of the ADI port. |
ui32Reg | is the Least Significant Register in the ADI slave that will be affected by the write operation. |
bWriteHigh | defines which part of the register to write in.
|
ui8Mask | is the mask defining which of the 4 bits that should be overwritten. The mask must be defined in the lower half of the 8 bits of the parameter. |
ui8Val | is the value to write. The value must be defined in the lower half of the 8 bits of the parameter. |
Definition at line 778 of file adi.h.
|
inlinestatic |
Clear specific bits in an 8 bit ADI register.
This function will clear bits in a register in the analog domain. The access to the registers in the analog domain is either 8, 16 or 32 bit aligned, but arranged in chunks of 32 bits. You can only do 16 bit access on registers 0-1 / 2-3, etc. Similarly 32 bit accesses are always performed on register 0-3 / 4-7 etc. Addresses for the registers and values being written to the registers will be truncated according to this access scheme.
ui32Base | is ADI base address. |
ui32Reg | is the base registers to clear the bits in. |
ui8Val | is the 8 bit one-hot encoded value specifying which bits to clear in the register. |
Definition at line 604 of file adi.h.
Referenced by AUXADCDisable().
|
inlinestatic |
Set specific bits in a single 8 bit ADI register.
This function will set bits in a single register in the analog domain. The access to the registers in the analog domain is either 8, 16 or 32 bit aligned, but arranged in chunks of 32 bits. You can only do 16 bit access on registers 0-1 / 2-3, etc. Similarly 32 bit accesses are always performed on register 0-3 / 4-7 etc. Addresses for the registers and values being written to the registers will be truncated according to this access scheme.
ui32Base | is ADI base address. |
ui32Reg | is the base register to assert the bits in. |
ui8Val | is the 8 bit one-hot encoded value specifying which bits to set in the register. |
Definition at line 433 of file adi.h.
Referenced by AUXADCDisableInputScaling(), AUXADCEnableAsync(), and AUXADCEnableSync().
|
inlinestatic |
Read the value of an 8 bit register in the ADI slave.
This function will read an 8 bit register in the analog domain and return the value as the lower 8 bits of an uint32_t
. The access to the registers in the analog domain is either 8, 16 or 32 bit aligned. You can only do 16 bit access on registers 0-1 / 2-3, etc. Similarly 32 bit accesses are always performed on register 0-3 / 4-7, etc. Addresses for the registers and values being written to the registers will be truncated according to this access scheme.
ui32Base | is ADI base address. |
ui32Reg | is the 8 bit register to read. |
uint32_t
.Definition at line 300 of file adi.h.
|
inlinestatic |
Write an 8 bit value to a register in an ADI slave.
This function will write a value to a single register in the analog domain. The access to the registers in the analog domain is either 8, 16, or 32 bit aligned. You can only do 16 bit access on registers 0-1 / 2-3, etc. Similarly 32 bit accesses are always performed on register 0-3 / 4-7, etc. Addresses for the registers and values being written to the registers will be truncated according to this access scheme.
ui32Base | is ADI base address. |
ui32Reg | is the register to write. |
ui8Val | is the 8 bit value to write to the register. |
Definition at line 161 of file adi.h.
|
inlinestatic |
Set a value on any bits inside an 8 bit register in the ADI slave.
This function allows byte (8 bit) access to the ADI slave registers.
Use this function to write any value in the range 0-7 bits aligned on a byte boundary. Fx. for writing the value 0b101 to bits 1 and 3 the ui16Val
= 0x0A and the ui16Mask
= 0x0E. Bits 0 and 5-7 will not be affected by the operation, as the corresponding bits are not set in the ui16Mask
.
ui32Base | is the base address of the ADI port. |
ui32Reg | is the Least Significant Register in the ADI slave that will be affected by the write operation. |
ui16Mask | is the mask defining which of the 8 bit that should be overwritten. The mask must be defined in the lower half of the 16 bits. |
ui16Val | is the value to write. The value must be defined in the lower half of the 16 bits. |
Definition at line 836 of file adi.h.
#define ADI_SLAVE_REGS 16 |
Definition at line 77 of file adi.h.
Referenced by ADI16BitsClear(), ADI16BitsSet(), ADI16RegRead(), ADI16RegWrite(), ADI16SetValBit(), ADI32BitsClear(), ADI32BitsSet(), ADI32RegRead(), ADI32RegWrite(), ADI4SetValBit(), ADI8BitsClear(), ADI8BitsSet(), ADI8RegRead(), ADI8RegWrite(), and ADI8SetValBit().