changed uip_buf to a union for 32-bit alignment
This commit is contained in:
parent
9db7f06368
commit
2d447502d4
4 changed files with 18 additions and 17 deletions
|
@ -47,7 +47,7 @@
|
|||
*
|
||||
* This file is part of the uIP TCP/IP stack.
|
||||
*
|
||||
* $Id: uip.h,v 1.32 2010/05/08 07:23:55 oliverschmidt Exp $
|
||||
* $Id: uip.h,v 1.33 2010/05/24 10:07:34 joxe Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -476,10 +476,17 @@ void uip_reass_over(void);
|
|||
}
|
||||
\endcode
|
||||
*/
|
||||
|
||||
typedef union {
|
||||
uint32_t u32[(UIP_BUFSIZE + 3) / 4];
|
||||
uint8_t u8[UIP_BUFSIZE];
|
||||
} uip_buf_t;
|
||||
|
||||
#ifdef UIP_CONF_PLAIN_BUFFER
|
||||
CCIF extern uint8_t uip_buf[UIP_BUFSIZE+2];
|
||||
#else /* UIP_CONF_PLAIN_BUFFER */
|
||||
CCIF extern uint8_t * const uip_buf;
|
||||
CCIF extern uip_buf_t uip_aligned_buf;
|
||||
#define uip_buf (uip_aligned_buf.u8)
|
||||
#endif /* UIP_CONF_PLAIN_BUFFER */
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue