epc635_ll
The following API has been generated from the header file epc635_ll.h. It contains the low level API for the epc635 sensor.
Typedefs
-
typedef int (*reset_chip_t)(const struct i2cdevice *i2c_device)
Enums
-
enum epc635_ll_mod_clk_source
Values:
-
enumerator EPC635_LL_MOD_CLK_INTERN
-
enumerator EPC635_LL_MOD_CLK_EXTERN
-
enumerator EPC635_LL_MOD_CLK_INTERN
-
enum epc635_ll_tcmi_format
Values:
-
enumerator EPC635_LL_TCMI_FORMAT_8BIT
-
enumerator EPC635_LL_TCMI_FORMAT_12BIT_lsb_msb
-
enumerator EPC635_LL_TCMI_FORMAT_12BIT_msb_lsb
-
enumerator EPC635_LL_TCMI_FORMAT_8BIT
Functions
-
int epc635_ll_video_start(const struct epc635_ll *epc635, bool continuous)
Sends a shutter signal to the sensor over I2C.
- Parameters:
epc635 – epc635 instance
continuous – if set to true, the sensor will start continuous video mode, otherwise single frame mode
- Returns:
int
-
int epc635_ll_video_stop(const struct epc635_ll *epc635)
Stops the video stream.
- Parameters:
epc635 – epc635 instance
- Returns:
int
-
int epc635_ll_get_temp_clib_data(const struct epc635_ll *epc635, struct epc635_ll_temp_calib_data *data)
get temperature calibration data from sensor eeprom
- Parameters:
epc635 – epc635 instance
data – pointer to store the calibration data
- Returns:
return value from the i2c_read function
-
int epc635_ll_prepare_temp_reading(const struct epc635_ll *epc635, const struct epc635_ll_temp_calib_data *calib)
prepare temperature reading. This has to be called before making the grayscale image.
- Parameters:
epc635 – epc635 instance
calib – calibration data from
epc635_ll_get_temp_clib_data
- Returns:
return value from the i2c_write function
-
int epc635_ll_cleanup_temp_reading(const struct epc635_ll *epc635, const struct epc635_ll_temp_calib_data *calib)
cleanup temperature reading after grayscale image has been made
- Parameters:
epc635 – epc635 instance
calib – calibration data from
epc635_ll_get_temp_clib_data
- Returns:
return value from the i2c_write function
-
int epc635_ll_read_temperature(const struct epc635_ll *epc635, const struct epc635_ll_temp_calib_data *calib, float *temp)
readout temperature after grayscale image has been made. Make sure to call
epc635_ll_prepare_temp_readingbefore making the grayscale image andepc635_ll_cleanup_temp_readingafter the grayscale image has been made.- Parameters:
epc635 – epc635 instance
calib – calibration data from
epc635_ll_get_temp_clib_datatemp – pointer to store the temperature
- Returns:
return value from the i2c_read function
-
int epc635_ll_set_default_values(const struct epc635_ll *epc635)
set values of the registers to their default values
- Parameters:
epc635 – epc635 instance
- Returns:
value from the i2c_write function
-
int epc635_ll_update_sequencer(const struct epc635_ll *epc635, const struct epc635_ll_sequence_entry *sequencer, size_t num_entries)
update any sequencer (pixel, tcm, …) with the given entries
- Parameters:
epc635 – epc635 instance
sequencer – pointer to sequencer list
num_entries – number of entries in the sequencer
- Returns:
int
-
int epc635_ll_set_acquitition_type(const struct epc635_ll *epc635, enum epc635_ll_acq_type type)
set the active acquisition type
- Parameters:
epc635 – epc635 instance
type – acquisition type
- Returns:
returns a value from the i2c_write function
-
int epc635_ll_set_modulation_delay(const struct epc635_ll *epc635, const uint8_t delay)
set demodulation delay to compensate for internal led delay
- Parameters:
epc635 – epc635 instance
delay – number of pll_clk cycles to delay the demodulation
- Returns:
int returns -1 if the delay is out of range, 0 otherwise
-
int epc635_ll_set_mod_clock_divider(const struct epc635_ll *epc635, const uint8_t new_value)
set modulation clock divider (Mod_clk = Pll_clk / divider)
- Parameters:
epc635 – epc635 instance
divider – mod_clk divider (must not be 0)
- Returns:
value from the i2c_write function
-
int epc635_ll_set_mod_clk_source(const struct epc635_ll *epc635, enum epc635_ll_mod_clk_source source)
set modulation clock source (internal or external)
- Parameters:
epc635 – epc635 instance
source – modulation clock source
- Returns:
value from the i2c_write function
-
int epc635_ll_set_integration_time(const struct epc635_ll *epc635, uint32_t mod_clk, uint32_t int_time_us)
Sets integration time.
- Parameters:
epc635 – epc635 instance
mod_clk – current modulation clock frequency in the LEDs
int_time_us – integration time in microseconds
- Returns:
int
-
int epc635_ll_set_roi(const struct epc635_ll *epc635, uint8_t left, uint8_t top, uint8_t width, uint8_t height)
set roi of the imager
- Parameters:
epc635 – epc635 instance
left – left x coordinate (must be an even value)
top – top y coordinate (must be an even value)
width – width of the roi (must be an even value)
height – height of the roi (must be an even value)
- Returns:
int return 0 if successful, -1 for invalid input values
-
int epc635_ll_set_tcmi_format(const struct epc635_ll *epc635, enum epc635_ll_tcmi_format format)
set tcmi format (8Bit, 12Bit_lsb, 12Bit_msb)
- Parameters:
epc635 – epc635 instance
format – new tcmi data format
- Returns:
returns a value from the i2c_write function
-
int epc635_ll_read_register(const struct epc635_ll *epc635, uint8_t reg, uint8_t *value)
helper function to read a single byte from a register
- Parameters:
epc635 – epc635 instance
reg – register address
value – pointer to store the read value
-
int epc635_ll_write_register(const struct epc635_ll *epc635, uint8_t reg, uint8_t value)
helper function to write a single byte to a register
- Parameters:
epc635 – epc635 instance
reg – register address
value – value to write
-
int epc635_ll_set_bypass_dll(const struct epc635_ll *epc635, bool bypass)
Bypass control of DLL for system delay compensation.
- Parameters:
epc635 – epc635 instance
bypass – bypass enabled
- Returns:
value from the i2c_write function
-
int epc635_ll_set_manual_dll(const struct epc635_ll *epc635, bool manual)
enable manual control of the DLL
- Parameters:
epc635 – epc635 instance
manual – enable manual control
- Returns:
return value from the i2c_write function
-
int epc635_ll_enable_led_driver(const struct epc635_ll *epc635, bool enabled)
enable internal led driver
- Parameters:
epc635 – epc635 instance
enabled – enable led driver
- Returns:
return value from the i2c_write function
-
int epc635_ll_invert_led_pin(const struct epc635_ll *epc635, bool inverted)
invert the led pin polarity
- Parameters:
epc635 – epc635 instance
inverted – enable inverted polarity
- Returns:
return value from the i2c_write function
-
int epc635_ll_enable_led2_pin(const struct epc635_ll *epc635, bool enabled)
enable led2 pin. All pin settings also apply to led2
- Parameters:
epc635 – epc635 instance
enabled –
- Returns:
return value from the i2c_write function
-
int epc635_ll_set_led_on_permanently(const struct epc635_ll *epc635, bool on)
set the led permanently on (torch function)
- Parameters:
epc635 – epc635 instance
on –
- Returns:
int return value from the i2c_write function
-
int epc635_ll_get_chip_type(const struct epc635_ll *epc635, uint8_t *chip_type)
get the sensors chip type
- Parameters:
epc635 –
chip_type –
- Returns:
int
-
int epc635_ll_get_chip_id(const struct epc635_ll *epc635, uint16_t *value)
get the sensors chip id
- Parameters:
epc635 – epc635 instance
chip_id – value to store the chip id
- Returns:
returns a value from the i2c_read function
-
int epc635_ll_get_wafer_id(const struct epc635_ll *epc635, uint16_t *value)
get the wafer id number
- Parameters:
epc635 – epc635 instance
wafer_id – wafer id value
- Returns:
value from the i2c_read function
-
int epc635_ll_set_dll_step(const struct epc635_ll *epc635, const uint16_t fine_step, uint8_t coarse_step)
Sets DLL step.
- Parameters:
epc635 – epc635 instance
fine_step – number of fine DLL delay steps
coarse_step – number of coarse DLL delay steps
- Returns:
return value from the i2c_write function
-
int epc635_ll_set_dcs_frame(const struct epc635_ll *epc635, enum epc635_ll_dcs_mode dcs_mode)
Select DCS(from 0-3) frame for DCS rolling mode & 4DCS mode.
- Parameters:
epc635 – epc635 instance
dcs_mode – register value to select dcs frames for different modes
- Returns:
return value from the i2c_write function
-
struct epc635_ll
Public Members
-
const struct i2cdevice *i2c_device
-
i2c_read_reg_t const i2c_read
-
i2c_write_reg_t const i2c_write
-
reset_chip_t const reset_chip
-
const struct i2cdevice *i2c_device
-
struct epc635_ll_temp_calib_data
-
struct epc635_ll_sequence_entry
-
struct epc635_ll_sequencer
Public Members
-
uint8_t version
-
const struct epc635_ll_sequence_entry *entries
-
const size_t num_entries
-
uint8_t version