rpi_hal 树莓派的IO控制 pascal版代码下载

weixin_39821051 2019-09-18 06:30:46
功能强大,直接虐死wiringPi的树莓派IO之pascal代码,包括GPIO,I2C,PWM等控制。
rpi_hal-Hardware Abstraction Library (GPIO, I2C and SPI functions and procedures)
This Unit with around 1700 Lines of Code provided by Stefan Fischer, delivers procedures and functions to access the rpi HW I2C, SPI and GPIO:
Just an excerpt of the
相关下载链接://download.csdn.net/download/rocklee/9307315?utm_source=bbsseo
...全文
26 回复 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
功能强大,直接虐死wiringPi的树莓派IOpascal代码,包括GPIO,I2C,PWM等控制rpi_hal-Hardware Abstraction Library (GPIO, I2C and SPI functions and procedures) This Unit with around 1700 Lines of Code provided by Stefan Fischer, delivers procedures and functions to access the rpi HW I2C, SPI and GPIO: Just an excerpt of the available functions and procedures: procedure gpio_set_pin (pin:longword;highlevel:boolean); { Set RPi GPIO pin to high or low level; Speed @ 700MHz -> 0.65MHz } function gpio_get_PIN (pin:longword):boolean; { Get RPi GPIO pin Level is true when Pin level is '1'; false when '0'; Speed @ 700MHz -> 1.17MHz } procedure gpio_set_input (pin:longword); { Set RPi GPIO pin to input direction } procedure gpio_set_output(pin:longword); { Set RPi GPIO pin to output direction } procedure gpio_set_alt (pin,altfunc:longword); { Set RPi GPIO pin to alternate function nr. 0..5 } procedure gpio_set_gppud (mask:longword); { set RPi GPIO Pull-up/down Register (GPPUD) with mask } ... function rpi_snr :string; { delivers SNR: 0000000012345678 } function rpi_hw :string; { delivers Processor Type: BCM2708 } function rpi_proc:string; { ARMv6-compatible processor rev 7 (v6l) } ... function i2c_bus_write(baseadr,reg:word; var data:databuf_t; lgt:byte; testnr:integer) : integer; function i2c_bus_read (baseadr,reg:word; var data:databuf_t; lgt:byte; testnr:integer) : integer; function i2c_string_read(baseadr,reg:word; var data:databuf_t; lgt:byte; testnr:integer) : string; function i2c_string_write(baseadr,reg:word; s:string; testnr:integer) : integer; ... procedure SPI_Write(devnum:byte; reg,data:word); function SPI_Read(devnum:byte; reg:word) : byte; procedure SPI_BurstRead2Buffer (devnum,start_reg:byte; xferlen:longword); procedure SPI_BurstWriteBuffer (devnum,start_reg:byte; xferlen:longword); { Write 'len' Bytes from Buffer SPI Dev startig at address 'reg' }

13,656

社区成员

发帖
与我相关
我的任务
社区描述
CSDN 下载资源悬赏专区
其他 技术论坛(原bbs)
社区管理员
  • 下载资源悬赏专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧