libeasymcp2221 2.0.3
mcp2221_pin.h
Go to the documentation of this file.
1
6#ifndef MCP2221_PIN_H
7#define MCP2221_PIN_H
8
9#include <stdint.h>
10
11#include "mcp2221.h"
12
14
18typedef enum {
24
31typedef enum {
34
37
40
43
46
49
53
59typedef struct {
66
74 int out[4];
76
103
123
125#endif // MCP2221_PIN_H
Core MCP2221 device and I2C master API.
struct mcp2221_device mcp2221_t
Opaque MCP2221 device handle.
Definition: mcp2221.h:28
mcp2221_error_code_t
Error codes used by libeasymcp2221.
#define MCP2221_API
Export or import a public libeasymcp2221 API symbol.
#define MCP2221_END_DECLS
End a block started by MCP2221_BEGIN_DECLS.
#define MCP2221_BEGIN_DECLS
Begin a block of declarations using C linkage.
mcp2221_error_code_t mcp2221_pin_set_function(mcp2221_t *dev, mcp2221_gpio_pin_t pin, mcp2221_pin_function_t function)
Set the function of one GP pin.
mcp2221_error_code_t mcp2221_pin_set_functions(mcp2221_t *dev, const mcp2221_pin_functions_t *cfg)
Configure the functions of GP0 through GP3 in one operation.
mcp2221_gpio_pin_t
MCP2221 general-purpose pin identifiers.
Definition: mcp2221_pin.h:18
@ MCP2221_GPIO_PIN_GP1
Definition: mcp2221_pin.h:20
@ MCP2221_GPIO_PIN_GP3
Definition: mcp2221_pin.h:22
@ MCP2221_GPIO_PIN_GP0
Definition: mcp2221_pin.h:19
@ MCP2221_GPIO_PIN_GP2
Definition: mcp2221_pin.h:21
mcp2221_pin_function_t
High-level pin functions.
Definition: mcp2221_pin.h:31
@ MCP2221_PIN_FUNC_KEEP
Definition: mcp2221_pin.h:33
@ MCP2221_PIN_FUNC_ALT1
Definition: mcp2221_pin.h:42
@ MCP2221_PIN_FUNC_ALT0
Definition: mcp2221_pin.h:39
@ MCP2221_PIN_FUNC_GPIO_OUT
Definition: mcp2221_pin.h:51
@ MCP2221_PIN_FUNC_DEDICATED
Definition: mcp2221_pin.h:36
@ MCP2221_PIN_FUNC_ALT2
Definition: mcp2221_pin.h:45
@ MCP2221_PIN_FUNC_GPIO_IN
Definition: mcp2221_pin.h:48
Batch configuration for GP0 through GP3.
Definition: mcp2221_pin.h:59