UM10462
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 5.5 — 21 December 2016
427 of 523
22.1 How to read this chapter
The ROM-based 32-bit integer division routines are available on LPC11U2x/LPC11U3x.
22.2 Features
•
Performance-optimized signed/unsigned integer division.
•
Performance-optimized signed/unsigned integer division with remainder.
•
ROM-based routines to reduce code size.
•
Support for integers up to 32 bit.
•
ROM calls can easily be added to EABI-compliant functions to overload “/” and “%”
operators in C.
22.3 Description
The API calls to the ROM are performed by executing functions which are pointed by a
pointer within the ROM Driver Table.
shows the pointer structure used to call the
Integer divider API.
UM10462
Chapter 22: LPC11U3x/2x/1x Integer division routines
Rev. 5.5 — 21 December 2016
User manual
Fig 73. ROM pointer structure
Ptr to ROM Driver table
Ptr to Device Table 2
Ptr to Device Table 1
Ptr to Device Table 0
…
Ptr to Device Table n
sidiv
uidiv
sidivmod
uidivmod
Ptr to Function 2
Ptr to Function 0
Ptr to Function 1
…
Ptr to Function n
Integer division routines function table
Device n
ROM Driver Table
0x1FFF 1FF8
+0x0
+0x4
+0x8
+0x10
+0xC
Ptr to Device Table 3
Ptr to Integer Division routines Table
sidivmod
uidivmod