GPIO drive frame under SylixOS

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/ScilogyHunter/article/details/100583691

GPIO drive frame under SylixOS

GPIO is an extremely common and a high degree of standardization of equipment, SylixOS provides a complete set of clear hierarchy driven framework for GPIO. As shown below:
FIG GPIO drive frame under sylixos

Description Framework

  • SylixOS the device will GPIO abstract file, the application layer can operate by accessing the device file GPIO.
  • In addition to accessing files GPIO manner, the system also encapsulates GpioFd interface simplifies the operation of the application layer of GPIO.
  • SylixOS GpioDrv also provides an interface, not only facilitate the realization GPIO device file, is also used elsewhere GPIO driver layer provides the standard operation, easy implementation and other drive transplantation.
  • GpioDrv GPIO controller interface is based on the object, the system may have a plurality of GPIO controller object to facilitate different objects implemented using different drive.
  • In fact, the drive to achieve GPIO GPIO controller object is instantiated, as long as the need to achieve a callback function you can, do not need to consider how to package the device file.
  • GPIO driver implementation can directly read and write the GPIO register control means may be provided by the manufacturer chip peripheral driver library to achieve, for a more complex and the second method is recommended peripheral chips, can greatly improve the drive efficiency of development.
  • Achieve first be completed before the GPIO driver driving pin assignments, clock initialize drivers and other drivers and interrupt controller, GPIO driver is required to use these features.
  • The GPIO SylixOS are unified into a digital number, the application layer and the driving layer may be operated by the index number.

Guess you like

Origin blog.csdn.net/ScilogyHunter/article/details/100583691