X-Git-Url: http://git.kpe.io/?p=avr_bc100.git;a=blobdiff_plain;f=BaseTinyFirmware%2FGCC%2FPWM.c;fp=BaseTinyFirmware%2FGCC%2FPWM.c;h=a84a357ab35baa538e515335c4eb7b6f41737a71;hp=9d205fc2703410e731abe05f92d8ef3d4186d3db;hb=89173ec9cd6f33843bf27c45be0f2f9be3f5f0ce;hpb=7997f136b12114035265bd082c854bff95fd73dc diff --git a/BaseTinyFirmware/GCC/PWM.c b/BaseTinyFirmware/GCC/PWM.c index 9d205fc..a84a357 100644 --- a/BaseTinyFirmware/GCC/PWM.c +++ b/BaseTinyFirmware/GCC/PWM.c @@ -11,14 +11,14 @@ * AVR463: Charging NiMH Batteries with BC100 * * \par Documentation - * For comprehensive code documentation, supported compilers, compiler + * For comprehensive code documentation, supported compilers, compiler * settings and supported devices see readme.html * * \author * Atmel Corporation: http://www.atmel.com \n * Support email: avr@atmel.com * - * + * * $Name$ * $Revision: 2299 $ * $RCSfile$ @@ -67,52 +67,52 @@ void PWM_Start(void) { // Clear OC1B on compare match, enable PWM on comparator OCR1B. TCCR1A = (1< 0) { +unsigned char PWM_DecrementDutyCycle(void) { + + if (OCR1B > 0) { OCR1B -= 1; return(TRUE); } else {