Pointer conversion has to be 4 bytes aligned 指针强制转换必须 4 字节对齐

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Pointer conversion has to be 4 bytes aligned 指针强制转换必须 4 字节对齐

Postby ESP_Faye » Mon Jul 20, 2015 2:57 pm

:!: :!: :!:

请注意,内存必须 4 字节对齐读取,指针做转换时请确保为 4 字节对齐,否则转换失败,不能正常使用。
例如,请勿直接指针转换 float temp = *((float*)data); 而是使用 os_memcpy (memcpy) 实现。

Read and write RAM has to be aligned by 4 bytes, so please do not cast pointer directly, for example, please use os_memcpy (memcpy) instead of float temp = *((float*)data);.

Who is online

Users browsing this forum: No registered users and 1 guest