This header contains all defines for PMIC(mc13783) ADC driver. More...
Data Structures | |
struct | t_adc_param |
struct | t_monitoring_param |
Typedefs | |
typedef enum adc_state | t_adc_state |
typedef enum reading_mode | t_reading_mode |
typedef enum check_mode | t_check_mode |
Enumerations | |
enum | adc_state { ADC_FREE, ADC_USED, ADC_MONITORING } |
enum | reading_mode { M_LITHIUM_CELL = 0x000001, M_CHARGE_CURRENT = 0x000002, M_BATTERY_CURRENT = 0x000004, M_THERMISTOR = 0x000008, M_DIE_TEMPERATURE = 0x000010, M_UID = 0x000020, M_LITHIUM_CELL = 0x000001, M_CHARGE_CURRENT = 0x000002, M_BATTERY_CURRENT = 0x000004 } |
enum | check_mode { CHECK_LOW, CHECK_HIGH, CHECK_LOW_OR_HIGH } |
Functions | |
static int | pmic_adc_filter (t_touch_screen *ts_curr) |
int | mc13783_adc_request (bool read_ts) |
void | update_buffer (void) |
int | mc13783_adc_release (int adc_index) |
t_reading_mode | mc13783_set_read_mode (t_channel channel) |
PMIC_STATUS | mc13783_adc_read_ts (t_touch_screen *touch_sample, int wait_tsi) |
This header contains all defines for PMIC(mc13783) ADC driver.
typedef enum adc_state t_adc_state |
Define state mode of ADC.
typedef enum check_mode t_check_mode |
This enumeration, is used to configure the monitoring mode.
typedef enum reading_mode t_reading_mode |
This enumeration, is used to configure the mode of ADC.
enum adc_state |
enum check_mode |
enum reading_mode |
This enumeration, is used to configure the mode of ADC.
PMIC_STATUS mc13783_adc_read_ts | ( | t_touch_screen * | ts_value, | |
int | wait_tsi | |||
) |
This function read the touch screen value.
touch_sample | return value of touch screen | |
wait_tsi | if true, this function is synchronous (wait in TSI event). |
This function read the touch screen value.
ts_value | return value of touch screen | |
wait_tsi | if true, this function is synchronous (wait in TSI event). |
References t_touch_screen::contact_resistance, mc13783_adc_convert(), mc13783_adc_init_param(), t_adc_param::read_ts, suspend_flag, t_adc_param::ts_value, t_adc_param::wait_tsi, t_touch_screen::x_position, t_touch_screen::x_position1, t_touch_screen::x_position2, t_touch_screen::x_position3, t_touch_screen::y_position, t_touch_screen::y_position1, t_touch_screen::y_position2, and t_touch_screen::y_position3.
Referenced by pmic_adc_get_touch_sample().
int mc13783_adc_release | ( | int | adc_index | ) |
This function release an ADC.
adc_index | index of ADC to be released. |
References ADC_FREE, ADC_MONITORING, ADC_USED, suspend_flag, suspendq, and swait.
Referenced by mc13783_adc_convert(), and pmic_adc_deactive_comparator().
int mc13783_adc_request | ( | bool | read_ts | ) |
This function request a ADC.
References ADC_USED.
Referenced by mc13783_adc_convert(), and pmic_adc_active_comparator().
t_reading_mode mc13783_set_read_mode | ( | t_channel | channel | ) |
This function select the required read_mode for a specific channel.
channel | The channel to be sampled |
References M_BATTERY_CURRENT, M_CHARGE_CURRENT, M_DIE_TEMPERATURE, M_LITHIUM_CELL, M_THERMISTOR, and M_UID.
Referenced by pmic_adc_convert(), and pmic_adc_convert_8x().
static int pmic_adc_filter | ( | t_touch_screen * | ts_curr | ) | [static] |
This function performs filtering and rejection of excessive noise prone samples.
ts_curr | Touch screen value |
void update_buffer | ( | void | ) |
This function is used to update buffer of touch screen value in read mode.
© Freescale Semiconductor, Inc., 2007.
All rights reserved. Freescale Confidential Proprietary NDA Required |
![]() |