Работа с GPIO/en: различия между версиями

Новая страница: «Driving GPIO can use the direct access to the processor registers, bypassing the Linux interface/dev/mem. At the same time, compared to the work via sysfs minimiz…»
(Новая страница: «<b>This method is strongly NOT recommended for use without sufficient reason. To work in C / C ++ is to use the files to work through sysfs, as described in the p…»)
(Новая страница: «Driving GPIO can use the direct access to the processor registers, bypassing the Linux interface/dev/mem. At the same time, compared to the work via sysfs minimiz…»)
Строка 118: Строка 118:
<b>This method is strongly NOT recommended for use without sufficient reason. To work in C / C ++ is to use the files to work through sysfs, as described in the previous section</b>.
<b>This method is strongly NOT recommended for use without sufficient reason. To work in C / C ++ is to use the files to work through sysfs, as described in the previous section</b>.


Управлять GPIO можно с помощью прямого доступа к регистрам процессора, в обход Linux через интерфейс /dev/mem. При этом, по сравнению с работой через sysfs минимизуются наладные расходы. Этот метод можно использовать,  
Driving GPIO can use the direct access to the processor registers, bypassing the Linux interface/dev/mem. At the same time, compared to the work via sysfs minimization of costs. This method can be used,
если вам необходим очень быстрый доступ к GPIO, например bitbang протоколов или ШИМ. Стоит иметь в виду, что планировщик процессов всё ещё может вносить в работу программы значительные задержки.
if you need a very fast access to GPIO, such bitbang protocols or PWM. It should be borne in mind that the process scheduler can still contribute to the work program of significant delays.
Рекомендуется выносить критичные ко времени задачи в ядро.
It is recommended to make time-critical tasks in the kernel.


См. [http://olimex.wordpress.com/2012/09/11/imx233-olinuxino-gpios-faster-and-faster/] , [https://github.com/OLIMEX/OLINUXINO/blob/master/SOFTWARE/iMX233/gpio-mmap.h]
См. [http://olimex.wordpress.com/2012/09/11/imx233-olinuxino-gpios-faster-and-faster/] , [https://github.com/OLIMEX/OLINUXINO/blob/master/SOFTWARE/iMX233/gpio-mmap.h]