renamed enum constant to BLCAP
This commit is contained in:
@@ -33,7 +33,7 @@ void UADC_DMA_Handler(void *arg)
|
|||||||
// check what mode we're in
|
// check what mode we're in
|
||||||
const bool m_trigd = priv->opmode == ADC_OPMODE_TRIGD;
|
const bool m_trigd = priv->opmode == ADC_OPMODE_TRIGD;
|
||||||
const bool m_stream = priv->opmode == ADC_OPMODE_STREAM;
|
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 (m_trigd || m_stream || m_fixcpt) {
|
||||||
if (ht || tc) {
|
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_frame_id = frame_id;
|
||||||
priv->stream_startpos = (uint16_t) DMA_POS(priv);
|
priv->stream_startpos = (uint16_t) DMA_POS(priv);
|
||||||
priv->trig_stream_remain = len;
|
priv->trig_stream_remain = len;
|
||||||
UADC_SwitchMode(unit, ADC_OPMODE_FIXCAPT);
|
UADC_SwitchMode(unit, ADC_OPMODE_BLCAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Start stream */
|
/** Start stream */
|
||||||
@@ -333,7 +333,7 @@ void UADC_SwitchMode(Unit *unit, enum uadc_opmode new_mode)
|
|||||||
}
|
}
|
||||||
else if (new_mode == ADC_OPMODE_TRIGD ||
|
else if (new_mode == ADC_OPMODE_TRIGD ||
|
||||||
new_mode == ADC_OPMODE_STREAM ||
|
new_mode == ADC_OPMODE_STREAM ||
|
||||||
new_mode == ADC_OPMODE_FIXCAPT) {
|
new_mode == ADC_OPMODE_BLCAP) {
|
||||||
|
|
||||||
dbg("ADC switch -> TRIG'D / STREAM / BLOCK");
|
dbg("ADC switch -> TRIG'D / STREAM / BLOCK");
|
||||||
assert_param(priv->opmode == ADC_OPMODE_ARMED || priv->opmode == ADC_OPMODE_IDLE);
|
assert_param(priv->opmode == ADC_OPMODE_ARMED || priv->opmode == ADC_OPMODE_IDLE);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ enum uadc_opmode {
|
|||||||
ADC_OPMODE_REARM_PENDING, //!< Idle, waiting for the next sample to re-arm (auto trigger).
|
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_ARMED, //!< Armed for a trigger. Direct access and averaging are disabled.
|
||||||
ADC_OPMODE_TRIGD, //!< Triggered, sending pre-trigger and streaming captured data.
|
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
|
ADC_OPMODE_STREAM, //!< Unlimited capture
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ static error_t UADC_handleRequest(Unit *unit, TF_ID frame_id, uint8_t command, P
|
|||||||
priv->auto_rearm = false;
|
priv->auto_rearm = false;
|
||||||
UADC_SwitchMode(unit, ADC_OPMODE_IDLE);
|
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_STREAM ||
|
||||||
old_opmode == ADC_OPMODE_TRIGD) {
|
old_opmode == ADC_OPMODE_TRIGD) {
|
||||||
UADC_ReportEndOfStream(unit);
|
UADC_ReportEndOfStream(unit);
|
||||||
|
|||||||
Reference in New Issue
Block a user