Merge pull request #7795 from mirelachirica/issue_7470_access_to_power

Cellular: Add getters for device and serial to EasyCellularConnection
pull/7881/merge
Cruz Monrreal 2018-08-29 09:37:38 -05:00 committed by GitHub
commit 7b29f7d2e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

View File

@ -336,6 +336,16 @@ NetworkStack *EasyCellularConnection::get_stack()
}
}
CellularDevice *EasyCellularConnection::get_device()
{
return _cellularConnectionFSM->get_device();
}
UARTSerial *EasyCellularConnection::get_serial()
{
return &_cellularSerial;
}
} // namespace
#endif // CELLULAR_DEVICE

View File

@ -135,6 +135,19 @@ public:
* @param plmn operator in numeric format. See more from 3GPP TS 27.007 chapter 7.3.
*/
void set_plmn(const char *plmn);
/** Get the cellular device from the cellular state machine
*
* @return cellular device
*/
CellularDevice *get_device();
/** Get the UART serial file handle used by cellular subsystem
*
* @return address of cellular UART serial
*/
UARTSerial *get_serial();
protected:
/** Provide access to the NetworkStack object