From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Sun, 7 Nov 2010 13:26:41 -0500 To: 9fans@9fans.net Message-ID: <1ab89ced7625309d8c289292c4a4086c@brasstown.quanstro.net> In-Reply-To: <4CD6D235.3030704@gmx.net> References: <4CD5F934.2080705@gmx.net> <4CD69C49.5090209@gmx.net> <9f6f706b0da2fc0b208ad49c097a823b@brasstown.quanstro.net> <4CD6D235.3030704@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] pcc limitation? Topicbox-Message-UUID: 78db962c-ead6-11e9-9d60-3106f5b1d025 > The big problem with defining it as an array inside struct spicmd is > that writearr has variable length. writearr is a command sent to a SPI > chip by a SPI controller. writearr can have any length of 1-1056 bytes. > There's also an analogous readarr in struct spi_command (not mentioned > in the example to keep it brief) and that one can have any length > between 0 and 16777217 (2^24+1) bytes. One variable-length array at the > end of a struct is possible, but an array of structs with a variable > length array in the struct won't work since you can't compute the offset > of individual members of the outer arrray. what is the largest sequence of commands in practice? - erik