#ifndef BLE_MODEM_H #define BLE_MODEM_H #include "wm_type_def.h" /** * @brief Turns the BLE modem on * * @param startService to start the ble service when turning the modem on * @return true on success * @return false on failure */ bool ble_modem_on(bool bluetoothOnly, bool startService); /** * @brief Turns the BLE modem off * @note If the ble service was started, then it will automatically be turned off with the modem * * @return true on success * @return false on failure */ bool ble_modem_off(void); /** * @brief Find out if the modem is turned on or not * * @return true if turned on * @return false if turned off */ bool is_ble_modem_on(void); /** * @brief Sets the BLE modem to sleep during IDLE times. * This will lead to a latency penalty of arround 10 seconds, * upon receiving a new frame but reduces power consumption when using BLE. * * @return true if the modem was successfully set to sleep. * @return false if not */ bool ble_modem_sleep(void); /** * @brief Disables the sleep state of the BLE modem. Latency will increase and power * consumption also. * * @return true if the modem woke up successfully * @return false otherwise */ bool ble_modem_wake(void); /** * @brief Returns true if the BLE modem is allowed to sleep during IDLE times, false * if it is not allowed to sleep. * * @return true if it is sleeping or allowed to sleep * @return false otherwise */ bool ble_modem_is_sleeping(void); #endif //BLE_MODEM_H