rotaryw2 2.1.0.0
main.c File Reference

Rotary W 2 Click example. More...

#include "board.h"
#include "log.h"
#include "rotaryw2.h"

Macros

#define ROTARYW2_ONE_LED   ROTARYW2_SET_LED_DATA_1
 
#define ROTARYW2_TWO_LED   ROTARYW2_SET_LED_DATA_1 | ROTARYW2_SET_LED_DATA_9
 
#define ROTARYW2_FOUR_LED
 
#define ROTARYW2_EIGHT_LED
 
#define ROTARYW2_EIGHT_LED_INV
 

Functions

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

Detailed Description

Rotary W 2 Click example.

Description

This library contains the API for the Rotary W 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 W 2 Click boardâ„¢. The demo example shows the functionality of a rotary encoder used to control LEDs.

Author
Nenad Filipovic

Macro Definition Documentation

◆ ROTARYW2_EIGHT_LED

#define ROTARYW2_EIGHT_LED
Value:
#define ROTARYW2_SET_LED_DATA_15
Definition rotaryw2.h:89
#define ROTARYW2_SET_LED_DATA_3
Definition rotaryw2.h:77
#define ROTARYW2_SET_LED_DATA_13
Definition rotaryw2.h:87
#define ROTARYW2_SET_LED_DATA_9
Definition rotaryw2.h:83
#define ROTARYW2_SET_LED_DATA_11
Definition rotaryw2.h:85
#define ROTARYW2_SET_LED_DATA_1
Definition rotaryw2.h:75
#define ROTARYW2_SET_LED_DATA_7
Definition rotaryw2.h:81
#define ROTARYW2_SET_LED_DATA_5
Definition rotaryw2.h:79

◆ ROTARYW2_EIGHT_LED_INV

#define ROTARYW2_EIGHT_LED_INV
Value:
#define ROTARYW2_SET_LED_DATA_14
Definition rotaryw2.h:88
#define ROTARYW2_SET_LED_DATA_4
Definition rotaryw2.h:78
#define ROTARYW2_SET_LED_DATA_2
Definition rotaryw2.h:76
#define ROTARYW2_SET_LED_DATA_16
Definition rotaryw2.h:90
#define ROTARYW2_SET_LED_DATA_8
Definition rotaryw2.h:82
#define ROTARYW2_SET_LED_DATA_12
Definition rotaryw2.h:86
#define ROTARYW2_SET_LED_DATA_6
Definition rotaryw2.h:80
#define ROTARYW2_SET_LED_DATA_10
Definition rotaryw2.h:84

◆ ROTARYW2_FOUR_LED

◆ ROTARYW2_ONE_LED

#define ROTARYW2_ONE_LED   ROTARYW2_SET_LED_DATA_1

◆ ROTARYW2_TWO_LED

#define ROTARYW2_TWO_LED   ROTARYW2_SET_LED_DATA_1 | ROTARYW2_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 )