renamed enum constant to BLCAP

adc
Ondřej Hruška 6 years ago
parent d4e1d85bb4
commit 72b331bce5
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 6
      units/adc/_adc_core.c
  2. 2
      units/adc/_adc_internal.h
  3. 2
      units/adc/unit_adc.c

@ -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);

@ -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
};

@ -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);

Loading…
Cancel
Save