Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| ctboard:peripherals:button [2016/02/09 11:56] – feur | ctboard:peripherals:button [2022/12/23 11:00] (current) – ruan | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| The 4 buttons on the CT Board are **" | The 4 buttons on the CT Board are **" | ||
| The buttons are accessible over the memory mapped interface or on [[stm32: | The buttons are accessible over the memory mapped interface or on [[stm32: | ||
| - | > {{ctboard_mode_1.svg? | + | > {{ctboard:ctboard_mode_1.svg? |
| - | > Supported modes: **1**, **2**, **3** | + | > Supported |
| + | \\ | ||
| ===== Registers ===== | ===== Registers ===== | ||
| Line 11: | Line 12: | ||
| The Registers are read only. | The Registers are read only. | ||
| - | {{ctboard_button_reg.svg}} | + | \\ {{ctboard_button_reg.svg}} |
| ===== Diagram ===== | ===== Diagram ===== | ||
| \\ {{: | \\ {{: | ||
| + | |||
| + | ===== Programming Example ===== | ||
| + | |||
| + | The code snippets below show how to use the buttons. | ||
| + | |||
| + | <code c> | ||
| + | #include " | ||
| + | |||
| + | uint8_t data = CT_BUTTON; | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | <code asm> | ||
| + | ADDR_BUTTON | ||
| + | | ||
| + | LDR r0, =ADDR_BUTTON | ||
| + | LDRB r1, [r0, #0] ; Read all buttons into the lower nibble of a byte. | ||
| + | </ | ||
| + | \\ | ||
| + | |||