w3_userio driver
Driver for WARP v3 user IO control core (w3_userio_axi_v1_02_a)
|
Macros | |
#define | userio_read_inputs(baseaddr) Xil_In32(baseaddr+W3_USERIO_SLV_REG6_OFFSET) |
#define | userio_read_hexdisp_left(baseaddr) Xil_In32(baseaddr+W3_USERIO_SLV_REG1_OFFSET) |
#define | userio_read_hexdisp_right(baseaddr) Xil_In32(baseaddr+W3_USERIO_SLV_REG2_OFFSET) |
#define | userio_read_leds_red(baseaddr) Xil_In32(baseaddr+W3_USERIO_SLV_REG3_OFFSET) |
#define | userio_read_leds_green(baseaddr) Xil_In32(baseaddr+W3_USERIO_SLV_REG4_OFFSET) |
#define | userio_read_leds_rf(baseaddr) Xil_In32(baseaddr+W3_USERIO_SLV_REG5_OFFSET) |
Note on output state: The macros for reading the current state of user outputs (LEDs, hex displays) can only access outputs configured for software control. Attempts to read the state of outputs configured for hardware control (i.e. outputs with corresponding CTRLSRC_* asserted in control reg) will not reflect actual output state.
Examples:
#define userio_read_inputs | ( | baseaddr | ) | Xil_In32(baseaddr+W3_USERIO_SLV_REG6_OFFSET) |
Returns the current state of the user inputs (buttons and DIP switch)
#define userio_read_hexdisp_left | ( | baseaddr | ) | Xil_In32(baseaddr+W3_USERIO_SLV_REG1_OFFSET) |
Returns the current state of the left hex display outputs.
#define userio_read_hexdisp_right | ( | baseaddr | ) | Xil_In32(baseaddr+W3_USERIO_SLV_REG2_OFFSET) |
Returns the current state of the right hex display outputs.
#define userio_read_leds_red | ( | baseaddr | ) | Xil_In32(baseaddr+W3_USERIO_SLV_REG3_OFFSET) |
Returns the current state of the red user LEDs.
#define userio_read_leds_green | ( | baseaddr | ) | Xil_In32(baseaddr+W3_USERIO_SLV_REG4_OFFSET) |
Returns the current state of the green user LEDs.
#define userio_read_leds_rf | ( | baseaddr | ) | Xil_In32(baseaddr+W3_USERIO_SLV_REG5_OFFSET) |
Returns the current state of the RF LEDs.