currentlimit7 2.0.0.0
main.c File Reference

CurrentLimit7 Click example. More...

#include "board.h"
#include "log.h"
#include "currentlimit7.h"

Macros

#define CURRENTLIMIT_MODE_500_mA_2500_mA
 

Functions

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

Variables

const uint16_t limit_value_op [14]
 

Detailed Description

CurrentLimit7 Click example.

Description

This library contains API for the Current Limit 7 Click driver. This driver provides the functions to set the current limiting conditions in order to provide the threshold of the fault conditions.

The demo application is composed of two sections :

Application Init

Initialization of I2C module and log UART. After driver initialization, default settings turn on the device.

Application Task

This example demonstrates the use of the Current Limit 7 Click boardâ„¢. Reading user's input from Usart Terminal and using it as an index for an array of pre-calculated values that define the current limit level. Results are being sent to the Usart Terminal, where you can track their changes.

Additional Function

  • static void display_selection ( void )
Author
Nenad Filipovic

Macro Definition Documentation

◆ CURRENTLIMIT_MODE_500_mA_2500_mA

#define CURRENTLIMIT_MODE_500_mA_2500_mA

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 )

Variable Documentation

◆ limit_value_op

const uint16_t limit_value_op[14]
Initial value:
=
{
}
#define CURRENTLIMIT7_OP_1_CURRENT_LIMIT_2020_mA
Definition currentlimit7.h:112
#define CURRENTLIMIT7_OP_1_CURRENT_LIMIT_625_mA
Definition currentlimit7.h:106
#define CURRENTLIMIT7_OP_0_CURRENT_LIMIT_280_mA
Definition currentlimit7.h:101
#define CURRENTLIMIT7_OP_1_CURRENT_LIMIT_510_mA
Definition currentlimit7.h:105
#define CURRENTLIMIT7_OP_1_CURRENT_LIMIT_860_mA
Definition currentlimit7.h:107
#define CURRENTLIMIT7_OP_1_CURRENT_LIMIT_1450_mA
Definition currentlimit7.h:109
#define CURRENTLIMIT7_OP_0_CURRENT_LIMIT_450_mA
Definition currentlimit7.h:103
#define CURRENTLIMIT7_OP_1_CURRENT_LIMIT_1550_mA
Definition currentlimit7.h:110
#define CURRENTLIMIT7_OP_1_CURRENT_LIMIT_1750_mA
Definition currentlimit7.h:111
#define CURRENTLIMIT7_OP_1_CURRENT_LIMIT_2500_mA
Definition currentlimit7.h:114
#define CURRENTLIMIT7_OP_0_CURRENT_LIMIT_260_mA
Current Limit 7 description current limit values.
Definition currentlimit7.h:100
#define CURRENTLIMIT7_OP_0_CURRENT_LIMIT_330_mA
Definition currentlimit7.h:102
#define CURRENTLIMIT7_OP_1_CURRENT_LIMIT_1320_mA
Definition currentlimit7.h:108
#define CURRENTLIMIT7_OP_1_CURRENT_LIMIT_2260_mA
Definition currentlimit7.h:113