/**/
#ifndef _MY_PWM_H
#define _MY_PWM_H

// Definice
#define DEFAULT_LED_PWM_PULSE			0		// Vychozi hodnota PWM pulzu LED 		 	(0-48000) - doby trvani aktivni urovne pri knitoctu 500Hz 
#define DEFAULT_FAN_PULSE				0		// Vychozi hodnota PWM pulzu Ventilatoru 	(0-48000) - doby trvani aktivni urovne pri knitoctu 500Hz 
#define DEFAULT_LCD_BACKLIGHT_PULSE		20000	// Vychozi hodnota PWM pulzu Podsviceni LCD (0-48000) - doby trvani aktivni urovne pri knitoctu 500Hz 

// Definice maker
#define PWM_Set_LED_1(x);					TIM2->CCR4 = x;
#define PWM_Set_LED_2(x);					TIM2->CCR3 = x;
#define PWM_Set_LED_3(x);					TIM2->CCR2 = x;
#define PWM_Set_LED_4(x);					TIM2->CCR1 = x;
#define PWM_Set_LED_5(x);					TIM3->CCR3 = x;
#define PWM_Set_FAN(x);						TIM3->CCR4 = x;
#define PWM_Set_BACKLIGHT(x);				TIM1->CCR1 = x;

#define PWM_Get_LED_1() 					TIM2->CCR4
#define PWM_Get_LED_2() 					TIM2->CCR3
#define PWM_Get_LED_3() 					TIM2->CCR2
#define PWM_Get_LED_4() 					TIM2->CCR1
#define PWM_Get_LED_5() 					TIM3->CCR3
#define PWM_Get_FAN() 						TIM3->CCR4
#define PWM_Get_BACKLIGHT() 				TIM1->CCR1

// Prototypy funkci --------------------------------------
void PWM_Init(void);
void PWM_Vypnuti(void);
void PWM_ZnovuZapnuti(void);

#endif
