color12
2.1.0.0
|
API for configuring and manipulating Color 12 Click driver. More...
Modules | |
Color 12 Registers List | |
List of registers of Color 12 Click driver. | |
Color 12 Registers Settings | |
Settings for registers of Color 12 Click driver. | |
Color 12 MikroBUS Map | |
MikroBUS pin mapping of Color 12 Click driver. | |
Functions | |
void | color12_cfg_setup (color12_cfg_t *cfg) |
Color 12 configuration object setup function. More... | |
err_t | color12_init (color12_t *ctx, color12_cfg_t *cfg) |
Color 12 initialization function. More... | |
err_t | color12_default_cfg (color12_t *ctx) |
Color 12 default configuration function. More... | |
err_t | color12_generic_write (color12_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Color 12 I2C writing function. More... | |
err_t | color12_generic_read (color12_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Color 12 I2C reading function. More... | |
err_t | color12_sw_reset (color12_t *ctx) |
Color 12 software reset function. More... | |
err_t | color12_set_config (color12_t *ctx, color12_config_t config) |
Color 12 sets the configuration function. More... | |
err_t | color12_get_config (color12_t *ctx, color12_config_t *config) |
Color 12 gets the configuration function. More... | |
err_t | color12_get_color_data (color12_t *ctx, color12_color_sel_t color_sel, uint16_t *color_data) |
Color 12 gets the color measurement result function. More... | |
err_t | color12_get_device_id (color12_t *ctx, uint8_t *device_id) |
Color 12 gets the device ID function. More... | |
uint8_t | color12_get_int_pin (color12_t *ctx) |
Color 12 gets the interrupt function. More... | |
API for configuring and manipulating Color 12 Click driver.
void color12_cfg_setup | ( | color12_cfg_t * | cfg | ) |
Color 12 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See color12_cfg_t object definition for detailed explanation. |
err_t color12_default_cfg | ( | color12_t * | ctx | ) |
Color 12 default configuration function.
This function executes a default configuration of Color 12 click board.
[in] | ctx | : Click context object. See color12_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t color12_generic_read | ( | color12_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
Color 12 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See color12_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t color12_generic_write | ( | color12_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
Color 12 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See color12_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t color12_get_color_data | ( | color12_t * | ctx, |
color12_color_sel_t | color_sel, | ||
uint16_t * | color_data | ||
) |
Color 12 gets the color measurement result function.
This function reads color measurement result data of the desired selection of the BU27006MUC-Z, Digital 16bit Serial Output Type Color Sensor IC on the Color 12 Click board™.
[in] | ctx | : Click context object. See color12_t object definition for detailed explanation. |
[in] | color_sel | : Color data selector. See color12_color_sel_t object definition for detailed explanation. |
[out] | color_data | : Color measurement result. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t color12_get_config | ( | color12_t * | ctx, |
color12_config_t * | config | ||
) |
Color 12 gets the configuration function.
This function reads the configuration data of the BU27006MUC-Z, Digital 16bit Serial Output Type Color Sensor IC on the Color 12 Click board™.
[in] | ctx | : Click context object. See color12_t object definition for detailed explanation. |
[out] | config | : Sensor configuration object. See color12_config_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t color12_get_device_id | ( | color12_t * | ctx, |
uint8_t * | device_id | ||
) |
Color 12 gets the device ID function.
This function reads a manufacturers ID of the BU27006MUC-Z, Digital 16bit Serial Output Type Color Sensor IC on the Color 12 Click board™.
[in] | ctx | : Click context object. See color12_t object definition for detailed explanation. |
[out] | device_id | : Manufacturer ID (0xE0). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t color12_get_int_pin | ( | color12_t * | ctx | ) |
Color 12 gets the interrupt function.
This function gets states of the Interrupt ( INT ) pin of the BU27006MUC-Z, Digital 16bit Serial Output Type Color Sensor IC on the Color 12 Click board™.
[in] | ctx | : Click context object. See color12_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state err_t color12_init | ( | color12_t * | ctx, |
color12_cfg_t * | cfg | ||
) |
Color 12 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See color12_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See color12_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t color12_set_config | ( | color12_t * | ctx, |
color12_config_t | config | ||
) |
Color 12 sets the configuration function.
This function executes a configuration of the BU27006MUC-Z, Digital 16bit Serial Output Type Color Sensor IC on the Color 12 Click board™.
[in] | ctx | : Click context object. See color12_t object definition for detailed explanation. |
[in] | config | : Sensor configuration object. See color12_config_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t color12_sw_reset | ( | color12_t * | ctx | ) |
Color 12 software reset function.
This function is used to perform a software reset of the BU27006MUC-Z, Digital 16bit Serial Output Type Color Sensor IC on the Color 12 Click board™.
[in] | ctx | : Click context object. See color12_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.