Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ctboard:peripherals:gpio_cpld [2016/02/25 12:32] feurctboard:peripherals:gpio_cpld [2022/12/23 11:05] (current) – [Output] ruan
Line 6: Line 6:
 > Supported [[ctboard:mode_switch|mode]]: **1** > Supported [[ctboard:mode_switch|mode]]: **1**
 \\ \\
 +
 +===== Registers =====
 +
 +==== Input ====
 +
 +\\ {{ ctboard_gpio_pinout.svg?300em}} 
 +   {{ctboard_gpio_input_reg.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?300em}}  
-   {{ctboard_gpio_input_reg.svg}} \\ \\ 
- 
-==== Output ==== 
- 
-The Registers are read / write. 
- 
-\\ {{ctboard_gpio_output_reg.svg}} \\ \\ 
- 
-===== Diagram ===== 
- 
-\\ {{ctboard_gpio_cpld.svg}} \\ \\ 
  • ctboard/peripherals/gpio_cpld.1456403564.txt.gz
  • Last modified: 2016/02/25 12:32
  • by feur