add Chapter10

This commit is contained in:
Amar Mahmutbegovic
2024-09-09 20:55:25 +02:00
parent 8673086b40
commit 8ce616c0c9
203 changed files with 302587 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
#include <gpio_interrupt_manager.hpp>
namespace hal {
void gpio_interrupt_manager::register_interrupt_handler(gpio * pin) {
gpio_handlers.at(w_idx++) = pin;
}
void gpio_interrupt_manager::execute_interrupt_handlers() {
for(std::size_t i = 0; i < w_idx; i++) {
gpio_handlers[i]->execute_interrupt_handler();
}
}
extern "C" void EXTI4_15_IRQHandler(void) {
gpio_interrupt_manager::execute_interrupt_handlers();
}
};