Functions | |
| u_int | edt_bar1_read (EdtDev *edt_p, u_int offset) |
| A convenience routine to access the EDT BAR1 registers. | |
| void | edt_bar1_write (EdtDev *edt_p, u_int offset, u_int val) |
| A convenience routine to access the EDT BAR1 registers. | |
| uchar_t | edt_intfc_read (EdtDev *edt_p, uint_t offset) |
| A convenience routine, partly for backward compatability, to access the user interface XILINX registers. | |
| uint_t | edt_intfc_read_32 (EdtDev *edt_p, uint_t offset) |
| A convenience routine, partly for backward compatability, to access the user interface XILINX registers. | |
| u_short | edt_intfc_read_short (EdtDev *edt_p, uint_t offset) |
| A convenience routine, partly for backward compatability, to access the user interface XILINX registers. | |
| void | edt_intfc_write_32 (EdtDev *edt_p, uint_t offset, uint_t val) |
| A convenience routine, partly for backward compatability, to access the user interface XILINX registers. | |
| void | edt_intfc_write_short (EdtDev *edt_p, uint_t offset, u_short val) |
| A convenience routine, partly for backward compatability, to access the user interface XILINX registers. | |
| uint_t | edt_reg_and (EdtDev *edt_p, uint_t desc, uint_t val) |
| Performs a bitwise logical AND of the value of the specified register and the value provided in the argument; the result becomes the new value of the register. | |
| void | edt_reg_clearset (EdtDev *edt_p, uint_t desc, uint_t val) |
| Toggles the bits specified in the mask argument off then on in a single ioctl call. | |
| uint_t | edt_reg_or (EdtDev *edt_p, uint_t desc, uint_t val) |
| Performs a bitwise logical OR of the value of the specified register and the value provided in the argument; the result becomes the new value of the register. | |
| uint_t | edt_reg_read (EdtDev *edt_p, uint_t desc) |
| Reads the specified register and returns its value. | |
| void | edt_reg_setclear (EdtDev *edt_p, uint_t desc, uint_t val) |
| Toggles the bits specified in the mask argument on then off in a single ioctl call. | |
| void | edt_reg_write (EdtDev *edt_p, uint_t desc, uint_t val) |
| Write the specified value to the specified register. | |
| u_int edt_bar1_read | ( | EdtDev * | edt_p, | |
| u_int | offset | |||
| ) |
A convenience routine to access the EDT BAR1 registers.
Passed the BAR1 byte address for a 32-bit word; note that the LS two bits of the address are ignored.
| edt_p | pointer to edt device structure returned by edt_open or edt_open_channel | |
| offset | integer byte offset into EDT BAR1 register memory, addressing a 32-bit value. Note that the LS two bits of the address are ignored. |
| void edt_bar1_write | ( | EdtDev * | edt_p, | |
| u_int | offset, | |||
| u_int | data | |||
| ) |
A convenience routine to access the EDT BAR1 registers.
Passed the BAR1 byte address for a 32-bit word; note that the LS two bits of the address are ignored.
| edt_p | pointer to edt device structure returned by edt_open or edt_open_channel | |
| offset | integer byte offset into EDT BAR1 register memory, addressing a 32-bit value. Note that the LS two bits of the address are ignored. | |
| data | 32-bit value to set register with. |
u_int reg24 = 0xb01d_bee; edt_bar1_write(edt_p, 0x24, reg24);
| uchar_t edt_intfc_read | ( | EdtDev * | edt_p, | |
| uint_t | offset | |||
| ) |
A convenience routine, partly for backward compatability, to access the user interface XILINX registers.
The register descriptors used by edt_reg_read can also be used, since edt_intfc_read masks off the offset.
| edt_p | pointer to edt device structure returned by edt_open or edt_open_channel | |
| offset | integer offset into user interface XILINX, or edt_reg_read style register descriptor |
| uint_t edt_intfc_read_32 | ( | EdtDev * | edt_p, | |
| uint_t | offset | |||
| ) |
A convenience routine, partly for backward compatability, to access the user interface XILINX registers.
The register descriptors used be edt_reg_read can also be used, since edt_intfc_read_32 masks off the offset.
| edt_p | pointer to edt device structure returned by edt_open or edt_open_channel | |
| offset | integer offset into the user interface XILINX, or edt_reg_read style register descriptor. |
| u_short edt_intfc_read_short | ( | EdtDev * | edt_p, | |
| uint_t | offset | |||
| ) |
A convenience routine, partly for backward compatability, to access the user interface XILINX registers.
The register descriptors used by edt_reg_read can also be used, since edt_intfc_read_short masks off the offset.
| edt_p | pointer to edt device structure returned by edt_open or edt_open_channel | |
| offset | integer offset into user interface XILINX, or edt_reg_read style register descriptor |
int i; puts("Directions for each channel of 16-channel card using user interface xilinx 'ssdio.bit':"); u_short channel_direction_reg = edt_intfc_read_short(edt_p, SSD16_CHDIR); for (i = 0; i < 16; ++i) { int dir = channel_dir_reg & (1 << i); printf("Channel %d configured for: ", i); if (dir == 0) { printf("input\n"); } else if (dir == 1) { printf("output"); } }
| void edt_intfc_write_32 | ( | EdtDev * | edt_p, | |
| uint_t | offset, | |||
| uint_t | data | |||
| ) |
A convenience routine, partly for backward compatability, to access the user interface XILINX registers.
The register descriptors used by edt_reg_write can also be used, since edt_intfc_write_32 masks off the offset.
| edt_p | pointer to edt device structure returned by edt_open or edt_open_channel | |
| offset | integer offset into user interface XILINX, or edt_reg_write style register descriptor | |
| data | The 32 bit value to set the register to. |
| void edt_intfc_write_short | ( | EdtDev * | edt_p, | |
| uint_t | offset, | |||
| u_short | data | |||
| ) |
A convenience routine, partly for backward compatability, to access the user interface XILINX registers.
The register descriptors used by edt_reg_write() can also be used, since edt_intfc_write_short masks off the offset.
| edt_p | pointer to edt device structure returned by edt_open or edt_open_channel | |
| offset,: | integer offset into user interface XILINX, or edt_reg_write style register descriptor | |
| data | unsigned short integer value to set |
puts("Enabling all 16 DMA channels on PCDa with 'ssdio.bit' loaded in user interface xilinx"); edt_intfc_write_short(edt_p, SSD16_CHEN, 0xffff);
| uint_t edt_reg_and | ( | EdtDev * | edt_p, | |
| uint_t | desc, | |||
| uint_t | mask | |||
| ) |
Performs a bitwise logical AND of the value of the specified register and the value provided in the argument; the result becomes the new value of the register.
Use this routine instead of using ioctls.
| edt_p | pointer to edt device structure returned by edt_open or edt_open_channel | |
| desc | The name of the register to modify. Use the names provided in the register descriptions in Hardware Addendum for the card you are using (e.g. "PCI DV C-Link Hardware Addendum"). | |
| mask | The value to AND with the register. |
| void edt_reg_clearset | ( | EdtDev * | edt_p, | |
| uint_t | desc, | |||
| uint_t | mask | |||
| ) |
Toggles the bits specified in the mask argument off then on in a single ioctl call.
| edt_p | pointer to edt device structure returned by edt_open or edt_open_channel | |
| desc | The name of the register to modify. Use the names provided in the register descriptions in Hardware Addendum for the card you are using (e.g. "PCI DV C-Link Hardware Addendum"). | |
| mask | The value to XOR with the register. |
| uint_t edt_reg_or | ( | EdtDev * | edt_p, | |
| uint_t | desc, | |||
| uint_t | mask | |||
| ) |
Performs a bitwise logical OR of the value of the specified register and the value provided in the argument; the result becomes the new value of the register.
Use this routine instead of using ioctls.
| edt_p | pointer to edt device structure returned by edt_open or edt_open_channel | |
| desc | The name of the register to modify. Use the names provided in the register descriptions in Hardware Addendum for the card you are using (e.g. "PCI DV C-Link Hardware Addendum"). | |
| mask | The value to OR with the register. |
| uint_t edt_reg_read | ( | EdtDev * | edt_p, | |
| uint_t | desc | |||
| ) |
Reads the specified register and returns its value.
Use this routine instead of using ioctls.
| edt_p | pointer to edt device structure returned by edt_open or edt_open_channel | |
| desc | The name of the register to read. Use the names provided in the register descriptions in Hardware Addendum for the card you are using (e.g. "PCI DV C-Link Hardware Addendum"). |
| void edt_reg_setclear | ( | EdtDev * | edt_p, | |
| uint_t | desc, | |||
| uint_t | mask | |||
| ) |
Toggles the bits specified in the mask argument on then off in a single ioctl call.
| edt_p | pointer to edt device structure returned by edt_open or edt_open_channel | |
| desc | The name of the register to modify. Use the names provided in the register descriptions in Hardware Addendum for the card you are using (e.g. "PCI DV C-Link Hardware Addendum"). | |
| mask | The value to XOR with the register. |
| void edt_reg_write | ( | EdtDev * | edt_p, | |
| uint_t | desc, | |||
| uint_t | value | |||
| ) |
Write the specified value to the specified register.
Use this routine instead of using ioctls.
| edt_p | pointer to edt device structure returned by edt_open or edt_open_channel | |
| desc | The name of the register to write. Use the names provided in the register descriptions in Hardware Addendum for the card you are using (e.g. "PCI DV C-Link Hardware Addendum"). | |
| value | The desired value to write in register. |
1.4.7