#include <calypso/dsp.h>
#include <calypso/timer.h>
#include <comm/sercomm.h>
+#include <asm/system.h>
#include <layer1/sync.h>
#include <layer1/agc.h>
#include <layer1/tdma_sched.h>
#include <layer1/tpu_window.h>
#include <layer1/l23_api.h>
+#include <layer1/prim.h>
#include <l1ctl_proto.h>
dsp_api.db_w->d_task_md = num_meas; /* number of measurements */
dsp_api.ndb->d_fb_mode = 0; /* wideband search */
- dsp_end_scenario();
/* Tell the RF frontend to set the gain appropriately */
rffe_set_gain(-85, CAL_DSP_TGT_BB_LVL);
* num_meas > 1 */
l1s_rx_win_ctrl(arfcn, L1_RXWIN_PW, 0);
//l1s_rx_win_ctrl(arfcn, L1_RXWIN_NB);
- tpu_end_scenario();
return 0;
}
}
static const struct tdma_sched_item pm_sched_set[] = {
- SCHED_ITEM(l1s_pm_cmd, 1, 0), SCHED_END_FRAME(),
+ SCHED_ITEM_DT(l1s_pm_cmd, 0, 1, 0), SCHED_END_FRAME(),
SCHED_END_FRAME(),
- SCHED_ITEM(l1s_pm_resp, 1, 0), SCHED_END_FRAME(),
+ SCHED_ITEM(l1s_pm_resp, -4, 1, 0), SCHED_END_FRAME(),
SCHED_END_SET()
};
/* Schedule a power measurement test */
void l1s_pm_test(uint8_t base_fn, uint16_t arfcn)
{
+ unsigned long flags;
+
printd("l1s_pm_test(%u, %u)\n", base_fn, arfcn);
+
+ local_firq_save(flags);
tdma_schedule_set(base_fn, pm_sched_set, arfcn);
+ local_irq_restore(flags);
}