Re: HW access

ba_f <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
Am 2016-08-09 17:49, schrieb Matthias Lange:
> On 08/09/2016 04:44 PM, ba_f wrote:
>> Am 2016-08-09 15:19, schrieb Matthias Lange:
>> 
>> Great, all L4Re-Apps boot now.
>> 
>> But, there's still something wrong.
>> Here's my code to access HW:
>> 
>> 
>>   printf("io_request...");
>>   long ret = l4io_request_iomem( 0x43c00000, 4, L4IO_MEM_NONCACHED,
>> baseaddr);
> 
> Did you initialize 'baseaddr' to NULL?
> 
> A few more recommendations. It is usually bad practice to use 
> hard-coded
> device addresses. If you like the convinience of libio-io you can use
> l4io_lookup_device() to get a device handle which you can use to 
> iterate
> the device resources with l4vbus_get_resource().
> 
> Matthias.
> 

Nice, thanks for the hint.

I took examples/misc/eb_leds/eb_leds.c as reference and now it works.



Thanks Matthias,


ba_f
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.