What is different in ble_lbs_init_t and ble_lbs_s

Hi All,

Later I will build a Custom Service, so I refer to ble_app_blinky.

According to the image below, I cannot clearly understand the difference between the two from the annotations.

Best regards,

Kai

Parents
  • Hi there,

    The difference is best illustrated by the usage in the ble_app_multiperipheral example in the SDK. 

    ble_lbs_init_t is a struct which contains the service handler. This struct is passed to the ble_lbs_init() to set the callback handler for the service.
    ble_lbs_s is structure which contains the information about the service such as characterizes, uuid_type etc. This struct is used internally in the module when you create your service. Note that the callback handler is one of the member variables of this struct.
    regards
    Jared
Reply
  • Hi there,

    The difference is best illustrated by the usage in the ble_app_multiperipheral example in the SDK. 

    ble_lbs_init_t is a struct which contains the service handler. This struct is passed to the ble_lbs_init() to set the callback handler for the service.
    ble_lbs_s is structure which contains the information about the service such as characterizes, uuid_type etc. This struct is used internally in the module when you create your service. Note that the callback handler is one of the member variables of this struct.
    regards
    Jared
Children
Related