This is an old revision of the document!


Buttons

The 4 buttons on the CT Board are “active-high”, e.g. a pressed button is read as logical “1”, and debounced.
The buttons are accessible over the memory mapped interface or on GPIO port C.

Please make sure the CT Board is in the correct mode.
Supported modes: 1, 2, 3, 4


The Registers are read only.







The code snippets below show how to use the buttons.

#include "reg_ctboard.h"
 
uint8_t data = CT_BUTTON;                   /* Read all buttons into the lower nibble of a byte. */


.equ ADDR_BUTTON,   0x60000210
 
        ldr         r0, =ADDR_BUTTON
        ldrb        r1, [r0, #0]       // Read all buttons into the lower nibble of a byte.


  • ctboard/peripherals/button.1782397307.txt.gz
  • Last modified: 2026/06/25 14:21
  • by scbj