add code to support getPermittedTxValues()

This commit is contained in:
Rohit Grover 2015-02-26 15:15:19 +00:00 committed by Rohit Grover
parent 929136c446
commit 3b74d9dcb2
2 changed files with 11 additions and 0 deletions

View file

@ -81,6 +81,16 @@ ble_error_t nRF51822n::setTxPower(int8_t txPower)
return BLE_ERROR_NONE;
}
void nRF51822n::getPermittedTxPowerValues(const int8_t **valueArrayPP, size_t *countP)
{
static const int8_t permittedTxValues[] = {
-40, -30, -20, -16, -12, -8, -4, 0, 4
};
*valueArrayPP = permittedTxValues;
*countP = sizeof(permittedTxValues) / sizeof(int8_t);
}
ble_error_t nRF51822n::init(void)
{
/* ToDo: Clear memory contents, reset the SD, etc. */

View file

@ -44,6 +44,7 @@ public:
};
virtual ble_error_t setTxPower(int8_t txPower);
virtual void getPermittedTxPowerValues(const int8_t **valueArrayPP, size_t *countP);
virtual ble_error_t init(void);
virtual ble_error_t shutdown(void);