LwIP

Started by tha, August 29, 2021, 09:15:30 AM

Previous topic - Next topic

tha



คำนวณ memory size สำหรับ an aligned buffer - ส่งคืนกลับค่าผลคูณสูงสุดถัดไปของ MEM_ALIGNMENT (ตัวอย่างเช่น LWIP_MEM_ALIGN_SIZE(3) และ LWIP_MEM_ALIGN_SIZE(4) ทั้งคู่จะให้ผล 4 สำหรับ  MEM_ALIGNMENT == 4).

tha



กำหนดสิ่งนี้เป็น 1 ใน arch/cc.h ของ port ของคุณถ้า your compiler ไม่จัดให้มี the ctype.h header. ถ้า ctype.h มีให้ใช้งาน, a few character functions จะถูกแม็ปไปยัง the appropriate functions (lwip_islower, lwip_isdigit...), ถ้าไม่มี, a private implementation ถูกจัดให้มี.

tha



กำหนดสิ่งนี้เป็น 1 ใน arch/cc.h ของ port ของคุณถ้า your compiler ไม่จัดให้มี the inttypes.h header. คุณจำเป็นต้อง define the format strings ที่แสดงรายการใน lwip/arch.h ด้วยตัวคุณเองในกรณีนี้ (X8_F, U16_F...).


tha



กำหนดสิ่งนี้เป็น 1 ใน arch/cc.h ของ your port ถ้า your compiler ไม่จัดให้มี the limits.h header.  คุณจำเป็นต้อง define the type limits ด้วยตัวคุณเองในกรณีนี้ (ตัวอย่างเช่่น INT_MAX, SSIZE_MAX).

tha



กำหนดสิ่งนี้เป็น 1 ใน arch/cc.h ของ your port ถ้าคุณไม่ต้องการ include stddef.h header เพื่อรับ size_t. คุณจำเป็นต้อง typedef size_t ด้วยตัวคุณเองในกรณีนี้.

tha



กำหนดสิ่งนี้เป็น 1 ใน arch/cc.h ของ your port ถ้า your compiler ไม่จัดให้มี the stdint.h header. คุณจำเป็นต้อง typedef the generic types ที่แสดงรายการใน lwip/arch.h ด้วยตัวคุณเองในกรณีนี้ (u8_t, u16_t...).

tha



หลีกเลี่ยง warnings/errors ที่เกี่ยวกับ implicitly casting ไกลออกไปจากการแพ็ค attributes โดยการทำ a explicit cast

tha



Platform specific assertion handling.
โปรดทราบว่า the default implementation จะดึงใน printf, fflush และ abort, ซึ่งอาจดึงเป็นลำดับใน standard libary code จำนวนมาก. ใน resource-constrained systems, สิ่งนี้ควรจะถูกกำหนดเป็นสิ่งที่ใช้ทรัพยากรที่น้อยกว่า.