rotaryb2 2.1.0.0
main.c File Reference

Rotary B 2 Click example. More...

#include "board.h"
#include "log.h"
#include "rotaryb2.h"

Macros

#define ROTARYB2_ONE_LED   ROTARYB2_SET_LED_DATA_1
 
#define ROTARYB2_TWO_LED   ROTARYB2_SET_LED_DATA_1 | ROTARYB2_SET_LED_DATA_9
 
#define ROTARYB2_FOUR_LED
 
#define ROTARYB2_EIGHT_LED
 
#define ROTARYB2_EIGHT_LED_INV
 

Functions

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

Detailed Description

Rotary B 2 Click example.

Description

This library contains the API for the Rotary B 2 Click driver to control LEDs states and a rotary encoder position readings.

The demo application is composed of two sections :

Application Init

Initialization of SPI module and log UART. After the driver init, the app executes a default configuration and turn off all LEDs.

Application Task

This example demonstrates the use of the Rotary B 2 Click board. The demo example shows the functionality of a rotary encoder used to control LEDs.

Author
Nenad Filipovic

Macro Definition Documentation

◆ ROTARYB2_EIGHT_LED

#define ROTARYB2_EIGHT_LED
Value:
#define ROTARYB2_SET_LED_DATA_9
Definition rotaryb2.h:83
#define ROTARYB2_SET_LED_DATA_3
Definition rotaryb2.h:77
#define ROTARYB2_SET_LED_DATA_5
Definition rotaryb2.h:79
#define ROTARYB2_SET_LED_DATA_15
Definition rotaryb2.h:89
#define ROTARYB2_SET_LED_DATA_11
Definition rotaryb2.h:85
#define ROTARYB2_SET_LED_DATA_7
Definition rotaryb2.h:81
#define ROTARYB2_SET_LED_DATA_1
Definition rotaryb2.h:75
#define ROTARYB2_SET_LED_DATA_13
Definition rotaryb2.h:87

◆ ROTARYB2_EIGHT_LED_INV

#define ROTARYB2_EIGHT_LED_INV
Value:
#define ROTARYB2_SET_LED_DATA_12
Definition rotaryb2.h:86
#define ROTARYB2_SET_LED_DATA_8
Definition rotaryb2.h:82
#define ROTARYB2_SET_LED_DATA_2
Definition rotaryb2.h:76
#define ROTARYB2_SET_LED_DATA_4
Definition rotaryb2.h:78
#define ROTARYB2_SET_LED_DATA_10
Definition rotaryb2.h:84
#define ROTARYB2_SET_LED_DATA_6
Definition rotaryb2.h:80
#define ROTARYB2_SET_LED_DATA_16
Definition rotaryb2.h:90
#define ROTARYB2_SET_LED_DATA_14
Definition rotaryb2.h:88

◆ ROTARYB2_FOUR_LED

◆ ROTARYB2_ONE_LED

#define ROTARYB2_ONE_LED   ROTARYB2_SET_LED_DATA_1

◆ ROTARYB2_TWO_LED

#define ROTARYB2_TWO_LED   ROTARYB2_SET_LED_DATA_1 | ROTARYB2_SET_LED_DATA_9

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 )