Skip to content

Configurable BLE application #34

Closed

Description

@KMeldgaard

Dear STM32Duino team

I want to change the BLE app configurations found in app_conf.h (generated with STM32CubeMX I presume).
The only way possible I can see at the moment, is forking this repo, risking to fall behind updated versions.
Is it in the pipeline to make the BLE interface configurable?

Regards
K_Meld

Activity

  1. fpistm commented on Nov 12, 2021

    @fpistm
    Member

    Hi @KMeldgaard

    you're right.
    One way should be to rename app_conf.h to app_conf_default.h
    Don't forget to protect all define which should/could be redefined with #ifndef/#endif. ex:

    #ifndef CFG_BLE_HSE_STARTUP_TIME
    #define CFG_BLE_HSE_STARTUP_TIME  0x148
    #endif

    Then create a app_conf.h with:

    #ifndef APP_CONF_H
    #define APP_CONF_H
    
    #if __has_include("app_conf_custom.h")
    #include "app_conf_custom.h"
    #endif
    #include "app_conf_default.h"
    
    #endif /* APP_CONF_H */
  2. KMeldgaard commented on Nov 15, 2021

    @KMeldgaard
    Author

    Hi @fpistm

    Thanks for the quick response.
    I've tested out your solution in my fork, and so far its works like a charm.
    Do you accept a Pull-request to the official repo?

    Regards

  3. fpistm commented on Nov 15, 2021

    @fpistm
    Member

    Of cousre :)
    All contributions are welcome.

  4. added
    enhancement
    on Nov 15, 2021
  5. linked a pull request that will close this issueAdded support for custom app_conf.h #35on Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions