proximity7 2.0.0.0
main.c File Reference

Proximity7 Click example. More...

#include "board.h"
#include "log.h"
#include "proximity7.h"

Functions

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

Detailed Description

Proximity7 Click example.

Description

This application give us lux level and proximiti data.

The demo application is composed of two sections :

Application Init

Initializes I2C driver and writes basic settings to device registers

Application Task

Logs lux level and proximity data

note:

  • When setting LED drive strength please note that if "proximity drive level - PDL" bit in "configuration register" is set to 1, LED drive current values are reduced by 9.
  • When setting wait time note that if "wait long - WLONG" bit is set to 1, time is 12x longer. Therefore if WLONG == 1 set time between 33ms and 8386.56ms.
  • When setting ALS gain note that if "ALS gain level - AGL" bit is set to 1, ALS gains are scaled by 0.16, otherwise, they are scaled by 1.
Author
MikroE Team

Function Documentation

◆ application_init()

void application_init ( void )

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 )