
30 Aug
2010
30 Aug
'10
11:39 a.m.
Reinhard Meyer schrieb:
- uint32_t linebuf[MAX_LINE_LENGTH_BYTES/4 + 1];
uint32_t *uip = (void*)linebuf; uint16_t *usp = (void*)linebuf; uint8_t *ucp = (void*)linebuf;
I personally prefer this above an attribute. Its disputeable but I prefer to do things with "normal C constructs" where possible.
Reading this, after it had been sent, a perfect patch should make the buffer an union:
union { uint32_t ui[MAX.../4+1]; uint16_t us[MAX.../2+1]; uint8_t uc[MAX...+1]; } linebuf;
Reinhard