Searched refs:CH341_PACKET_LENGTH (Results 1 – 1 of 1) sorted by relevance
36 #define CH341_PACKET_LENGTH 0x20 macro38 #define CH341_MAX_PACKET_LEN (CH341_PACKET_LENGTH * CH341_MAX_PACKETS)52 #define CH341A_CMD_I2C_STM_MAX ( min( 0x3F, CH341_PACKET_LENGTH ) )99 if (i % CH341_PACKET_LENGTH == CH341_PACKET_LENGTH - 1) in print_hex()167 unsigned int cur_todo = min(CH341_PACKET_LENGTH - 1, readcnt - in_done - in_active); in usb_transfer()344 const size_t packets = (writecnt + readcnt + CH341_PACKET_LENGTH - 2) / (CH341_PACKET_LENGTH - 1); in ch341a_spi_spi_send_command()347 uint8_t wbuf[packets+1][CH341_PACKET_LENGTH]; in ch341a_spi_spi_send_command()350 memset(wbuf[0], 0, CH341_PACKET_LENGTH); in ch341a_spi_spi_send_command()360 unsigned int write_now = min(CH341_PACKET_LENGTH - 1, write_left); in ch341a_spi_spi_send_command()361 unsigned int read_now = min ((CH341_PACKET_LENGTH - 1) - write_now, read_left); in ch341a_spi_spi_send_command()[all …]