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

app_button_init should take a pointer to a const app_button_cfg_t

This isn't really a question, but I'm not sure where to post something like this. The stock app_button_init takes a pointer to a non-const app_button_cfg_t. The library never modifies this config, though. Changing it to a pointer to a const app_button_cfg_t allows the config to be stored in read-only memory. I've attached a simple patch that makes this change: app_button.patch

Is there a place I should put something like this in the future? Hopefully soon the SDK will be on GitHub and I can send a PR :)

Thanks!

Parents
  • Hi Nikolaus,

    I agree that this type of improvements would have been alot easier if our SDK was officially on git, but for the time being; we're unfortunately not.

    The changes you list makes sense, and I'll forward this thread/improvement internally. You even provided a .patch file. I like it.

    Thank you very much for helping us improving the SDK!

    Cheers, Håkon

  • Thanks! I appreciate you forwarding it :)

Reply Children
No Data