mirror of https://github.com/ARMmbed/mbed-os.git
commit
ed57ce8748
|
@ -71,8 +71,8 @@ typedef uintptr_t mem_ptr_t;
|
|||
#define PACK_STRUCT_STRUCT
|
||||
#define PACK_STRUCT_END
|
||||
#define PACK_STRUCT_FIELD(fld) fld
|
||||
// #define PACK_STRUCT_USE_INCLUDES
|
||||
#error NEEDS ALIGNED // FIXME TBD
|
||||
#define IAR_STR(a) #a
|
||||
#define ALIGNED(n) _Pragma(IAR_STR(data_alignment= ## n ##))
|
||||
#else
|
||||
/* GCC tools (CodeSourcery) */
|
||||
#define PACK_STRUCT_BEGIN
|
||||
|
|
|
@ -427,7 +427,7 @@ sys_thread_t sys_thread_new(const char *pcName,
|
|||
t->def.tpriority = (osPriority)priority;
|
||||
t->def.stacksize = stacksize;
|
||||
#ifndef __MBED_CMSIS_RTOS_CA9
|
||||
t->def.stack_pointer = (unsigned char*)malloc(stacksize);
|
||||
t->def.stack_pointer = (uint32_t*)malloc(stacksize);
|
||||
if (t->def.stack_pointer == NULL) {
|
||||
error("Error allocating the stack memory");
|
||||
}
|
||||
|
|
|
@ -61,6 +61,9 @@ public:
|
|||
NTPResult setTime(const char* host, uint16_t port = NTP_DEFAULT_PORT, uint32_t timeout = NTP_DEFAULT_TIMEOUT); //Blocking
|
||||
|
||||
private:
|
||||
#if defined (__ICCARM__)
|
||||
#pragma pack()
|
||||
#endif
|
||||
struct NTPPacket //See RFC 4330 for Simple NTP
|
||||
{
|
||||
//WARN: We are in LE! Network is BE!
|
||||
|
@ -86,7 +89,11 @@ private:
|
|||
uint32_t rxTm_f;
|
||||
uint32_t txTm_s;
|
||||
uint32_t txTm_f;
|
||||
#if defined (__ICCARM__)
|
||||
};
|
||||
#else
|
||||
} __attribute__ ((packed));
|
||||
#endif
|
||||
|
||||
UDPSocket m_sock;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue