Skip to content

Commit 2c29852

Browse files
author
Mirela Chirica
committed
Cellular: Added getters for device and serial to EasyCellularConnection
1 parent 273a052 commit 2c29852

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

features/cellular/easy_cellular/EasyCellularConnection.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,16 @@ NetworkStack *EasyCellularConnection::get_stack()
336336
}
337337
}
338338

339+
CellularDevice *EasyCellularConnection::get_device()
340+
{
341+
return _cellularConnectionFSM->get_device();
342+
}
343+
344+
UARTSerial *EasyCellularConnection::get_serial()
345+
{
346+
return &_cellularSerial;
347+
}
348+
339349
} // namespace
340350

341351
#endif // CELLULAR_DEVICE

features/cellular/easy_cellular/EasyCellularConnection.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,19 @@ class EasyCellularConnection: public CellularBase {
135135
* @param plmn operator in numeric format. See more from 3GPP TS 27.007 chapter 7.3.
136136
*/
137137
void set_plmn(const char *plmn);
138+
139+
/** Get the cellular device from the cellular state machine
140+
*
141+
* @return cellular device
142+
*/
143+
CellularDevice *get_device();
144+
145+
/** Get the UART serial file handle used by cellular subsystem
146+
*
147+
* @return address of cellular UART serial
148+
*/
149+
UARTSerial *get_serial();
150+
138151
protected:
139152

140153
/** Provide access to the NetworkStack object

0 commit comments

Comments
 (0)