EDT PDV SDK Documentation 6.2.0
|
Functions | |
uint32_t | edt_reg_read (EdtDev edt_p, uint32_t desc) |
Read a device register. More... | |
void | edt_reg_write (EdtDev edt_p, uint32_t desc, uint32_t val) |
Write a device register. More... | |
uint32_t | edt_reg_or (EdtDev edt_p, uint32_t desc, uint32_t mask) |
Perform a register read-modify-write operation in the driver, OR-ing the mask with the register value. More... | |
uint32_t | edt_reg_and (EdtDev edt_p, uint32_t desc, uint32_t mask) |
Perform a register read-modify-write operation in the driver, AND-ing the mask with the register value. More... | |
void | edt_reg_clearset (EdtDev edt_p, uint32_t desc, uint32_t mask) |
Toggle the register bits specified in mask , off (0) then on (1). More... | |
void | edt_reg_setclear (EdtDev edt_p, uint32_t desc, uint32_t mask) |
Toggle the register bits specified in mask , on (1) then off (0). More... | |
void | edt_intfc_write8 (EdtDev edt_p, uint32_t offset, uint8_t data) |
Write 8-bit value to a user interface ("UI") FPGA register. More... | |
uint8_t | edt_intfc_read8 (EdtDev edt_p, uint32_t offset) |
Read 8-bit value from a user interface ("UI") FPGA register. More... | |
void | edt_intfc_write16 (EdtDev edt_p, uint32_t offset, uint16_t data) |
Write 16-bit value to a user interface ("UI") FPGA register. More... | |
uint16_t | edt_intfc_read16 (EdtDev edt_p, uint32_t offset) |
Read 16-bit value from a user interface ("UI") FPGA register. More... | |
void | edt_intfc_write32 (EdtDev edt_p, uint32_t offset, uint32_t data) |
Write 32-bit value to a user interface ("UI") FPGA register. More... | |
uint32_t | edt_intfc_read32 (EdtDev edt_p, uint32_t offset) |
Read 32-bit value from a user interface ("UI") FPGA register. More... | |
void | edt_bar1_write (EdtDev edt_p, uint32_t offset, uint32_t data) |
A convenience routine to write registers in the PCI BAR1 region. Equivalent to edt_reg_write(edt_p, EDT_BAR1_REG4(offset)), data) . More... | |
uint32_t | edt_bar1_read (EdtDev edt_p, uint32_t offset) |
A convenience routine to read registers in the PCI BAR1 region. Equivalent to edt_reg_read(edt_p, EDT_BAR1_REG4(offset))) . More... | |
Register access functions.
uint32_t edt_reg_read | ( | EdtDev | edt_p, |
uint32_t | desc | ||
) |
Read a device register.
edt_p | The open EDT device handle. |
desc | The name of the register to read. Use the names provided in the register descriptions in documentation for the card you are using. Or, register descriptor values can be constructed with macros such as EDT_BAR1_REG4 or EDT_IND_REG_1. |
void edt_reg_write | ( | EdtDev | edt_p, |
uint32_t | desc, | ||
uint32_t | val | ||
) |
Write a device register.
edt_p | The open EDT device handle. |
desc | The name of the register to write. Use the names provided in the register descriptions in documentation for the card you are using. Or, register descriptor values can be constructed with macros such as EDT_BAR1_REG4 or EDT_IND_REG_1. |
value | The value to write to the register. |
uint32_t edt_reg_or | ( | EdtDev | edt_p, |
uint32_t | desc, | ||
uint32_t | mask | ||
) |
Perform a register read-modify-write operation in the driver, OR-ing the mask
with the register value.
edt_p | The open EDT device handle. |
desc | The name of the register to modify. |
mask | The value to OR with the register. |
uint32_t edt_reg_and | ( | EdtDev | edt_p, |
uint32_t | desc, | ||
uint32_t | mask | ||
) |
Perform a register read-modify-write operation in the driver, AND-ing the mask
with the register value.
edt_p | The open EDT device handle. |
desc | The name of the register to modify. |
mask | The value to AND with the register. |
void edt_reg_clearset | ( | EdtDev | edt_p, |
uint32_t | desc, | ||
uint32_t | mask | ||
) |
Toggle the register bits specified in mask
, off (0) then on (1).
edt_p | The open EDT device handle. |
desc | The name of the register to modify. |
mask | Bits set in this mask indicate which bits in the register to toggle. |
void edt_reg_setclear | ( | EdtDev | edt_p, |
uint32_t | desc, | ||
uint32_t | mask | ||
) |
Toggle the register bits specified in mask
, on (1) then off (0).
edt_p | The open EDT device handle. |
desc | The name of the register to modify. |
mask | Bits set in this mask indicate which bits in the register to toggle. |
void edt_intfc_write8 | ( | EdtDev | edt_p, |
uint32_t | offset, | ||
uint8_t | data | ||
) |
Write 8-bit value to a user interface ("UI") FPGA register.
edt_p | The open EDT device handle. |
offset | Integer offset into user interface FPGA space, or edt_reg_write() style register descriptor. |
data | 8-bit value to write to the register. |
A convenience routine, partly for backward compatability. The register descriptors used by edt_reg_write() can also be used, since this function masks off the offset.
Example:
uint8_t edt_intfc_read8 | ( | EdtDev | edt_p, |
uint32_t | offset | ||
) |
Read 8-bit value from a user interface ("UI") FPGA register.
edt_p | The open EDT device handle. |
offset | Integer offset into user interface FPGA space, or edt_reg_read() style register descriptor. |
A convenience routine, partly for backward compatability. The register descriptors used by edt_reg_read() can also be used, since this function masks off the offset.
Example:
void edt_intfc_write16 | ( | EdtDev | edt_p, |
uint32_t | offset, | ||
uint16_t | data | ||
) |
Write 16-bit value to a user interface ("UI") FPGA register.
edt_p | The open EDT device handle. |
offset | Integer offset into user interface FPGA space, or edt_reg_write() style register descriptor. |
data | 16-bit value to write to the register. |
A convenience routine, partly for backward compatability. The register descriptors used by edt_reg_write() can also be used, since this function masks off the offset.
Example:
uint16_t edt_intfc_read16 | ( | EdtDev | edt_p, |
uint32_t | offset | ||
) |
Read 16-bit value from a user interface ("UI") FPGA register.
edt_p | The open EDT device handle. |
offset | Integer offset into user interface FPGA space, or edt_reg_read() style register descriptor. |
A convenience routine, partly for backward compatability. The register descriptors used by edt_reg_read() can also be used, since this function masks off the offset.
Example:
void edt_intfc_write32 | ( | EdtDev | edt_p, |
uint32_t | offset, | ||
uint32_t | data | ||
) |
Write 32-bit value to a user interface ("UI") FPGA register.
edt_p | The open EDT device handle. |
offset | Integer offset into user interface FPGA space, or edt_reg_read() style register descriptor. |
data | 32-bit value to write to the register. |
A convenience routine, partly for backward compatability. The register descriptors used by edt_reg_write() can also be used, since this function masks off the offset.
uint32_t edt_intfc_read32 | ( | EdtDev | edt_p, |
uint32_t | offset | ||
) |
Read 32-bit value from a user interface ("UI") FPGA register.
edt_p | The open EDT device handle. |
offset | Integer offset into user interface FPGA space, or edt_reg_read() style register descriptor. |
A convenience routine, partly for backward compatability. The register descriptors used by edt_reg_read() can also be used, since this function masks off the offset.
void edt_bar1_write | ( | EdtDev | edt_p, |
uint32_t | offset, | ||
uint32_t | data | ||
) |
A convenience routine to write registers in the PCI BAR1 region. Equivalent to edt_reg_write(edt_p, EDT_BAR1_REG4(offset)), data)
.
edt_p | The open EDT device handle. |
offset | Byte offset into PCI BAR1 register memory, addressing a 32-bit value. The least-significant two bits are ignored (masked off). |
data | 32-bit value to write to the register. |
Example:
uint32_t edt_bar1_read | ( | EdtDev | edt_p, |
uint32_t | offset | ||
) |
A convenience routine to read registers in the PCI BAR1 region. Equivalent to edt_reg_read(edt_p, EDT_BAR1_REG4(offset)))
.
edt_p | The open EDT device handle. |
offset | Byte offset into PCI BAR1 register memory, addressing a 32-bit value. The least-significant two bits are ignored (masked off). |
Example: