Azure Sphere MT3620 M4 API Reference Manual
|
M-HAL ADC function list information, ADC hardware initializing and de-initializing, setting and getting ADC parameters set, enabling and disabling ADC hardware output, gets ADC sample data using FIFO mode, gets ADC sample data using DMA mode, enabling and disabling clock. More...
M-HAL ADC function list information, ADC hardware initializing and de-initializing, setting and getting ADC parameters set, enabling and disabling ADC hardware output, gets ADC sample data using FIFO mode, gets ADC sample data using DMA mode, enabling and disabling clock.
Functions | |
int | mtk_mhal_adc_init (struct mtk_adc_controller *ctlr) |
This function is used to initialize an ADC hardware controller. More... | |
int | mtk_mhal_adc_deinit (struct mtk_adc_controller *ctlr) |
This function is used to de-initialize an ADC hardware controller. More... | |
int | mtk_mhal_adc_fsm_param_set (struct mtk_adc_controller *ctlr, struct adc_fsm_param *adc_fsm_parameter) |
This function is used to configure ADC controller parameters. More... | |
int | mtk_mhal_adc_start (struct mtk_adc_controller *ctlr) |
This function is used to start the predefined channels by ADC parameter configre API, please refer to the structure channel_map for detail info. More... | |
int | mtk_mhal_adc_stop (struct mtk_adc_controller *ctlr) |
This function is used to stop ADC controller. More... | |
int | mtk_mhal_adc_enable_clk (struct mtk_adc_controller *ctlr) |
This function is used to enable ADC clock. More... | |
int | mtk_mhal_adc_disable_clk (struct mtk_adc_controller *ctlr) |
This function is used to disable ADC clock. More... | |
int | mtk_mhal_adc_fifo_handle_rx (struct mtk_adc_controller *ctlr) |
This function is used to read FIFO data from HW. More... | |
int mtk_mhal_adc_init | ( | struct mtk_adc_controller * | ctlr | ) |
This function is used to initialize an ADC hardware controller.
Usage: The main sequence is as bellow:
1.Call this function after allocating ADC controller.
2.Before operating ADC hardware, this API should be called firstly.
[in] | ctlr | : Abstract an ADC controller. |
int mtk_mhal_adc_deinit | ( | struct mtk_adc_controller * | ctlr | ) |
This function is used to de-initialize an ADC
hardware controller.
Usage: This function should be called before releasing ADC
controller.
[in] | ctlr | : Abstract an ADC controller. |
int mtk_mhal_adc_fsm_param_set | ( | struct mtk_adc_controller * | ctlr, |
struct adc_fsm_param * | adc_fsm_parameter | ||
) |
This function is used to configure ADC controller parameters.
Usage: OS-HAL calls this API to set ADC hardware,
and this function should be called before ADC start or
ADC start channel.
[in] | ctlr | : Abstract an ADC controller. |
[in] | adc_fsm_parameter | : ADC parameter information. |
int mtk_mhal_adc_start | ( | struct mtk_adc_controller * | ctlr | ) |
This function is used to start the predefined channels by ADC
parameter configre API, please refer to the structure
channel_map for detail info.
Usage: OS-HAL calls this API to start ADC hardware,
and this function should be called after setting ADC parameters.
[in] | ctlr | : Abstract an ADC controller. |
int mtk_mhal_adc_stop | ( | struct mtk_adc_controller * | ctlr | ) |
This function is used to stop ADC controller.
Usage: The main sequence of the API is as bellow:
1.This function should be called after setting ADC parameters.
2.This function should be called before ADC de-initializing.
[in] | ctlr | : Abstract an ADC controller. |
int mtk_mhal_adc_enable_clk | ( | struct mtk_adc_controller * | ctlr | ) |
This function is used to enable ADC clock.
Usage: It must be called before operating hardware;
otherwise, the access to ADC register will fail. The function should
be called in the sequence as bellow:
alloc_controller-> enable_clk->adc_init.
[in] | ctlr | : Abstract an ADC controller. |
int mtk_mhal_adc_disable_clk | ( | struct mtk_adc_controller * | ctlr | ) |
This function is used to disable ADC clock.
Usage: When Hardware is not in use, advise to disable clock.
[in] | ctlr | : Abstract an ADC controller. |
int mtk_mhal_adc_fifo_handle_rx | ( | struct mtk_adc_controller * | ctlr | ) |
This function is used to read FIFO data from HW.
Usage: It must be called in irq function with FIFO mode.
[in] | ctlr | : Abstract an ADC controller. |