mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 21:13:39 +00:00
runtime: Implement GPIO output
Now we can actually blink a LED!
This commit is contained in:
@@ -2,9 +2,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
void uart_init(uint32_t pin_tx);
|
||||
void uart_send(uint8_t c);
|
||||
|
||||
void rtc_init();
|
||||
void rtc_sleep(uint32_t ticks);
|
||||
|
||||
typedef enum {
|
||||
GPIO_INPUT,
|
||||
GPIO_OUTPUT,
|
||||
} gpio_mode_t;
|
||||
|
||||
void gpio_cfg(uint32_t pin, gpio_mode_t mode);
|
||||
void gpio_set(uint32_t pin, bool high);
|
||||
|
||||
Reference in New Issue
Block a user