|
| enum | adc_channel_t {
ADC_CHANNEL_0
, ADC_CHANNEL_1
, ADC_CHANNEL_2
, ADC_CHANNEL_3
,
ADC_CHANNEL_4
, ADC_CHANNEL_5
, ADC_CHANNEL_MAX_NUM
, ADC_CHANNEL_NONE = ADC_CHANNEL_MAX_NUM
} |
| | ADC channels definition. 更多...
|
| |
| enum | port_adc_scan_freq_t {
HAL_ADC_SCAN_FREQ_2HZ
, HAL_ADC_SCAN_FREQ_4HZ
, HAL_ADC_SCAN_FREQ_8HZ
, HAL_ADC_SCAN_FREQ_16HZ
,
HAL_ADC_SCAN_FREQ_32HZ
, HAL_ADC_SCAN_FREQ_64HZ
, HAL_ADC_SCAN_FREQ_128HZ
, HAL_ADC_SCAN_FREQ_256HZ
,
HAL_ADC_SCAN_FREQ_MAX
, HAL_ADC_SCAN_FREQ_NONE = HAL_ADC_SCAN_FREQ_MAX
} |
| | adc自动扫描频率,用于所有通道。 更多...
|
| |
Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2022-2022. All rights reserved.
Description: Provides adc port
History:
2022-09-16, Create file.
◆ ADC_LOCK_GET_ATTE
| #define ADC_LOCK_GET_ATTE 0xFFFFFFFF |
◆ HAL_ADC_CH0_PIN
| #define HAL_ADC_CH0_PIN 0 |
◆ HAL_ADC_CH1_PIN
| #define HAL_ADC_CH1_PIN 0 |
◆ HAL_ADC_CH2_PIN
| #define HAL_ADC_CH2_PIN 0 |
◆ HAL_ADC_CH3_PIN
| #define HAL_ADC_CH3_PIN 0 |
◆ HAL_ADC_CH4_PIN
| #define HAL_ADC_CH4_PIN 0 |
◆ HAL_ADC_CH5_PIN
| #define HAL_ADC_CH5_PIN 0 |
◆ HAL_ADC_CH6_PIN
| #define HAL_ADC_CH6_PIN 0 |
◆ HAL_ADC_CH7_PIN
| #define HAL_ADC_CH7_PIN 0 |
◆ HAL_ADC_CH8_PIN
| #define HAL_ADC_CH8_PIN 0 |
◆ HAL_ADC_SCAN_CH0_1_ADDR
| #define HAL_ADC_SCAN_CH0_1_ADDR 0x4400D01C |
◆ HAL_ADC_SCAN_CH0_ADDR
| #define HAL_ADC_SCAN_CH0_ADDR 0x4400D01C |
◆ HAL_ADC_SCAN_CH1_ADDR
| #define HAL_ADC_SCAN_CH1_ADDR 0x4400D020 |
◆ HAL_ADC_SCAN_CH2_3_ADDR
| #define HAL_ADC_SCAN_CH2_3_ADDR 0x4400D024 |
◆ HAL_ADC_SCAN_CH2_ADDR
| #define HAL_ADC_SCAN_CH2_ADDR 0x4400D024 |
◆ HAL_ADC_SCAN_CH3_ADDR
| #define HAL_ADC_SCAN_CH3_ADDR 0x4400D028 |
◆ HAL_ADC_SCAN_CH4_ADDR
| #define HAL_ADC_SCAN_CH4_ADDR 0x4400D02C |
◆ HAL_ADC_SCAN_CH5_ADDR
| #define HAL_ADC_SCAN_CH5_ADDR 0x4400D030 |
◆ adc_channel_t
ADC channels definition.
| 枚举值 |
|---|
| ADC_CHANNEL_0 | |
| ADC_CHANNEL_1 | |
| ADC_CHANNEL_2 | |
| ADC_CHANNEL_3 | |
| ADC_CHANNEL_4 | |
| ADC_CHANNEL_5 | |
| ADC_CHANNEL_MAX_NUM | |
| ADC_CHANNEL_NONE | |
◆ port_adc_scan_freq_t
adc自动扫描频率,用于所有通道。
| 枚举值 |
|---|
| HAL_ADC_SCAN_FREQ_2HZ | |
| HAL_ADC_SCAN_FREQ_4HZ | |
| HAL_ADC_SCAN_FREQ_8HZ | |
| HAL_ADC_SCAN_FREQ_16HZ | |
| HAL_ADC_SCAN_FREQ_32HZ | |
| HAL_ADC_SCAN_FREQ_64HZ | |
| HAL_ADC_SCAN_FREQ_128HZ | |
| HAL_ADC_SCAN_FREQ_256HZ | |
| HAL_ADC_SCAN_FREQ_MAX | |
| HAL_ADC_SCAN_FREQ_NONE | |
◆ adc_irq_lock()
| uint32_t adc_irq_lock |
( |
void |
| ) |
|
|
inline |
Lock of the interrupt.
- 返回
- The irq status.
◆ adc_irq_unlock()
| void adc_irq_unlock |
( |
uint32_t |
irq_sts | ) |
|
|
inline |
Unlock of the interrupt.
- 参数
-
| [in] | irq_sts | The irq status to restore. |
◆ adc_port_calibration()
| void adc_port_calibration |
( |
void |
| ) |
|
◆ adc_port_clock_enable()
| void adc_port_clock_enable |
( |
bool |
on | ) |
|
Set the divider number of the peripheral device clock.
- 参数
-
◆ adc_port_get_cali_param()
| errcode_t adc_port_get_cali_param |
( |
uint8_t * |
data_s, |
|
|
uint8_t * |
data_b, |
|
|
uint8_t * |
data_k |
|
) |
| |
◆ adc_port_init_clock()
Set the divider number of the peripheral device clock.
- 参数
-
| [in] | clock | The clock which is used for adc sample, adc source clock is 2MHz. |
◆ adc_port_power_on()
| void adc_port_power_on |
( |
bool |
on | ) |
|
Power on or power off the peripheral device.
- 参数
-
| [in] | on | Power on or Power off. |
◆ adc_port_pull_disable()
ADC disadle channel pull.
- 参数
-
| [in] | channel | The adc channel. |
◆ adc_port_read()
| errcode_t adc_port_read |
( |
uint8_t |
channel, |
|
|
uint16_t * |
data |
|
) |
| |
◆ adc_port_register_hal_funcs()
| void adc_port_register_hal_funcs |
( |
void |
| ) |
|
Register hal funcs objects into hal_adc module.
◆ adc_port_register_irq()
| void adc_port_register_irq |
( |
void |
| ) |
|
Register the interrupt of adc.
◆ adc_port_set_scan_discard_and_average_num()
| void adc_port_set_scan_discard_and_average_num |
( |
adc_channel_t |
channel | ) |
|
ADC set scan discard number and average number.
- 参数
-
| [in] | channel | The adc channel. |
◆ adc_port_unregister_hal_funcs()
| void adc_port_unregister_hal_funcs |
( |
void |
| ) |
|
Unregister hal funcs objects from hal_adc module.
◆ adc_port_unregister_irq()
| void adc_port_unregister_irq |
( |
void |
| ) |
|
Unregister the interrupt of adc.
◆ adc_porting_base_addr_get()
◆ cldo_addr_get()