Where is the proper place to define an application task like TASK_APP_DIS?

3 posts / 0 new
Last post
brian
Offline
Last seen:5年11个月前
Expert Master
Joined:2014-10-16 18:10
Where is the proper place to define an application task like TASK_APP_DIS?

I want to add the application device information service CLIENT and it has a currently undefined task TASK_APP_DIS.

Where should this be defined? Should I add it to the list of TASK TYPE definitions in rwip_config.h or the BLE APPLICATION SETTINGS in rwip_config.h?

When should I call the app_disc_task init() method? Should this be called in app_init()? I assume the prf_init_func() in prf_utils has already been called and disc_init() called before app_init() is called.

Thanks

PY_Dialog
Offline
Last seen:2 years 7 months ago
Staff
Joined:2014-08-25 09:59
Hi Brian,

Hi Brian,

1.Yes, you can put this define in KE_TASK_TYPE.
2.实际上没有restriction where you call init function and app_init() or app_init_func() will be typical entry points for initiation.

Regards!
PY

brian
Offline
Last seen:5年11个月前
Expert Master
Joined:2014-10-16 18:10
I ended up doing this and by

I ended up doing this and by trial an error it seemed to work. However, at this point I have decided not to use the profiles, but just to stick with GATT since my central exposes no services.