1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-18 12:54:25 +01:00

[sam] fixed compiling on wiring_analog.c

This commit is contained in:
Cristian Maglie 2012-04-28 12:45:30 +02:00
parent 4da2833a81
commit 08b614048d

View File

@ -186,7 +186,7 @@ void analogWrite(uint32_t ulPin, uint32_t ulValue) {
if ((attr & PIN_ATTR_PWM) == PIN_ATTR_PWM) {
if (!PWMEnabled) {
// PWM Startup code
PMC_EnablePeripheral(PWM_INTERFACE_ID);
pmc_enable_periph_clk(PWM_INTERFACE_ID);
PWMC_ConfigureClocks(PWM_FREQUENCY * PWM_MAX_DUTY_CYCLE, 0, VARIANT_MCK);
PWMEnabled = 1;
}