init mod04 ex02
This commit is contained in:
@@ -70,7 +70,6 @@ typedef enum {
|
||||
} Slope;
|
||||
|
||||
volatile uint8_t duty_cycle = T1_DUTY_CYCLE_PERCENT;
|
||||
volatile Slope slope = UP;
|
||||
|
||||
// using TIMER 1
|
||||
void blink_led_1() {
|
||||
@@ -119,6 +118,7 @@ int main() {
|
||||
}
|
||||
|
||||
ISR(TIMER0_COMPA_vect) {
|
||||
volatile static Slope slope = UP;
|
||||
if (slope == UP) {
|
||||
if (duty_cycle >= 100) {
|
||||
duty_cycle = 100;
|
||||
|
||||
Reference in New Issue
Block a user