From f3fb2a87faea8acf60a8d202bf860d4503e9810b Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 24 Feb 2015 22:24:36 +0100 Subject: moved pcr-controller to realraum github repo --- pcr-controller/pwm.c | 87 ---------------------------------------------------- 1 file changed, 87 deletions(-) delete mode 100644 pcr-controller/pwm.c (limited to 'pcr-controller/pwm.c') diff --git a/pcr-controller/pwm.c b/pcr-controller/pwm.c deleted file mode 100644 index 3ca5bbe..0000000 --- a/pcr-controller/pwm.c +++ /dev/null @@ -1,87 +0,0 @@ - -#include "pwm.h" - -//OutputCompareRegister for Timer1 and pin OC1A/B5 -#define PWMB5_VAL OCR1AL -//for FastPWM in Timer4 OCR4C is TOP for all OC4x pins, all other PWM Modes use OCR4A,OCR4B or OCR4D -#define PWMD7_VAL OCR4D - -void pwm_init(void) -{ - //for OC1A on pin B5 - DDRB |= (1< 0) - pwm_b5_on(); - else - pwm_b5_off(); - PWMB5_VAL = val; -} - -void pwm_d7_set(uint8_t val) -{ - if (val > 0) - pwm_d7_on(); - else - pwm_d7_off(); - PWMD7_VAL = val; -} - -inline void pwm_b5_inc(void) -{ - if(PWMB5_VAL < 255) - PWMB5_VAL++; -} - -inline void pwm_b5_dec(void) -{ - if(PWMB5_VAL > 0) - PWMB5_VAL--; -} -- cgit v1.2.3