You are reading a single comment by @user156811 and its replies. Click here to read the full conversation.
  • This sounds ok - but maybe if bangle_defines.h is going to have all the state, it should be bangle_state.h?

    I'm also not sure if we really need empty weak functions? If the function is going to be required for the given hardware to work, maybe just put the declarations in the header? If the function is needed, having the build fail if the function isn't defined is probably a good thing?

  • So those week functions are to handle state.
    So in the code i just sent the Bangle1 watch needs its backlight to be killed a certain way. But most backlights don't need to be killed at all.

    There's also a few display drawing calls that are not really supported on other devices other then the bangle1.

    If i get to do touch. The bangle1 touch needs no initialization. But the bangle2 does.

    There are other examples. I can point out where a specific devices doesn't need a special state, but the group as a hole needs the option to config at a given state.

    • idle
    • kill
    • init

    So these empty declarations are there because its not needed for every devices. So each device could have every function declarations inside of them. But they would also just be empty.

    If the function is needed, having the build fail if the function isn't defined is probably a good thing?

    So i totally agree with this. Its just in these cases these function are not needed in many cases.

About

Avatar for user156811 @user156811 started