This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

turning off qdec led

In the nrf52 specification:

"The Phase A, Phase B, and LED signals are mapped to physical pins according to the configuration specified in the PSEL.A, PSEL.B, and PSEL.LED registers respectively. If the CONNECT field value 'Disconnected' is specified in any of these registers, the associated signal will not be connected to any physical pin."

There doesn't seem to be an obvious wrapper for this in the sdk. How do I access the PSEL.LED connect field to disable the LED?

Thank you

Parents
  • You can set the pin to 0xFFFFFFFF.

    When using the default configuration (nrf_drv_qdec_init(NULL, qdec_event_handler)) you can set the default pin in nrf_drv_config.h:

    #define QDEC_CONFIG_PIO_LED 0xFFFFFFFF
    

    When using your own config:

    nrf_drv_qdec_config_t qdec_config;
    qdec_config.pselled = 0xFFFFFFFF;
    ...
    nrf_drv_qdec_init(&qdec_config, qdec_event_handler)
    
Reply
  • You can set the pin to 0xFFFFFFFF.

    When using the default configuration (nrf_drv_qdec_init(NULL, qdec_event_handler)) you can set the default pin in nrf_drv_config.h:

    #define QDEC_CONFIG_PIO_LED 0xFFFFFFFF
    

    When using your own config:

    nrf_drv_qdec_config_t qdec_config;
    qdec_config.pselled = 0xFFFFFFFF;
    ...
    nrf_drv_qdec_init(&qdec_config, qdec_event_handler)
    
Children
No Data
Related