NEORV32 - Software Framework Documentation
Loading...
Searching...
No Matches
Functions
main.c File Reference

Simple PWM demo program. More...

#include <neorv32.h>

Macros

User configuration
#define BAUD_RATE   19200
 
#define PWM_MAX   128
 

Functions

int aux_get_pwm_num_channels (void)
 
int main ()
 

Detailed Description

Simple PWM demo program.

Author
Stephan Nolting

Macro Definition Documentation

◆ BAUD_RATE

#define BAUD_RATE   19200

UART BAUD rate

◆ PWM_MAX

#define PWM_MAX   128

Maximum PWM output intensity (0..255)

Function Documentation

◆ aux_get_pwm_num_channels()

int aux_get_pwm_num_channels ( void  )

Helper function to count the number of implemented PWM channels.

Returns
Number of available PWM channels (0..60)

◆ main()

int main ( void  )

This program generates a simple dimming sequence for PWM channels 0 to 3.

Note
This program requires the PWM controller to be synthesized (the UART is optional).
Returns
!=0 if error.