Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
ctboard:peripherals:gpio_cpld [2016/02/25 12:32] – feur | ctboard:peripherals:gpio_cpld [2022/12/23 11:05] (current) – [Output] ruan | ||
---|---|---|---|
Line 6: | Line 6: | ||
> Supported [[ctboard: | > Supported [[ctboard: | ||
\\ | \\ | ||
+ | |||
+ | ===== Registers ===== | ||
+ | |||
+ | ==== Input ==== | ||
+ | |||
+ | \\ {{ ctboard_gpio_pinout.svg? | ||
+ | | ||
+ | |||
+ | ==== Output ==== | ||
+ | |||
+ | The registers are read / write. | ||
+ | |||
+ | \\ {{ctboard_gpio_output_reg.svg}} \\ \\ | ||
+ | |||
+ | ===== Diagram ===== | ||
+ | |||
+ | \\ {{ctboard_gpio_cpld.svg}} \\ \\ | ||
===== Programming Example ===== | ===== Programming Example ===== | ||
- | The code snippet bellow shows how to use the GPIO. | + | The code snippets below show how to use the GPIO. |
<code c> | <code c> | ||
Line 34: | Line 51: | ||
| | ||
LDR r0, =ADDR_GPIO_OUT | LDR r0, =ADDR_GPIO_OUT | ||
- | STRB r1, [r0, #0] ; Write byte of data to P3. | + | STRB r1, [r0, #2] ; Write byte of data to P3. |
STRH r1, [r0, #2] ; Write halfword of data to P3..4. | STRH r1, [r0, #2] ; Write halfword of data to P3..4. | ||
STR r1, [r0, #0] ; Write word of data to all ports (P1..4). | STR r1, [r0, #0] ; Write word of data to all ports (P1..4). | ||
Line 40: | Line 57: | ||
\\ | \\ | ||
- | ===== Registers ===== | ||
- | |||
- | ==== Input ==== | ||
- | |||
- | \\ {{ ctboard_gpio_pinout.svg? | ||
- | | ||
- | |||
- | ==== Output ==== | ||
- | |||
- | The Registers are read / write. | ||
- | |||
- | \\ {{ctboard_gpio_output_reg.svg}} \\ \\ | ||
- | |||
- | ===== Diagram ===== | ||
- | |||
- | \\ {{ctboard_gpio_cpld.svg}} \\ \\ |