コード例 #1
0
ファイル: i2c_api.c プロジェクト: jasongaunt/mbed
static int i2c_do_write(i2c_t *obj, int value) {
    // write the data
    obj->i2c->D = value;

    // init and wait the end of the transfer
    return i2c_wait_end_tx_transfer(obj);
}
コード例 #2
0
ファイル: i2c_api.c プロジェクト: 1deus/tmk_keyboard
static int i2c_do_write(i2c_t *obj, int value) {
    uint32_t i2c_addrs[] = I2C_BASE_ADDRS;
    I2C_HAL_WriteByte(i2c_addrs[obj->instance], value);

    // init and wait the end of the transfer
    return i2c_wait_end_tx_transfer(obj);
}
コード例 #3
0
ファイル: i2c_api.c プロジェクト: goconnor/mbed
static int i2c_do_write(i2c_t *obj, int value) {
    i2c_hal_write(obj->instance, value);

    // init and wait the end of the transfer
    return i2c_wait_end_tx_transfer(obj);
}