#include <cstdio>
#include "SHAL.h"

int main() {

    SHAL_init();

    PIN(E9).setPinMode(PinMode::ALTERNATE_FUNCTION_MODE);

    PIN(E9).setAlternateFunction(GPIO_Alternate_Function::AF1);

    SHAL_TIM1.configurePWM(SHAL_Timer_Channel::CH1,24,2000,5);

    SHAL_TIM1.start();

    PIN(A3).setPinMode(PinMode::OUTPUT_MODE);
    PIN(B0).setPinMode(PinMode::ALTERNATE_FUNCTION_MODE);

    while (true) {
        PIN(A3).toggle();
        PIN(B0).toggle();
        SHAL_delay_ms(500);
    }
}
