Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

Misc

Functions


Function Documentation

void delayMs u16  msec  ) 
 

Delay miliseconds.

Note:
It is "nop" instruction based and not calibrated. Depends on freq provided by ME.
Parameters:
msec 

void delayUs u16  usec  ) 
 

Delay microseconds.

Note:
It is "nop" instruction based and not calibrated. Depends on freq provided by ME.
Parameters:
usec 

u8* sprintc u8 buf,
u8  c
 

Append char to buffer.

Parameters:
buf pointer on buffer, RAM only.
c char.
Returns:
pointer at the new end of buffer.
Examples:
adc.c, braping.c, calc.c, cells.c, certs.c, fake_sim.c, mc.c, net.c, pos.c, shmem.c, sysinfo.c, temperature.c, test_idle.c, and test_prot_mem.c.

u8* sprintch u8 buf,
u8  c
 

Append char as hex to buffer.

Parameters:
buf pointer on buffer, RAM only.
c char.
Returns:
pointer at the new end of buffer.
Examples:
braping.c, cells.c, fake_sim.c, mc.c, net.c, pos.c, sysinfo.c, and test_prot_mem.c.

u8* sprinti u8 buf,
u32  val
 

Convert integer to string and append it to the buffer.

Parameters:
buf pointer on buffer, RAM only.
val integer.
Returns:
pointer at the new end of buffer.
Examples:
adc.c, braping.c, calc.c, certs.c, mc.c, net.c, shmem.c, sysinfo.c, temperature.c, test_idle.c, and test_prot_mem.c.

u8* sprints u8 buf,
const u8 str
 

Append string to buffer.

Parameters:
buf pointer on buffer, RAM only.
str pointer on string, can be from RAM, EEPROM, PROGMEM.
Returns:
pointer at the new end of buffer.
Examples:
adc.c, braping.c, cells.c, certs.c, fake_sim.c, mc.c, net.c, pos.c, shmem.c, sysinfo.c, temperature.c, test_idle.c, and test_prot_mem.c.

void sprintucs2_end void   ) 
 

Close UCS2 string.

u8 *end_ucs2 (u8 * buf)
{
  if (proc_8 (PROC_8_LANGUAGE) == LC_RUSSIAN)
    sprintucs2_end ();
  else
    buf = sprintc (buf, '\0');
  return buf;
}
\sa sprintucs2_start()

Returns:
pointer at the new end of buffer.

u8* sprintucs2_start u8 buf,
u8  dcs
 

Prepare for UCS2 string, make STRING_SLV head.

For UCS2 strings the text has to have special header, Ref. 11.11. This functions also informs kernel that sprintc() and sprints() should respect UCS2 coding.

If you plan to use UCS2 strings then use something like this:

u8 *start_ucs2 (u8 * buf)
{
  if (proc_8 (PROC_8_LANGUAGE) == LC_RUSSIAN)
    buf = sprintucs2_start (buf, DCS_UCS2);

  return buf;
}

void foo()
{
u8 *buf = buf_B ();
u8 *r = buf;

r = start_ucs2 (r);
r = sprints (r, t_foo);
r = end_ucs2 (r);

display_text (buf, NULL);
}

Parameters:
buf pointer on buffer, RAM only
dcs DCS
Returns:
pointer at the new end of buffer
See also:
sprintucs2_end()


Copyright © 2004-2006 BLADOX
Turbo version 1.2