Doing it the right way with defines.

4 posts / 0 new
Last post
ciano
Offline
Last seen:1 month 3 weeks ago
Joined:2014-10-03 08:13
Doing it the right way with defines.

Hi,

我一直使用SDK有一段时间了, and I need some SDK guidelines for the defines.
I have added a simple temperature sensor, which involves the following.
temperature HW driver
temperature GATT service
temperature timer handling in APP context. (temperature is polled by timer)

I have created the following defines for this, trying to follow the SDK concept:

CFG_PRF_TEMPERATURE
BLE_TEMPERATURE

CFG_APP_TEMPERATURE
BLE_APP_TEMPERATURE

I am using these defines when adding the code for handling the temperature, but I am using the defines in the correct places.
Now for my question.
Where should I use which defines?
Could you give an explanation of the "type" of defines.
For each define could you list the files, where it should be used?

I would like not to "hack" the SDK. If done right, it should also be easier to upgrade the SDK, when new versions are released from dialog.

Best Regards
Ciano Frost
Denmark

RvA
Offline
Last seen:1 week 22 hours ago
Staff
Joined:2014-02-07 14:10
Hi Ciano,

Hi Ciano,

I will talk to the SW team and give feedback as soon as possible.

Best regards, RvA(Dialog)

gl_dialog (not verified)
Dear Ciano,

Dear Ciano,

I suggest you to check out the simple beacon software from the link:http://support.dialog-semiconductor.com/da14580-reference-design-beacon

When connected, It reads the ADC channel every 5 seconds. (see the app_adc_notify_task.c file in the app_adc_notify_cfg_ind_handler).

You can easily duplicate the same thing for your sensor or you can even start from this project.

Hope this helps,

Best regards,

DIALOG TEAM.

gl_dialog (not verified)
Just noticed that the second

==> Where should I use which defines? / For each define could you list the files, where it should be used?

in the da14580_config.h file + rwble_hl_config.h

Please download the beacon SW mentioned above and look for: CFG_PRF_ADC_NOTIFY (to enable our 128 bits profile to read ADC channel)

==> Could you give an explanation of the "type" of defines.

please downloadUM-B-019 DA14580 Beacon Reference Application Manualand check page 12.

Best regards,

DIALOG TEAM.