Nordic Thingy:52 v2.2.0
Color sensor

Digital color sensor API. More...

Modules

 BH1745 color sensor
 BH1745 digital color sensor API.
 

Data Structures

struct  drv_color_init_t
 Color sensor configuration struct. More...
 

Typedefs

typedef void(* drv_color_data_handler_t) (drv_color_data_t const *p_evt)
 Color sensor driver event handler callback type.
 
typedef drv_bh1745_data_t drv_color_data_t
 Resulting color data for red, green, blue, and clear.
 

Functions

uint32_t drv_color_init (drv_color_init_t *p_init)
 Function for initializing the color sensor. More...
 
uint32_t drv_color_sample (void)
 Function for acquiring a sample from the color sensor. More...
 
uint32_t drv_color_start (void)
 Function for starting the color sensor. More...
 
uint32_t drv_color_stop (void)
 Function for stopping the color sensor. More...
 

Detailed Description

Digital color sensor API.

Function Documentation

◆ drv_color_init()

uint32_t drv_color_init ( drv_color_init_t p_init)

Function for initializing the color sensor.

Parameters
[in]p_initPointer to the driver configuration.
Returns
NRF_SUCCESS Completed successfully.
Other codes from the underlying drivers.

◆ drv_color_sample()

uint32_t drv_color_sample ( void  )

Function for acquiring a sample from the color sensor.

Note
The sensor will give a pin interrupt when finished, which is in turn caught by the gpiote_evt_handler.
Returns
NRF_SUCCESS Completed successfully.
Other codes from the underlying drivers.

◆ drv_color_start()

uint32_t drv_color_start ( void  )

Function for starting the color sensor.

Returns
NRF_SUCCESS Completed successfully.
Other codes from the underlying drivers.

◆ drv_color_stop()

uint32_t drv_color_stop ( void  )

Function for stopping the color sensor.

Returns
NRF_SUCCESS Completed successfully.
Other codes from the underlying drivers.