Re: Accesing 32bits registers

On 19/10/07 17:35, David MacMahon wrote:
> On Oct 19, 2007, at 4:33 , Félix wrote:
> 
>> 2. I'm discover in comedi.h the 16bits type:
>>
>>          typedef unsigned int lsampl_t;
> 
> Are you sure about "unsigned int" being 16 bits?  I would bet that
> "unsigned int" is 32 bits (or possibly 64?) if you're working on a PCI
> based machine.

Yes, "unsigned int" is always 32-bits on Linux:

unsigned char: 8 bits
unsigned short: 16 bits
unsigned int: 32 bits
unsigned long: 32 bits or 64 bits, depending on architecture, but same
size as a pointer.

The above is not universally true, but is true for Linux (until some
weird architecture needs to be supported!).

-- 
-=( Ian Abbott _at_ MEV Ltd.    E-mail: <abbotti_at_mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-

Received on 2007-10-23Z08:50:47