gpio.h

来自「A few drivers for the Motorola C380 s ce」· C头文件 代码 · 共 19 行

H
19
字号
#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 + =
减小字号Ctrl + -
显示快捷键?