color13 2.0.0.0
main.c File Reference

Color13 Click example. More...

#include "board.h"
#include "log.h"
#include "color13.h"

Macros

#define COLOR13_EXAMPLE_PS_LS   3
 
#define COLOR13_EXAMPLE_RGB   6
 

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

Color13 Click example.

Description

This application showcases ability of click board to read RGB and IR data from device. Also it can be configured to read proximity data and ALS data in lux units.

The demo application is composed of two sections :

Application Init

Initialization of host communication modules (UART, I2C) and additonal pin. Read and check device ID, selects example and configures device for it.

Application Task

Depending of selected example in task proximity and als data will be read from device, or it will show ADC value for red, green, blue and ir data from device.

Additioal function

static void color13_proximity_als_example ( void ); static void color13_rgb_example ( void );

Author
Luka Filipovic

Macro Definition Documentation

◆ COLOR13_EXAMPLE_PS_LS

#define COLOR13_EXAMPLE_PS_LS   3

◆ COLOR13_EXAMPLE_RGB

#define COLOR13_EXAMPLE_RGB   6

Function Documentation

◆ application_init()

void application_init ( void )

< Logger config object.

< Click config object.

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ main()

int main ( void )