SAMV71 Xplained Ultra Software Package 1.4

main.c File Reference

#include "board.h"
#include <stdint.h>
#include <stdio.h>

Go to the source code of this file.

Defines

#define PWM_FREQUENCY   50
#define MAX_DUTY_CYCLE   100
#define MIN_DUTY_CYCLE   0
#define DUTY_BUFFER_LENGTH   (MAX_DUTY_CYCLE - MIN_DUTY_CYCLE )
#define PIN_PWM_LED   { PIO_PA23B_PWMC0_PWMH0, PIOA, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT}
#define CHANNEL_PWM_LED0   0

Functions

void XDMAC_Handler (void)
 xDMA interrupt handler.
void PWM0_Handler (void)
int main (void)
 Application entry point for PWM with PDC example.

Detailed Description

This file contains all the specific code for the pwm_pdc example.

Definition in file main.c.


Define Documentation

#define DUTY_BUFFER_LENGTH   (MAX_DUTY_CYCLE - MIN_DUTY_CYCLE )

Duty cycle buffer length for three channels

Definition at line 99 of file main.c.

#define MAX_DUTY_CYCLE   100

Maximum duty cycle value.

Definition at line 94 of file main.c.

#define MIN_DUTY_CYCLE   0

Minimum duty cycle value.

Definition at line 96 of file main.c.

#define PIN_PWM_LED   { PIO_PA23B_PWMC0_PWMH0, PIOA, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT}

PIO pins to configure.

Definition at line 107 of file main.c.

#define PWM_FREQUENCY   50

PWM frequency in Hz.

Definition at line 91 of file main.c.


Function Documentation

int main ( void   ) 

Application entry point for PWM with PDC example.

Outputs a PWM on LED1. Channel #0 is configured as synchronous channels. The update of the duty cycle values is made automatically by the Peripheral DMA Controller.

Returns:
Unused (ANSI-C compatibility).

Definition at line 223 of file main.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines