From b8a50db03c1f7655b846c59d6903e27d54bd82ae Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Wed, 24 Nov 2021 20:06:08 +0100 Subject: [PATCH] Add DisaBLE app that disables bluetooth Signed-off-by: Francesco Gazzetta --- README.rst | 4 ++ docs/apps.rst | 2 + res/DisaBLEApp.png | Bin 0 -> 5453 bytes res/disaBLE_icon.png | Bin 0 -> 396 bytes wasp/apps/disaBLE.py | 61 +++++++++++++++++++++++++++++++ wasp/apps/software.py | 1 + wasp/boards/manifest_240x240.py | 1 + wasp/boards/simulator/ble.py | 15 ++++++++ wasp/boards/simulator/machine.py | 5 +++ wasp/boards/sphinx/ble.py | 11 ++++++ 10 files changed, 100 insertions(+) create mode 100644 res/DisaBLEApp.png create mode 100644 res/disaBLE_icon.png create mode 100644 wasp/apps/disaBLE.py create mode 100644 wasp/boards/simulator/ble.py create mode 100644 wasp/boards/sphinx/ble.py diff --git a/README.rst b/README.rst index afef113..1051621 100644 --- a/README.rst +++ b/README.rst @@ -149,6 +149,10 @@ simulator: :alt: Simple always-on demo for showing off wasp-os at conferences and shows :width: 179 +.. image:: res/DisaBLEApp.png + :alt: Small application for disabling bluetooth to save power and enhance security + :width: 179 + .. image:: res/HeartApp.png :alt: Heart rate application running on the wasp-os simulator :width: 179 diff --git a/docs/apps.rst b/docs/apps.rst index 99ec0fc..74dca13 100644 --- a/docs/apps.rst +++ b/docs/apps.rst @@ -47,6 +47,8 @@ Applications .. automodule:: apps.demo +.. automodule:: apps.disaBLE + .. automodule:: apps.flashlight .. automodule:: apps.haiku diff --git a/res/DisaBLEApp.png b/res/DisaBLEApp.png new file mode 100644 index 0000000000000000000000000000000000000000..25301879ed2d6fed78ee41f51c9a7ae213660962 GIT binary patch literal 5453 zcmc&&XH-+$w%!y)rFxJqML&y+I9$38C?!1U&z@j zS;IemX1C8G4|!HxYF~xfw$@HeGtt5;$7gFOThP3%{qdUYo$}g2G@37u(!7l^%n9AR zQD8^6xHEA1>*`!B@I7K~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