Hi There ,
  I am working with the LPC2468  board and i will like to find out from you
if you have any idea how to read the ADC value and set PWM in C code not on
the command line.
For the ADc read i have this piece of code which i am not sure it will work.
# define adadc 0XE0034004
int ADC_read()
{
  int val;
   val = adadc;
 return va;
}
Please do you know if this piece of Code will return me the value of at the
output of the adc.
Thanks alot for your help if you can
Anne


On Mon, Mar 23, 2009 at 5:38 PM, Daniel Glöckner <[email protected]> wrote:

> Hi,
> I'm a little confused as to how to write drivers that require
> remap_pfn_range on mmu Linux to function on nommu as well.
>
> The current nommu implementation looks like this:
>
> int remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
>                    unsigned long to, unsigned long size, pgprot_t prot)
> {
>        vma->vm_start = vma->vm_pgoff << PAGE_SHIFT;
>        return 0;
> }
>
> It's strange to see vm_pgoff being used to define the start of the area.
> IMHO this should only be used for /dev/mem. In all other cases this is
> not related to the absolute address. And not changing vm_end will
> effectively change the size of the area.
>
> But is remap_pfn_range supposed to change vm_start at all?
> Shouldn't this, on nommu, consist only of checks if the size bytes starting
> at "from" and "to << PAGE_SHIFT" are inside vma?
> vm_start and vm_end are already at their designated value after mmap has
> called get_unmapped_area..
>
>  Daniel
> _______________________________________________
> uClinux-dev mailing list
> [email protected]
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by [email protected]
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev
>
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to