#include <why.h>
#include <why-semaphore.h>
#include <why-irq.h>

#include <print>

int main()
{
    Why::init();

    Why::Semaphore sem(0);

    Why::IRQ::connect(7, [&sem](int){ sem.give(); });

    std::println("waiting for semaphore to be given");
    sem.take();
    std::println("semaphore taken");

    return 0;
}
