R_DOC_SetMode

Sets the operating mode and the initial value of the reference value for use by the data operation circuit.

Remark 1. When COMPARE_MISMATCH or COMPARE_MATCH (data comparison mode) is specified as the mode of operation, the 16-bit reference value is stored in the DOC data setting register (DODSR).

Remark 2. When ADDITION (data addition mode) or SUBTRACTION (data subtraction mode) is specified for the mode (operation mode), the 16-bit value is stored in the DOC data setting register (DODSR) as the initial value.

[Syntax]

#include "r_cg_doc.h"

void R_DOC_SetMode ( doc_mode_t mode, uint16_t value );

[Argument(s)]

I/O

Argument

Description

I

doc_mode_t mode;

Operating modes (including the condition for detection)

COMPARE_MISMATCH : Data comparison mode

(mismatch)

COMPARE_MATCH : Data comparison mode

(match)

ADDITION : Data addition mode

SUBTRACTION : Data subtraction mode

I

uint16_t value;

Initial value of the reference value for use by the DOC

[Return value]

None.