OpenCores
URL https://opencores.org/ocsvn/1664/1664/trunk

Subversion Repositories 1664

[/] [1664/] [trunk/] [c/] [lista/] [n4__asciiexadesimal.c] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mrdmkg
#include "tipodef.h"
2
 
3
n4 n4__asciiexadesimal(n1 * a, nN cuantia)
4
{
5
 n4 binaria = 0;
6
 n1 c;
7
 nN i = 0;
8
 
9
 while((cuantia--)>0)
10
 {
11
  c = a[i++];
12
  c = (c>0x39) ? c : c+0x09;
13
  binaria |= (c&0x0f);
14
  binaria <<= 4;
15
 }
16
 
17
 return binaria;
18
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.