Skip to content

Commit 5b2dc38

Browse files
author
Ari Parkkila
committed
Cellular: Removed set_power_level()
1 parent 09e2a7e commit 5b2dc38

File tree

6 files changed

+0
-54
lines changed

6 files changed

+0
-54
lines changed

UNITTESTS/features/cellular/framework/AT/at_cellularpower/at_cellularpowertest.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,6 @@ TEST_F(TestAT_CellularPower, test_AT_CellularPower_off)
7575
EXPECT_TRUE(NSAPI_ERROR_UNSUPPORTED == pow.off());
7676
}
7777

78-
TEST_F(TestAT_CellularPower, test_AT_CellularPower_set_power_level)
79-
{
80-
EventQueue que;
81-
FileHandle_stub fh1;
82-
ATHandler at(&fh1, que, 0, ",");
83-
84-
AT_CellularPower pow(at);
85-
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
86-
EXPECT_TRUE(NSAPI_ERROR_OK == pow.set_power_level(6));
87-
EXPECT_TRUE(NSAPI_ERROR_OK == pow.set_power_level(1, 1));
88-
EXPECT_TRUE(NSAPI_ERROR_OK == pow.set_power_level(1, 0));
89-
90-
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_DEVICE_ERROR;
91-
EXPECT_TRUE(NSAPI_ERROR_DEVICE_ERROR == pow.set_power_level(6));
92-
}
93-
9478
TEST_F(TestAT_CellularPower, test_AT_CellularPower_reset)
9579
{
9680
EventQueue que;

UNITTESTS/stubs/AT_CellularPower_stub.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ nsapi_error_t AT_CellularPower::off()
4040
return NSAPI_ERROR_OK;
4141
}
4242

43-
nsapi_error_t AT_CellularPower::set_power_level(int func_level, int do_reset)
44-
{
45-
return NSAPI_ERROR_OK;
46-
}
47-
4843
nsapi_error_t AT_CellularPower::reset()
4944
{
5045
return NSAPI_ERROR_OK;

features/cellular/TESTS/api/cellular_power/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ static void test_power_interface()
8181
TEST_ASSERT(err == NSAPI_ERROR_OK || err == NSAPI_ERROR_UNSUPPORTED);
8282
wait_for_power(pwr);
8383

84-
TEST_ASSERT(pwr->set_power_level(1, 0) == NSAPI_ERROR_OK);
85-
8684
err = pwr->reset();
8785
TEST_ASSERT(err == NSAPI_ERROR_OK);
8886
wait_for_power(pwr);

features/cellular/framework/API/CellularPower.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,6 @@ class CellularPower {
5858
*/
5959
virtual nsapi_error_t off() = 0;
6060

61-
/** Set cellular device power level by enabling/disabling functionality.
62-
*
63-
* @param func_level:
64-
* 0 minimum functionality
65-
* 1 full functionality. Enable (turn on) the transmit and receive RF circuits for all supported radio access technologies.
66-
* For MTs supporting +CSRA, this equals the RATs indicated by the response of +CSRA=?. Current +CSRA setting is ignored.
67-
* It is not required that the MT transmit and receive RF circuits are in a disabled state for this setting to have effect.
68-
* 2 disable (turn off) MT transmit RF circuits only
69-
* 3 disable (turn off) MT receive RF circuits only
70-
* 4 disable (turn off) both MT transmit and receive RF circuits
71-
* @param do_reset 0 for do not reset, 1 for reset the device when changing the functionality
72-
*
73-
* @remark See 3GPP TS 27.007 CFUN for more details
74-
*
75-
* @return NSAPI_ERROR_OK on success
76-
* NSAPI_ERROR_DEVICE_ERROR on failure
77-
*/
78-
virtual nsapi_error_t set_power_level(int func_level, int do_reset = 0) = 0;
79-
8061
/** Reset and wake-up cellular device.
8162
*
8263
* @return NSAPI_ERROR_OK on success

features/cellular/framework/AT/AT_CellularPower.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,6 @@ nsapi_error_t AT_CellularPower::off()
4242
return NSAPI_ERROR_UNSUPPORTED;
4343
}
4444

45-
nsapi_error_t AT_CellularPower::set_power_level(int func_level, int do_reset)
46-
{
47-
_at.lock();
48-
_at.cmd_start("AT+CFUN=");
49-
_at.write_int(func_level);
50-
_at.write_int(do_reset);
51-
_at.cmd_stop_read_resp();
52-
return _at.unlock_return_error();
53-
}
54-
5545
nsapi_error_t AT_CellularPower::reset()
5646
{
5747
_at.lock();

features/cellular/framework/AT/AT_CellularPower.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ class AT_CellularPower : public CellularPower, public AT_CellularBase {
3838

3939
virtual nsapi_error_t off();
4040

41-
virtual nsapi_error_t set_power_level(int func_level, int do_reset = 0);
42-
4341
virtual nsapi_error_t reset();
4442
};
4543

0 commit comments

Comments
 (0)