brushless25 2.1.0.0
main.c File Reference

Brushless 25 Click example. More...

#include "board.h"
#include "log.h"
#include "brushless25.h"

Functions

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

Variables

uint8_t sw_data = 0
 
uint8_t speed_val = 3
 

Detailed Description

Brushless 25 Click example.

Description

Application example shows the device's capability of controlling the brushless motor speed and state of the driver.

The demo application is composed of two sections :

Application Init

Initializes the driver, sets the device into slow start mode and sets the speed of the motor to 30%.

Application Task

This example is taking track of the state of the driver and motor, as well as its voltage and speed which is changing from 30% to 100%, and logging it onto the USB UART terminal.

Author
Stefan Ilic

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

◆ speed_val

uint8_t speed_val = 3

◆ sw_data

uint8_t sw_data = 0