Skip to content
Snippets Groups Projects
buzz_cycle.c 567 B
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include "pico/stdlib.h"
#include "buzzer.h"

static int64_t period = 1000000;
static bool alarm_status = false;

// timer callback that controls the buzzer
static int64_t buzz_isr(alarm_id_t id, void* data) {

}

// initialise stdio and the buzzer
static inline void init() {

}

static inline void start_timer() {

}

// allow the user to enter a period in microseconds
int64_t get_period() {

}

int main(void) {
    init();
    start_timer();

    while (true) {
        period = get_period();
    }
}