该实例为通过定时器去控制LED灯的点亮和熄灭,使用内核中platform_driver的框架去实现,并在对应的sysfs设备节点中导出属性文件ctrl、gpio和timer_peroid,在Linux的应用层对ctrl进行读写能实现定时器的打开和关闭,对gpio进行读,能够显示对应的GPIO号,对timer_peroid进行写能够控制定时器的周期,该文件的值以毫秒为单位。
gpio greybus hsi i3c iio input irqchip isdn lockd mailbox mdio mfd mlx4 mlx5 mmc mtd mux net netfilter netfilter_arp netfilter_bridge netfilter_ipv4 netfilter_ipv6 pcs perf phy pinctrl platform_data power qed raid 8250_pci.h a.out.h acct.h acpi.h acpi_dma.h acpi...
of_gpio.h of_graph.h of_iommu.h of_irq.h of_mdio.h of_net.h of_pci.h of_pdt.h of_platform.h of_reserved_mem.h oid_registry.h olpc-ec.h omap-dma.h omap-gpmc.h omap-iommu.h omap-mailbox.h omapfb.h once.h once_lite.h oom.h openvswitch.h osq_loc...