Home | History | Annotate | Download | only in stm32_flash

Lines Matching refs:handle

29 uint8_t uart_write_data(handle_t *handle, uint8_t *buffer, int length)
31 uart_handle_t *uart_handle = (uart_handle_t *)handle;
33 buffer[length] = checksum(handle, buffer, length);
41 uint8_t uart_write_cmd(handle_t *handle, uint8_t cmd)
43 uart_handle_t *uart_handle = (uart_handle_t *)handle;
56 uint8_t uart_read_data(handle_t *handle, uint8_t *data, int length)
58 uart_handle_t *uart_handle = (uart_handle_t *)handle;
72 uint8_t uart_read_ack(handle_t *handle)
76 if (handle->read_data(handle, &buffer, sizeof(uint8_t)) == CMD_ACK)
82 int uart_init(handle_t *handle)
84 uart_handle_t *uart_handle = (uart_handle_t *)handle;
88 handle->cmd_erase = CMD_ERASE;
89 handle->cmd_read_memory = CMD_READ_MEMORY;
90 handle->cmd_write_memory = CMD_WRITE_MEMORY;
92 handle->no_extra_sync = 1;
94 handle->write_data = uart_write_data;
95 handle->write_cmd = uart_write_cmd;
96 handle->read_data = uart_read_data;
97 handle->read_ack = uart_read_ack;
121 uart_write_cmd(handle, CMD_UART_ENABLE);
122 if (uart_read_ack(handle) == CMD_ACK)