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/25 10:45] – 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: | + | > {{ctboard: |
- | > Supported [[ctboard: | + | > Supported [[ctboard: |
- | + | ||
- | ===== Programming Example ===== | + | |
- | + | ||
- | The code snippet bellow shows how to use the Buttons. | + | |
- | + | ||
- | <code c> | + | |
- | #include " | + | |
- | + | ||
- | uint8_t data = CT_BUTTON; | + | |
- | </ | + | |
\\ | \\ | ||
Line 27: | Line 17: | ||
\\ {{: | \\ {{: | ||
+ | |||
+ | ===== 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. | ||
+ | </ | ||
+ | \\ | ||
+ |