autobar/autobar.c
Wyatt J. Miller f3a7db00c9 wrote some ffi functions and interfaces
tested the fact that the rust library could be used in a embedded application
2022-07-16 10:44:38 -04:00

25 lines
569 B
C

// AutoBar
// Automatic bartender running on the Raspberry Pi Pico/W
//
// Copyright 2022 Wyatt Miller, Avery Miller
// Licensed by the Mozilla Public License v2
#include "pico/stdlib.h"
void gpio_put_explict(int pin, bool status) {
gpio_put(pin, status);
return;
}
void set_and_sleep(int pin, bool state, int sleep_duration);
int main() {
const uint LED_PIN = PICO_DEFAULT_LED_PIN;
gpio_init(LED_PIN);
gpio_set_dir(LED_PIN, GPIO_OUT);
while (true) {
set_and_sleep(LED_PIN, 1, 1000);
set_and_sleep(LED_PIN, 0, 1000);
}
}