beautypg.com

Strlen_x (), Strlen_r (), Log2 () – Maxim Integrated 73S12xxF Software User Manual

Page 66: E 66)

background image

73S12xxF Software User Guide

UG_12xxF_016

66

Rev. 1.50

strlen_x ()

Purpose

Compute the string length of ASCII data in XDATA (XRAM).


Synopsis

unsigned int strlen_x ( IN unsigned char xdata *psource );


Parameters

psource: Input parameter
Specifies a pointer to the source data in XRAM.


Return Value

Length of the ASCII data string (in bytes) in the specified XRAM location.

strlen_r ()

Purpose

Compute the string length of ASCII data in ROM (Flash).


Synopsis

unsigned int strlen_x ( IN unsigned char code *psource );


Parameters

psource: Input parameter
Specifies a pointer to the source data in Flash.


Return Value

Length of the ASCII data (in bytes) in the specified Flash ROM location.

Log2 ()

Purpose

Compute the logarithm (base 2) of the input.


Synopsis

unsigned int log2 ( IN unsigned int unumber );


Parameters

unumber: Input parameter
The input value to determine the log2 of.


Return Value

log2 of the input.