OM13008,598 NXP Semiconductors, OM13008,598 Datasheet - Page 352

no-image

OM13008,598

Manufacturer Part Number
OM13008,598
Description
BOARD LPC XPRESSO LPC122X
Manufacturer
NXP Semiconductors
Series
LPCXpressor
Datasheets

Specifications of OM13008,598

Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Other names
568-6642
OM13008
23.1 How to read this chapter
23.2 Features
23.3 Description
UM10441
User manual
The integer division routines are available on all LPC122x parts.
The integer division routines perform arithmetic integer division operations and can be
called in the application code through simple API calls.
The following function prototypes are used:
typedef struct { int quot; int rem; } idiv_return;
typedef struct { unsigned quot; unsigned rem; } uidiv_return;
typedef struct{
} LPC_ROM_DIV_STRUCT;
/* The value at this address is the entry to ROM Division API.
Once it is dereferenced, individual API functions can be used
*/
#define LPC_122x_DIVROM_LOC (0x1FFC0000)
UM10441
Chapter 23: LPC122x Integer division routines
Rev. 1.1 — 10 March 2011
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.
/* Signed integer division */
int
/* Unsigned integer division */
unsigned (*uidiv) (unsigned numerator, unsigned denominator);
/* Signed integer division with remainder */
idiv_return (*sidivmod) (int numerator, int denominator);
/* Unsigned integer division with remainder */
uidiv_return (*uidivmod)(unsigned numerator, unsigned denominator);
All information provided in this document is subject to legal disclaimers.
Rev. 1.1 — 10 March 2011
(*sidiv) (int numerator, int denominator);
© NXP B.V. 2011. All rights reserved.
User manual
352 of 442

Related parts for OM13008,598