renamed enum constant to BLCAP

This commit is contained in:
2018-02-07 15:58:47 +01:00
parent d4e1d85bb4
commit 72b331bce5
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -33,7 +33,7 @@ void UADC_DMA_Handler(void *arg)
// check what mode we're in
const bool m_trigd = priv->opmode == ADC_OPMODE_TRIGD;
const bool m_stream = priv->opmode == ADC_OPMODE_STREAM;
const bool m_fixcpt = priv->opmode == ADC_OPMODE_FIXCAPT;
const bool m_fixcpt = priv->opmode == ADC_OPMODE_BLCAP;
if (m_trigd || m_stream || m_fixcpt) {
if (ht || tc) {
@@ -222,7 +222,7 @@ void UADC_StartBlockCapture(Unit *unit, uint32_t len, TF_ID frame_id)
priv->stream_frame_id = frame_id;
priv->stream_startpos = (uint16_t) DMA_POS(priv);
priv->trig_stream_remain = len;
UADC_SwitchMode(unit, ADC_OPMODE_FIXCAPT);
UADC_SwitchMode(unit, ADC_OPMODE_BLCAP);
}
/** Start stream */
@@ -333,7 +333,7 @@ void UADC_SwitchMode(Unit *unit, enum uadc_opmode new_mode)
}
else if (new_mode == ADC_OPMODE_TRIGD ||
new_mode == ADC_OPMODE_STREAM ||
new_mode == ADC_OPMODE_FIXCAPT) {
new_mode == ADC_OPMODE_BLCAP) {
dbg("ADC switch -> TRIG'D / STREAM / BLOCK");
assert_param(priv->opmode == ADC_OPMODE_ARMED || priv->opmode == ADC_OPMODE_IDLE);
+1 -1
View File
@@ -17,7 +17,7 @@ enum uadc_opmode {
ADC_OPMODE_REARM_PENDING, //!< Idle, waiting for the next sample to re-arm (auto trigger).
ADC_OPMODE_ARMED, //!< Armed for a trigger. Direct access and averaging are disabled.
ADC_OPMODE_TRIGD, //!< Triggered, sending pre-trigger and streaming captured data.
ADC_OPMODE_FIXCAPT,//!< Capture of fixed length without a trigger
ADC_OPMODE_BLCAP,//!< Capture of fixed length without a trigger
ADC_OPMODE_STREAM, //!< Unlimited capture
};
+1 -1
View File
@@ -227,7 +227,7 @@ static error_t UADC_handleRequest(Unit *unit, TF_ID frame_id, uint8_t command, P
priv->auto_rearm = false;
UADC_SwitchMode(unit, ADC_OPMODE_IDLE);
if (old_opmode == ADC_OPMODE_FIXCAPT ||
if (old_opmode == ADC_OPMODE_BLCAP ||
old_opmode == ADC_OPMODE_STREAM ||
old_opmode == ADC_OPMODE_TRIGD) {
UADC_ReportEndOfStream(unit);