aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-06-17 19:26:27 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-06-18 19:11:55 +0200
commitf5e22703e76ee04b8f80911eb71f62a4357d3e64 (patch)
tree5ab79f922ac732c2d07ea46640621237169cda30 /include
parentd819a57c60a28dcad4478f041e82b9da818e0373 (diff)
power_ramp: Add support to get callback when ramping process completes
It will be used in forthcoming commits to feed FSM events once the ramping process completes. Change-Id: I778dc215cf6055b93658670cc12e78ad2e51f85e
Diffstat (limited to 'include')
-rw-r--r--include/osmo-bts/tx_power.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/osmo-bts/tx_power.h b/include/osmo-bts/tx_power.h
index 8f331008..4d0457b3 100644
--- a/include/osmo-bts/tx_power.h
+++ b/include/osmo-bts/tx_power.h
@@ -20,6 +20,8 @@ struct power_amp {
struct pa_calibration calib;
};
+typedef void (*ramp_compl_cb_t)(struct gsm_bts_trx *trx);
+
/* Transmit power related parameters of a transceiver */
struct trx_power_params {
/* specified maximum output of TRX at full power, has to be
@@ -55,6 +57,8 @@ struct trx_power_params {
unsigned int step_size_mdB;
unsigned int step_interval_sec;
struct osmo_timer_list step_timer;
+ /* call-back called when target is reached */
+ ramp_compl_cb_t compl_cb;
} ramp;
};
@@ -73,7 +77,7 @@ int get_p_trxout_target_mdBm_lchan(struct gsm_lchan *lchan);
int get_p_trxout_actual_mdBm(struct gsm_bts_trx *trx, uint8_t bs_power_red);
int get_p_trxout_actual_mdBm_lchan(struct gsm_lchan *lchan);
-int power_ramp_start(struct gsm_bts_trx *trx, int p_total_tgt_mdBm, int bypass);
+int power_ramp_start(struct gsm_bts_trx *trx, int p_total_tgt_mdBm, int bypass, ramp_compl_cb_t ramp_compl_cb);
void power_trx_change_compl(struct gsm_bts_trx *trx, int p_trxout_cur_mdBm);