Skip to content
Snippets Groups Projects
Select Git revision
  • b732cac4b3c938a2483f8dd25abfbc5b50b83645
  • main default protected
2 results

buzz_cycle.c

Blame
  • 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();
        }
    }