📄 gpio.h
字号:
#ifndef GPIO_DRV_H
#define GPIO_DRV_H
#include "../libs/motolibs.h"
#define GPIO_DIR_IN 0
#define GPIO_DIR_OUT 1
/* Configure a GPIO pin as input or output and to use the specified
* alternative input/output channel */
void gpio_config(byte port, byte pin, byte dir, byte chan);
/* Set a value on an out GPIO pin */
void gpio_write(byte port, byte pin, byte val);
/* Get a value from an in GPIO pin */
byte gpio_read(byte port, byte pin);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -