i posted following on "bare metal" , told linux question, i'm reposting here:
here response got on "bare metal." looks wonder if has add. since textbook, want have thorough explanation.can point me discussion of difference between using /dev/gpiomem , /dev/mem access gpio? i've tried both. both work, , both require sudo run program they're used in.
i'm doing textbook. i'm inclined use /dev/mem because seems more general. when students graduate, chances won't programming raspberry pi in jobs.
this isn't bare metal question. it's linux question.
should not need use sudo /dev/gpiomem. required user belongs gpio group.
/dev/gpiomem grants access gpio peripheral registers.
/dev/mem grants access peripheral registers memory. more dangerous.
/dev/gpiomem doesn't require sudo access if user member of "gpio" group. "pi" user member of group.
difference between 2 /dev/mem allows access all arm accessible memory on pi, whilst /dev/gpiomem area associated gpio control.
difference between 2 /dev/mem allows access all arm accessible memory on pi, whilst /dev/gpiomem area associated gpio control.
raspberrypi
Comments
Post a Comment