This is an old revision of the document!


LED

On the CT Board are 32 LEDs mounted. They are arranged in 4 groups of 8 LEDs and are “active-high”.
E.g. the LEDs are on if a logical “1” is written.

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


The code snippets below shows how to use the LEDs.

#include "reg_ctboard.h"
 
CT_LED->BYTE.LED7_0 = (uint8_t) data_byte;            /* Write byte of data to LED7..0. */
CT_LED->HWORD.LED31_16 = (uint16_t) data_halfword;    /* Write half word of data to LED31..16. */
CT_LED->WORD = (uint32_t) data_word;                  /* Write word of data to all LEDs. */


ADDR_LED        EQU      0x60000100
 
                LDR      r0, =ADDR_LED
                STRB     r1, [r0, #0]                     ; Write byte of data to LED7..0.
                STRH     r1, [r0, #2]                     ; Write half word of data to LED31..16. */
                STR      r1, [r0, #0]                     ; Write word of data to all LEDs. */


The Registers are read / write.







  • ctboard/peripherals/led.1472729709.txt.gz
  • Last modified: 2016/09/01 11:35
  • by ruan