- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found the low power handling on PSoC4BLE difficult so I tried to create a more user friendly function: void sleep_ble(BLESleepT request)
. It it based on documentation I've found, see comments in the source code. The function takes one of the following requests:
BLE_SLEEP
: put BLE into SleepBLE_DEEPSLEEP
: put BLE into DeepSleep, which takes some longer time to wake up than SleepBLE_SLEEP_CPU_SLEEP
: put BLE into Sleep, put CPU into SleepBLE_DEEPSLEEP_CPU_SLEEP
: put BLE into DeepSleep, put CPU into SleepBLE_DEEPSLEEP_CPU_DEEPSLEEP
: put BLE into DeepSleep, put CPU into DeepSleep
and tries to to it's best. The typical usage will probably use one of BLE_DEEPSLEEP
, BLE_DEEPSLEEP_CPU_SLEEP
or BLE_DEEPSLEEP_CPU_DEEPSLEEP
.
Enjoy! And please add comments if parts of the code must be fixed.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Awesome! 🙂 Thanks for your interest!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found a nasty bug in this library: The if-statements in the function unzip()
was not put into braces. I've attached the bugfixed files (I plan to put this (and more?) on GitHub, when I get time).
So if you have been using EasySleep, you must update it. And please give feedback if more needs to be fixed. I have not tested this code well, yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK. I started to use this library by my own, and have now fixed another problem: The documentation for CyBle_GetBleSsState()
was wrong for the CYBLE_BLESS_STATE_EVENT_CLOSE
state ("after this state").
The code is now on GitHub instead, and further (?) development will be done there: https://github.com/cypress-speedycat/EasySleep