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

The 'HOST' #define in light switch examples

In the examples I see places where there is conditional code based on the #define HOST.

For example in function nrf_mesh_init() i see that the softdevice is only enabled if HOST is undefined.

That seems to suggest that I integrate the mesh code into my firmware where I already call softdevice, then I need to ensure the HOST is defined

I have checked in the segger ide appropriate place for preprocessor defines and I see HOST is not defined there.

I wish Nordic could adopt a convention that for this example in the preprocessor definitions there is an explicit 'notHOST' which conveys to the reader that there is a significance to that hash define

The absence of 'HOST' leads to confusion, the presence of 'notHOST' will give the some relevant information.

I worked for a consultancy 2 decades ago and they drilled that into me :-)

Parents Reply Children
Related