Skip to content

Commit

Permalink
drivers: function to disable pit
Browse files Browse the repository at this point in the history
Add function to disable PIT

Signed-off-by: Daniele Ahmed <ahmeddan amazon c;0m >
  • Loading branch information
82marbag authored and wipawel committed Nov 15, 2020
1 parent a4e0c30 commit 5d27384
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/pit.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ void pit_sleep(uint64_t ms) {
cpu_relax();
}
}

void pit_disable(void) { pic_disable_irq(PIC1_DEVICE_SEL, PIT_IRQ); }
1 change: 1 addition & 0 deletions include/drivers/pit.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@ typedef enum pit_operational_mode pit_operational_mode_t;
extern void init_pit(uint8_t dst_cpus);
extern void pit_interrupt_handler(void);
extern void pit_sleep(uint64_t ms);
extern void pit_disable(void);

#endif

0 comments on commit 5d27384

Please sign in to comment.