Skip to content

Commit

Permalink
fixes Soft Power Down and Listening Mode operation
Browse files Browse the repository at this point in the history
  • Loading branch information
technobly committed Oct 29, 2015
1 parent 3efd173 commit 68c0c4c
Show file tree
Hide file tree
Showing 8 changed files with 183 additions and 56 deletions.
9 changes: 7 additions & 2 deletions hal/inc/cellular_hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <stdint.h>
#include <string.h>
#include "net_hal.h"
#include "wlan_hal.h"

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -127,8 +128,12 @@ CellularCredentials* cellular_credentials_get(void* reserved);
bool cellular_sim_ready(void* reserved);

/**
* Called from another thread or ISR context. Attempts to stop the cellular modem from performing the current operation.
* @param reserved Pass NULL. Allows future expansion.
* Attempts to stop/resume the cellular modem from performing AT operations.
* Called from another thread or ISR context.
*
* @param cancel: true to cancel AT operations, false will resume AT operations.
* calledFromISR: true if called from ISR, false if called from main system thread.
* reserved: pass NULL. Allows future expansion.
*/
void cellular_cancel(bool cancel, bool calledFromISR, void* reserved);

Expand Down
9 changes: 6 additions & 3 deletions hal/src/electron/cellular_hal.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

#include "cellular_hal.h"
#include "modem/mdm_hal.h"
#include "wlan_hal.h"


#define CHECK_SUCCESS(x) { if (!(x)) return -1; }
Expand Down Expand Up @@ -115,5 +114,9 @@ uint32_t HAL_WLAN_SetNetWatchDog(uint32_t timeOutInuS)

void cellular_cancel(bool cancel, bool calledFromISR, void*)
{
// todo!
}
if (cancel) {
electronMDM.cancel();
} else {
electronMDM.resume();
}
}
Loading

0 comments on commit 68c0c4c

Please sign in to comment.