The BLE FreeRTOS project is no different from normal project. Only difference is the firmware flow. FreeRTOS adds some files for scheduling and Task management.
Also there is no difference in terms of APIs and other firmware flow between Modus Toolbox 2.1 and PSoC Creator in case of BLE application.
In the BLE_Battery_Level_FreeRTOS project, you can see the stack_event_handler and its registration " Cy_BLE_RegisterEventCallback(stack_event_handler);" in the ble_task.c file.
You can add the corresponding code for your custom service read and write operation inside the stack_event_handler present in the ble_task.c
When using PSoC Creator and BLE component (v2.10 and in v2.20 PDL 3.1.1) Cy_BLE_Start() is still present in BLE.c and
the callback variable cy_ble_config in the cy_stc_ble_config_t struct is still there.
However, using ModusToolbox,
- BLE "component is now called "bless" v3.40
- cy_ble_config is still allocated
- the struct cy_stc_ble_config_t no longer contains the callback variable
- Cy_BLE_Start() has been removed.
Strangely, there are still a few places in the comments of the new BLE PDL version that refers to Cy_BLE_Start().