Home | History | Annotate | Download | only in stm32_flash

Lines Matching refs:handle

26 uint8_t i2c_write_data(handle_t *handle, uint8_t *buffer, int length)
28 i2c_handle_t *i2c_handle = (i2c_handle_t *)handle;
30 buffer[length] = checksum(handle, buffer, length);
38 uint8_t i2c_write_cmd(handle_t *handle, uint8_t cmd)
45 return handle->write_data(handle, buffer, sizeof(uint8_t));
48 uint8_t i2c_read_data(handle_t *handle, uint8_t *data, int length)
50 i2c_handle_t *i2c_handle = (i2c_handle_t *)handle;
58 uint8_t i2c_read_ack(handle_t *handle)
62 if (handle->read_data(handle, &buffer, sizeof(uint8_t)) == CMD_ACK)
68 int i2c_init(handle_t *handle)
70 i2c_handle_t *i2c_handle = (i2c_handle_t *)handle;
72 handle->cmd_erase = CMD_ERASE_NS;
73 handle->cmd_read_memory = CMD_READ_MEMORY;
74 handle->cmd_write_memory = CMD_WRITE_MEMORY_NS;
76 handle->no_extra_sync = 0;
78 handle->write_data = i2c_write_data;
79 handle->write_cmd = i2c_write_cmd;
80 handle->read_data = i2c_read_data;
81 handle->read_ack = i2c_read_ack;