libeasymcp2221 2.0.3
mcp2221_usb.h
Go to the documentation of this file.
1
6#ifndef MCP2221_USB_H
7#define MCP2221_USB_H
8
9#include "mcp2221.h"
10
12
38 mcp2221_t *dev,
39 int enable);
40
61 mcp2221_t *dev,
62 int *enabled);
63
86 mcp2221_t *dev,
87 int enable);
88
105 mcp2221_t *dev,
106 int *enabled);
107
132 mcp2221_t *dev,
133 int self_powered);
134
151 mcp2221_t *dev,
152 int *self_powered);
153
181 mcp2221_t *dev,
182 unsigned ma);
183
201 mcp2221_t *dev,
202 unsigned *ma);
203
205
206#endif // MCP2221_USB_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_usb_set_remote_wakeup(mcp2221_t *dev, int enable)
Stage the USB Remote Wake-up capability setting.
mcp2221_error_code_t mcp2221_usb_set_requested_current(mcp2221_t *dev, unsigned ma)
Stage the USB bus current advertised by the MCP2221.
mcp2221_error_code_t mcp2221_usb_get_cdc_serial_enabled(mcp2221_t *dev, int *enabled)
Return the effective USB CDC serial-number enumeration setting.
mcp2221_error_code_t mcp2221_usb_get_requested_current(mcp2221_t *dev, unsigned *ma)
Return the effective requested USB bus current in milliamperes.
mcp2221_error_code_t mcp2221_usb_set_self_powered(mcp2221_t *dev, int self_powered)
Stage whether the MCP2221 advertises itself as self-powered.
mcp2221_error_code_t mcp2221_usb_get_self_powered(mcp2221_t *dev, int *self_powered)
Return the effective self-powered setting.
mcp2221_error_code_t mcp2221_usb_set_cdc_serial_enabled(mcp2221_t *dev, int enable)
Stage USB CDC serial-number enumeration.
mcp2221_error_code_t mcp2221_usb_get_remote_wakeup(mcp2221_t *dev, int *enabled)
Return the effective USB Remote Wake-up setting.