99 const uint8_t *data,
size_t data_len);
Core MCP2221 device and I2C master API.
struct mcp2221_device mcp2221_t
Opaque MCP2221 device handle.
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_flash_read(mcp2221_t *dev, uint8_t section, uint8_t out[60])
Read one MCP2221 flash section.
mcp2221_error_code_t mcp2221_flash_write_ex(mcp2221_t *dev, uint8_t section, const uint8_t *data, size_t data_len)
Write a length-delimited MCP2221 Write Flash Data payload.
mcp2221_error_code_t mcp2221_flash_write(mcp2221_t *dev, uint8_t section, const uint8_t data[60])
Write one MCP2221 flash section using the legacy 60-byte payload.
mcp2221_error_code_t mcp2221_flash_send_password(mcp2221_t *dev, const uint8_t pwd[8])
Send the eight-byte flash access password.