c2x2rgb 2.1.0.0
main.c File Reference

2x2 RGB Click example More...

#include "board.h"
#include "log.h"
#include "c2x2rgb.h"

Macros

#define DEMO_LED_CURRENT   600
 

Functions

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

Detailed Description

2x2 RGB Click example

Description

This example demonstrates the use of the 2x2 RGB Click boardâ„¢ by controlling the color of the LEDs [1-4].

The demo application is composed of two sections :

Application Init

Initialization of SPI module and log UART. After driver initialization, the app executes a default configuration.

Application Task

This simple example shows all LEDs in different colors. These LEDs actually consist of three single-colored LEDs (Red, Green and Blue) in a single package. Various colors can be reproduced by mixing the intensity of each LED.

Author
Mikroe Team

Macro Definition Documentation

◆ DEMO_LED_CURRENT

#define DEMO_LED_CURRENT   600

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 )