Skip to content

Commit

Permalink
Refactored BT GATTS API, added mJS bindings
Browse files Browse the repository at this point in the history
All the ESP32 specifics are hidden in the implementation, new API is
generic and is much easier to use:

 * Prepared writes are handled by mos, user doesn't need to care about reassembling the write.
 * Notification handling is much simpler - CCCD management is handled by mos, user gets simple "notifications on/off" event.
 * ESP32 code cleaned up, all processing moved to main task.

Updated existing GATTS service implementations to use it.

CL: Refactored BT GATTS API, added mJS bindings

PUBLISHED_FROM=7f1a63102d207b68baf1f50b6b9e7fd7c175f35b
  • Loading branch information
Deomid Ryabkov authored and cesantabot committed Dec 16, 2018
1 parent 0567a96 commit de7840b
Show file tree
Hide file tree
Showing 4 changed files with 299 additions and 345 deletions.
4 changes: 4 additions & 0 deletions mos.yml
Expand Up @@ -3,11 +3,15 @@ description: Configuration over Bluetooth GATT service support
type: lib
version: 1.0

sources:
- src

libs:
- origin: https://github.com/mongoose-os-libs/bt-common

config_schema:
- ["bt.config_svc_enable", "b", true, {title: "Enable the config service"}]
- ["bt.config_svc_sec_level", "i", 0, {title: "Minimum required security level"}]

tags:
- bt
Expand Down
2 changes: 0 additions & 2 deletions mos_esp32.yml

This file was deleted.

343 changes: 0 additions & 343 deletions src/esp32/esp32_bt_svc_config.c

This file was deleted.

0 comments on commit de7840b

Please sign in to comment.