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:hexsw [2017/08/29 09:18] – [Programming Example] ruanctboard:peripherals:hexsw [2026/06/25 14:53] (current) – [Programming Example] scbj
Line 6: Line 6:
 > Supported [[ctboard:mode_switch|modes]]: **1**, **2**, **3**, **4**  > Supported [[ctboard:mode_switch|modes]]: **1**, **2**, **3**, **4** 
 \\ \\
 +
 +===== Registers =====
 +
 +**Caveat:** Register bits [7:4] are read as '1' and therefore need to be masked.
 +
 +The register is read only.
 +
 +\\ {{ctboard_hexsw_reg.svg}} \\ \\
 +
 +===== Diagram =====
 +
 +\\ {{:ctboard:peripherals:ctboard_hexsw.svg?700em}} \\ \\
  
 ===== Programming Example ===== ===== Programming Example =====
Line 18: Line 30:
 \\ \\
  
-<code asm+<code text
-ADDR_HEXSW      EQU      0x60000211+.equ ADDR_HEXSW,    0x60000211
                                  
-                LDR      r0, =ADDR_HEXSW +        ldr         r0, =ADDR_HEXSW 
-                LDRB     r1, [r0, #0]       Read HEXSW into the lower nibble of a byte.+        ldrb        r1, [r0, #0]       // Read HEXSW into the lower nibble of a byte.
 </code> </code>
 \\ \\
  
-===== Registers ===== 
- 
-The Registers are read only. 
- 
-\\ {{ctboard_hexsw_reg.svg}} \\ \\ 
- 
-===== Diagram ===== 
- 
-\\ {{:ctboard:peripherals:ctboard_hexsw.svg?700em}} \\ \\ 
  • ctboard/peripherals/hexsw.1503998338.txt.gz
  • Last modified: 2017/08/29 09:18
  • by ruan