RX Family
ADC Module Using Firmware Integration Technology
R01AN1666EJ0220 Rev. 2.20
Page 69 of 74
Dec 01, 2016
3.6
R_ADC_Close()
This function ends any scan in progress, disables interrupts, and removes power to the A/D peripheral.
Format
adc_err_t R_ADC_Close(uint8_t unit);
Parameters
unit
0 or 1. For MCUs with only one unit 0 should be passed (only the RX64M/RX71M/RX65x have 2 units).
Return Values
ADC_ERR
_
INVALID_ARG:
Unit not 0 or 1
Properties
Prototyped in file “r_s12ad_rx_if.h”
Description
Ends any scan in progress, disables interrupts, and removes power to the A/D peripheral. Allows call to Open() to be
performed again. This is necessary when changing scan configurations.
Reentrant
This may only be called once per unit after an Open() is performed.
Example
:
err = R_ADC_Open(1, ADC_MODE_SS_MULTI_CH_GROUPED, &config, MyCallback);
:
R_ADC_Close(1);
Special Notes:
This function will abort any scan that may be in progress.