c2x5wamp 2.0.0.0
main.c File Reference

2X5W AMP Click example More...

#include "board.h"
#include "log.h"
#include "c2x5wamp.h"

Functions

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

Detailed Description

2X5W AMP Click example

Description

This is a example which demonstrates the use of 2x5W Amp Click board. 2x5W AMP click functions as an amplifier and features the TDA7491LP 2x5-watt dual BTL class-D audio amplifier. It communicates with the target MCU over the following pins on the mikroBUS™ line: AN, RST, CS, PWM, INT.

The demo application is composed of two sections :

Application Init

Initializes GPIO and LOG structures, set DIA pin as input and sets GN0, GN1, STB and MUTE pins as output.

Application Task

This examples first activates operation mode MUTE for 5 seconds and after that activates operation mode PLAY. When the device is in Play mode then changes the gain selection, first sets the minimum gain ( 20dB ) for 10 seconds and then sets the maximum gain (32dB) for 5 seconds too. Results are being sent to the Usart Terminal where you can track their changes.

Author
MikroE Team

Function Documentation

◆ application_init()

void application_init ( void )

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 )