HAN Pilot Platform
Demonstration Manual
66
www.terasic.com
September 6, 2019
Figure 4-5 LED PIO memory map code
LED Control
C programmers need to understand the Register Map of the PIO core for
LED_PIO
before they can
control it.
shows the Register Map for the PIO Core. Each register is 32-bit width. For
detail information, please refer to the datasheet of PIO Core. For led control, we just need to write
output value to the offset 0 register. Because the led on HAN Pilot Platform is low active, writing a
value 0x00000003 to the offset 0 register will turn off the two LEDs. Writing a value 0x00000000
to the offset 0 register will turn on the two LEDs. In C program, writing a value 0x00000000 to the
offset 0 register of led_pio can be implemented as:
*(uint32_t *) h2p_lw_led_addr= 0x00000000;
The state will assign the void pointer to a uint32_t pointer, so C compiler knows write a 32-bit value
0x00000000 to the virtual address h2p_lw_led_addr.
Figure 4-6 Register Map of PIO Core
Содержание HAN Pilot Platform
Страница 1: ......
Страница 92: ...HAN Pilot Platform Demonstration Manual 91 www terasic com September 6 2019...