initial commit

This commit is contained in:
willem oldemans
2020-10-01 09:52:32 +02:00
commit 7a1ad821be
5 changed files with 318 additions and 0 deletions

24
PWMFrequency.h Normal file
View File

@@ -0,0 +1,24 @@
//
// -----------------------
// PWM FREQUENCY PRESCALER
// -----------------------
// Written by Kiwisincebirth 2014
// Revised by MacTester57 (aka TheDIYGuy999) to allow correct PWM frequencies (confirmed with oscilloscope). January 2015
// - prescale variable: replaced uint8_t with uint16_t data type (fixes bug, which did not allow frequencies < 492Hz)
// - mode variable: replaced hex format with binary to make it more readable, if compared with bit tables in the 32U4 manual
// - added comments
//
#ifndef PWMFrequency
#define PWMFrequency
#if ARDUINO >= 100
#include <Arduino.h> // Arduino 1.0
#else
#include <WProgram.h> // Arduino 0022
#endif
void setPWMPrescaler(uint8_t pin, uint16_t prescale);
#endif