Skip to content

General I2C questions #2606

Open
Open
@MaBecker

Description

On my way to implement a CST816S i2c touch device for a custom board.

Is there a implementation like function I2C.readReg(address, reg, quantity) we can use in c instead of a jsi2cWrite() used with jsi2cRead()

#define CST816S_ID 0x15

unsigned char buf[6];
uint8_t version;
// read version
    buf[0] = 0x15; jsi2cWrite(&jswrap_touch_init, CST816S_ID, 1, buf, true);
    // wait 100ms
    jshDelayMicroseconds(100*1000); // we should really have a callback
    jsi2cRead(&jswrap_touch_init, CST816S_ID, 1, &version, true);

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions