/* Max number of segments allowable in LUX table */ #define TSL2772_MAX_LUX_TABLE_SIZE 6 /* The default LUX tables all have 3 elements. */ #define TSL2772_DEF_LUX_TABLE_SZ 3 #define TSL2772_DEFAULT_TABLE_BYTES (sizeof(struct tsl2772_lux) * \
TSL2772_DEF_LUX_TABLE_SZ)
/* Proximity diode to use */ #define TSL2772_DIODE0 0x01 #define TSL2772_DIODE1 0x02 #define TSL2772_DIODE_BOTH 0x03
/* LED Power */ #define TSL2772_100_mA 0x00 #define TSL2772_50_mA 0x01 #define TSL2772_25_mA 0x02 #define TSL2772_13_mA 0x03
/** *structtsl2772_settings-Settingsforthetsl2772driver *@als_time:IntegrationtimeoftheALSchannelADCsin2.73ms *increments.Totalintegrationtimeis *(256-als_time)*2.73. *@als_gain:Indexintothetsl2772_als_gainarray. *@als_gain_trim:Defaultgaintrimtoaccountforapertureeffects. *@wait_time:TimebetweenproximityandALScyclesin2.73 *periods. *@prox_time:IntegrationtimeoftheproximityADCin2.73ms *increments.Totalintegrationtimeis *(256-prx_time)*2.73. *@prox_gain:Indexintothetsl2772_prx_gainarray. *@als_prox_config:ThevalueoftheALS/Proximityconfiguration *register. *@als_cal_target:KnownexternalALSreadingforcalibration. *@als_persistence:H/WFilters,Numberof'outoflimits'ALSreadings. *@als_interrupt_en:Enable/DisableALSinterrupts *@als_thresh_low:CH0'low'counttotriggerinterrupt. *@als_thresh_high:CH0'high'counttotriggerinterrupt. *@prox_persistence:H/WFilters,Numberof'outoflimits'proximity *readings. *@prox_interrupt_en:Enable/Disableproximityinterrupts. *@prox_thres_low:Lowthresholdproximitydetection. *@prox_thres_high:Highthresholdproximitydetection. *@prox_pulse_count:Numberifproximityemitterpulses. *@prox_max_samples_cal:Thenumberofsamplesthataretakenwhenperforming *aproximitycalibration. *@prox_diodeWhichdiode(s)tousefordrivingtheexternal *LED(s)forproximitysensing. *@prox_powerTheamountofpowertousefortheexternalLED(s).
*/ struct tsl2772_settings { int als_time; int als_gain; int als_gain_trim; int wait_time; int prox_time; int prox_gain; int als_prox_config; int als_cal_target;
u8 als_persistence; bool als_interrupt_en; int als_thresh_low; int als_thresh_high;
u8 prox_persistence; bool prox_interrupt_en; int prox_thres_low; int prox_thres_high; int prox_pulse_count; int prox_max_samples_cal; int prox_diode; int prox_power;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.