NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
main.c File Reference

Simple PWM demo program. More...

#include <neorv32.h>

Macros

User configuration
#define BAUD_RATE   19200
 
#define MAX_DUTY   200
 

Functions

int main ()
 

Detailed Description

Simple PWM demo program.

Author
Stephan Nolting

Macro Definition Documentation

◆ BAUD_RATE

#define BAUD_RATE   19200

UART BAUD rate

◆ MAX_DUTY

#define MAX_DUTY   200

Maximum PWM output intensity (8-bit duty cycle)

Function Documentation

◆ 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.