pax_global_header00006660000000000000000000000064137346570420014525gustar00rootroot0000000000000052 comment=cc17196c7586c3625ac8adf8f34838d320ffeda6 pigpio-78/000077500000000000000000000000001373465704200126145ustar00rootroot00000000000000pigpio-78/.gitignore000066400000000000000000000003211373465704200146000ustar00rootroot00000000000000*.o *.so *.so.* *.pyc pig2vcd pigpiod pigs x_pigpio x_pigpiod_if x_pigpiod_if2 __pycache__ build dist *.egg-info tmp/ # DOC files DOC/dbase/pigpio.sqlite.* DOC/tmp DOC/MAN/* !DOC/MAN/README* DOC/HTML/*.html pigpio-78/CMakeLists.txt000066400000000000000000000056641373465704200153670ustar00rootroot00000000000000cmake_minimum_required(VERSION 3.0) project(pigpio LANGUAGES C VERSION 0.71) list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) find_package(Threads REQUIRED) find_package(RT REQUIRED) option(BUILD_SHARED_LIBS "Create shared libraries" ON) add_compile_options(-Wall) # libpigpio.(so|a) add_library(pigpio pigpio.c command.c custom.cext) # libpigpiod_if.(so|a) add_library(pigpiod_if pigpiod_if.c command.c) # libpigpiod_if2.(so|a) add_library(pigpiod_if2 pigpiod_if2.c command.c) # x_pigpio add_executable(x_pigpio x_pigpio.c) target_link_libraries(x_pigpio pigpio RT::RT Threads::Threads) # x_pigpiod_if add_executable(x_pigpiod_if x_pigpiod_if.c) target_link_libraries(x_pigpiod_if pigpiod_if RT::RT Threads::Threads) # x_pigpiod_if2 add_executable(x_pigpiod_if2 x_pigpiod_if2.c) target_link_libraries(x_pigpiod_if2 pigpiod_if2 RT::RT Threads::Threads) # pigpiod add_executable(pigpiod pigpiod.c) target_link_libraries(pigpiod pigpio RT::RT Threads::Threads) # pigs add_executable(pigs pigs.c command.c) target_link_libraries(pigs Threads::Threads) # pig2vcd add_executable(pig2vcd pig2vcd.c command.c) target_link_libraries(pig2vcd Threads::Threads) # Configure and install project include (GenerateExportHeader) include (CMakePackageConfigHelpers) generate_export_header(${PROJECT_NAME}) install(TARGETS pigpio pigpiod_if pigpiod_if2 pig2vcd pigpiod pigs EXPORT ${PROJECT_NAME}Targets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin INCLUDES DESTINATION include ) write_basic_package_version_file( "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" VERSION ${${PROJECT_NAME}_VERSION} COMPATIBILITY AnyNewerVersion ) export(EXPORT ${PROJECT_NAME}Targets FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake" NAMESPACE pigpio:: ) set(ConfigPackageLocation lib/cmake/${PROJECT_NAME}) install(EXPORT ${PROJECT_NAME}Targets FILE ${PROJECT_NAME}Targets.cmake NAMESPACE pigpio:: DESTINATION ${ConfigPackageLocation} ) install( FILES ${CMAKE_CURRENT_LIST_DIR}/cmake/${PROJECT_NAME}Config.cmake "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" DESTINATION ${ConfigPackageLocation} ) install(FILES pigpio.h pigpiod_if.h pigpiod_if2.h DESTINATION include PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ ) file(GLOB man_1_SRC "*.1") install(FILES ${man_1_SRC} DESTINATION man/man1 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ ) file(GLOB man_3_SRC "*.3") install(FILES ${man_3_SRC} DESTINATION man/man3 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ ) # Install python modules. find_package(Python COMPONENTS Interpreter QUIET) if(Python_FOUND) configure_file(${CMAKE_CURRENT_LIST_DIR}/cmake/setup.py.in ${CMAKE_CURRENT_BINARY_DIR}/setup.py ) install(CODE "execute_process(COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/setup.py install)") endif() # package project include (CPack)pigpio-78/CONTRIBUTING.md000066400000000000000000000057211373465704200150520ustar00rootroot00000000000000## Submitting a New Issue If you are reporting a **bug** or defect, please provide the steps to reproduce the problem you are describing. Ideally, provide a simple script that will reproduce the issue. Also provide a description of the hardware and software types and versions used in your application/test environment. Requests for a feature or **enhancement** to the library software will be treated at a lower priority due to the lack of resources (contributors with skillset, knowledge of the library or time). Unless your request has wide support from the community it will be treated at a low priority. If the repo's maintainer judges your request to be of value then it will be labeled `enhancement`. If additional resources are required, it will be tagged with `help wanted`. If you simply have a **question**, consult the SUPPORT.md document. ## Creating a Pull Request Contributions are welcome. To save time it is best to have an open issue relating to what it is you want to contribute and to discuss the prospects of getting your contribution accepted. Your changes *must* pass the set of test files `x_*`. Please indicate that you have run the test scripts successfuly or attach a screen shot of the output from the test scripts. In addition, you *should* provide updated or additional scripts that at least test the 'happy' paths of your code changes. For larger changes the additional test cases will be considered mandatory. Beginning 2020, this repo will follow a dual branch model: `master` is the stable branch that people use in production. A second branch, `develop`, is the first branch to receive merges from bug fixes and new features. Only after we consider `develop` stable we merge it into the `master` branch and release the changes with a tagged version. Adhering to the following process is the best way to get your work included in the project: - Fork the project, clone your fork, and configure the remotes: ``` # Clone your fork of the repo into the current directory git clone https://github.com//pigio.git # Navigate to the newly cloned directory cd pigpio # Assign the original repo to a remote called "upstream" git remote add upstream https://github.com/joan2937/pigpio.git ``` - If you cloned a while ago, get the latest changes from upstream: ``` git checkout develop git pull upstream develop ``` - Create a new topic branch (off the develop branch) to contain your feature, change, or fix: ``` git checkout -b ``` - Commit your changes. - Locally merge (or rebase) the upstream dev branch into your topic branch: ``` git pull [--rebase] upstream develop ``` - Push your topic branch up to your fork: ``` git push origin ``` - Open a Pull Request with a clear title and description. See [creating a pull request from a fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork). Make sure the base branch drop down menu is selecting 'develop'. pigpio-78/DOC/000077500000000000000000000000001373465704200132215ustar00rootroot00000000000000pigpio-78/DOC/HTML/000077500000000000000000000000001373465704200137655ustar00rootroot00000000000000pigpio-78/DOC/HTML/images/000077500000000000000000000000001373465704200152325ustar00rootroot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:u{0v}v??;vX?,SLjjqjj[9Tׂ*k]G֡C눇Grrr͚5%%%%yzz=ߜo?@x>bĈ/gϞ7###&*UyGϞ=kޖ˫z'O^! Ef_jBAAA۷OHHHHHh۶mPPvE&$N{.55u޽{쉍MP 4k֬'>}zΝe˖ '۷o^n BY(,+ldawwDOOOI{ݺu/]\gQf5kܻw'O2$%v N¹p႟_rrnݺM2֬Y3}͛7l;xBYs<`3f$'''%%; `rNVZm۶} 37ٳ@`); aƍ۷>ܹqNbbbBY(Ӭ: cǺw~aI 4a~N(%%eǏܹٳIfFJOO5k{/v)Sw*Ȏ; r:Hrsszjr$]vRJׯ_'%c fBO'^ >|ϟ??| l>*TЩSŋgyw1-[l׮͚5vBS!AIII{L!ެPiVD]l2yjժUV^`޳L2*T 7HΝ;XZ޽{ :x-}#F/{yc?228**ߟ`)ě 1JuСo[ovmp8nذa{IMM}ᇇJn(G&%%-Y7ߜ:u*VSw*¬Y^|oQFZBV fEeD}{jժUV߿\\l7nl_k׮B M4y嗯\B(4?Oʕ}vR T(4tcLzz /`=*jҤId[M!ެ`iUB"P@  0`(Htʒ]IENDB`pigpio-78/DOC/HTML/images/LDR-photo.jpg000066400000000000000000003256731373465704200175240ustar00rootroot00000000000000JFIFHHB}ExifII* (2; i%*<CanonCanon EOS 50DHH2013:06:09 20:19:01Tony O'Leary^f"'0221n    |>0000000100 <- 2013:06:09 19:07:132013:06:09 19:07:13`T%1x".<  T   tat &0|  F V f f]n@@@ @ @ @0@ ,@L@t`@@b17, Tq:UdDJCanon EOS 50DFirmware Version 1.0.9h+h+XJFm~Td@ P +S17u` pv1.0.951(20)\,T0a3addd edd     ᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳaҴQt2)p` ` ` cPPPvPPPcObbbxbbbOiiW4mEF-S55-250mm f/4-5.6 ISP0123615t\8l\  ` P " H8 Hjj1A75 E i [, 75?K\+KPv X/p],,1 tzK\Z KiKiKiKiKiQQQQQ~*'sl OX6pQpP \,hQV*q2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|6J*JSN8^LT[9r]smN-oϷu#  pNs8OaU2o̟1QRd5J9/*[yLd)Z.b}ШkYq2(HU+Ńjm_?zUV%bC )uZ2Մϒ pr C7uy+f^+4Yxfm) Ugo1jia Tkc/f,h阕[DWx9Og&}9-7RIbO3] {0n;ӡmUbS ho[M-|㚄iX}yxJ ϥV!Ґk@ʠK3cQGk'M7L !K2'07sh k%T"pL<)ZM^'-pwu*?Ʈ@**!:I򼏷[*nnh3csQ2e#Q10JhXH$_/b~5W?`еeut~?Wi!0,7d{FېwF~ɒc0N Ѝ]1skdž|sV\׿䍖eNy#?V)v듈F@V1<(e`}䎀x@y 'p?EPכ"QZ$V33@Ks3sNyG;-/v..>sQT9>㋱;,!T=2h>c#V_AF2=>1J=<=)˿q&͜Io%®[0>L VRVZ^m^OJ([# http://ns.adobe.com/xap/1.0/ Canon Canon EOS 50D Top-left 72 72 Inch 2013:06:09 19:07:13 Co-sited Tony O'Leary (Photographer) - [None] (Editor) JPEG compression 72 72 Inch 1/60 sec. f/4.5 Normal programme 400 Exif Version 2.21 2013:06:09 19:07:13 2013:06:09 19:07:13 Y Cb Cr - 6.00 EV (1/64 sec.) 4.38 EV (f/4.6) 0.00 EV Spot 84.0 mm 6974 bytes undefined data 00 00 00 FlashPix Version 1.0 sRGB 4752 3168 5315.436 5306.533 Inch Normal process Auto exposure Manual white balance Standard 2.2.0.0 R98 0100 C  !"$"$C! 940/!xcu^盢RlKQPvq+ֲ|P+(ǹZXW}̺5PMɩ$2hi ;ykOVgPUKQVD"{2+ knY3~<;qϵͨB(Ic8 S{MkQYR叞H7VJtCVukSl({y?{ xߡyEY?ϱB\\E id&v@Lsgήglv=MɤcܵV[BbK5ephT+I߬6eXq?A2勮2hWg?nb1ZGuvȯriO^TQ֪@HE.乱KPP)E]@nWlNkUi䥖hS*`z}?}utauُC55 Xjo(hXM!5ӭzg; N ֧wiw{37||*-Gu]` ڠY_@T<4䡇o{*_7\|.Xs|خĚ:j;ݚm Lvn\`& лLLԎ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@R~4XT0HxQS8&D;X(0H<4Z7rBP,&% (co3VPRn/t~| $ >a ݷ`b~pigpio-78/DOC/HTML/images/ir-photo.jpg000066400000000000000000002605621373465704200175100ustar00rootroot00000000000000JFIFHHE ExifII* (2; i%*<CanonCanon EOS 50DHH2013:06:09 12:00:08Tony O'Leary^f"'0221n    |>0000000100 <2013:06:09 10:44:482013:06:09 10:44:48m%1x".<  T   tat &0|  F V f f]n@@@ @ @ @0@ ,@L@t`@@b174 mq:USD]Canon EOS 50DFirmware Version 1.0.9h-h-X]ViymS P -U17u` pv1.0.951(20)\,T0a3addd edd     ᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳ\Qt2)p` ` ` cPPPvPPPcObbbxbbbOiiW4iEF-S55-250mm f/4-5.6 ISP0123615t\8l\  ` P  " H8 Hjj1A75 E i [, 75?K\  KPv X/p],,1 tzK\_ KiKiKiKiKiQQQQQ~*'sl OX6pQpP \,hQV*q2 a    ^`   :#D$&@J) !"_N"$&-.(##0%LKXQs)!/0(:4+2:+h4k#'):524.1644CJrsB42Y>?;98;>6=SY[dbTH>F_I) -.(62(.3&W2]"%(9523-/3/-9;[\?52X=>:768907pW\]eaRF;BZD}}&'$+&!&@> "$.&$$!# '+@:;-+C,,(&$%&"FEHHJC90'+8*HDLElGht3SupycPQ )((ri.<RuPeb$\8znR"N P*vY<'h  t ucM @`68' t?\` s>| 8-e  QH~W0UR980100(~%HHJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?hl/p[O!T&^!5MDZlJȱc]0B+jlmgߧ\PXexZZl[YK۴g A&ݣcნQ魚Yīڤ?!TqiɽoZن#.@ d=f3ƿz%ݟ2դ,[W)*t=UrЍKoqi.;q4,7`/Lս2o#Tqe'"$kiDo!'=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tJ?K^6~$ \{Ѻ编{}P}04{w%!!&@HgPRuy_ėxr?zvmqXP¸+lqW~(*A o٢q Lgq\iFϯz+uԭYM Rc. q%3fWH㼚ybkzRi&gIdǧұ.[w ]l"6lLg(R+iULL{{Zmi.*TȧG}sk%L%eU`bs] Zho ٙ~`1CS^-e#rLJ*ҬEk|<60;ɗ#k _YS=Iӵ .f0}q0n;td{uһpT{3*ѩVR"r &?ަh#vX{U{psa o\8? ~' 9%zv:LQoP~\I|ނaIR1,So믗Ee"+I3e~)ٽnvyZ?96֏ݿz^^LB U_!r;Iߑd_7?O8k<ْ;=,v˼&6)E͉I}D&#yqcɢM&c)5&zMrl[\AO7J'`To/t2K1:uϵF5w X;-uNZ:|[ qqOz}imL<{U+m_KT8e "sGSI=ۃ_#2Fd i:s0=OI08-֧0bcٳb]E.ޅQ-?[iy#sϧo.# m#3Z֛ [YƈZJW*Y+?oO( ow@$});L]6c\ܿ_?#4u<`٩$7Y.qJl8.9'WOop?9̒g.I8#{Ԧ8v!mzNK}sFP;ǥSWs6-&oCXN+V-Hh O]b/+7j2eVg\HSoMKD"]tc=zғ&eŔ^֯or1h̜Ojr2OhG+)N-BLcIa{O_*sb(㏔dzBamcҍB 'N ơlxe)$ƕ5Z溿bR_ b~_/y'y1'_ғ:wF05Qer=}~T݃-(:!s http://ns.adobe.com/xap/1.0/ Canon Canon EOS 50D Top-left 72 72 Inch 2013:06:09 10:44:48 Co-sited Tony O'Leary (Photographer) - [None] (Editor) JPEG compression 72 72 Inch 1/60 sec. f/5.0 Normal programme 400 Exif Version 2.21 2013:06:09 10:44:48 2013:06:09 10:44:48 Y Cb Cr - 6.00 EV (1/64 sec.) 4.62 EV (f/5.0) 0.00 EV Spot 109.0 mm 6974 bytes undefined data 00 00 00 FlashPix Version 1.0 sRGB 4752 3168 5315.436 5306.533 Inch Normal process Auto exposure Manual white balance Standard 2.2.0.0 R98 0100 C  !"$"$C! ־dlKĕ~kƝ]^7|:^þva:\4({G2T?B'e(ߙ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c+SdŬ,655P/vEi(.f233#R7od254400gЁz@(]]]*{͋-`ho. o544Xh MBФ9""/О.t wwwBH``Gl10d}ν)dut:}͚5ԥ n BJٳt pbH4 5F M |c9pjF4aԴa1´VՃ*_ˍCoBQ XN ˃`/]/.r/F ҋ߱lC6_ @uǏ5kֶmf=QQQMMMOn UA܏*++SSSu 쒊Qtttaa,pRRRN>ԧ8 lnn#""lmmYReX,־}:zG/z MMMBHCCѣGY/_,++ uvvrX[[[WWW%#=# 555555@ O/OMttt.\k׮.7nF(cllr7jpǏxbXM,XطSTTLHHFߤ}& ۬z…O0AN&dyyy7߷o7MGK|1Ww Uz@6 H/;}ކWY(EK=[S^سf?OZ$bAfyYbq dg:54Sji0ァgjjj=[Qk@|B^  ɟPW`F#> B!A @ B!A @ B!A @ B!A @ B!A @ ? kcIENDB`pigpio-78/DOC/HTML/images/ir-wave-3.png000066400000000000000000000116561373465704200174630ustar00rootroot00000000000000PNG  IHDRXd#tbKGD pHYs  tIME 51o2;IDATxyT'!PZP ED RD+Vi UEB.e9Zk[*e+Ȣ^xUl !"LS@ć'3g,a4 ݵ0 /ϟ?YMut7m"p4F9#KJJϺر#}lKlN]H$okkæ@""#srr?777{7!bddt4^|ܯm֦ZΦ3̬l//O%3#mLM{ٲ%j%vvvFFFFFFZZZIuafffeddRW8s挴OFf9йmܰ F[[[?s3ssHErCBZ؎yKT{`PxSM6gΜtQ_0vڵ_ lz5/#stWOu>,))T5!!f:\;)ԧcb_ Ձ~YNo:U^ M,'Y0( arR;N/W[֗7gef߷higφ7.,wvrZ&j5kֱG gه:>CʕNNN9RSϝ;' !ggبB223444nnp^RQQAinnNKKlٲ?p>\Z).?I___l [rG('̝M]]))Gv޽{z{Oiַ%-֖S !i\?642.uCCC΄IV7nקZΤ#:3|miK7#wnC6{-&Z޵e鄫ZZZR޶mNNV}a"?10{xիSRNm͹34:q«kքܾ?B˧K#gF Hꪪ^}SG"̈́QF}lٲ>\-̓'OD"ާ툍-++{IW间؝otY띤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V) RF¦܏n-݉u%墉ڐW_['wR Sګ:]! 4؞ |"Yew|`U<|{emZ壴@-:KRޅ+}D@8q^%S'֗:Jd;գ[ i_RP%a]~ Nt;2iB)պRU{XP)..7x;jN${\Sw.ZN>on(YVql}OΐIJ5Eb)CH뜕.#>;լ}#˓RE p7SڽG܍Ò/8Zam)5~m5!} 8r~{؁WwSBfkLh)~#{NaJQf3>cSJZu8#]x:_'e=ϾcJqRv(.-SWe:RnS·_㇓Q^1n4$Y&~% B׵O-# 8b$E$o%f#/l q-2R $X9&4K((E{{~ѝ H/ԓE(Xpx]A,$AޯI(#pGAЍRM3+IYq*H\qk{$ 6㉆mŴ\BlMl1 bQe^C2'B۶߂91%W!.8l( mhSMfS>hi Tp UyN8 SJҋ-`齭$n V6]G; .A<$ʐ4H 7۷ Om):ZM9ބ)j-O>+qLCR)NR b-Ϳ[өlSZB!Ҕ/xU<}%1[Hm7Rqd|;GۍiPSIwzSTodv%%ʟ,Ye)A\<7ɠc8m!il}ܷK";E7<|¡W Vm!Cr:5)Q6* J5PׂJ"$4@7턒B;iPXu> O #Be}aY 2ET-`Z؋ x}yM.K)Qoԝpm!%ѵ)"MLEpigpio-78/DOC/HTML/images/ldr-cap.jpg000066400000000000000000001032201373465704200172540ustar00rootroot00000000000000JFIFHH92ExifII* (2; i%*<CanonCanon EOS 50DHH2013:06:09 22:53:40Tony O'Leary^f"'0221n    |>0000000100 <8 2013:06:09 21:34:042013:06:09 21:34:04%1x".<  T   tat &0|  F V f f]n@@@ @ @ @0@ ,@L@t`@@b17@ q:UdDNCanon EOS 50DFirmware Version 1.0.9h0h0XNOWUd P 0X17u` pv1.0.951(20)\,T0a3addd edd     ᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳQt2)p` ` ` cPPPvPPPcObbbxbbbOiiW4WEF-S55-250mm f/4-5.6 ISP0123615t\8l\  ` P m" H8 Hjj1A75 E i [, 75?K\ KPv X/p],,1 tzK\_ /KiKiKiKiKiQQQQQ~*'sl OX6pQpP \,hQV*q2 a    ^` 4' ,(&:''$$' !#$(/+.6:+9\6 ""#'+1*.74:3G5/'# (//9F7@>u<840#'%(38?/<X>49652 !!"!$)%&,-%/L4!#""#'*$&-)00A5.)$ '+)2=.30b.03/%)&(.28'2H0%(%11# !&($8  # %!#)" ""(0%*'F# $'+'7&!2 %,% - Q1DF8m9L Z,)9 n j GtzEWV8 EN P*vY%X,Pg  X ldS @`xxxxxxx68' t?\` H;8-e  QH~W0UR980100(HHJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?^&E)WlfG8G"g8M[˨#=t /TDTsM28fy2:5]%9!ip0W̉"NM;XF *xc9O[oȲ$cP.OCIl\3[zˆ\!& 9ldYHldW~iB`?ZD0,A`N *UMBW*G*w g6ʾSn`i%)ULdj 8v&PǑP,>`@ n;P9%K )8by7U1nj$I09" }pHng$6'j 2xZ{)0 aR& q)z$ ZLoh#)e]jᣑ:Ԉzi$dr'{|+ Acb1iAV2 Nk)dWe;AqR22Tp;ٶ#1P[ dy25XmPi D͞+jLRC0J҆jj1BM^n2W}=i20eO_A]KY cmTQJM%vG?/BHOdHgEdiךs[U λw0 zTƤy:)S,4OC:3lf.@M3vJٷ"H1YY":qWlo5 ?MUS֫] ;[ke. cy+E$cirzw)Ycww!U5S„ul)>lֺ6K 0+̠_%geX`VvTrR+sPɧ5]H /< 5:'e#D$2U9Y) >ZK8S0aՖrJpW uR"ȸ^Mr~|l$[ ǦjilIq֖+[%Ab:RLf%B5=ҪTȑG?w/j;q|U3T <Oj ϭވo5Hzų@@*'ß[-l{[/gX4!9aɛTy[0X+]YEtﵺ)$E[j 8ft]4V&Ҏooq&|Kc%Qs"R@'>& )$S>~ p}ڊ"pDrA-ҖWp̣$7Ltv'wq9xcK>̨l2"EcI8ҜIF }qPNC7*xpV~iǽĔyWn[FAdK#SqD^Y\9KElt ۿN*v!^;xhC\1Ut/3V!<*qUVedԊ7y|H%x8 Canon Canon EOS 50D Top-left 72 72 Inch 2013:06:09 21:34:04 Co-sited Tony O'Leary (Photographer) - [None] (Editor) JPEG compression 72 72 Inch 1/60 sec. f/5.6 Normal programme 400 Exif Version 2.21 2013:06:09 21:34:04 2013:06:09 21:34:04 Y Cb Cr - 6.00 EV (1/64 sec.) 5.00 EV (f/5.7) 0.00 EV Spot 250.0 mm 6974 bytes undefined data 00 00 00 FlashPix Version 1.0 sRGB 4752 3168 5315.436 5306.533 Inch Normal process Auto exposure Manual white balance Standard 2.2.0.0 R98 0100 C  !"$"$C!E!1A"Qa2q#BRS3b$%4&Crs1!1AQa"2q#BR ?k_C+WSTM Tcԍ'~`dZѬDSI l\ V%|4('qlqS dU.BϪ\ɤ+9D1#؊LX_hr|G|;Qؖ4q^<U+_Ԙ˳eK/:Æt$hx !{$kJj݈ :L}p٧(u%N0Gx^?IM:s1|۵^P~h60A>Uȝ<ߴ 02d$zA ` zEa/D9gb%K@mx>Q@A˓c3잃,ei{1=oG`99 Hunop&xvְ82hH\'0Z km#㤡˧.ruYn,7}pZ"Ə-5ٖ+X9zU6LE?t E1*0Gsfs|9-]XPXwdQ#"mMQG ~Pkb6 5^Z!\-s1.a!q01$Ĵm`c KJ ̷-'i8+Xs,m8whM3N{`J)1 2*1ku[pu5Q9#=cBq)ʧI!w]9oQU2T0 @ae5d ec]E{*Fi7+v^'Y4Fpi2KȡdBďNxŭo)ɢ 7?+()%24elz ކO,*:u۠;+h2Q*E񴵾'J>y.=Qp6_DZy(!g~L-f.a~ks;c0G:Y;]+c}x-\CAU$>$-z 8H t܋zY*S#\0#a4)(l9,pi\˨aSc! gFB>TuOO+&DuM%Psc>C R@$H ,OltEPyL-o%EQ,:nО=V,&V=p, ҰC煔j檴z$e%{mJ-0(n0;8S* PDAF]!0 -r|* ZM<}%Hʂ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`0000000100 <8 2013:06:09 21:36:512013:06:09 21:36:51%1x".<  T   tat &0|  F V f f]n@@@ @ @ @0@ ,@L@t`@@b17@ q:UdDNCanon EOS 50DFirmware Version 1.0.9h0h0XNPWUd P 0X17u` pv1.0.951(20)\,T0a3addd edd     ᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳsQt2)p` ` ` cPPPvPPPcObbbxbbbOiiW4WEF-S55-250mm f/4-5.6 ISP0123615t\8l\  ` P " H8 Hjj1A75 E i [, 75?K\ g gKPv X/p],,1 tzK\_ KiKiKiKiKiQQQQQ~*'sl OX6pQpP \,hQV*q2 a    ^` #)"&*!-%)#$'"!$%###$$% ""'+++0E&"""&+3(6A6F8:<-)!'008@@U@D9:<DL;)A<DCFG>=;;72 ! !$&%$*9 #"!#'.$080B59</*!&,,5<=P?C88;FL;(?;DBEE><::62 !.%%+")(#""&+)4%%:?1,(,**)"  *)< 4,hs  jE&=  7 "[`"N P*vYvT  ] lcK @`68' t?\` H;8-e  QH~W0UR980100(PHHJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?b[᎘I4eJߧJkDB68 GqMusFEm/Qߊy$9 @~/ZՂ1:d(e]CE,۾`U 'ښxbsڀ-Eiғ3J#X݊`9˖ 4 p=%/++;PM{7--Vǭg^2cݎ˸7 ;jx!3tM3,K`'{-v/Pk"`ǩ#_ ]r΍̉!@tBp*ykugp99e8=*i29jwa(#iAh3YcLR7}zHcw)#erS@ Xեћ5e*G)t$> `oRbfΝg°':ι~ZR*IJ ǡ}-lvau32椖@9=(aRF9Jh ]̯ zq+h$P+cMZtP?}-(2O+ [LI=N*7VoּwW'yU;JtP(<*t𠤇hˢ Կi-꿕 |{wXrՄLpݫ#sm E]AzJ/̼:cqW~UUU\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HDG'bi&Rr]ԤrȖ23p2ļc$KH0SGP)clނ LNp} ,, Xw tc`q]7 BFIB Sj"l!iw ǂkcN }\Ymɘۂ(z $ر 0mF*)ď& ULIxJ.FE K $51cswcEmZ;GkB*3zԭz9^b:|H#$([mnE%GZ[;ȻF0@E9OԞkJJ O=+&G)#('Sq http://ns.adobe.com/xap/1.0/ Canon Canon EOS 50D Top-left 72 72 Inch 2013:06:09 21:36:51 Co-sited Tony O'Leary (Photographer) - [None] (Editor) JPEG compression 72 72 Inch 1/60 sec. f/5.6 Normal programme 400 Exif Version 2.21 2013:06:09 21:36:51 2013:06:09 21:36:51 Y Cb Cr - 6.00 EV (1/64 sec.) 5.00 EV (f/5.7) 0.00 EV Spot 250.0 mm 6974 bytes undefined data 00 00 00 FlashPix Version 1.0 sRGB 4752 3168 5315.436 5306.533 Inch Normal process Auto exposure Manual white balance Standard 2.2.0.0 R98 0100 C  !"$"$C!J!1AQ"a#2qB3RSCbcs$%5DUr/!1A"Q2aq#$BR ?喙O>+JI@BH'Ԏ>SH%kT OօU\-xJqc>(]/>T(KtC΄1iQ-Rz5!KDŮzxe5c*?橐v@A1㩧7bX s߾VJYAjc:nJ -X*1u9>^*Ն=|_qcmQu'?:d6:2?G?D}+pIU QOM[XGzTr|CB!xl`?ѐxӱ1Ş}碈?]<#+&OtntQe`=,tېcCF")|^ TQF,Oo־dʏ'>oAT[ WLQΟR ?Vp89<N]1(U+ڏ!qXH!tS*k}:ZTӴ+ 9gDXL!8XAr$ja} UR/Ǹt#g%eMY1f;{M%QodI;#Jtϑw.bodbG|1Lo[oΙX-" chon&9ðB[YdvkFn?}} URajHl: bv;g딃G^5%q'B ,D<(g+#Ho0}Xi~vut&Hղ>ƗbA>H7*1 4CRB[?۟M>N-6?ƼOY|37(7atm$zcJ7Z[@Oo~S#6 Gk]gf86[j$+2݊Ơ UhF=ݳiP/Va>L;)v>NbP7ʥF1]izln>7oΧhiqZǚ~ J+ 6;{hoQV5RO$kȿ]6Nr5?Y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 Ax iI ʆ*gd6P,yg듌/ǩ"NJO&,a;z.,&'AZIfUsK-d@mt=眪P?Ӷ<ˎzh}W"ɚP khf;NNzlWWgWۉXf2,Ys\hZ.Uɬu mj'zݢSm&n "=Q߿Y2m# mЍPDT LQApXǕo=uW^ v{wُz0-eRb |3ƒp{WEnt2ڊ2eUyWc9ߏ!e6&i]DBݯ˽xM~^L($̐Z.\~߼D~6xIG I_F_xDM}LfєtU `:|_/1.m5*E<>9~Bc꒹zYh9h|WNl6㭚sB=s|p?\.c}(% Iӝ+Z2;.E[n=&{;QmCo  ][\ջn;k?A ݺ*v*6e[߃h8ճl1U™kxssfD+>^D eg2X/mop(0=l }jN pA]r\Zd\$|Ҍ & py}: 8̸_g ^.U_O/~nmumEÄ|~/j9C^CBӝZҝ@;Jb@?MZe9FrM؛̂&'ArI#ilul> ڭڑwgP5 H3GaGSF3;DrDfn8뎺lԞm3WTUEz{*_ Z 4kRB #QQª Ѫ\BocpKE&EFړKz&%@ / &8ED%UەY2(i+ӆh %@!B\{/i.m%lvӎ(T$> ElEl׺ dۭa^x_Ere{3樞NAB IW.ʹO b~sVx"*&G׷@z9$'H UPUWqMMEQEOJr(f 'rD^PE-bϞS/_gStVAmAD ?\NE(<=ǖ`@"hV<\e|}P 0"/2 /oI&)d@H($Jeq@ MAUQ7g8LcmH;=pkϯm; }2~=]I fIA!; U|9qqqTSTEˀjWE2<D\|@_pigpio-78/DOC/HTML/images/meter.jpg000066400000000000000000000716521373465704200170630ustar00rootroot00000000000000JFIFHH4YExifII* (2; i%*<CanonCanon EOS 50DHH2013:06:09 22:51:19Tony O'Leary^f"'0221n    |>0000000100 <2013:06:09 21:38:392013:06:09 21:38:39m%1x".<  T   tat &0|  F V f f]n@@@ @ @ @0@ ,@L@t`@@b174 mq:UD [Canon EOS 50DFirmware Version 1.0.9h-h-X[`iym@ P -U17u` pv1.0.951(20)\,T0a3addd edd     ᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳQt2)p` ` ` cPPPvPPPcObbbxbbbOiiW4iEF-S55-250mm f/4-5.6 ISP0123615t\8l\  ` P %" H8 Hjj1A75 E i [, 75?K\;7%KPv X/p],,1 tzK\Z KiKiKiKiKiQQQQQ~*'sl OX6pQpP \,hQV*q2 a    ^` .9<=9=DL9w.)@DIEIQGJTHV8:BFGGPMQVah:<<89<>@FIO_M)MR !(^u~xl"%'W;54z|s"!"'Wjondhr{YC$&'Uv@86xy}y~K{"IY^]V[cuSD!!Dfltls}or}m|4-,]]jorrwzili]Z`cgqtwDvuS_EAn x{KYz.UD`/- U R ȓ '* N P*vYo + E  | |c @`68' t?\` (F 8-e  QH~W0UR980100(HHJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?gޟpJUCJTg략)^Z4P0N>F?!Si$iv;Ӂ Cv>Ai0Ww/>c#s4g8/%":)Ϧ *jSX(VU#y78vc nkhus jER%4aLϺbA;c}i79#d_Z`R A})(<*E4"Pg)6g>€-D?w]?J=A4E3^4 -KqAsP( S l{IT%b:)ؚsOΠ%Bz^:&şSNMC9#ڽ}y*ʽq4MbU-'` w>:/?Ҁg!cS3JM$t/:Y~ qlոKDc4ӥi6)q!ݣă^4?*0E򪺞h|̰j#qF(O ~ !^XF:Wx/@1yק(`pMLc\|xJ, os]Vzª0!ONyI9AjL%QWИX @"28;Xû_ qMHLD(0cQudF\=qZR&@䊄ٴC)!Rc<|Pw 4yx\?ºM΋`J,sq;G)gh ֮vionAdRb*:zArȊAGjX$Kq-xy;{f9ZjEӢn.cWc`"D v#v7@\,!e4Mf+^1J?B?ƪG9ѫSeXm!-ݽGO^,tgfg69$=jܴj,`8zVG"?gM67r:* 4q 秵"(wc^#^j9n2pq^ ۾?簾d{PĤ(p`E< ,nRg򧓌:T~{s?KHٶar"xV5n qZ֢@ zMg㸬QcRy$jI_g)=6K(rP{ka3/ ؊D(~wzf8JY"[]!@^2k>]f (|4H#B,R(2xLe dRJ@ `Q\F/a]۬aGL!1ؿIEWT6G #֥=IbAЫo?b 5~ib8?wmI yؑ98KECY.'C,.I$y?R6p R,hԸDp΁jU,1ӽzG:,g1}5 J%k Gqj2WܧOO*uȁʿ OS#&M>S۔?ji ԡ6VRANA;*u #LCn("-K5rla>rI{cAhOҲ/!b/As?t $8?yIbH#C򑴒\W!XGtV8.ucR7Vf qh+:.^^[C$z~h)4Eǭ/SRIZhB`!=jc`$G9 ?b?:rI;ă*V?Zc{/VK!<=(q\ɟ 8fpq=YZsIgR3e7:OT)djZ~iB?:ӄv)B+>OnI=WGxHrTg*$-櫊I˹ƹWZSا&47,2.82[hŤXVhiA_?*;J˖L`d$cU/5y PJobU,(FX"JC$zD 4\,e.$9,~l198W|[m"HTpvek}&\vTR(ٱ{HmX })Fe :e#TjUOY7Εi ckg4+; ͷ,^[sZieޡ3*#Q/Nw -̡b 2=qAF? qIi/iYv)$vaҔXpNK o@)T*3=7b2!XԌ >$T&dERCzGN|]Ϸ$@C;)RKdvz84S$1IB @j#ag8 FXqLXÒQ:b$8=ޚU;( Canon Canon EOS 50D Top-left 72 72 Inch 2013:06:09 21:38:39 Co-sited Tony O'Leary (Photographer) - [None] (Editor) JPEG compression 72 72 Inch 1/60 sec. f/5.0 Normal programme 400 Exif Version 2.21 2013:06:09 21:38:39 2013:06:09 21:38:39 Y Cb Cr - 6.00 EV (1/64 sec.) 4.62 EV (f/5.0) 0.00 EV Spot 109.0 mm 6974 bytes undefined data 00 00 00 FlashPix Version 1.0 sRGB 4752 3168 5315.436 5306.533 Inch Normal process Auto exposure Manual white balance Standard 2.2.0.0 R98 0100 C  !"$"$C!R  !1A"Qa2q#B$3Rbr%5c&4CDSTstEd-1!A2aq"4Q#3B ? 9Amo` di5[)pB~рtb,1T-7cΆrZnnNx 7Wҷ3Y?ߠ:ZѨ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pG!3X~<_te-%8󻐥8mČr0ư1#:DJ{z0K= T'1>Rf]қB:5-Sj7.>,_¥=< rB#o*ᰬDHgen(铎5SNT{]5"~j%QJeބQqJgKZuμ둊gHkҕ K$$nǤvPQB$12;c'ێ49RS1퟾ ؐ)E#Tdns(KHlT0~Aqb;)i[ ֵJ՜dO遌HJ|9 W"Tn?\IpʒڊRABۏWl|gq408MiCM@qo,G߷|an e\i r;E(#v䤑&l3ϕJTt2]HSP UN}20r=G|DVE8Q}#.u6Kc)¶9JO'߅1H |4ܞ\B)j(Jrn%)zRJ+; I'*aƢMn@M(P!mRH=y8#$p1ȦYe.2Zش-:d&UA;5Rc%HQH̬a ).6QBN$?!sNi;MC2mR0HZoHz:n/rP?A;skgKp%֢6Jw(%YV 7~|Y ToRcKEEmAH;Vg>Sn} Jꍧ8 $wIXRaqRҧ;${cn((4@_pigpio-78/DOC/HTML/images/oled-2.jpg000066400000000000000000001176701373465704200170320ustar00rootroot00000000000000JFIFHH:iExifII* (2; i%*<CanonCanon EOS 50DHH2014:08:28 14:38:00Tony O'Leary^f"'d0221n    |>0000000100 # 2014:08:28 12:53:482014:08:28 12:53:48d%1x".<  T   tat &0|  F V f f]n@@@ @ @ @0@ ,@L@t`@@bdd`@dq:UDtpCanon EOS 50DFirmware Version 1.0.9u$u%Hetd0- P  Xddg` pv1.0.951(20)\,T0a3addd edd     ᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳ\&S2)p` ` ` cPPPvPPPcObbbxbbbOiiW4e0-EF100mm f/2.8 Macro USMP0123615t\8l\  ` P y" H8 Hjj1A75 E i [, 75?v .,KPv X/p],,1 tzK\ _KiKiKiKiKiQQQQQ~*'sl OX6pQpP \,hQV*q2 a    ^` $+-*"##', "*#0$ 8#' */.,&,.%!# *#"!&)+004A=HOXL"$$%(/278@GJ?DPP4*)%-8FL]NeJA@u:-BII^hfbR^cIA?815%$"%''**,508@C9'&&(-/328<=48=?$.+'-5AESDX?75[20HNL_da\LVWB::3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bɗ JE `sڛ i9<NjHrO#!(˶]FG99<{UP?zT98犔Hy 6Mvs=s9#>OX.AG.y5(fqG/$(_Ƣu;O lI' i)g\60 4RhA<+G_J +^ieGP^?(dP{i jrnAiT('Ty·0}DpIoZQ3c#&YzPw,PqƠ1czu];Olgy#a'z ێ:}f+QIl=Pv+Hνh[|v'lN̏'VL =_i\t0| W'>s6l]ߵ9Xy(x9 Canon Canon EOS 50D Top-left 72 72 Inch 2014:08:28 12:53:48 Co-sited Tony O'Leary (Photographer) - [None] (Editor) JPEG compression 72 72 Inch 1/200 sec. f/3.5 Normal programme 100 Exif Version 2.21 2014:08:28 12:53:48 2014:08:28 12:53:48 Y Cb Cr - 7.62 EV (1/197 sec.) 3.62 EV (f/3.5) 0.00 EV Spot 100.0 mm 6974 bytes undefined data 00 00 00 FlashPix Version 1.0 sRGB 4752 3168 5315.436 5306.533 Inch Normal process Auto exposure Manual white balance Standard 2.2.0.0 R98 0100 C     C   ! '8גG8AWjA<ú;Mn4 @tQ&ӎ7pUTSπj\mgJ> *Mtd̄ )Ah1{9Z7kǜ`Vު[I=IRwV{wqGscRD Xm%MGִrO]J5o4S{39?B&LXdQ<,NEʎ-qM9h .8M);E|t\/i^0 = ^cz|"vGY.lـ3:ǹ&%r\Qaorkn%2 lÞކF~1qnCqw+ q& x$48?"0Nį;ouf^u&(Əxw7LOgN jr&yA(I3fer]oɉ,ʲ؟ Qq%xaUNbXc*g+qU- (Uӧ]2U;֞cHR!>[CV1ОUs^*8%)Isaq-j:c⣍iרx$`*lWbU>/7NBđݲoQ<73$m,qib9yǘ<_Pri^U?D@p\)­a$%tb ok|w!Zmׄ$ž_w_ݣY Ƥ/zܜ lNSQ?,MBu^3B"yT;/oFFtMG5Q'4WCw#AzjM*G3$YR(߀A\b]sXbcnl&\mab2rw9-rvlC+N.*jan>K֭R6kx lAAv~7># `V6lJSpK´) I['8Tk8P8<ȑ>>rk.[۴sUc'}s$A F=ɼ{sH챍M{K?~ E=l%M8?[WjV,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2{زDƨ }+1Xb M&Gh9s stè6ktжʹ"5BZקX/DNNGƈPa{ Y :G:D ) kbw8סAP=K*A8{G7L@ )z,1ʹ v]1a;x{ BW㩌1Mf5sѭ y2`O+?gb[c0Ak9A(E7zsNN>>9pxD7Foa]v(͛r/\C8>yWȀ: ׇC.1hr1D4cW҂-ajU^4* qkE-VBC%)΃%>7S=N[Ƨ@D.XIu7474740100 } 2014:08:28 12:52:222014:08:28 12:52:22d%1x".<  T   tat &0|  F V f f]n@@@ @ @ @0@ ,@L@t`@@bdd`@dq:UD@``_Canon EOS 50DFirmware Version 1.0.9p p `_hgtd@*) P  Xddg` pv1.0.951(20)\,T0a3addd edd     ᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳ&S2)p` ` ` cPPPvPPPcObbbxbbbOiiW4g*)EF100mm f/2.8 Macro USMP0123615t\8l\  ` P " H8 Hjj1A75 E i [, 75?v KPv X/p],,1 tzK\ _KiKiKiKiKiQQQQQ~*'sl OX6pQpP \,hQV*q2 a    ^` (2EAE"&*'&*T**6>G1(% )14@G//0$"7BI-+_Tvfk7@<4IMWQPO:.<5=BBWWgwc6B!AGLXHVcgzWUV=9(,>#%LUsdh+62/EIPJFH3'}4.8>>SRer~W2= AGKVETbfxSSS;44==#G<QDG294(46=871$H5.32/<;DLQ<#69<A19?AJM0*)   +27"' "06$B qc B/ F@#PN P*vYev/J   cD @`8' t<\` TNup  QH~W0UR980100(SHHJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?3M͇ZfhL!!Lbax>NψuDbMzzVۭ'F?ZU-[)=:%mHmm]b4N̐LAQGЌkCREpi7 vPe4 .q]?5dCRq׽Rޕ}%tx=s&mQe(RdEPxKWѵq"CyV_ _uG%`E{׮I4PY@u?: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Z]/5KKҮ/ HUa۟5Gsjx_QGHihf-V\P>U uˣjjvOob\SС+3h5=4tv̋+66 \ͥj>hVb&|)EϪ,藑J IdcHJ-/mٮU>w/PIs3k@`4ko*j+m%"]CLUQdu*u=3>K[hqڈDxOIEv?_1h7ڦ-Rr,:ʉ8p3""KR(hy< @ip1ɣj3ڗdsNtȥ=drypygf_#м)[ɡIݍn돧ZK<1;d3>D+O/.-u뙼~e5x=J-غ|=YJri&4D{no9FN;Z5[Yd,j{q^N[{Gm}[D'F$$`rĊ`%qѭ3Pmv۸g&rfr?knj:om5O N=zpۍ.IAgxܾ[q&̩v~&s}+fuc?Jپռ& Mb|#G3Tzޏ%"sԏJ "|7coϵz8e.M ET؟TNM2I'mݎ=O=?i0Xœcwn$7%~eȦ]:Ul=*ojٝ:ŷ[YlWۇWMۯF V= IOEҬcM˱[/늛)),Ešcz."TJz:QhX5/RsQlx*)01N.Ɵ$:@@0#_h#U*9t+ʇZA֌е% #֗H(=h http://ns.adobe.com/xap/1.0/ Canon Canon EOS 50D Top-left 72 72 Inch 2014:08:28 12:52:22 Co-sited Tony O'Leary (Photographer) - [None] (Editor) JPEG compression 72 72 Inch 1/125 sec. f/2.8 Normal programme 800 Exif Version 2.21 2014:08:28 12:52:22 2014:08:28 12:52:22 Y Cb Cr - 7.00 EV (1/128 sec.) 3.00 EV (f/2.8) 0.00 EV Spot 100.0 mm 6974 bytes undefined data 74 74 74 FlashPix Version 1.0 sRGB 4752 3168 5315.436 5306.533 Inch Normal process Auto exposure Manual white balance Standard 2.2.0.0 R98 0100 C     C   ! SAzy^W+޹lG9x}3kg]mUk>vZLtWo N(ҥJ13MMT 8 @S:@Pjޚ28FHy'@H?&ݩVJ%w&"P t! ' ރQCфLW@eZx-sk z]2ge^V wH@N!.ǩ'>xyXΞhl᳼e[RZ $ԊFmz^Rg[9fnό)me.l_m :I~vq@TM-*U7_7}Vlѹ!k%2Q !ZuѳxϷe*[K ':73ޒpG :_iSaLttv 36f熶LOUZC9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q( XhZ_ew5٬)\w2˕]ϡK:5-W/P&kmkx:4'XCq шX/ Cf>A#')އ)+0leyqf#8sOx![۞Dv l )7\H5.-LK7y=qj̩|Q;r nI4mER;ZSx7 Eeʺ" wO:@鈃{o(]nai@>ˇ[qүw)xͬo o?Tʔhܽ.Qi6{(A1O7f<}san`j@pwN "t-R3g1oq#(ӉϵIWwp Qᗕj*yY}14DL (Bpusm2ai| @e 9M\_}VY}Bq* `6fA5eͨhBfm傦 UNn0oNnq8l;͡SHyC[ߜ$IӬC\&O^`:CX Y&\R T~n ad43cr+{::ȨiYhd l}- `lM\>1Ň=⣠÷-ŕ t~`6z]nMaG bdjf0Cr>uEqqɫ]pigpio-78/DOC/HTML/images/pigpio-logo.gif000066400000000000000000000005671373465704200201560ustar00rootroot00000000000000GIF89a@@ p! ,@@0I8ͻ`(dihzlp,)N'/% H8"z!$GaШDZUޯ H Vm@~fx{ie{yw}~~ozrtkm  S;5(ad b^`[ 믭¾򤯙\%W1bC`2j >th0 %=01l)EN 5S2'dpM3hҪ-йڸނ ѣH*]ʴӧ*;pigpio-78/DOC/HTML/images/pins.jpg000066400000000000000000001234441373465704200167150ustar00rootroot00000000000000JFIFHHCC!  I! 1"A#2Q a$3Bq%b&CR5r'4cU!1AQ"aq2#B$DRr%5CSb346Ts&c7dt ?x.߭%{[}T6,J5Z&,i<}4PR)|Ă2&ݔSզzM0Y\_<)q?ZԦq0Y=H#1׶xH1S}MZbKM*kTSnJ"\Z9Xʈ όW}Y6旤)?Z:BZk%$`䏞: B-~q+~<lk˴ iZe,4eѐT?#'I#?o.8C(Au6 ŭ*ZSF0~ۨna3dUùm0bD4n/&j\+uI nn<{ap)σ<2?nzhtQmKSOuF! ˥[w\Rfc*R ¦nu|IW>Q?Q ҋm]Zw딵% %%BCW8ƒkUbFm-OLGB7RjC\ecP%.M̯+TXQﵸ 9;oҥeVz"U6ڠ-se|@QF3$AM޾a5cP 21jT$RIm"'Ĩe-y154ܳmVkmU۴ĥ9P(vZ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HH2014:08:28 14:34:16Tony O'Leary^f"'0221n    |>0000000100 } 2014:08:28 12:55:132014:08:28 12:55:13d%1x".<  T   tat &0|  F V f f]n@@@ @ @ @0@ ,@L@t`@@bdd`@dq:UDP``lCanon EOS 50DFirmware Version 1.0.9q p ]lletd0- P  Xddg` pv1.0.951(20)\,T0a3addd edd     ᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳ&S2)p` ` ` cPPPvPPPcObbbxbbbOiiW4e0-EF100mm f/2.8 Macro USMP0123615t\8l\  ` P " H8 Hjj1A75 E i [, 75?v Bm+O+KPv X/p],,1 tzK\ _KiKiKiKiKiQQQQQ~*'sl OX6pQpP \,hQV*q2 a    ^` .!! -B>Ln='$# $%<J?=/3.@# &3<KL@OZP4-%"$2?OSWOIThbIEW75@<:A>TvnnD"F9;F@=GGoqkNUKt=9<HBNdsqW'[NGLgxx_87@96<9MlbsX7N=>F>:CCk~haHLAND>?H@Lbpl{MiWMNgoYS2/4.,0-:PHSyE(@2280,20ITF@,/)@6117/6DLXUDLNF.K?88FVgihXKPYR;;Er W-:)5L|w0&<6pj@\_.*IKJ D7: &sN P*vY$7Z+Q,(  dj @`99999998' t=\` p  QH~W0UR980100(HHJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?E[D'5@6R&5d^N1ҫ= dklk*qy;Q5P&zxfvD=9dm j&!+Oo$T]L+sXp;9@9$+:Ƥi_0~ i|՝+)E(9sN@J9Wr;f2ܒsׁT~W\ԠR dgtmOVzP亓OaDnAq:,3$P|{#NO02C)ɨR*3犗pnzZb/=ۙH&yϸ7ٓkcsLe c=9 ;m{e <Ώ850}o8 I`wsor_[ #3H3 1pNPmֲ_i+:qZr #Y|89sf\"UkK uF6f9=h%dYݚC&FD)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'r:%}|7MhG,HZҜ\w"ZvG +\98S4"!}y<3D+1^_TpC|Ĝ֯]Du& ܬJHHg ,17F:obqIV!3x<_\#c!ބlQI݅V"D #'9T/]ZE,v8>ՙB6GTJHrNG.O[ 5"9 $W4T=5vq3.bOP} -hU~afVOn!wqPY꺵Gg2C-ԓZSiqoqy,s>hϙA+OGUxR{Ti-rZ,}N=n`=i偹W<ӗ}1brHH$8㊏~bG][;`2ٓߊ dHPM66w2i˷#Lc$T@Y!4#pqNIPr=i8ڀ#7T1rxF}!F'ğ8 =F1<*2 Bɩ< D(۸S.jds(!>"rqަU@;6Ojl& 23R4Wy5#4lmG@@'X9ץ$j0~nHeaxOA3y皓z<: ߙp8 (Ups !& O=)n1@ /#Z+y3 A9DǾ@ ')BRd'8{T$hUCd$Â71GDN:ǙM B:lTmf yR8 \z4l8z :z1#N9 ̜piXsL$S6HPvt1>r Canon Canon EOS 50D Top-left 72 72 Inch 2014:08:28 12:55:13 Co-sited Tony O'Leary (Photographer) - [None] (Editor) JPEG compression 72 72 Inch 1/125 sec. f/2.8 Normal programme 640 Exif Version 2.21 2014:08:28 12:55:13 2014:08:28 12:55:13 Y Cb Cr - 7.00 EV (1/128 sec.) 3.00 EV (f/2.8) 0.00 EV Spot 100.0 mm 6974 bytes undefined data 00 00 00 FlashPix Version 1.0 sRGB 4752 3168 5315.436 5306.533 Inch Normal process Auto exposure Manual white balance Standard 2.2.0.0 R98 0100 C     C   ! ~|~b Hʺ2p 喬F5)HB6a"@3&;hJ6KfZK)6̇RA`h$6`Tg" էf$lɒ<@d4{Zl^³,`HWQPLQōlɐxJ&]Z7 uD)ybf7a\0L Jv/%%:QӚk $4@1gWb+!hH&RGs[kְ&2H6N3W*B#Rʹe:a^)A6YYfMAO]Yuf5rIύv}S(:b<*~*tL玕noROoWV*@%7yCʽ[vʭ.ɏ|zzg{rsi֢ͧ5Jg|q'%^LÞ]p Ǻ39c3Y>mF.w.Ӏ_?d|y3z]9޾*K˽ Y:ZuY2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%]1)YyBȰi9R1uFjq=x͊G/͑g4%B*_(IA<@̉-o ߠ7ru#y0?ҝNbp>%RtT9IoXV;Ԉn]x_N:ӺbCU)"Y {*MP8@dBv+ 1ǵHyj^{ [ȹ𭌙1!>~FSu>(mK^1sm$$h2s8\Wrlҧ^ yO#xyQ}nO'Uwg1E!sZ+=ՊA!6n="&=jwqI)<V .2cU9,km%$AU#*UA2p1%K63ܝ]pU>a$VeL75"e 8>rcy%aG}x:ԱC="!7,͸a [8XOʙ48,t$lDum_{]_^ށcm&I7GzPd.x1qۢz)`yxl{`^5GT\$և/ ySQz^Rj)>n&f,툣`{4j2r}NOSJC 0U~]xS={5?4hW U$޵5s>( 5ҫ>* :Ow)\'wavC\I4`px>r }s oV>jyMDiӵyo̫>1شf(cڼwntd%C`[85FdyX'╍p*ʎՋ[qu?yVk_7b"h!ҵjTF\si hY&3㡬ԲĬWEY]B)v4VS^٠ .( 2o}ܖfFpU=rii ;3Siqf%T>9cE*\ {ШT+'YdLJ#> aҴr,4DV=b}_5V!@1ҡE];b}YcvVE˾។zT2KtH}U #(6FZxJЈoU`;s|EOg#QUvw[.I$zHҫz md1抈4VeWa'o\{p7(If Y@+BJzE{Ys~ͣTdHR8>b#bTy)%7@4QVHvCb9䗇mQE#rܱrO1*XgF9XvJ(9ŸQqfdl1]\zf/>WoLk{m?X=(B{i do ~?袼9?KMWbsEKsQP3 [http://ns.adobe.com/xap/1.0/ OLYMPUS DIGITAL CAMERA OLYMPUS IMAGING CORP. VR340,D750 Top-left 314 314 Inch Version 1.0 2013:06:08 14:40:27 Co-sited 546 bytes undefined data JPEG compression 72 72 Inch 1/15 sec. f/5.8 Normal programme 200 Exif Version 2.3 2013:06:08 14:40:27 2013:06:08 14:40:27 Y Cb Cr - 0.00 EV 3.17 EV (f/3.0) Centre-weighted average Unknown 42.0 mm 132 bytes undefined data FlashPix Version 1.0 sRGB 4608 3456 DSC Normal process Auto exposure Auto white balance 0.00 240 Standard Low gain up Normal Normal Normal R98 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U訿~;hI:I)>uyn\ϹŰf̵U\"*|5nY-M eEKR!]]"8B{)RDQ%LU\J6-GQ>k[j_q ‰H;˄д>^%B ]*-m|_"Uΰ)0UTvKmn' .N;E?+|dֲQ' Q5=0xU.һ4PeZQR2UlDW|?Q~Xm3(;pigpio-78/DOC/HTML/images/sidebar.gif000066400000000000000000000000641373465704200173320ustar00rootroot00000000000000GIF89a!Mm,,!›Pҋ'}T;pigpio-78/DOC/HTML/images/son-fritz.png000066400000000000000000002104331373465704200176760ustar00rootroot00000000000000PNG  IHDRX>bKGD pHYs))UtIME G- IDATx]wU;mK]`#E&=&1$3DFDaE } la{zmBۅռνwΜ6g (E=M(%RVRVRJQ X)JQ X)J+E)`(E)`(RVRVRJQ X)JQ X)J+E)`(E)`(RVRVRJQ X)JQ X)J+E)`(E)`(RVRVRJя _ktW)AW{XMt$E oć a}r:,@ˢJU-rz^VO $`3pEgIDzkSJⲸs]`Ӳ=<_"*^C&iY>wČue_C/^g 8rY]%E6Ǿz@(qZ'&nXyS^Ꮗ9kl&$9xB?aQ˟vOS `??uX`zE(RǔE\gPQ/B ݌yAoU}1 V`NJ69s2]F7b+Ubި6XViquH%*rl4Ѯ1i HpmF W=6k6q\<2+v}h4[)ߑb[FA?'&`mH۱?F0kȴ9gr QJX #v޺lmX PAn?5P:hB!G!Լqߦmk*7Dz;vvşv}G?}D Q;",$ɢ3O?}ćξsos'{}o9A -<MI>޾4z)a?Z}?bVͫZx}W mH#(-!(K͡,{οIh.} ).8w2QS'*FeU/{>cV\/͟w넫L.Ywv{>e;n!n{Mϻz.mp)OW豯k 6kQfCv0  *Cܦط󞿲ovݿ{ $+(uOţU&/wgq^b4!{W |_VYO,#\Yx77ݘK%5 o; 7OZ%o/6[t>ھKo[Ro}ў0UBF7ܦu6 XX^mG4?}k>6vnyq,FQQ9;<`'O~K=48I.T B2@)%D=duuU:FW.Vr(STϲeDAgq_nrEuFDaVhVx97:!ۚǭ:sLw2Z򒲚&oS,cRRJ z?F^Vك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jjjj۶mn# ;+/\Vz~]Y%Ha{tt4:7q-|>hgG?:|#mHy'V\rʻp`a]Y}**-ߟ kQr;v8!9p__v4/s뭷q+gϞ>$W_}OOOOOO//9&!}ueuYueUĬ= ;O?(/iGR_ܳy̙+[ަ;sϟ韾['OdʕU'??whӦM_֮]X%~ueuYue`@#0` @ tqF!'@IENDB`pigpio-78/DOC/HTML/images/son-photo.jpg000066400000000000000000002103031373465704200176610ustar00rootroot00000000000000JFIFHH>ExifII* (2; i%*<CanonCanon EOS 50DHH2013:06:10 15:16:11Tony O'Leary^f"'0221n    |>5454540100x <2013:06:10 13:48:382013:06:10 13:48:38{%1x".<  T   tat &0|  F V f f]n@@@ @ @ @0@ ,@L@t`@@b178 {q:U)D$hCanon EOS 50DFirmware Version 1.0.9h.h-Xhadt{) P .V17u` pv1.0.951(20)\,T0a3addd edd     ᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳ6ٵQ"t2)p` ` ` cPPPvPPPcObbbxbbbOiiW4dEF-S55-250mm f/4-5.6 ISP0123615t\8l\  ` P " H8 Hjj1A75 E i [, 75?K\KK sKPv X/p],,1 tzK\_ KiKiKiKiKiQQQQQ~*'sl OX6pQpP \,hQV*q2 a    ^`   !>& ' '''&&$"-,5?D1%(***)'P.'E #++6"$%'',,;:8B7*763021:rI0C!"9MJJED?<\QWb6%(mKMPPMKG^Hw/TeezKMKMN[Znpmx~(333/1/4_8-3!"8KJIDB=8JDOYW8%(jJMPOLHBL=d(YjhzHKJKKSRgc^fP$*(%""!&I/).853/-(%9024M0 "T56651.+s7)?GSQ\3421173;;8:?<Q = ,I  B2 )_uolu s(aRKN P*vY"  z {cU @`68' t?\` i*  8-e  QH~W0UR980100(7HHJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZ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MFҗp6h@nA kie:4qxA4)p9CQ\[T型\X}[ex7y}BKđXhӛo{E{xV$ @^x(ۣ/]%ߢ*0Q]h:ۑLSQE} \_#'B[?̙˹cjΩ#ŧJp?Vc#.U[iVkޥH[$1(n;E[`AXP|w/-BU_66 drG3qW <z(yP,t[Jܣ1* =9Osk.I]INu$2؅54vfOsEW/&kK/9E|YFzQE? http://ns.adobe.com/xap/1.0/ Canon Canon EOS 50D Top-left 72 72 Inch 2013:06:10 13:48:38 Co-sited Tony O'Leary (Photographer) - [None] (Editor) JPEG compression 72 72 Inch 1/60 sec. f/5.0 Normal programme 400 Exif Version 2.21 2013:06:10 13:48:38 2013:06:10 13:48:38 Y Cb Cr - 6.00 EV (1/64 sec.) 4.62 EV (f/5.0) 0.00 EV Spot 123.0 mm 6974 bytes undefined data 54 54 54 FlashPix Version 1.0 sRGB 4752 3168 5315.436 5306.533 Inch Normal process Auto exposure Manual white balance Standard 2.2.0.0 R98 0100 C  !"$"$Cx! s#HFИw笭O8ԹؼSõ+82 aDު܄_]|3G;U$@ $^f'8  ci=L+֣ng7$^BxY#S)CjF7SN1t2dɂ$`&67W|U]'sՏY*-S p;pϦ@`̢U"sL\I P"䟣^H9Y.q5O08 hVAgHѕ-Fh[J: ɠB`4$9di$F )vofu s7;Rς2U5ۉk˙D9q6s)Ym<:ܞOa`@2@('@ @b3%ӷ׭F,ÄέYJ4LʯLӉJir(i%zlb L99 B A2a 0@F3]>:4z8SDynjQ-4U'rw:zGZ71CY `H$O" ݈f]YUQb FDDjo4MIyeSw˪TR+{`@)Ab) f 8| 0Djt(b^/Rg(])7z5+r%s $d)l`  P;xߩ>1+lj^Hun&wNլꓓ!ZjV=*S:gyNI D@ HoڽBxѭN\ Msg#EGV]kC# D?yQysR)BRas`$g)Ú-_L~`}9= 7zy'yX;:h]N={TnCfRMKztXH2Xl dp&`0|F5gвyY uZYX;]5׃Oԩs 2[3:BT5,޿}q11W %QFDX`r Y1E}}^:G:Jwscywڞj T[j*~B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{7j/>cQ0HSblaju5")LPѴEf|N"i eQCGPv8lưyQR㹊.THc w󈽛If*aA!mEQVAO5 K"tr"QnycPDdH(sPDrdL{`*&`'1鍓XV800PlWk-?[lƭ#׈Ҹ<=W1a?h f){>em67tn3F! @lJM@7a< ㈂xR6~>򅪫ݻ66 -^Ⴚ[CM*ъ3\ }qW&wX[?r]0.?SnG(OS,3E(o]ʅTQ7(4~%`>/5F>#(AjnQO2د< 7$JJdI†׵+,31*bTZP ! /0ŊqX.- "ECSbeWq/#|p*aI2iL斗ݨq29|Opigpio-78/DOC/HTML/images/son-wave-1.png000066400000000000000000000104721373465704200176410ustar00rootroot00000000000000PNG  IHDRXd#tbKGD pHYs  tIME %5XIDATxyTS׾0@P \ĩ*wZgePD,*vYUEeT^a1885D-M\NΗ}rr](:PHBG A |_ۂfYz..3B54{khjUWWN-v@eϞd=}vGG|$HbJJJ׬^mee9~xB!+p-x<---,jN_Z \g0: "<~DBŽ+>ppp033333!0 mmm)SXXD=lkkꠠ|q¢…b(r:88lټK%% O-44T>;""~Ko?_T{hXI\m][;UnݺedlbieakA<<<~((- WaQuicccuuyVNԳ|OO/ FGo&mf3e$źOR*++}O25*j#LL[;i))⽶O?7W'ۻ՘j{]A/XO(/~~+?Z9~Ki<ŋ ٍ3RXT쬩Iuvsu=~_%AABa+MMM&/g͞ZTlPJJL\..OeÃㅆdg$&%\瘚d566!WGܩM5kVM!cR$FkKKg+)1!=q}r?Lb|,?ɓ']]]fffÿ{cƼx۽gOmm'O^LrI76"e֊ .߇B&&{%:t׷6f$HaG{>[(3cc^q#33+2"B9\"8$4#KSSSi"!FǎLrF=p##C&SNH=*m F__0:;:===ϟٳg?{رc9T7]>_Gj'455?qRܮㅆwvvfل555zOwvv7'de640d2t%2H%%%c66y_رc,-Sy<O]cT E"iݺ/@YYsb6jxڍQQs9y8!|Ĥ.ssÇ{RNhn_U77˗KN*nxN℣ڵkJeeσrP@ "-{Ra8ΤI ,,*Eg>6CN=O}.(ʟvuukm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<EKr[ ] X!ܘB!A @ B!A @ B!A eMߛoPIENDB`pigpio-78/DOC/HTML/images/son-wave-3.png000066400000000000000000000112251373465704200176400ustar00rootroot00000000000000PNG  IHDRXd#tbKGD pHYs  tIME  "IDATxyTW` l*" >E Z([D-V@APYdu.A+.V"K}AZ5 4,i| ѣGxԏ<_;vn_?i79|gΞŒu]k֮maԢ788vG=ΟK3|c{\7n042mapqq9gLj((O:?ϰ/^t@ 8}t[[!x^T''/B 455N}b,E==/^T__ODԊDGu>z$aڵtRN`wÞ,I~cceyP< Ǐ307uH[[{pB\lOO[I~QE&r5~̣GZZZLMM~TT?NMܸѣG%ӑܜ>hcc.ZB5_F7&&tرݽH7MMz܎:3Λgdddggиvm!QTTt|?oLLL,{# !uuuLbAݺu8CC55u&$Z ־V|bisW_$={sO<ٷo_NvUQRR䔐a+D10Я ]g.A@;;;.KQUU]ӧ55S!Z57PSSc*(*AHQPP|reNnή]544,FNNJ}ڌq0d F ѕ pw޽{}}}7?jhhhiiBKKK !o60x{BCC}|||||>csNuu@N566 5q~Ќ )}߼yѣGsss% ,裰.^ĉ ttt/[lʔ)q)9d^:~ϟK蘘Oٻwoll7!$66Wz'NZZZBnjs}BÇWZrlv@@SkاϟBݠihhpss02Ej&'kO~l6[ƻoN*;ba0X,l.̛͚5k%%%! Mu(u"כ.\rs]n0̹sΝ; '!Pu{'$/&;raa0X,akk+!.FW"(BAFPM!$09 7z_|aÐb( iWᵴ`H!b=)w:tXXXٳgffZ[[>wII < Aywfee]tI2 ݻB._|ҥژ;GuCIKK۲e˄ FFFjjjAAA0+++&&>|2Bkjj,,,zlOPUUw644R  3ܹs9NMM rK,|rkkkEEEPPPܢ###gΜ~]?J秭ZQQjժ$222""bӧGFF@zzzzzzݞQ]]=----- r6#ZY>s0AN+^TA @dxv BUUU^׹B={/PZ GX4CP B:Ԑ0XIkTMM-%%eԨQ:::txpgll7@r#Gӓ_ueeeaaaQQѹs ;?hjj*#r߾}?%DGG=ٲȈmhhN -\n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M.'43|OFjRGg͖1'*%z._6,yu˜bܖuTPI'+WH-grwn\3nc*ɳ#}_g$c%5vnFcSF[95wusR{qURWT% ICp+"<цfS xk*% .p{Z]Y6lQ0S8\imFs#]Df[DtqOGE#jHOɜYN$-Gg#oA T; 'bg0^WAvv9\$Zޯg#Y7q:{q]UJ.W ?54dr4ߪ!D[<YIݧBŁf]<Z{OXBukqǥ&3Lm,jWtȷj23/ǁV5X`|o\A4HmJ̒1Ϲ2͡@JP'< dۻ4$f3'LGe}Me=F[lH7|87* 4Q HU)5ЂK ~OԚ Ff'?Ȣ\PJ<q1H u Hn:+M0/\˶Ԝ]L*{[IWwAD9K,r6֌U#mmwqR{aUJxЛUcԱ&+Q%J)3Ka—5V{[o-Y> *m,gB81ZW-Sm \H ՙ`_)e?JIb[NrչFibZh.o$b>BRQb%9IY4M&i`&4f4NN 9@iB; OLYMPUS DIGITAL CAMERA OLYMPUS IMAGING CORP. VR340,D750 Top-left 314 314 Inch Version 1.0 2014:08:28 08:00:48 Co-sited 546 bytes undefined data JPEG compression 72 72 Inch OLYMPUS DIGITAL CAMERA OLYMPUS IMAGING CORP. VR340,D750 Top-left 314 314 Inch GIMP 2.8.10 2014:08:28 08:50:35 Co-sited 546 bytes undefined data JPEG compression 72 72 Inch 1/30 sec. f/3.0 Normal programme 200 Exif Version 2.3 2014:08:28 08:00:48 2014:08:28 08:00:48 Y Cb Cr - 0.00 EV 3.17 EV (f/3.0) Centre-weighted average Unknown 4.2 mm 132 bytes undefined data FlashPix Version 1.0 sRGB 750 500 DSC Normal process Auto exposure Auto white balance 0.00 24 Standard Low gain up Normal Normal Normal R98 0100 C     C   ! [ZٌhvDcLErL@<=wjV8k*2lH嚤W5"p 531;TfTKNjErN!.ͳI5 $S̗.QSp x[*Ymks5I\y\;^׷fb p zE j%qSc߃f~7Ɍ}> û,a2躪WK.1F|mV>co AHYH6ЗM<_@a|ʎ4x&2Ձ X?{e@뉠mYVr؝֧m#^3-х d?m"M[yt0B4ڋvs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#jQ-OhEw}]Hln IX^uCf3-b80gb{H.c CBP 'a!ҟMUMHW00eޓ2HٸF60|xz5|Fkm.().e!9Vʎ7H;mkwAoO<(i ئZODE"wPՕ @8^|gdm|Ԩ),%\:S%jڪ@8c=3߹h==`R*;zci2IU-[k U3BPruz諱Q-RyyBk Y2x(J$mjnS&x$-z% JҪpC q1GZ.CD$ 1B)|8$;#%n&H@J$ ;o {pi?\ᣂ;j-U O{)5n vsyz郰E%1:(9'&#/T[1ꇨZwt ;VaUIo:eSf4j#u*J.4T cݰJ!EM"Ğ[/| (iFǪ=wC)ˉduSY =Q9?τ TVPkTo!ydT2Vqc{[-b>%b)LT`cIROQ!jH!* 8.Q܇|=/[m! 6m,{Em|0zLUmrBHPiLnBN0یt4e8Xp|w ?؈w!4s!9J[CKip$(Hg4:İ4S(VO`* ({u+u;qъ!DY$x1:t5r#<LqQX]‚ZBQ;3=pRLMP̛$:ڙl:YhRN)^; */CHp| $"R9q1X+J5!3=px%JRlCm)8Jㅕt0 hؘCM[ %;sE%#vL)Ɗ4 G'=ێ8*&g4ߖIZS@8dǏRm'??׎$".EqH^(cmHPrYCiB:%+ʒJH?8QzCcFj\6Է Cm翞ۏc\p39b`p ?_pigpio-78/DOC/HTML/scripts/000077500000000000000000000000001373465704200154545ustar00rootroot00000000000000pigpio-78/DOC/HTML/scripts/index.css000066400000000000000000000016611373465704200173010ustar00rootroot00000000000000body { font-size: 100%; font-family: Arial, Helvetica, sans-serif; color: #101010; margin-left: 1%; margin-right: 10%; } h1 {font-size: 2.4em; color: #5d9dce; font-weight: bold;} h2 {font-size: 1.8em; color: #5d9dce; font-weight: bold;} h3 {font-size: 1.4em; color: #5d9dce; font-weight: bold;} h4 {font-size: 1.2em; color: #5d9dce;} h5 {font-size: 1.0em; color: #5d9dce;} h6 {font-size: 0.8em; color: #5d9dce;} code {display:block;font-size:80%; font-family: "Courier New", Courier, monospace; background-color:#D0D0D0;} pre {font-size:80%; font-family: Courier; background-color:#D0D020;} table.ev { border: 3px solid green; } td.ev1 { width: 200px; border: 1px solid green; } td.ev2 { border: 1px solid green; } a.l1:link,a.l1:visited { display:block; font-weight:bold; color:#FFFFFF; background-color:#98bf21; width:120px; text-align:center; padding:4px; text-decoration:none; } a.l1:hover,a.l1:active { background-color:#7A991A; } pigpio-78/DOC/HTML/scripts/standard.css000066400000000000000000000001441373465704200177650ustar00rootroot00000000000000html { height: 100% } body { height: 100%; margin: 0px; padding: 0px } #map_canvas { height: 100% } pigpio-78/DOC/MAN/000077500000000000000000000000001373465704200136345ustar00rootroot00000000000000pigpio-78/DOC/MAN/README000066400000000000000000000000461373465704200145140ustar00rootroot00000000000000Placeholder directory for man pages. pigpio-78/DOC/README000066400000000000000000000007241373465704200141040ustar00rootroot00000000000000bin various scripts to generate man pages and HTML dbase defines the structure of the web documentation HTML auto generated html web site makedoc run to regenerate documentation MAN auto generated man pages src/defs edit to change pigs, pigpiod, pig2vcd, and examples docs src/html edit to change the fairly invariant web pages DO NOT ADD auto generated HTML to this directory tmp stores temporary files, may be deleted pigpio-78/DOC/bin/000077500000000000000000000000001373465704200137715ustar00rootroot00000000000000pigpio-78/DOC/bin/backup.sh000077500000000000000000000001171373465704200155740ustar00rootroot00000000000000#!/bin/bash # backup database cp dbase/pigpio.sqlite dbase/pigpio.sqlite.bak pigpio-78/DOC/bin/body.py000077500000000000000000000004201373465704200152770ustar00rootroot00000000000000#!/usr/bin/env python3 import glob for fn in glob.glob("src/html/*.html"): f = open(fn) h = f.read() f.close() s1,d1,e1=h.partition("") s2,d2,e2=e1.partition("") f = open("tmp/body/" + fn[9:-5] + ".body", "w") f.write(s2) f.close() pigpio-78/DOC/bin/build_site.py000077500000000000000000000004401373465704200164670ustar00rootroot00000000000000#!/usr/bin/env python3 import os import sqlite3 db=sqlite3.connect("dbase/pigpio.sqlite") c=db.cursor() c.execute("select file_name from pigpio") names = c.fetchall() for n in names: os.system("bin/html.py {0} >HTML/{0}.html".format(n[0])) print(n[0]) c.close() db.close() pigpio-78/DOC/bin/cmakdoc.py000077500000000000000000000275301373465704200157560ustar00rootroot00000000000000#!/usr/bin/env python3 import sys pigpio_m1=""" .\" Process this file with .\" groff -man -Tascii pigpio.3 .\" .TH pigpio 3 2012-2020 Linux "pigpio archive" .SH NAME pigpio - A C library to manipulate the Pi's GPIO.\n .SH SYNOPSIS\n #include \n gcc -Wall -pthread -o prog prog.c -lpigpio -lrt\n sudo ./prog .SH DESCRIPTION\n """ pigpiod_if_m1=""" .\" Process this file with .\" groff -man -Tascii pigpiod_if.3 .\" .TH pigpiod_if 3 2012-2020 Linux "pigpio archive" .SH NAME pigpiod_if - A C library to interface to the pigpio daemon.\n .SH SYNOPSIS\n #include \n gcc -Wall -pthread -o prog prog.c -lpigpiod_if -lrt\n ./prog .SH DESCRIPTION\n """ pigpiod_if2_m1=""" .\" Process this file with .\" groff -man -Tascii pigpiod_if2.3 .\" .TH pigpiod_if2 3 2012-2020 Linux "pigpio archive" .SH NAME pigpiod_if2 - A C library to interface to the pigpio daemon.\n .SH SYNOPSIS\n #include \n gcc -Wall -pthread -o prog prog.c -lpigpiod_if2 -lrt\n ./prog .SH DESCRIPTION\n """ pigpiod_m1=""" .\" Process this file with .\" groff -man -Tascii pigpiod.1 .\" .TH pigpiod 1 2012-2020 Linux "pigpio archive" .SH NAME pigpiod - A utility to start the pigpio library as a daemon.\n .SH SYNOPSIS\n sudo pigpiod [OPTION]... .SH DESCRIPTION\n """ pig2vcd_m1=""" .\" Process this file with .\" groff -man -Tascii pig2vcd.1 .\" .TH pig2vcd 1 2012-2020 Linux "pigpio archive" .SH NAME pig2vd - A utility to convert pigpio notifications to VCD.\n .SH SYNOPSIS\n pig2vcd file.VCD .SH DESCRIPTION\n """ pigpio_m2=""" .SH SEE ALSO\n pigpiod(1), pig2vcd(1), pigs(1), pigpiod_if(3), pigpiod_if2(3) .SH AUTHOR\n joan@abyz.me.uk """ pigpiod_if_m2=""" .SH SEE ALSO\n pigpiod(1), pig2vcd(1), pigs(1), pigpio(3), pigpiod_if2(3) .SH AUTHOR\n joan@abyz.me.uk """ pigpiod_if2_m2=""" .SH SEE ALSO\n pigpiod(1), pig2vcd(1), pigs(1), pigpio(3), pigpiod_if(3) .SH AUTHOR\n joan@abyz.me.uk """ pigpiod_m2=""" .SH SEE ALSO\n pig2vcd(1), pigs(1), pigpio(3), pigpiod_if(3), pigpiod_if2(3) .SH AUTHOR\n joan@abyz.me.uk """ pig2vcd_m2=""" .SH SEE ALSO\n pigpiod(1), pigs(1), pigpio(3), pigpiod_if(3), pigpiod_if2(3) .SH AUTHOR\n joan@abyz.me.uk """ def emit(s): sys.stdout.write(s) def get_line(f): line = f.readline() if man: line = line.replace(" \n", "\n.br\n") else: line = line.replace("<", "<") line = line.replace(">", ">") line = line.replace(" \n", "
    \n") return line def nostar(k): if k[0] == "*": return k[1:] else: return k NONE =0 MAN =1 TEXT =2 OVERVIEW=4 FUNC =5 DESC =6 OPT =7 PARAMS =8 DEFS =9 param_used = [] param_defd = [] param_refd = [] at = NONE in_code = False in_pard = False in_table = False if len(sys.argv) > 2: obj = sys.argv[1] fn = sys.argv[2] if len(sys.argv) > 3: man = True else: man = False else: exit("bad args, need page file [man]") try: f = open(fn, "r") except: exit("aborting, can't open {}".format(fn)) if man: if obj == "pigpio": emit(pigpio_m1) elif obj == "pigpiod_if": emit(pigpiod_if_m1) elif obj == "pigpiod_if2": emit(pigpiod_if2_m1) elif obj == "pigpiod": emit(pigpiod_m1) elif obj == "pig2vcd": emit(pig2vcd_m1) emit("\n.ad l\n") emit("\n.nh\n") while True: line = get_line(f) if line == "": for p in param_used: if p not in param_defd: sys.stderr.write("{} used but not defined.\n".format(p)) for p in param_defd: if p not in param_used and p not in param_refd: sys.stderr.write("{} defined but not used.\n".format(p)) break if line == "/*MAN\n": at = MAN continue elif line == "MAN*/\n": at = NONE continue if line == "/*TEXT\n": at = TEXT continue elif line == "TEXT*/\n": at = NONE continue elif line == "/*OVERVIEW\n": if man: emit("\n.SH OVERVIEW\n") else: emit("

    OVERVIEW

    ") emit( "") at = OVERVIEW continue elif line == "OVERVIEW*/\n": if man: emit(".SH FUNCTIONS\n") else: emit("
    ") emit("

    FUNCTIONS

    ") at = NONE elif line == "/*F*/\n": in_code = False fdef="" line = get_line(f) at = FUNC elif line == "/*D\n": # Function definition should be complete. fdef = fdef.replace("\n", " ") while fdef.find(" ") != -1: fdef = fdef.replace(" ", " ") fdef = fdef.replace("( ", "(") (rf, sep1, end1) = fdef.partition("(") (parl, sep2, end2) = end1.partition(")") tps = parl.split(",") rf = rf.split(" ") ret = rf[0] func = rf[1] if ret not in param_used: param_used.append(ret) if man: t = "\\fB" + ret + " " + func + "(" + parl + ")\\fP" emit("\n.IP \"{}\"\n.IP \"\" 4\n".format(t)) else: emit("

    {} {}". format(nostar(func), ret, ret,func)) emit("(") x = 0 for tp in tps: tp = tp.strip() (t, sep3, p) = tp.partition(" ") t = t.strip() p = p.strip() if (p != ""): if p not in param_used: param_used.append(p) if t not in param_used: param_used.append(t) if x > 0: if man: pass else: emit(", ") x += 1 if man: pass else: emit("{} {}". format(t, t, p, p)) else: if man: pass else: emit("{}".format(t)) if man: pass else: emit(")

    \n") line = get_line(f) at = DESC elif line == "D*/\n": at = NONE elif line == "/*O\n": if man: emit(".SH OPTIONS\n") else: emit("") at = OPT continue elif line == "O*/\n": if man: pass else: emit("
    ") at = NONE continue elif line == "/*PARAMS\n": last_par = "*" if man: emit(".SH PARAMETERS\n") else: emit("

    PARAMETERS

    ") at = PARAMS continue elif line == "PARAMS*/\n": at = NONE elif line.startswith("/*DEF_S "): title = line[8:-3] in_code = True if man: emit(".SH {}\n".format(title)) emit("\n.EX\n") else: emit("

    {}

    ".format(title)) emit("") at = DEFS continue elif line == "/*DEF_E*/\n": in_code = False if man: emit("\n.EE\n") else: emit("") at = NONE continue if at != NONE and at != OVERVIEW: if line.find("@") != -1: if not in_table: in_table = True if man: pass else: emit("") if man: line = line.replace("@", " ") emit(line) # emit("\n.br\n") emit(".br\n") else: emit("") cols = line.split("@") for col in cols: emit("".format(col.strip())) emit("") continue else: if in_table: in_table = False if man: pass else: emit("
    {}
    ") if line == "...\n" or line == ". .\n": if in_code: in_code = False if man: emit("\n.EE\n") else: emit("") else: in_code = True if line == "...\n": if man: emit("\\fBExample\\fP\n.br\n") else: emit("Example

    ") if man: emit("\n.EX\n") else: emit("") continue if line == "\n": if man: emit("\n.br\n") else: emit("
    ") if not in_code: if man: emit("\n.br\n") else: emit("
    ") continue if in_code: if man: line = line.replace("\n", "\n.br\n") else: line = line.replace(" ", " ") line = line.replace("\n", "
    ") while line.find("[*") != -1 and line.find("*]") != -1: (b, s, e) = line.partition("[*") (l, s, e) = e.partition("*]") if man: line = "{}\\fB{}\\fP{}".format(b, l, e) else: line = "{}{}{}".format(b, l, l, e) if l not in param_refd: param_refd.append(l) while line.find("[[") != -1 and line.find("]]") != -1: (b, s, e) = line.partition("[[") (l, s, e) = e.partition("]]") if man: line = "{}\\fB{}\\fP{}".format(b, l, e) else: line = "{}{}{}".format(b, l, l, e) if at == TEXT: if line[0] == '*' and line[-2] == '*': if man: emit(".SS {}".format(line[1:-2])) else: emit("

    {}

    ".format(line[1:-2])) elif line[0] == '^' and line[-2] == '^': if man: emit(".SS {}".format(line[1:-2])) else: emit("
    {}
    ".format(line[1:-2])) else: emit(line) elif at == OVERVIEW: if line == "\n": if man: emit("\n.br\n") else: emit("") else: (func, sep, desc) = line.partition(" ") if desc != "": if man: emit("\n.br\n{}".format(line.strip())) else: emit("{}{}". format(func, func, desc)) else: if man: emit(".SS {}".format(line.replace("_", " ").strip())) else: emit("{}". format(func.replace("_", " "))) elif at == FUNC: fdef += line elif at == DESC: emit(line) elif at == PARAMS: if line.find("::") != -1: (par, sep, end) = line.partition("::") par = par.strip() end = end.strip() if nostar(par.lower()) < nostar(last_par.lower()): sys.stderr.write("Out of order {} after {}.\n". format(par, last_par)) last_par = par if par in param_defd: sys.stderr.write("Duplicate definition of {}.\n".format(par)) else: param_defd.append(par) if end != "": end = ": " + end if man: emit("\n.IP \"\\fB{}\\fP{}\" 0\n".format(par, end)) else: emit("

    {}{}

    \n".format(par, par, end)) else: emit(line) elif at == MAN: if man: emit(line) elif at == OPT: line = line.split("|") if man: emit("\n.IP \"\\fB{}\\fP\"\n{}.\n{}.\n{}.".format( line[0], line[1], line[2], line[3])) else: emit("{}{}{}{}". format(line[0], line[1], line[2], line[3])) elif at == DEFS: emit(line) if man: if obj == "pigpio": emit(pigpio_m2) elif obj == "pigpiod_if": emit(pigpiod_if_m2) elif obj == "pigpiod_if2": emit(pigpiod_if2_m2) elif obj == "pigpiod": emit(pigpiod_m2) elif obj == "pig2vcd": emit(pig2vcd_m2) f.close() pigpio-78/DOC/bin/examples.py000077500000000000000000000053361373465704200161730ustar00rootroot00000000000000#!/usr/bin/env python3 import sys from collections import OrderedDict def emit(s): sys.stdout.write(s) def get_line(f): line = f.readline() return line def get_file(): try: fn = sys.argv[1] f = open(fn, "r") except: exit("aborting, can't open {}".format(fn)) return f def cancel_row(): global in_row if in_row: in_row = False emit('') def start_row(): global in_row if not in_row: in_row = True emit('') def cancel_table(): global in_table if in_table: in_table = False cancel_row() emit('') def start_table(): global in_table if not in_table: in_table = True emit('') else: cancel_row() start_row() index = {} in_code = False in_samp = False in_table = False in_row = False f = get_file() while True: line = get_line(f) if line == "": cancel_table() emit('
    \n') last = None ordered = OrderedDict(sorted(index.items(), key=lambda t: t[1].lower())) for k,v in ordered.items(): tag=k.split('_')[0] if last != v.lower(): if last is not None: emit('') last = v.lower() anchor="index_"+last.replace(" ", "_") emit('
    '+v+'') emit(' '+tag+'\n') emit('
    ') break if line.startswith("?0|"): s = line.split("|") anchor=s[1].strip() emit(''+anchor+'
    ') continue if line.startswith("?1|"): cancel_table() s = line.split("|") tag = s[1].strip()+"_" anchor=s[2].strip() emit('

    '+anchor+'

    ') continue elif line.startswith("?2|") or line.startswith("?3|") or line.startswith("?4|"): start_table() s = line.split("|") anchor=tag+s[1].strip() if line.startswith("?2|"): link=s[1].strip()+".html" elif line.startswith("?3|"): link="code/"+s[1].strip()+".zip" elif line.startswith("?4|"): link=s[1].strip() else: link="code/"+s[1].strip() date=s[2].strip() title=s[3].strip() emit(''+title+'
    '+date+'
    ') index.update({anchor:title}) continue else: emit(line.replace("\n", "
    \n")) f.close() pigpio-78/DOC/bin/html.py000077500000000000000000000073611373465704200153210ustar00rootroot00000000000000#!/usr/bin/env python3 import sys import sqlite3 import time i_file_name = 0 i_menu_title = 1 i_menu_pos = 2 i_menu_level = 3 i_page_title = 4 i_pic1 = 5 i_pic2 = 6 i_pic3 = 7 i_body = 8 print(""" pigpio library """) page = sys.argv[1] menuH = "" menuV = "" sitemap = "" header = 'pigpio library' footer1 = "© 2012-2020"; footer2 = "e-mail: pigpio @ abyz.me.uk"; footer3 = "Updated: " + time.strftime("%d/%m/%Y") + ""; db=sqlite3.connect("dbase/pigpio.sqlite") c=db.cursor() def menu_titles(): global menuV, menuH c.execute( "SELECT file_name, menu_title, menu_level FROM pigpio ORDER by menu_pos") recs = c.fetchall() menuV = "" menuH = "" for r in recs: if r[2] == 1: menuV += '' + r[1] + '\n' menuH += '[' + r[1] + ']\n' def sitemap(): c.execute( "SELECT file_name, menu_title, menu_level FROM pigpio ORDER by menu_pos") recs = c.fetchall() stemap = "" for r in recs: if r[2] > 0: s = "----" * (r[2]-1) stemap += s + '' + r[1] + '
    \n' return stemap def check_image(d): img = "images/" + d try: with open("HTML/" + img) as f: print('') except: pass titles = menu_titles() s_sidebar = 'style="background:#EAF2E6 url(\'images/sidebar.gif\') repeat-y; width:35px; height:100%"' s_header = 'style="background:url(\'images/topbar.gif\') repeat-x; height: 70px; font-size:1.5em; vertical-align: top;"' s_menuV = 'style="vertical-align: top; background-color: #98bf21;"' c.execute("SELECT * FROM pigpio WHERE file_name=?", (page,)) rec = c.fetchone() if page == "sitemap": body = sitemap() else: body = rec[i_body] c.close() db.close() print('') print('') print('') print('
    ') print('') print('
    ' + header + '
    ') print('
    ') print('
    ') check_image(rec[i_pic1]) check_image(rec[i_pic2]) check_image(rec[i_pic3]) print('
    ') print("") print('') print('') print('
    ' + menuV + '

    ' + rec[i_page_title] + '

    ' + body + '
    ') print('
    ' + menuH + '
    ') print('') print('') print('') print('') print('
    ' + footer1 + '
    ' + footer2 + '
    ' + footer3 + '
    ') print('
    ') print('\n') pigpio-78/DOC/bin/purge.sh000077500000000000000000000005031373465704200154500ustar00rootroot00000000000000#!/bin/bash # if backup same as new delete it if cmp -s dbase/pigpio.sqlite dbase/pigpio.sqlite.bak then rm dbase/pigpio.sqlite.bak else d=$(date "+%F-%H-%M-%S") mv -f dbase/pigpio.sqlite.bak dbase/pigpio.sqlite.$d fi # delete backups older than a week find dbase/pigpio.sqlite.2* -mtime +7 -delete &>/dev/null pigpio-78/DOC/bin/pymakdoc.py000077500000000000000000000145551373465704200161670ustar00rootroot00000000000000#!/usr/bin/env python3 import sys def emit(s): sys.stdout.write(s) def str2hex(s): return ":".join("{:02x}".format(ord(c)) for c in s) def funchdr(line): if len(line) > 1 and (not line.startswith(" ")) and line.find("(") != -1: return True else: return False def get_line(f): line = f.readline() line = line.replace("<", "<") line = line.replace(">", ">") return line def get_file(): try: fn = sys.argv[1] f = open(fn, "r") except: exit("aborting, can't open {}".format(fn)) return f NONE = 0 DESCRIPTION = 1 OVERVIEW = 2 CLASSES = 3 CLASS = 4 FUNC = 5 XREF = 6 DATA = 7 f = get_file() param_used = [] param_defd = [] param_refd = [] at = NONE in_code = False in_samp = False in_table = False left = 0 while True: line = get_line(f) if line == "": for p in param_used: if p not in param_defd: sys.stderr.write("{} is used but not defined.\n".format(p)) for p in param_defd: if p not in param_used and p not in param_refd: sys.stderr.write("{} is defined but not used.\n".format(p)) break if line.startswith("DESCRIPTION"): left = 4 at = DESCRIPTION continue elif line.startswith(" OVERVIEW"): left = 4 emit("

    OVERVIEW

    ") emit( "") at = OVERVIEW continue elif line.startswith("CLASSES"): left = 4 emit("
    ") at = NONE continue elif line.startswith(" class "): in_func = False if line.startswith(" class error"): at = NONE else: left = 8 emit("

    {}

    ".format(line)) _class = line[10:-1] at = CLASS continue elif line.startswith("FUNCTIONS"): left = 4 emit("

    FUNCTIONS

    ") in_func = False at = FUNC continue elif line.startswith(" xref()"): left = 8 emit("

    PARAMETERS

    ") in_func = False last_par = "" at = XREF continue elif line.startswith("DATA"): at = DATA continue line = line[left:] at_funchdr = funchdr(line) if at != NONE and at != OVERVIEW: if at == CLASS or at == FUNC: if not at_funchdr: line = line[4:] line = line.replace(' \n', '
    ') if line.find('@') != -1: if not in_table: in_table = True emit("") emit("") cols = line.split('@') for col in cols: emit("".format(col.strip())) emit("") continue else: if in_table: in_table = False emit("
    {}
    ") if line.find(":=") != -1: if not in_samp: emit("
    Parameters

    ") in_samp = True if line == '...\n' or line == '. .\n': if in_code: in_code = False emit("
    ") else: in_code = True if line == '...\n': emit("Example

    ") emit("") continue if line == '\n' or line == '': if in_samp: emit("") in_samp = False emit('
    ') if not in_code: emit('
    ') continue if in_code or in_samp: line = line.replace(" ", " ") line = line.replace("\n", "
    ") while line.find('[*') != -1 and line.find('*]') != -1: (b, s, e) = line.partition('[*') (l, s, e) = e.partition('*]') line = '{}{}{}'.format(b, l, l, e) if l not in param_refd: param_refd.append(l) while line.find('[[') != -1 and line.find(']]') != -1: (b, s, e) = line.partition('[[') (l, s, e) = e.partition(']]') line = '{}{}{}'.format(b, l, l, e) if at == DESCRIPTION: if line[0] == '*' and line[-2] == '*': emit("

    {}

    ".format(line[1:-2])) elif line[0] == '[' and line[-2] == ']': pass else: emit(line) elif at == OVERVIEW: if line == "\n": emit("") else: (func, sep, desc) = line.partition(' ') if desc != '': emit("{}{}". format(func, func, desc)) else: emit("{}". format(func).replace("_", " ")) elif at == CLASS or at == FUNC: if at_funchdr: in_func = True if in_code: emit("
    ***C***
    ") in_code = False if in_samp: emit("
    ***S***") in_samp = False (func, sep1, end1) = line.partition("(") (parl, sep2, end2) = end1.partition(")") pars = parl.split(",") func = func.strip() if at == FUNC: func = "pigpio." + func else: if func == "__init__": func = "pigpio." + _class emit("

    {}".format(func,func)) emit('(') x = 0 for p in pars: (p, sep3, end3) = p.partition('=') p = p.strip() if (p != 'self') and (p != '...') and (p != ''): if p not in param_used: param_used.append(p) if x > 0: emit(", ") x += 1 emit("{}".format(p, p)) emit(')

    \n') else: if in_func: emit(line) elif at == XREF: if line.find(':') != -1: (par, sep, end) = line.partition(':') par = par.strip() end = end.strip() emit("

    {}: {}

    ".format(par, par, end)) if par.lower() < last_par.lower(): sys.stderr.write("Out of order {} after {}.\n". format(par, last_par)) last_par = par if par in param_defd: sys.stderr.write("Duplicate definition of {}.\n".format(par)) else: param_defd.append(par) else: emit(line) f.close() pigpio-78/DOC/bin/smakdoc.py000077500000000000000000000212621373465704200157720ustar00rootroot00000000000000#!/usr/bin/env python3 import sys def get_file(): try: fn = sys.argv[1] f = open(fn, "r") except: exit("aborting, can't open {}".format(fn)) return f def emit(s): sys.stdout.write(s) def str2hex(s): return ":".join("{:02x}".format(ord(c)) for c in s) def get_line(f): line = f.readline() if man: line = line.replace(" \n", "\n.br\n") else: line = line.replace("<", "<") line = line.replace(">", ">") line = line.replace(" \n", "
    \n") return line if len(sys.argv) > 2: # Are we creating a man page? man = True else: man = False NONE=0 INTRO=1 OVERVIEW=2 COMMANDS=3 PARAMETERS=4 SCRIPTS=5 param_used = [] param_defd = [] f = get_file() at = NONE in_table = False in_code = False funcdef ={} if man: emit(""" .\" Process this file with .\" groff -man -Tascii foo.1 .\" .TH pigs 1 2012-2020 Linux "pigpio archive" .SH NAME pigs - command line socket access to the pigpio daemon.\n /dev/pigpio - command line pipe access to the pigpio daemon.\n .SH SYNOPSIS\n .B sudo pigpiod\n then\n .B pigs {command}+\n or\n .B \"echo {command}+ >/dev/pigpio\"\n .SH DESCRIPTION\n .ad l\n .nh\n """) while True: line = get_line(f) if line == "": for p in param_used: if p not in param_defd: sys.stderr.write("{} used but not defined.\n".format(p)) for p in param_defd: if p not in param_used: sys.stderr.write("{} defined but not used.\n".format(p)) break if line.startswith("INTRO"): line = get_line(f) if man: pass else: emit("

    Introduction

    \n") at = INTRO elif line.startswith("OVERVIEW"): line = get_line(f) if man: emit("\n.SH OVERVIEW\n") else: emit("

    Overview

    \n") emit( "") at = OVERVIEW elif line.startswith("COMMANDS"): line = get_line(f) if man: emit("\n.SH COMMANDS\n") else: emit("
    ") emit("

    Commands

    \n") funcs = sorted(funcdef) at = COMMANDS elif line.startswith("PARAMETERS"): line = get_line(f) last_par = "" if man: emit("\n.SH PARAMETERS\n") else: emit("

    Parameters

    \n") at = PARAMETERS elif line.startswith("SCRIPTS"): line = get_line(f) if man: emit("\n.SH SCRIPTS\n") else: emit("

    Scripts

    \n") at = SCRIPTS if at != NONE: if line.find("@") != -1: if not in_table: in_table = True if man: emit("\n.EX\n") else: emit("") if man: pass else: emit("") if man: line = line.replace("@", " ") emit(line) else: cols = line.split("@") for col in cols: emit("".format(col.strip())) if man: pass else: emit("") continue else: if in_table: in_table = False if man: emit("\n.EE\n") else: emit("
    {}
    ") if line == "...\n" or line == ". .\n": if in_code: in_code = False if man: emit("\n.EE\n") else: emit("") else: in_code = True if at == COMMANDS: if line == "...\n": if man: emit("\n\\fBExample\\fP\n.br\n") else: emit("Example

    ") if man: emit("\n.EX\n") else: emit("") continue if line == "\n" and at != OVERVIEW: if man: # emit("\n.br\n.br\n") emit("\n.br\n") else: emit("

    ") continue if in_code: if man: line = line.replace("\n", "\n.br\n") else: line = line.replace(" ", " ") line = line.replace("\n", "
    ") while line.find("[*") != -1 and line.find("*]") != -1: (b, s, e) = line.partition("[*") (l, s, e) = e.partition("*]") if man: line = "{}\\fB{}\\fP{}".format(b, l, e) else: line = "{}{}{}".format(b, l, l, e) while line.find("[{") != -1 and line.find("}]") != -1: (b, s, e) = line.partition("[[") (l, s, e) = e.partition("]]") if man: line = "{}\\fB{}\\fP{}".format(b, l, e) else: line = "{}{}{}".format(b, l, l, e) if at == INTRO or at == SCRIPTS: if line[0] == "*" and line[-2] == "*": if man: emit(".SS {}".format(line[1:-2])) else: emit("

    {}

    ".format(line[1:-2])) else: emit(line) elif at == OVERVIEW: if line == "\n": if man: pass else: emit("") elif line.find("::") == -1: if man: emit(".SS {}".format(line)) else: emit("{}".format(line)) else: (funcpar, sep, desc) = line.partition("::") funcpar = funcpar.strip() desc = desc.strip() if desc != "": (func, sep, parl) = funcpar.partition(" ") func = func.strip() parl = parl.strip() if func in funcdef: sys.stderr.write("{} has been redefined.\n".format(func)) funcdef[func]=parl+"::"+desc if man: emit(".B {}\n".format(func+" "+parl+" ")) pass else: emit("{}".format(func, func)) pars = parl.split() for p in pars: if p not in param_used: param_used.append(p) if man: pass else: emit(" {}".format(p, p)) (des, sep, c) = desc.partition("::") c = c.strip() if man: emit("{}\n.P\n".format(des)) pass else: emit("{}{}".format(des, c, c)) else: if man: pass else: emit("{}".format(funcpar)) if man: # emit(".IP {} 9\n".format(func)) pass else: emit("{}".format(func, func)) elif at == COMMANDS: if line.find("::") != -1: (func, sep, desc) = line.partition("::") func = func.strip() if func not in funcdef: parl="unknown" desc="unknown" else: (parl,sep,desc) = funcdef[func].partition("::") (des, sep, c) = desc.partition("::") if man: t = "\\fB" + func + " " + parl + "\\fP" + " - " + des.strip() emit("\n.IP \"{}\"\n.IP \"\" 4\n".format(t)) else: emit("

    {}\n".format(func,func)) pars = parl.split() for p in pars: if man: pass else: emit(" {}".format(p, p)) if man: pass else: emit(" - {}

    ".format(des.strip())) else: emit(line) elif at == PARAMETERS: if line.find("::") != -1: (par, sep, desc) = line.partition("::") par = par.strip() desc = desc.strip() if par.lower() < last_par.lower(): sys.stderr.write("Out of order {} after {}.\n".format(par, last_par)) last_par = par if par in param_defd: sys.stderr.write("Duplicate definition of {}.\n".format(par)) else: param_defd.append(par) if man: emit("\n.IP \"\\fB{}\\fP - {}\" 0\n".format(par, desc)) else: emit("

    {} - {}

    \n".format(par,par,desc)) else: emit(line) if man: emit(""" .SH SEE ALSO\n pigpiod(1), pig2vcd(1), pigpio(3), pigpiod_if(3), pigpiod_if2(3) .SH AUTHOR\n joan@abyz.me.uk """) f.close() pigpio-78/DOC/bin/tidy.py000077500000000000000000000010521373465704200153150ustar00rootroot00000000000000#!/usr/bin/env python3 import glob def snafu(t, s, r): l = t while l.find(s) != -1: l = l.replace(s, r) return l for n in glob.glob("tmp/body/*.body"): f = open(n, "r"); t = f.read() f.close() t = snafu(t, "

    ", "

    ") t = snafu(t, "

    ", "

    ") t = snafu(t, "


    ", "") t = snafu(t, "\n
    ", "\n") t = snafu(t, "
    ", "") t = snafu(t, "\n
    ", "\n") t = snafu(t, "


    ", "

    ") f = open(n, "w"); f.write(t) f.close() pigpio-78/DOC/bin/updatesql.py000077500000000000000000000005121373465704200163460ustar00rootroot00000000000000#!/usr/bin/env python3 import sqlite3 import glob db=sqlite3.connect("dbase/pigpio.sqlite") c=db.cursor() for fn in glob.glob("tmp/body/*.body"): f = open(fn, encoding='utf-8') body = f.read() f.close() c.execute("UPDATE pigpio SET body=? WHERE file_name=?", (body, fn[9:-5])) c.close() db.commit() db.close() pigpio-78/DOC/dbase/000077500000000000000000000000001373465704200142775ustar00rootroot00000000000000pigpio-78/DOC/dbase/pigpio.sqlite000066400000000000000000053600001373465704200170150ustar00rootroot00000000000000SQLite format 3@ -^I-.? 33\-indexpigpio_file_namepigpioCREATE INDEX "pigpio_file_name" ON "pigpio" ("file_name")l3tablepigpiopigpioCREATE TABLE "pigpio" ( "file_name" varchar(30) NOT NULL, "menu_title" varchar(60) NOT NULL, "menu_pos" int(11) NOT NULL DEFAULT 0, "menu_level" int(11) NOT NULL DEFAULT 0, "page_title" varchar(32) NOT NULL, "pic1" varchar(15) NOT NULL, "pic2" varchar(15) NOT NULL, "pic3" varchar(15) NOT NULL, "body" longtext NOT NULL )yusq o k i]\[HGp;-135 // bad file seek
    #define PI_NO_FILE_MATCH   -136 // no files match pattern
    #define PI_NO_FILE_ACCESS  -137 // no permission to access file
    #define PI_FILE_IS_A_DIR   -138 // file is a directory
    #define PI_BAD_SHELL_STATUS -139 // bad shell return status
    #define PI_BAD_SCRIPT_NAME -140 // bad script name
    #define PI_BAD_SPI_BAUD    -141 // bad SPI baud rate, not 50-500k
    #define PI_NOT_SPI_GPIO    -142 // no bit bang SPI in progress on GPIO
    #define PI_BAD_EVENT_ID    -143 // bad event id
    #define PI_CMD_INTERRUPTED -144 // Used by Python
    #define PI_NOT_ON_BCM2711  -145 // not available on BCM2711
    #define PI_ONLY_ON_BCM2711 -146 // only available on BCM2711

    #define PI_PIGIF_ERR_0    -2000
    #define PI_PIGIF_ERR_99   -2099

    #define PI_CUSTOM_ERR_0   -3000
    #define PI_CUSTOM_ERR_999 -3999

    Defaults


    #define PI_DEFAULT_BUFFER_MILLIS           120
    #define PI_DEFAULT_CLK_MICROS              5
    #define PI_DEFAULT_CLK_PERIPHERAL          PI_CLOCK_PCM
    #define PI_DEFAULT_IF_FLAGS                0
    #define PI_DEFAULT_FOREGROUND              0
    #define PI_DEFAULT_DMA_CHANNEL             14
    #define PI_DEFAULT_DMA_PRIMARY_CHANNEL     14
    #define PI_DEFAULT_DMA_SECONDARY_CHANNEL   6
    #define PI_DEFAULT_DMA_PRIMARY_CH_2711     7
    #define PI_DEFAULT_DMA_SECONDARY_CH_2711   6
    #define PI_DEFAULT_DMA_NOT_SET             15
    #define PI_DEFAULT_SOCKET_PORT             8888
    #define PI_DEFAULT_SOCKET_PORT_STR         "8888"
    #define PI_DEFAULT_SOCKET_ADDR_STR         "localhost"
    #define PI_DEFAULT_UPDATE_MASK_UNKNOWN     0x0000000FFFFFFCLL
    #define PI_DEFAULT_UPDATE_MASK_B1          0x03E7CF93
    #define PI_DEFAULT_UPDATE_MASK_A_B2        0xFBC7CF9C
    #define PI_DEFAULT_UPDATE_MASK_APLUS_BPLUS 0x0080480FFFFFFCLL
    #define PI_DEFAULT_UPDATE_MASK_ZERO        0x0080000FFFFFFCLL
    #define PI_DEFAULT_UPDATE_MASK_PI2B        0x0080480FFFFFFCLL
    #define PI_DEFAULT_UPDATE_MASK_PI3B        0x0000000FFFFFFCLL
    #define PI_DEFAULT_UPDATE_MASK_PI4B        0x0000000FFFFFFCLL
    #define PI_DEFAULT_UPDATE_MASK_COMPUTE     0x00FFFFFFFFFFFFLL
    #define PI_DEFAULT_MEM_ALLOC_MODE          PI_MEM_ALLOC_AUTO

    #define PI_DEFAULT_CFG_INTERNALS           0

    nbsp;-99 // need password to use hardware clock 1
    #define PI_HPWM_ILLEGAL    -100 // illegal, PWM in use for main clock
    #define PI_BAD_DATABITS    -101 // serial data bits not 1-32
    #define PI_BAD_STOPBITS    -102 // serial (half) stop bits not 2-8
    #define PI_MSG_TOOBIG      -103 // socket/pipe message too big
    #define PI_BAD_MALLOC_MODE -104 // bad memory allocation mode
    #define PI_TOO_MANY_SEGS   -105 // too many I2C transaction segments
    #define PI_BAD_I2C_SEG     -106 // an I2C transaction segment failed
    #define PI_BAD_SMBUS_CMD   -107 // SMBus command not supported by driver
    #define PI_NOT_I2C_GPIO    -108 // no bit bang I2C in progress on GPIO
    #define PI_BAD_I2C_WLEN    -109 // bad I2C write length
    #define PI_BAD_I2C_RLEN    -110 // bad I2C read length
    #define PI_BAD_I2C_CMD     -111 // bad I2C command
    #define PI_BAD_I2C_BAUD    -112 // bad I2C baud rate, not 50-500k
    #define PI_CHAIN_LOOP_CNT  -113 // bad chain loop count
    #define PI_BAD_CHAIN_LOOP  -114 // empty chain loop
    #define PI_CHAIN_COUNTER   -115 // too many chain counters
    #define PI_BAD_CHAIN_CMD   -116 // bad chain command
    #define PI_BAD_CHAIN_DELAY -117 // bad chain delay micros
    #define PI_CHAIN_NESTING   -118 // chain counters nested too deeply
    #define PI_CHAIN_TOO_BIG   -119 // chain is too long
    #define PI_DEPRECATED      -120 // deprecated function removed
    #define PI_BAD_SER_INVERT  -121 // bit bang serial invert not 0 or 1
    #define PI_BAD_EDGE        -122 // bad ISR edge value, not 0-2
    #define PI_BAD_ISR_INIT    -123 // bad ISR initialisation
    #define PI_BAD_FOREVER     -124 // loop forever must be last command
    #define PI_BAD_FILTER      -125 // bad filter parameter
    #define PI_BAD_PAD         -126 // bad pad number
    #define PI_BAD_STRENGTH    -127 // bad pad drive strength
    #define PI_FIL_OPEN_FAILED -128 // file open failed
    #define PI_BAD_FILE_MODE   -129 // bad file mode
    #define PI_BAD_FILE_FLAG   -130 // bad file flag
    #define PI_BAD_FILE_READ   -131 // bad file read
    #define PI_BAD_FILE_WRITE  -132 // bad file write
    #define PI_FILE_NOT_ROPEN  -133 // file not open for read
    #define PI_FILE_NOT_WOPEN  -134 // file not open for write
    #define PI_BAD_FILE_SEEK  &nbscript initialising
    #define PI_BAD_TAG          -63 // script has unresolved tag
    #define PI_BAD_MICS_DELAY   -64 // bad MICS delay (too large)
    #define PI_BAD_MILS_DELAY   -65 // bad MILS delay (too large)
    #define PI_BAD_WAVE_ID      -66 // non existent wave id
    #define PI_TOO_MANY_CBS     -67 // No more CBs for waveform
    #define PI_TOO_MANY_OOL     -68 // No more OOL for waveform
    #define PI_EMPTY_WAVEFORM   -69 // attempt to create an empty waveform
    #define PI_NO_WAVEFORM_ID   -70 // no more waveforms
    #define PI_I2C_OPEN_FAILED  -71 // can't open I2C device
    #define PI_SER_OPEN_FAILED  -72 // can't open serial device
    #define PI_SPI_OPEN_FAILED  -73 // can't open SPI device
    #define PI_BAD_I2C_BUS      -74 // bad I2C bus
    #define PI_BAD_I2C_ADDR     -75 // bad I2C address
    #define PI_BAD_SPI_CHANNEL  -76 // bad SPI channel
    #define PI_BAD_FLAGS        -77 // bad i2c/spi/ser open flags
    #define PI_BAD_SPI_SPEED    -78 // bad SPI speed
    #define PI_BAD_SER_DEVICE   -79 // bad serial device name
    #define PI_BAD_SER_SPEED    -80 // bad serial baud rate
    #define PI_BAD_PARAM        -81 // bad i2c/spi/ser parameter
    #define PI_I2C_WRITE_FAILED -82 // i2c write failed
    #define PI_I2C_READ_FAILED  -83 // i2c read failed
    #define PI_BAD_SPI_COUNT    -84 // bad SPI count
    #define PI_SER_WRITE_FAILED -85 // ser write failed
    #define PI_SER_READ_FAILED  -86 // ser read failed
    #define PI_SER_READ_NO_DATA -87 // ser read no data available
    #define PI_UNKNOWN_COMMAND  -88 // unknown command
    #define PI_SPI_XFER_FAILED  -89 // spi xfer/read/write failed
    #define PI_BAD_POINTER      -90 // bad (NULL) pointer
    #define PI_NO_AUX_SPI       -91 // no auxiliary SPI on Pi A or B
    #define PI_NOT_PWM_GPIO     -92 // GPIO is not in use for PWM
    #define PI_NOT_SERVO_GPIO   -93 // GPIO is not in use for servo pulses
    #define PI_NOT_HCLK_GPIO    -94 // GPIO has no hardware clock
    #define PI_NOT_HPWM_GPIO    -95 // GPIO has no hardware PWM
    #define PI_BAD_HPWM_FREQ    -96 // invalid hardware PWM frequency
    #define PI_BAD_HPWM_DUTY    -97 // hardware PWM dutycycle not 0-1M
    #define PI_BAD_HCLK_FREQ    -98 // invalid hardware clock frequency
    #define PI_BAD_HCLK_PASS   &;not 0-15
    #define PI_BAD_SOCKET_PORT  -28 // socket port not 1024-32000
    #define PI_BAD_FIFO_COMMAND -29 // unrecognized fifo command
    #define PI_BAD_SECO_CHANNEL -30 // DMA secondary channel not 0-15
    #define PI_NOT_INITIALISED  -31 // function called before gpioInitialise
    #define PI_INITIALISED      -32 // function called after gpioInitialise
    #define PI_BAD_WAVE_MODE    -33 // waveform mode not 0-3
    #define PI_BAD_CFG_INTERNAL -34 // bad parameter in gpioCfgInternals call
    #define PI_BAD_WAVE_BAUD    -35 // baud rate not 50-250K(RX)/50-1M(TX)
    #define PI_TOO_MANY_PULSES  -36 // waveform has too many pulses
    #define PI_TOO_MANY_CHARS   -37 // waveform has too many chars
    #define PI_NOT_SERIAL_GPIO  -38 // no bit bang serial read on GPIO
    #define PI_BAD_SERIAL_STRUC -39 // bad (null) serial structure parameter
    #define PI_BAD_SERIAL_BUF   -40 // bad (null) serial buf parameter
    #define PI_NOT_PERMITTED    -41 // GPIO operation not permitted
    #define PI_SOME_PERMITTED   -42 // one or more GPIO not permitted
    #define PI_BAD_WVSC_COMMND  -43 // bad WVSC subcommand
    #define PI_BAD_WVSM_COMMND  -44 // bad WVSM subcommand
    #define PI_BAD_WVSP_COMMND  -45 // bad WVSP subcommand
    #define PI_BAD_PULSELEN     -46 // trigger pulse length not 1-100
    #define PI_BAD_SCRIPT       -47 // invalid script
    #define PI_BAD_SCRIPT_ID    -48 // unknown script id
    #define PI_BAD_SER_OFFSET   -49 // add serial data offset > 30 minutes
    #define PI_GPIO_IN_USE      -50 // GPIO already in use
    #define PI_BAD_SERIAL_COUNT -51 // must read at least a byte at a time
    #define PI_BAD_PARAM_NUM    -52 // script parameter id not 0-9
    #define PI_DUP_TAG          -53 // script has duplicate tag
    #define PI_TOO_MANY_TAGS    -54 // script has too many tags
    #define PI_BAD_SCRIPT_CMD   -55 // illegal script command
    #define PI_BAD_VAR_NUM      -56 // script variable id not 0-149
    #define PI_NO_SCRIPT_ROOM   -57 // no more room for scripts
    #define PI_NO_MEMORY        -58 // can't allocate temporary memory
    #define PI_SOCK_READ_FAILED -59 // socket read failed
    #define PI_SOCK_WRIT_FAILED -60 // socket write failed
    #define PI_TOO_MANY_PARAM   -61 // too many script parameters (> 10)
    #define PI_NOT_HALTED       -62 // DEPRECATED
    #define PI_SCRIPT_NOT_READY -62 // sI_CMD_PADS  102
    #define PI_CMD_PADG  103

    #define PI_CMD_FO    104
    #define PI_CMD_FC    105
    #define PI_CMD_FR    106
    #define PI_CMD_FW    107
    #define PI_CMD_FS    108
    #define PI_CMD_FL    109

    #define PI_CMD_SHELL 110

    #define PI_CMD_BSPIC 111
    #define PI_CMD_BSPIO 112
    #define PI_CMD_BSPIX 113

    #define PI_CMD_BSCX  114

    #define PI_CMD_EVM   115
    #define PI_CMD_EVT   116

    #define PI_CMD_PROCU 117
    #define PI_CMD_WVCAP 118

    Error Codes


    #define PI_INIT_FAILED       -1 // gpioInitialise failed
    #define PI_BAD_USER_GPIO     -2 // GPIO not 0-31
    #define PI_BAD_GPIO          -3 // GPIO not 0-53
    #define PI_BAD_MODE          -4 // mode not 0-7
    #define PI_BAD_LEVEL         -5 // level not 0-1
    #define PI_BAD_PUD           -6 // pud not 0-2
    #define PI_BAD_PULSEWIDTH    -7 // pulsewidth not 0 or 500-2500
    #define PI_BAD_DUTYCYCLE     -8 // dutycycle outside set range
    #define PI_BAD_TIMER         -9 // timer not 0-9
    #define PI_BAD_MS           -10 // ms not 10-60000
    #define PI_BAD_TIMETYPE     -11 // timetype not 0-1
    #define PI_BAD_SECONDS      -12 // seconds < 0
    #define PI_BAD_MICROS       -13 // micros not 0-999999
    #define PI_TIMER_FAILED     -14 // gpioSetTimerFunc failed
    #define PI_BAD_WDOG_TIMEOUT -15 // timeout not 0-60000
    #define PI_NO_ALERT_FUNC    -16 // DEPRECATED
    #define PI_BAD_CLK_PERIPH   -17 // clock peripheral not 0-1
    #define PI_BAD_CLK_SOURCE   -18 // DEPRECATED
    #define PI_BAD_CLK_MICROS   -19 // clock micros not 1, 2, 4, 5, 8, or 10
    #define PI_BAD_BUF_MILLIS   -20 // buf millis not 100-10000
    #define PI_BAD_DUTYRANGE    -21 // dutycycle range not 25-40000
    #define PI_BAD_DUTY_RANGE   -21 // DEPRECATED (use PI_BAD_DUTYRANGE)
    #define PI_BAD_SIGNUM       -22 // signum not 0-63
    #define PI_BAD_PATHNAME     -23 // can't open pathname
    #define PI_NO_HANDLE        -24 // no handle available
    #define PI_BAD_HANDLE       -25 // unknown handle
    #define PI_BAD_IF_FLAGS     -26 // ifFlags > 4
    #define PI_BAD_CHANNEL      -27 // DMA channel not 0-15
    #define PI_BAD_PRIM_CHANNEL -27 // DMA primary channel define PI_CMD_PRS    6
    #define PI_CMD_PFS    7
    #define PI_CMD_SERVO  8
    #define PI_CMD_WDOG   9
    #define PI_CMD_BR1   10
    #define PI_CMD_BR2   11
    #define PI_CMD_BC1   12
    #define PI_CMD_BC2   13
    #define PI_CMD_BS1   14
    #define PI_CMD_BS2   15
    #define PI_CMD_TICK  16
    #define PI_CMD_HWVER 17
    #define PI_CMD_NO    18
    #define PI_CMD_NB    19
    #define PI_CMD_NP    20
    #define PI_CMD_NC    21
    #define PI_CMD_PRG   22
    #define PI_CMD_PFG   23
    #define PI_CMD_PRRG  24
    #define PI_CMD_HELP  25
    #define PI_CMD_PIGPV 26
    #define PI_CMD_WVCLR 27
    #define PI_CMD_WVAG  28
    #define PI_CMD_WVAS  29
    #define PI_CMD_WVGO  30
    #define PI_CMD_WVGOR 31
    #define PI_CMD_WVBSY 32
    #define PI_CMD_WVHLT 33
    #define PI_CMD_WVSM  34
    #define PI_CMD_WVSP  35
    #define PI_CMD_WVSC  36
    #define PI_CMD_TRIG  37
    #define PI_CMD_PROC  38
    #define PI_CMD_PROCD 39
    #define PI_CMD_PROCR 40
    #define PI_CMD_PROCS 41
    #define PI_CMD_SLRO  42
    #define PI_CMD_SLR   43
    #define PI_CMD_SLRC  44
    #define PI_CMD_PROCP 45
    #define PI_CMD_MICS  46
    #define PI_CMD_MILS  47
    #define PI_CMD_PARSE 48
    #define PI_CMD_WVCRE 49
    #define PI_CMD_WVDEL 50
    #define PI_CMD_WVTX  51
    #define PI_CMD_WVTXR 52
    #define PI_CMD_WVNEW 53

    #define PI_CMD_I2CO  54
    #define PI_CMD_I2CC  55
    #define PI_CMD_I2CRD 56
    #define PI_CMD_I2CWD 57
    #define PI_CMD_I2CWQ 58
    #define PI_CMD_I2CRS 59
    #define PI_CMD_I2CWS 60
    #define PI_CMD_I2CRB 61
    #define PI_CMD_I2CWB 62
    #define PI_CMD_I2CRW 63
    #define PI_CMD_I2CWW 64
    #define PI_CMD_I2CRK 65
    #define PI_CMD_I2CWK 66
    #define PI_CMD_I2CRI 67
    #define PI_CMD_I2CWI 68
    #define PI_CMD_I2CPC 69
    #define PI_CMD_I2CPK 70

    #define PI_CMD_SPIO  71
    #define PI_CMD_SPIC  72
    #define PI_CMD_SPIR  73
    #define PI_CMD_SPIW  74
    #define PI_CMD_SPIX  75

    #define PI_CMD_SERO  76
    #define PI_CMD_SERC  77
    #define PI_CMD_SERRB 78
    #define PI_CMD_SERWB 79
    #define PI_CMD_SERR  80
    #define PI_CMD_SERW  81
    #define PI_CMD_SERDA 82

    #define PI_CMD_GDC   83
    #define PI_CMD_GPW   84

    #define PI_CMD_HC    85
    #define PI_CMD_HP    86

    #define PI_CMD_CF1   87
    #define PI_CMD_CF2   88

    #define PI_CMD_BI2CC 89
    #define PI_CMD_BI2CO 90
    #define PI_CMD_BI2CZ 91

    #define PI_CMD_I2CZ  92

    #define PI_CMD_WVCHA 93

    #define PI_CMD_SLRI  94

    #define PI_CMD_CGI   95
    #define PI_CMD_CSI   96

    #define PI_CMD_FG    97
    #define PI_CMD_FN    98

    #define PI_CMD_NOIB  99

    #define PI_CMD_WVTXM 100
    #define PI_CMD_WVTAT 101

    #define Past.

    spiBits

    The number of bits to transfer in a raw SPI transaction.

    spiChan

    A SPI channel, 0-2.

    spiFlags

    See spiOpen and bbSPIOpen.

    spiSS

    The SPI slave select GPIO in a raw SPI transaction.

    spiTxBits

    The number of bits to transfer dring a raw SPI transaction

    steady: 0-300000

    The number of microseconds level changes must be stable for before reporting the level changed (gpioGlitchFilter) or triggering the active part of a noise filter (gpioNoiseFilter).

    stop_bits: 2-8

    The number of (half) stop bits to be used when adding serial data to a waveform.

    PI_MIN_WAVE_HALFSTOPBITS 2
    PI_MAX_WAVE_HALFSTOPBITS 8

    *str

    An array of characters.

    timeout

    A GPIO level change timeout in milliseconds.

    gpioSetWatchdog PI_MIN_WDOG_TIMEOUT 0
    PI_MAX_WDOG_TIMEOUT 60000


    gpioSetISRFunc and gpioSetISRFuncEx <=0 cancel timeout
    >0 timeout after specified milliseconds

    timer

    PI_MIN_TIMER 0
    PI_MAX_TIMER 9

    timetype

    PI_TIME_RELATIVE 0
    PI_TIME_ABSOLUTE 1

    *txBuf

    An array of bytes to transmit.

    uint32_t: 0-0-4,294,967,295 (Hex 0x0-0xFFFFFFFF)

    A 32-bit unsigned value.

    uint64_t: 0-(2^64)-1

    A 64-bit unsigned value.

    unsigned

    A whole number >= 0.

    updateMask

    A 64 bit mask indicating which GPIO may be written to by the user.

    If GPIO#n may be written then bit (1<<n) is set.

    user_gpio

    0-31, a Broadcom numbered GPIO.

    See gpio.

    *userdata

    A pointer to arbitrary user data. This may be used to identify the instance.

    You must ensure that the pointer is in scope at the time it is processed. If it is a pointer to a global this is automatic. Do not pass the address of a local variable. If you want to pass a transient object then use the following technique.

    In the calling function:

    user_type *userdata;

    user_type my_userdata;

    userdata = malloc(sizeof(user_type));

    *userdata = my_userdata;


    In the receiving function:

    user_type my_userdata = *(user_type*)userdata;

    free(userdata);

    void

    Denoting no parameter is required

    wave_id

    A number identifying a waveform created by gpioWaveCreate.

    wave_mode

    The mode determines if the waveform is sent once or cycles repeatedly. The SYNC variants wait for the current waveform to reach the end of a cycle or finish before starting the new waveform.

    PI_WAVE_MODE_ONE_SHOT      0
    PI_WAVE_MODE_REPEAT        1
    PI_WAVE_MODE_ONE_SHOT_SYNC 2
    PI_WAVE_MODE_REPEAT_SYNC   3

    wVal: 0-65535 (Hex 0x0-0xFFFF, Octal 0-0177777)

    A 16-bit word value.

    Socket Command Codes


    #define PI_CMD_MODES  0
    #define PI_CMD_MODEG  1
    #define PI_CMD_PUD    2
    #define PI_CMD_READ   3
    #define PI_CMD_WRITE  4
    #define PI_CMD_PWM    5
    #/ delay after slave select
       int clk_pol; // clock off state
       int clk_pha; // clock phase
       int clk_us;  // clock micros
    } rawSPI_t;

    rawWave_t

    typedef struct
    {
       uint32_t gpioOn;
       uint32_t gpioOff;
       uint32_t usDelay;
       uint32_t flags;
    } rawWave_t;

    rawWaveInfo_t

    typedef struct
    {
       uint16_t botCB;  // first CB used by wave
       uint16_t topCB;  // last CB used by wave
       uint16_t botOOL; // last OOL used by wave
       uint16_t topOOL; // first OOL used by wave
       uint16_t deleted;
       uint16_t numCB;
       uint16_t numBOOL;
       uint16_t numTOOL;
    } rawWaveInfo_t;

    *retBuf

    A buffer to hold a number of bytes returned to a used customised function,

    retMax

    The maximum number of bytes a user customised function should return.

    *rxBuf

    A pointer to a buffer to receive data.

    SCL

    The user GPIO to use for the clock when bit banging I2C.

    SCLK

    The GPIO used for the SCLK signal when bit banging SPI.

    *script

    A pointer to the text of a script.

    script_id

    An id of a stored script as returned by gpioStoreScript.

    *scriptName

    The name of a shell script to be executed. The script must be present in /opt/pigpio/cgi and must have execute permission.

    *scriptString

    The string to be passed to a shell script to be executed.

    SDA

    The user GPIO to use for data when bit banging I2C.

    secondaryChannel: 0-6

    The DMA channel used to time output waveforms.

    *seconds

    A pointer to a uint32_t to store the second component of a returned time.

    seconds

    The number of seconds.

    seekFrom

    PI_FROM_START   0
    PI_FROM_CURRENT 1
    PI_FROM_END     2

    seekOffset

    The number of bytes to move forward (positive) or backwards (negative) from the seek position (start, current, or end of file).

    *segs

    An array of segments which make up a combined I2C transaction.

    serFlags

    Flags which modify a serial open command. None are currently defined.

    *sertty

    The name of a serial tty device, e.g. /dev/ttyAMA0, /dev/ttyUSB0, /dev/tty1.

    setting

    A value used to set a flag, 0 for false, non-zero for true.

    signum: 0-63

    PI_MIN_SIGNUM 0
    PI_MAX_SIGNUM 63

    size_t

    A standard type used to indicate the size of an object in bytes.

    *sockAddr

    An array of network addresses allowed to use the socket interface encoded as 32 bit numbers.

    E.g. address 192.168.1.66 would be encoded as 0x4201a8c0.

    *spi

    A pointer to a rawSPI_t structure.

    spiBitFirst

    GPIO reads are made from spiBitFirst to spiBitLast.

    spiBitLast

    GPIO reads are made from spiBitFirst to spiBitLsses allowed.

    offset

    The associated data starts this number of microseconds from the start of the waveform.

    *outBuf

    A buffer used to return data from a function.

    outLen

    The size in bytes of an output buffer.

    pad: 0-2

    A set of GPIO which share common drivers.

    PadGPIO
    00-27
    128-45
    246-53

    padStrength: 1-16

    The mA which may be drawn from each GPIO whilst still guaranteeing the high and low levels.

    *param

    An array of script parameters.

    pctBOOL: 0-100

    percent On-Off-Level (OOL) buffer to consume for wave output.

    pctCB: 0-100

    the percent of all DMA control blocks to consume.

    pctTOOL: 0-100

    the percent of OOL buffer to consume for wave input (flags).

    pi_i2c_msg_t

    typedef struct
    {
       uint16_t addr;  // slave address
       uint16_t flags;
       uint16_t len;   // msg length
       uint8_t  *buf;  // pointer to msg data
    } pi_i2c_msg_t;

    port: 1024-32000

    The port used to bind to the pigpio socket. Defaults to 8888.

    pos

    The position of an item.

    primaryChannel: 0-15

    The DMA channel used to time the sampling of GPIO and to time servo and PWM pulses.

    *pth

    A thread identifier, returned by gpioStartThread.

    pthread_t

    A thread identifier.

    pud: 0-2

    The setting of the pull up/down resistor for a GPIO, which may be off, pull-up, or pull-down.

    PI_PUD_OFF 0
    PI_PUD_DOWN 1
    PI_PUD_UP 2

    pulseLen

    1-100, the length of a trigger pulse in microseconds.

    *pulses

    An array of pulses to be added to a waveform.

    pulsewidth: 0, 500-2500

    PI_SERVO_OFF 0
    PI_MIN_SERVO_PULSEWIDTH 500
    PI_MAX_SERVO_PULSEWIDTH 2500

    PWMduty: 0-1000000 (1M)

    The hardware PWM dutycycle.

    PI_HW_PWM_RANGE 1000000

    PWMfreq: 1-125M (1-187.5M for the BCM2711)

    The hardware PWM frequency.

    PI_HW_PWM_MIN_FREQ 1
    PI_HW_PWM_MAX_FREQ 125000000
    PI_HW_PWM_MAX_FREQ_2711 187500000

    range: 25-40000

    PI_MIN_DUTYCYCLE_RANGE 25
    PI_MAX_DUTYCYCLE_RANGE 40000

    rawCbs_t

    typedef struct // linux/arch/arm/mach-bcm2708/include/mach/dma.h
    {
       unsigned long info;
       unsigned long src;
       unsigned long dst;
       unsigned long length;
       unsigned long stride;
       unsigned long next;
       unsigned long pad[2];
    } rawCbs_t;

    rawSPI_t

    typedef struct
    {
       int clk;     // GPIO for clock
       int mosi;    // GPIO for MOSI
       int miso;    // GPIO for MISO
       int ss_pol;  // slave select off state
       int ss_us;   / nc_t typedef void *(gpioThreadFunc_t) (void *);

    gpioTimerFunc_t

    typedef void (*gpioTimerFunc_t) (void);

    gpioTimerFuncEx_t

    typedef void (*gpioTimerFuncEx_t) (void *userdata);

    gpioWaveAdd*

    One of

    gpioWaveAddNew
    gpioWaveAddGeneric
    gpioWaveAddSerial

    handle: >=0

    A number referencing an object opened by one of

    fileOpen
    gpioNotifyOpen
    i2cOpen
    serOpen
    spiOpen

    i2cAddr: 0-0x7F

    The address of a device on the I2C bus.

    i2cBus: >=0

    An I2C bus number.

    i2cFlags: 0

    Flags which modify an I2C open command. None are currently defined.

    i2cReg: 0-255

    A register of an I2C device.

    ifFlags: 0-3

    PI_DISABLE_FIFO_IF 1
    PI_DISABLE_SOCK_IF 2

    *inBuf

    A buffer used to pass data to a function.

    inLen

    The number of bytes of data in a buffer.

    int

    A whole number, negative or positive.

    int32_t

    A 32-bit signed value.

    invert

    A flag used to set normal or inverted bit bang serial data level logic.

    level

    The level of a GPIO. Low or High.

    PI_OFF 0
    PI_ON 1

    PI_CLEAR 0
    PI_SET 1

    PI_LOW 0
    PI_HIGH 1


    There is one exception. If a watchdog expires on a GPIO the level will be reported as PI_TIMEOUT. See gpioSetWatchdog.

    PI_TIMEOUT 2

    lVal: 0-4294967295 (Hex 0x0-0xFFFFFFFF, Octal 0-37777777777)

    A 32-bit word value.

    memAllocMode: 0-2

    The DMA memory allocation mode.

    PI_MEM_ALLOC_AUTO    0
    PI_MEM_ALLOC_PAGEMAP 1
    PI_MEM_ALLOC_MAILBOX 2

    *micros

    A value representing microseconds.

    micros

    A value representing microseconds.

    millis

    A value representing milliseconds.

    MISO

    The GPIO used for the MISO signal when bit banging SPI.

    mode

    1. The operational mode of a GPIO, normally INPUT or OUTPUT.

    PI_INPUT 0
    PI_OUTPUT 1
    PI_ALT0 4
    PI_ALT1 5
    PI_ALT2 6
    PI_ALT3 7
    PI_ALT4 3
    PI_ALT5 2


    2. A file open mode.

    PI_FILE_READ  1
    PI_FILE_WRITE 2
    PI_FILE_RW    3


    The following values can be or'd into the mode.

    PI_FILE_APPEND 4
    PI_FILE_CREATE 8
    PI_FILE_TRUNC  16

    MOSI

    The GPIO used for the MOSI signal when bit banging SPI.

    numBits

    The number of bits stored in a buffer.

    numBytes

    The number of bytes used to store characters in a string. Depending on the number of bits per character there may be 1, 2, or 4 bytes per character.

    numPar: 0-10

    The number of parameters passed to a script.

    numPulses

    The number of pulses to be added to a waveform.

    numSegs

    The number of segments in a combined I2C transaction.

    numSockAddr

    The number of network addresses allowed to use the socket interface.

    0 means all addre!; X  -  -  X  X
    Type 2    -  -  X  X  X  -  -  X  X  X  X  X  -  -  X  X
    Type 3          X  X  X  X  X  X  X  X  X  X  X  X  X  X

             16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
    Type 1    -  X  X  -  -  X  X  X  X  X  -  -  -  -  -  -
    Type 2    -  X  X  -  -  -  X  X  X  X  -  X  X  X  X  X
    Type 3    X  X  X  X  X  X  X  X  X  X  X  X  -  -  -  -

    gpioAlertFunc_t

    typedef void (*gpioAlertFunc_t) (int gpio, int level, uint32_t tick);

    gpioAlertFuncEx_t

    typedef void (*eventFuncEx_t)
       (int event, int level, uint32_t tick, void *userdata);

    gpioCfg*

    These functions are only effective if called before gpioInitialise.

    gpioCfgBufferSize
    gpioCfgClock
    gpioCfgDMAchannel
    gpioCfgDMAchannels
    gpioCfgPermissions
    gpioCfgInterfaces
    gpioCfgSocketPort
    gpioCfgMemAlloc

    gpioGetSamplesFunc_t

    typedef void (*gpioGetSamplesFunc_t)
       (const gpioSample_t *samples, int numSamples);

    gpioGetSamplesFuncEx_t

    typedef void (*gpioGetSamplesFuncEx_t)
       (const gpioSample_t *samples, int numSamples, void *userdata);

    gpioISRFunc_t

    typedef void (*gpioISRFunc_t)
       (int gpio, int level, uint32_t tick);

    gpioISRFuncEx_t

    typedef void (*gpioISRFuncEx_t)
       (int gpio, int level, uint32_t tick, void *userdata);

    gpioPulse_t

    typedef struct
    {
       uint32_t gpioOn;
       uint32_t gpioOff;
       uint32_t usDelay;
    } gpioPulse_t;

    gpioSample_t

    typedef struct
    {
       uint32_t tick;
       uint32_t level;
    } gpioSample_t;

    gpioSignalFunc_t

    typedef void (*gpioSignalFunc_t) (int signum);

    gpioSignalFuncEx_t

    typedef void (*gpioSignalFuncEx_t) (int signum, void *userdata);

    gpioThreadFu"ntense bursts of signals it might be necessary to increase the buffer size.

    cfgPeripheral

    One of the PWM or PCM peripherals used to pace DMA transfers for timing purposes.

    cfgSource

    Deprecated.

    cfgVal

    A number specifying the value of a configuration item. See cfgWhat.

    cfgWhat

    A number specifying a configuration item.

    562484977: print enhanced statistics at termination.
    984762879: set the initial debug level.

    char

    A single character, an 8 bit quantity able to store 0-255.

    clkfreq: 4689-250M (13184-375M for the BCM2711)

    The hardware clock frequency.

    PI_HW_CLK_MIN_FREQ 4689
    PI_HW_CLK_MAX_FREQ 250000000
    PI_HW_CLK_MAX_FREQ_2711 375000000

    count

    The number of bytes to be transferred in an I2C, SPI, or Serial command.

    CS

    The GPIO used for the slave select signal when bit banging SPI.

    data_bits: 1-32

    The number of data bits to be used when adding serial data to a waveform.

    PI_MIN_WAVE_DATABITS 1
    PI_MAX_WAVE_DATABITS 32

    DMAchannel: 0-15

    PI_MIN_DMA_CHANNEL 0
    PI_MAX_DMA_CHANNEL 15

    double

    A floating point number.

    dutycycle: 0-range

    A number representing the ratio of on time to off time for PWM.

    The number may vary between 0 and range (default 255) where 0 is off and range is fully on.

    edge: 0-2

    The type of GPIO edge to generate an interrupt. See gpioSetISRFunc and gpioSetISRFuncEx.

    RISING_EDGE 0
    FALLING_EDGE 1
    EITHER_EDGE 2

    event: 0-31

    An event is a signal used to inform one or more consumers to start an action.

    eventFunc_t

    typedef void (*eventFunc_t) (int event, uint32_t tick);

    eventFuncEx_t

    typedef void (*eventFuncEx_t)
       (int event, uint32_t tick, void *userdata);

    f

    A function.

    *file

    A full file path. To be accessible the path must match an entry in /opt/pigpio/access.

    *fpat

    A file path which may contain wildcards. To be accessible the path must match an entry in /opt/pigpio/access.

    frequency: >=0

    The number of times a GPIO is swiched on and off per second. This can be set per GPIO and may be as little as 5Hz or as much as 40KHz. The GPIO will be on for a proportion of the time as defined by its dutycycle.

    gpio

    A Broadcom numbered GPIO, in the range 0-53.

    There are 54 General Purpose Input Outputs (GPIO) named GPIO0 through GPIO53.

    They are split into two banks. Bank 1 consists of GPIO0 through GPIO31. Bank 2 consists of GPIO32 through GPIO53.

    All the GPIO which are safe for the user to read and write are in bank 1. Not all GPIO in bank 1 are safe though. Type 1 boards have 17 safe GPIO. Type 2 boards have 21. Type 3 boards have 26.

    See gpioHardwareRevision.

    The user GPIO are marked with an X in the following table.

              0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
    Type 1    X  X  -  -  X  -  -  X  X  X  X #he start of buf to bit.

    bitPos: bit index from the start of buf
       buf: array of bits
       bit: 0-1, value to set

    double time_time(void)

    Return the current time in seconds since the Epoch.

    void time_sleep(double seconds)

    Delay execution for a given number of seconds

    seconds: the number of seconds to sleep

    void rawDumpWave(void)

    Used to print a readable version of the current waveform to stderr.

    Not intended for general use.

    void rawDumpScript(unsigned script_id)

    Used to print a readable version of a script to stderr.

    script_id: >=0, a script_id returned by gpioStoreScript


    Not intended for general use.

    PARAMETERS

    active: 0-1000000

    The number of microseconds level changes are reported for once a noise filter has been triggered (by steady microseconds of a stable level).

    arg1

    An unsigned argument passed to a user customised function. Its meaning is defined by the customiser.

    arg2

    An unsigned argument passed to a user customised function. Its meaning is defined by the customiser.

    argc

    The count of bytes passed to a user customised function.

    *argx

    A pointer to an array of bytes passed to a user customised function. Its meaning and content is defined by the customiser.

    baud

    The speed of serial communication (I2C, SPI, serial link, waves) in bits per second.

    bit

    A value of 0 or 1.

    bitPos

    A bit position within a byte or word. The least significant bit is position 0.

    bits

    A value used to select GPIO. If bit n of bits is set then GPIO n is selected.

    A convenient way to set bit n is to or in (1<<n).

    e.g. to select bits 5, 9, 23 you could use (1<<5) | (1<<9) | (1<<23).

    *bsc_xfer

    A pointer to a bsc_xfer_t object used to control a BSC transfer.

    bsc_xfer_t

    typedef struct
    {
       uint32_t control;          // Write
       int rxCnt;                 // Read only
       char rxBuf[BSC_FIFO_SIZE]; // Read only
       int txCnt;                 // Write
       char txBuf[BSC_FIFO_SIZE]; // Write
    } bsc_xfer_t;

    *buf

    A buffer to hold data being sent or being received.

    bufSize

    The size in bytes of a buffer.

    bVal: 0-255 (Hex 0x0-0xFF, Octal 0-0377)

    An 8-bit byte value.

    cbNum

    A number identifying a DMA contol block.

    cfgMicros

    The GPIO sample rate in microseconds. The default is 5us, or 200 thousand samples per second.

    cfgMillis: 100-10000

    The size of the sample buffer in milliseconds. Generally this should be left at the default of 120ms. If you expect i$small> Returns the number of the cb being currently output.

    Not intended for general use.

    rawCbs_t *rawWaveCBAdr(int cbNum)

    Return the (Linux) address of contol block cbNum.

    cbNum: the cb of interest


    Not intended for general use.

    uint32_t rawWaveGetOOL(int pos)

    Gets the OOL parameter stored at pos.

    pos: the position of interest.


    Not intended for general use.

    void rawWaveSetOOL(int pos, uint32_t lVal)

    Sets the OOL parameter stored at pos to value.

     pos: the position of interest
    lVal: the value to write


    Not intended for general use.

    uint32_t rawWaveGetOut(int pos)

    Gets the wave output parameter stored at pos.

    DEPRECATED: use rawWaveGetOOL instead.

    pos: the position of interest.


    Not intended for general use.

    void rawWaveSetOut(int pos, uint32_t lVal)

    Sets the wave output parameter stored at pos to value.

    DEPRECATED: use rawWaveSetOOL instead.

     pos: the position of interest
    lVal: the value to write


    Not intended for general use.

    uint32_t rawWaveGetIn(int pos)

    Gets the wave input value parameter stored at pos.

    DEPRECATED: use rawWaveGetOOL instead.

    pos: the position of interest


    Not intended for general use.

    void rawWaveSetIn(int pos, uint32_t lVal)

    Sets the wave input value stored at pos to value.

    DEPRECATED: use rawWaveSetOOL instead.

     pos: the position of interest
    lVal: the value to write


    Not intended for general use.

    rawWaveInfo_t rawWaveInfo(int wave_id)

    Gets details about the wave with id wave_id.

    wave_id: the wave of interest


    Not intended for general use.

    int getBitInBytes(int bitPos, char *buf, int numBits)

    Returns the value of the bit bitPos bits from the start of buf. Returns 0 if bitPos is greater than or equal to numBits.

     bitPos: bit index from the start of buf
        buf: array of bits
    numBits: number of valid bits in buf

    void putBitInBytes(int bitPos, char *buf, int bit)

    Sets the bit bitPos bits from t%e) arguments
    argc: number of extra arguments


    Returns >= 0 if OK, less than 0 indicates a user defined error.

    int gpioCustom2(unsigned arg1, char *argx, unsigned argc, char *retBuf, unsigned retMax)

    This function is available for user customisation.

    It differs from gpioCustom1 in that it returns an array of bytes rather than just an integer.

    The returned value is an integer indicating the number of returned bytes.   arg1: >=0
      argx: extra (byte) arguments
      argc: number of extra arguments
    retBuf: buffer for returned bytes
    retMax: maximum number of bytes to return


    Returns >= 0 if OK, less than 0 indicates a user defined error.

    The number of returned bytes must be retMax or less.

    int rawWaveAddSPI(rawSPI_t *spi, unsigned offset, unsigned spiSS, char *buf, unsigned spiTxBits, unsigned spiBitFirst, unsigned spiBitLast, unsigned spiBits)

    This function adds a waveform representing SPI data to the existing waveform (if any).

            spi: a pointer to a spi object
         offset: microseconds from the start of the waveform
          spiSS: the slave select GPIO
            buf: the bits to transmit, most significant bit first
      spiTxBits: the number of bits to write
    spiBitFirst: the first bit to read
     spiBitLast: the last bit to read
        spiBits: the number of bits to transfer


    Returns the new total number of pulses in the current waveform if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_SER_OFFSET, or PI_TOO_MANY_PULSES.

    Not intended for general use.

    int rawWaveAddGeneric(unsigned numPulses, rawWave_t *pulses)

    This function adds a number of pulses to the current waveform.

    numPulses: the number of pulses
       pulses: the array containing the pulses


    Returns the new total number of pulses in the current waveform if OK, otherwise PI_TOO_MANY_PULSES.

    The advantage of this function over gpioWaveAddGeneric is that it allows the setting of the flags field.

    The pulses are interleaved in time order within the existing waveform (if any).

    Merging allows the waveform to be built in parts, that is the settings for GPIO#1 can be added, and then GPIO#2 etc.

    If the added waveform is intended to start after or within the existing waveform then the first pulse should consist of a delay.

    Not intended for general use.

    unsigned rawWaveCB(void)
    If the board revision is not recognised then GPIO 2-27 are allowed.

    Unknown boardPI_DEFAULT_UPDATE_MASK_UNKNOWN0x0FFFFFFC
    Type 1 boardPI_DEFAULT_UPDATE_MASK_B10x03E6CF93
    Type 2 boardPI_DEFAULT_UPDATE_MASK_A_B20xFBC6CF9C
    Type 3 boardPI_DEFAULT_UPDATE_MASK_R30x0FFFFFFC

    int gpioCfgSocketPort(unsigned port)

    Configures pigpio to use the specified socket port.

    This function is only effective if called before gpioInitialise.

    port: 1024-32000


    The default setting is to use port 8888.

    int gpioCfgInterfaces(unsigned ifFlags)

    Configures pigpio support of the fifo and socket interfaces.

    This function is only effective if called before gpioInitialise.

    ifFlags: 0-7


    The default setting (0) is that both interfaces are enabled.

    Or in PI_DISABLE_FIFO_IF to disable the pipe interface.

    Or in PI_DISABLE_SOCK_IF to disable the socket interface.

    Or in PI_LOCALHOST_SOCK_IF to disable remote socket access (this means that the socket interface is only usable from the local Pi).

    int gpioCfgMemAlloc(unsigned memAllocMode)

    Selects the method of DMA memory allocation.

    This function is only effective if called before gpioInitialise.

    memAllocMode: 0-2


    There are two methods of DMA memory allocation. The original method uses the /proc/self/pagemap file to allocate bus memory. The new method uses the mailbox property interface to allocate bus memory.

    Auto will use the mailbox method unless a larger than default buffer size is requested with gpioCfgBufferSize.

    int gpioCfgNetAddr(int numSockAddr, uint32_t *sockAddr)

    Sets the network addresses which are allowed to talk over the socket interface.

    This function is only effective if called before gpioInitialise.

    numSockAddr: 0-256 (0 means all addresses allowed)
       sockAddr: an array of permitted network addresses.

    uint32_t gpioCfgGetInternals(void)

    This function returns the current library internal configuration settings.

    int gpioCfgSetInternals(uint32_t cfgVal)

    This function sets the current library internal configuration settings.

    cfgVal: see source code

    int gpioCustom1(unsigned arg1, unsigned arg2, char *argx, unsigned argc)

    This function is available for user customisation.

    It returns a single integer value.

    arg1: >=0
    arg2: >=0
    argx: extra (byt'4   45   87

    int gpioCfgClock(unsigned cfgMicros, unsigned cfgPeripheral, unsigned cfgSource)

    Configures pigpio to use a particular sample rate timed by a specified peripheral.

    This function is only effective if called before gpioInitialise.

        cfgMicros: 1, 2, 4, 5, 8, 10
    cfgPeripheral: 0 (PWM), 1 (PCM)
        cfgSource: deprecated, value is ignored


    The timings are provided by the specified peripheral (PWM or PCM).

    The default setting is 5 microseconds using the PCM peripheral.

    The approximate CPU percentage used for each sample rate is:

    sample  cpu
     rate    %

      1     25
      2     16
      4     11
      5     10
      8     15
     10     14


    A sample rate of 5 microseconds seeems to be the sweet spot.

    int gpioCfgDMAchannel(unsigned DMAchannel)

    Configures pigpio to use the specified DMA channel.

    This function is only effective if called before gpioInitialise.

    DMAchannel: 0-14


    The default setting is to use channel 14.

    int gpioCfgDMAchannels(unsigned primaryChannel, unsigned secondaryChannel)

    Configures pigpio to use the specified DMA channels.

    This function is only effective if called before gpioInitialise.

      primaryChannel: 0-14
    secondaryChannel: 0-14


    The default setting depends on whether the Pi has a BCM2711 chip or not (currently only the Pi4B has a BCM2711).

    The default setting for a non-BCM2711 is to use channel 14 for the primary channel and channel 6 for the secondary channel.

    The default setting for a BCM2711 is to use channel 7 for the primary channel and channel 6 for the secondary channel.

    The secondary channel is only used for the transmission of waves.

    If possible use one of channels 0 to 6 for the secondary channel (a full channel).

    A full channel only requires one DMA control block regardless of the length of a pulse delay. Channels 7 to 14 (lite channels) require one DMA control block for each 16383 microseconds of delay. I.e. a 10 second pulse delay requires one control block on a full channel and 611 control blocks on a lite channel.

    int gpioCfgPermissions(uint64_t updateMask)

    Configures pigpio to restrict GPIO updates via the socket or pipe interfaces to the GPIO specified by the mask. Programs directly calling the pigpio library (i.e. linked with -lpigpio are not affected). A GPIO update is a write to a GPIO or a GPIO mode change or any function which would force such an action.

    This function is only effective if called before gpioInitialise.

    updateMask: bit (1<<n) is set for each GPIO n which may be updated


    The default setting depends upon th(t
    fileList(char *fpat, char *buf, unsigned count)

    This function returns a list of files which match a pattern. The pattern may contain wildcards.

     fpat: file pattern to match
      buf: an array to receive the matching file names
    count: the maximum number of bytes to read


    Returns the number of returned bytes if OK, otherwise PI_NO_FILE_ACCESS, or PI_NO_FILE_MATCH.

    The pattern must match an entry in /opt/pigpio/access. The pattern may contain wildcards. See fileOpen.

    NOTE

    The returned value is not the number of files, it is the number of bytes in the buffer. The file names are separated by newline characters.

    Example

    #include <stdio.h>
    #include <pigpio.h>

    int main(int argc, char *argv[])
    {
       int c;
       char buf[1000];

       if (gpioInitialise() < 0) return 1;

       // assumes /opt/pigpio/access contains the following line
       // /ram/*.c r

       c = fileList("/ram/p*.c", buf, sizeof(buf));

       if (c >= 0)
       {
          // terminate string
          buf[c] = 0;
          printf("%s", buf);
       }

       gpioTerminate();
    }

    int gpioCfgBufferSize(unsigned cfgMillis)

    Configures pigpio to buffer cfgMillis milliseconds of GPIO samples.

    This function is only effective if called before gpioInitialise.

    cfgMillis: 100-10000


    The default setting is 120 milliseconds.

    The intention is to allow for bursts of data and protection against other processes hogging cpu time.

    I haven't seen a process locked out for more than 100 milliseconds.

    Making the buffer bigger uses a LOT of memory at the more frequent sampling rates as shown in the following table in MBs.

                         buffer milliseconds
                   120 250 500 1sec 2sec 4sec 8sec

             1      16  31  55  107  ---  ---  ---
             2      10  18  31   55  107  ---  ---
    sample   4       8  12  18   31   55  107  ---
     rate    5       8  10  14   24   45   87  ---
     (us)    8       6   8  12   18   31   55  107
            10       6   8  10   14   2)p;}

       gpioTerminate();
    }

    int fileClose(unsigned handle)

    This function closes the file associated with handle.

    handle: >=0, as returned by a call to fileOpen


    Returns 0 if OK, otherwise PI_BAD_HANDLE.

    Example

    fileClose(h);

    int fileWrite(unsigned handle, char *buf, unsigned count)

    This function writes count bytes from buf to the the file associated with handle.

    handle: >=0, as returned by a call to fileOpen
       buf: the array of bytes to write
     count: the number of bytes to write


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_FILE_NOT_WOPEN, or PI_BAD_FILE_WRITE.

    Example

    status = fileWrite(h, buf, count);
    if (status == 0)
    {
       // okay
    }
    else
    {
       // error
    }

    int fileRead(unsigned handle, char *buf, unsigned count)

    This function reads up to count bytes from the the file associated with handle and writes them to buf.

    handle: >=0, as returned by a call to fileOpen
       buf: an array to receive the read data
     count: the maximum number of bytes to read


    Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_FILE_NOT_ROPEN, or PI_BAD_FILE_WRITE.

    Example

    if (fileRead(h, buf, sizeof(buf)) > 0)
    {
       // process read data
    }

    int fileSeek(unsigned handle, int32_t seekOffset, int seekFrom)

    This function seeks to a position within the file associated with handle.

        handle: >=0, as returned by a call to fileOpen
    seekOffset: the number of bytes to move.  Positive offsets
                move forward, negative offsets backwards.
      seekFrom: one of PI_FROM_START (0), PI_FROM_CURRENT (1),
                or PI_FROM_END (2)


    Returns the new byte position within the file (>=0) if OK, otherwise PI_BAD_HANDLE, or PI_BAD_FILE_SEEK.

    Example

    fileSeek(0, 20, PI_FROM_START); // Seek to start plus 20

    size = fileSeek(0, 0, PI_FROM_END); // Seek to end, return size

    pos = fileSeek(0, 0, PI_FROM_CURRENT); // Return current position

    in*ll("scr1", "\"hello string with spaces world\"");

    int fileOpen(char *file, unsigned mode)

    This function returns a handle to a file opened in a specified mode.

    file: the file to open
    mode: the file open mode


    Returns a handle (>=0) if OK, otherwise PI_NO_HANDLE, PI_NO_FILE_ACCESS, PI_BAD_FILE_MODE, PI_FILE_OPEN_FAILED, or PI_FILE_IS_A_DIR.

    File

    A file may only be opened if permission is granted by an entry in /opt/pigpio/access. This is intended to allow remote access to files in a more or less controlled manner.

    Each entry in /opt/pigpio/access takes the form of a file path which may contain wildcards followed by a single letter permission. The permission may be R for read, W for write, U for read/write, and N for no access.

    Where more than one entry matches a file the most specific rule applies. If no entry matches a file then access is denied.

    Suppose /opt/pigpio/access contains the following entries

    /home/* n
    /home/pi/shared/dir_1/* w
    /home/pi/shared/dir_2/* r
    /home/pi/shared/dir_3/* u
    /home/pi/shared/dir_1/file.txt n


    Files may be written in directory dir_1 with the exception of file.txt.

    Files may be read in directory dir_2.

    Files may be read and written in directory dir_3.

    If a directory allows read, write, or read/write access then files may be created in that directory.

    In an attempt to prevent risky permissions the following paths are ignored in /opt/pigpio/access.

    a path containing ..
    a path containing only wildcards (*?)
    a path containing less than two non-wildcard parts


    Mode

    The mode may have the following values.

    MacroValueMeaning
    PI_FILE_READ1open file for reading
    PI_FILE_WRITE2open file for writing
    PI_FILE_RW3open file for reading and writing


    The following values may be or'd into the mode.

    MacroValueMeaning
    PI_FILE_APPEND4Writes append data to the end of the file
    PI_FILE_CREATE8The file is created if it doesn't exist
    PI_FILE_TRUNC16The file is truncated


    Newly created files are owned by root with permissions owner read and write.

    Example

    #include <stdio.h>
    #include <pigpio.h>

    int main(int argc, char *argv[])
    {
       int handle, c;
       char buf[60000];

       if (gpioInitialise() < 0) return 1;

       // assumes /opt/pigpio/access contains the following line
       // /ram/*.c r

       handle = fileOpen("/ram/pigpio.c", PI_FILE_READ);

       if (handle >= 0)
       {
          while ((c=fileRead(handle, buf, sizeof(buf)-1)))
          {
             buf[c] = 0;
             printf("%s", buf);
          }

          fileClose(handle);
      &nbs+ecified event occurs.

    event: 0-31
        f: the callback function


    Returns 0 if OK, otherwise PI_BAD_EVENT_ID.

    One function may be registered per event.

    The function is passed the event, and the tick.

    The callback may be cancelled by passing NULL as the function.

    int eventSetFuncEx(unsigned event, eventFuncEx_t f, void *userdata)

    Registers a function to be called (a callback) when the specified event occurs.

       event: 0-31
           f: the callback function
    userdata: pointer to arbitrary user data


    Returns 0 if OK, otherwise PI_BAD_EVENT_ID.

    One function may be registered per event.

    The function is passed the event, the tick, and the ueserdata pointer.

    The callback may be cancelled by passing NULL as the function.

    Only one of eventSetFunc or eventSetFuncEx can be registered per event.

    int eventTrigger(unsigned event)

    This function signals the occurrence of an event.

    event: 0-31, the event


    Returns 0 if OK, otherwise PI_BAD_EVENT_ID.

    An event is a signal used to inform one or more consumers to start an action. Each consumer which has registered an interest in the event (e.g. by calling eventSetFunc) will be informed by a callback.

    One event, PI_EVENT_BSC (31) is predefined. This event is auto generated on BSC slave activity.

    The meaning of other events is arbitrary.

    Note that other than its id and its tick there is no data associated with an event.

    int shell(char *scriptName, char *scriptString)

    This function uses the system call to execute a shell script with the given string as its parameter.

      scriptName: the name of the script, only alphanumeric characters,
                  '-' and '_' are allowed in the name
    scriptString: the string to pass to the script


    The exit status of the system call is returned if OK, otherwise PI_BAD_SHELL_STATUS.

    scriptName must exist in /opt/pigpio/cgi and must be executable.

    The returned exit status is normally 256 times that set by the shell script exit function. If the script can't be found 32512 will be returned.

    The following table gives some example returned statuses.

    Script exit statusReturned system call status
    1256
    51280
    102560
    20051200
    script not found32512


    Example

    // pass two parameters, hello and world
    status = shell("scr1", "hello world");

    // pass three parameters, hello, string with spaces, and world
    status = shell("scr1", "hello 'string with spaces' world");

    // pass one parameter, hello string with spaces world
    status = she, startTick;

    printf("some processing took %d microseconds", diffTick);

    unsigned gpioHardwareRevision(void)

    Returns the hardware revision.

    If the hardware revision can not be found or is not a valid hexadecimal number the function returns 0.

    The hardware revision is the last few characters on the Revision line of /proc/cpuinfo.

    The revision number can be used to determine the assignment of GPIO to pins (see gpio).

    There are at least three types of board.

    Type 1 boards have hardware revision numbers of 2 and 3.

    Type 2 boards have hardware revision numbers of 4, 5, 6, and 15.

    Type 3 boards have hardware revision numbers of 16 or greater.

    for "Revision : 0002" the function returns 2.
    for "Revision : 000f" the function returns 15.
    for "Revision : 000g" the function returns 0.

    unsigned gpioVersion(void)

    Returns the pigpio version.

    int gpioGetPad(unsigned pad)

    This function returns the pad drive strength in mA.

    pad: 0-2, the pad to get


    Returns the pad drive strength if OK, otherwise PI_BAD_PAD.

    PadGPIO
    00-27
    128-45
    246-53


    Example

    strength = gpioGetPad(1); // get pad 1 strength

    int gpioSetPad(unsigned pad, unsigned padStrength)

    This function sets the pad drive strength in mA.

            pad: 0-2, the pad to set
    padStrength: 1-16 mA


    Returns 0 if OK, otherwise PI_BAD_PAD, or PI_BAD_STRENGTH.

    PadGPIO
    00-27
    128-45
    246-53


    Example

    gpioSetPad(0, 16); // set pad 0 strength to 16 mA

    int eventMonitor(unsigned handle, uint32_t bits)

    This function selects the events to be reported on a previously opened handle.

    handle: >=0, as returned by gpioNotifyOpen
      bits: a bit mask indicating the events of interest


    Returns 0 if OK, otherwise PI_BAD_HANDLE.

    A report is sent each time an event is triggered providing the corresponding bit in bits is set.

    See gpioNotifyBegin for the notification format.

    Example

    // Start reporting events 3, 6, and 7.

    //  bit      76543210
    // (0xC8 = 0b11001000)

    eventMonitor(h, 0xC8);

    int eventSetFunc(unsigned event, eventFunc_t f)

    Registers a function to be called (a callback) when the sp-s automatically scaled to take this into account.

    int gpioTime(unsigned timetype, int *seconds, int *micros)

    Updates the seconds and micros variables with the current time.

    timetype: 0 (relative), 1 (absolute)
     seconds: a pointer to an int to hold seconds
      micros: a pointer to an int to hold microseconds


    Returns 0 if OK, otherwise PI_BAD_TIMETYPE.

    If timetype is PI_TIME_ABSOLUTE updates seconds and micros with the number of seconds and microseconds since the epoch (1st January 1970).

    If timetype is PI_TIME_RELATIVE updates seconds and micros with the number of seconds and microseconds since the library was initialised.

    Example

    int secs, mics;

    // print the number of seconds since the library was started
    gpioTime(PI_TIME_RELATIVE, &secs, &mics);
    printf("library started %d.%03d seconds ago", secs, mics/1000);

    int gpioSleep(unsigned timetype, int seconds, int micros)

    Sleeps for the number of seconds and microseconds specified by seconds and micros.

    timetype: 0 (relative), 1 (absolute)
     seconds: seconds to sleep
      micros: microseconds to sleep


    Returns 0 if OK, otherwise PI_BAD_TIMETYPE, PI_BAD_SECONDS, or PI_BAD_MICROS.

    If timetype is PI_TIME_ABSOLUTE the sleep ends when the number of seconds and microseconds since the epoch (1st January 1970) has elapsed. System clock changes are taken into account.

    If timetype is PI_TIME_RELATIVE the sleep is for the specified number of seconds and microseconds. System clock changes do not effect the sleep length.

    For short delays (say, 50 microseonds or less) use gpioDelay.

    Example

    gpioSleep(PI_TIME_RELATIVE, 2, 500000); // sleep for 2.5 seconds

    gpioSleep(PI_TIME_RELATIVE, 0, 100000); // sleep for 0.1 seconds

    gpioSleep(PI_TIME_RELATIVE, 60, 0);     // sleep for one minute

    uint32_t gpioDelay(uint32_t micros)

    Delays for at least the number of microseconds specified by micros.

    micros: the number of microseconds to sleep


    Returns the actual length of the delay in microseconds.

    Delays of 100 microseconds or less use busy waits.

    uint32_t gpioTick(void)

    Returns the current system tick.

    Tick is the number of microseconds since system boot.

    As tick is an unsigned 32 bit quantity it wraps around after 2^32 microseconds, which is approximately 1 hour 12 minutes.

    You don't need to worry about the wrap around as long as you take a tick (uint32_t) from another tick, i.e. the following code will always provide the correct difference.

    Example

    uint32_t startTick, endTick;
    int diffTick;

    startTick = gpioTick();

    // do some processing

    endTick = gpioTick();

    diffTick = endTick -.bsp;gpio: see description
    clkfreq: 0 (off) or 4689-250M (13184-375M for the BCM2711)


    Returns 0 if OK, otherwise PI_BAD_GPIO, PI_NOT_HCLK_GPIO, PI_BAD_HCLK_FREQ,or PI_BAD_HCLK_PASS.

    The same clock is available on multiple GPIO. The latest frequency setting will be used by all GPIO which share a clock.

    The GPIO must be one of the following.

    4   clock 0  All models
    5   clock 1  All models but A and B (reserved for system use)
    6   clock 2  All models but A and B
    20  clock 0  All models but A and B
    21  clock 1  All models but A and Rev.2 B (reserved for system use)

    32  clock 0  Compute module only
    34  clock 0  Compute module only
    42  clock 1  Compute module only (reserved for system use)
    43  clock 2  Compute module only
    44  clock 1  Compute module only (reserved for system use)


    Access to clock 1 is protected by a password as its use will likely crash the Pi. The password is given by or'ing 0x5A000000 with the GPIO number.

    int gpioHardwarePWM(unsigned gpio, unsigned PWMfreq, unsigned PWMduty)

    Starts hardware PWM on a GPIO at the specified frequency and dutycycle. Frequencies above 30MHz are unlikely to work.

    NOTE: Any waveform started by gpioWaveTxSend, or gpioWaveChain will be cancelled.

    This function is only valid if the pigpio main clock is PCM. The main clock defaults to PCM but may be overridden by a call to gpioCfgClock.

       gpio: see description
    PWMfreq: 0 (off) or 1-125M (1-187.5M for the BCM2711)
    PWMduty: 0 (off) to 1000000 (1M)(fully on)


    Returns 0 if OK, otherwise PI_BAD_GPIO, PI_NOT_HPWM_GPIO, PI_BAD_HPWM_DUTY, PI_BAD_HPWM_FREQ, or PI_HPWM_ILLEGAL.

    The same PWM channel is available on multiple GPIO. The latest frequency and dutycycle setting will be used by all GPIO which share a PWM channel.

    The GPIO must be one of the following.

    12  PWM channel 0  All models but A and B
    13  PWM channel 1  All models but A and B
    18  PWM channel 0  All models
    19  PWM channel 1  All models but A and B

    40  PWM channel 0  Compute module only
    41  PWM channel 1  Compute module only
    45  PWM channel 1  Compute module only
    52  PWM channel 0  Compute module only
    53  PWM channel 1  Compute module only


    The actual number of steps beween off and fully on is the integral part of 250M/PWMfreq (375M/PWMfreq for the BCM2711).

    The actual frequency set is 250M/steps (375M/steps for the BCM2711).

    There will only be a million steps for a PWMfreq of 250 (375 for the BCM2711). Lower frequencies will have more steps and higher frequencies will have fewer steps. PWMduty i/ f)
    Registers a function to be called (a callback) when a signal occurs.

    signum: 0-63
         f: the callback function


    Returns 0 if OK, otherwise PI_BAD_SIGNUM.

    The function is passed the signal number.

    One function may be registered per signal.

    The callback may be cancelled by passing NULL.

    By default all signals are treated as fatal and cause the library to call gpioTerminate and then exit.

    int gpioSetSignalFuncEx(unsigned signum, gpioSignalFuncEx_t f, void *userdata)

    Registers a function to be called (a callback) when a signal occurs.

      signum: 0-63
           f: the callback function
    userdata: a pointer to arbitrary user data


    Returns 0 if OK, otherwise PI_BAD_SIGNUM.

    The function is passed the signal number and the userdata pointer.

    Only one of gpioSetSignalFunc or gpioSetSignalFuncEx can be registered per signal.

    See gpioSetSignalFunc for further details.

    uint32_t gpioRead_Bits_0_31(void)

    Returns the current level of GPIO 0-31.

    uint32_t gpioRead_Bits_32_53(void)

    Returns the current level of GPIO 32-53.

    int gpioWrite_Bits_0_31_Clear(uint32_t bits)

    Clears GPIO 0-31 if the corresponding bit in bits is set.

    bits: a bit mask of GPIO to clear


    Returns 0 if OK.

    Example

    // To clear (set to 0) GPIO 4, 7, and 15
    gpioWrite_Bits_0_31_Clear( (1<<4) | (1<<7) | (1<<15) );

    int gpioWrite_Bits_32_53_Clear(uint32_t bits)

    Clears GPIO 32-53 if the corresponding bit (0-21) in bits is set.

    bits: a bit mask of GPIO to clear


    Returns 0 if OK.

    int gpioWrite_Bits_0_31_Set(uint32_t bits)

    Sets GPIO 0-31 if the corresponding bit in bits is set.

    bits: a bit mask of GPIO to set


    Returns 0 if OK.

    int gpioWrite_Bits_32_53_Set(uint32_t bits)

    Sets GPIO 32-53 if the corresponding bit (0-21) in bits is set.

    bits: a bit mask of GPIO to set


    Returns 0 if OK.

    Example

    // To set (set to 1) GPIO 32, 40, and 53
    gpioWrite_Bits_32_53_Set((1<<(32-32)) | (1<<(40-32)) | (1<<(53-32)));

    int gpioHardwareClock(unsigned gpio, unsigned clkfreq)

    Starts a hardware clock on a GPIO at the specified frequency. Frequencies above 30MHz are unlikely to work.

      &n0reScript
       numPar: 0-10, the number of parameters
        param: an array of parameters


    The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM.

    param is an array of up to 10 parameters which may be referenced in the script as p0 to p9.

    int gpioRunScript(unsigned script_id, unsigned numPar, uint32_t *param)

    This function runs a stored script.

    script_id: >=0, as returned by gpioStoreScript
       numPar: 0-10, the number of parameters
        param: an array of parameters


    The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM.

    param is an array of up to 10 parameters which may be referenced in the script as p0 to p9.

    int gpioUpdateScript(unsigned script_id, unsigned numPar, uint32_t *param)

    This function sets the parameters of a script. The script may or may not be running. The first numPar parameters of the script are overwritten with the new values.

    script_id: >=0, as returned by gpioStoreScript
       numPar: 0-10, the number of parameters
        param: an array of parameters


    The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM.

    param is an array of up to 10 parameters which may be referenced in the script as p0 to p9.

    int gpioScriptStatus(unsigned script_id, uint32_t *param)

    This function returns the run status of a stored script as well as the current values of parameters 0 to 9.

    script_id: >=0, as returned by gpioStoreScript
        param: an array to hold the returned 10 parameters


    The function returns greater than or equal to 0 if OK, otherwise PI_BAD_SCRIPT_ID.

    The run status may be

    PI_SCRIPT_INITING
    PI_SCRIPT_HALTED
    PI_SCRIPT_RUNNING
    PI_SCRIPT_WAITING
    PI_SCRIPT_FAILED


    The current value of script parameters 0 to 9 are returned in param.

    int gpioStopScript(unsigned script_id)

    This function stops a running script.

    script_id: >=0, as returned by gpioStoreScript


    The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID.

    int gpioDeleteScript(unsigned script_id)

    This function deletes a stored script.

    script_id: >=0, as returned by gpioStoreScript


    The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID.

    int gpioSetSignalFunc(unsigned signum, gpioSignalFunc_t2="#*userdata">*userdata)

    Registers a function to be called (a callback) every millis milliseconds.

       timer: 0-9.
      millis: 10-60000
           f: the function to call
    userdata: a pointer to arbitrary user data


    Returns 0 if OK, otherwise PI_BAD_TIMER, PI_BAD_MS, or PI_TIMER_FAILED.

    The function is passed the userdata pointer.

    Only one of gpioSetTimerFunc or gpioSetTimerFuncEx can be registered per timer.

    See gpioSetTimerFunc for further details.

    pthread_t *gpioStartThread(gpioThreadFunc_t f, void *userdata)

    Starts a new thread of execution with f as the main routine.

           f: the main function for the new thread
    userdata: a pointer to arbitrary user data


    Returns a pointer to pthread_t if OK, otherwise NULL.

    The function is passed the single argument arg.

    The thread can be cancelled by passing the pointer to pthread_t to gpioStopThread.

    Example

    #include <stdio.h>
    #include <pigpio.h>

    void *myfunc(void *arg)
    {
       while (1)
       {
          printf("%s", arg);
          sleep(1);
       }
    }

    int main(int argc, char *argv[])
    {
       pthread_t *p1, *p2, *p3;

       if (gpioInitialise() < 0) return 1;

       p1 = gpioStartThread(myfunc, "thread 1"); sleep(3);

       p2 = gpioStartThread(myfunc, "thread 2"); sleep(3);

       p3 = gpioStartThread(myfunc, "thread 3"); sleep(3);

       gpioStopThread(p3); sleep(3);

       gpioStopThread(p2); sleep(3);

       gpioStopThread(p1); sleep(3);

       gpioTerminate();
    }

    void gpioStopThread(pthread_t *pth)

    Cancels the thread pointed at by pth.

    pth: a thread pointer returned by gpioStartThread


    No value is returned.

    The thread to be stopped should have been started with gpioStartThread.

    int gpioStoreScript(char *script)

    This function stores a null terminated script for later execution.

    See http://abyz.me.uk/rpi/pigpio/pigs.html#Scripts for details.

    script: the text of the script


    The function returns a script id if the script is valid, otherwise PI_BAD_SCRIPT.

    int gpioRunScript(unsigned script_id, unsigned numPar, uint32_t *param)

    This function runs a stored script.

    script_id: >=0, as returned by gpioSto3esFunc, and gpioSetGetSamplesFuncEx.

    It does not affect interrupts set up with gpioSetISRFunc, gpioSetISRFuncEx, or levels read by gpioRead, gpioRead_Bits_0_31, or gpioRead_Bits_32_53.

    Each (stable) edge will be timestamped steady microseconds after it was first detected.

    int gpioSetGetSamplesFunc(gpioGetSamplesFunc_t f, uint32_t bits)

    Registers a function to be called (a callback) every millisecond with the latest GPIO samples.

       f: the function to call
    bits: the GPIO of interest


    Returns 0 if OK.

    The function is passed a pointer to the samples (an array of gpioSample_t), and the number of samples.

    Only one function can be registered.

    The callback may be cancelled by passing NULL as the function.

    The samples returned will be the union of bits, plus any active alerts, plus any active notifications.

    e.g. if there are alerts for GPIO 7, 8, and 9, notifications for GPIO 8, 10, 23, 24, and bits is (1<<23)|(1<<17) then samples for GPIO 7, 8, 9, 10, 17, 23, and 24 will be reported.

    int gpioSetGetSamplesFuncEx(gpioGetSamplesFuncEx_t f, uint32_t bits, void *userdata)

    Registers a function to be called (a callback) every millisecond with the latest GPIO samples.

           f: the function to call
        bits: the GPIO of interest
    userdata: a pointer to arbitrary user data


    Returns 0 if OK.

    The function is passed a pointer to the samples (an array of gpioSample_t), the number of samples, and the userdata pointer.

    Only one of gpioGetSamplesFunc or gpioGetSamplesFuncEx can be registered.

    See gpioSetGetSamplesFunc for further details.

    int gpioSetTimerFunc(unsigned timer, unsigned millis, gpioTimerFunc_t f)

    Registers a function to be called (a callback) every millis milliseconds.

     timer: 0-9
    millis: 10-60000
         f: the function to call


    Returns 0 if OK, otherwise PI_BAD_TIMER, PI_BAD_MS, or PI_TIMER_FAILED.

    10 timers are supported numbered 0 to 9.

    One function may be registered per timer.

    The timer may be cancelled by passing NULL as the function.

    Example

    void bFunction(void)
    {
       printf("two seconds have elapsed");
    }

    // call bFunction every 2000 milliseconds
    gpioSetTimerFunc(0, 2000, bFunction);

    int gpioSetTimerFuncEx(unsigned timer, unsigned millis, gpioTimerFuncEx_t f, void     level: 0,1


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_LEVEL, or PI_BAD_PULSELEN.

    int gpioSetWatchdog(unsigned user_gpio, unsigned timeout)

    Sets a watchdog for a GPIO.

    user_gpio: 0-31
      timeout: 0-60000


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_BAD_WDOG_TIMEOUT.

    The watchdog is nominally in milliseconds.

    One watchdog may be registered per GPIO.

    The watchdog may be cancelled by setting timeout to 0.

    Until cancelled a timeout will be reported every timeout milliseconds after the last GPIO activity.

    In particular:

    1) any registered alert function for the GPIO will be called with the level set to PI_TIMEOUT.

    2) any notification for the GPIO will have a report written to the fifo with the flags set to indicate a watchdog timeout.

    Example

    void aFunction(int gpio, int level, uint32_t tick)
    {
       printf("GPIO %d became %d at %d", gpio, level, tick);
    }

    // call aFunction whenever GPIO 4 changes state
    gpioSetAlertFunc(4, aFunction);

    //  or approximately every 5 millis
    gpioSetWatchdog(4, 5);

    int gpioNoiseFilter(unsigned user_gpio, unsigned steady, unsigned active)

    Sets a noise filter on a GPIO.

    Level changes on the GPIO are ignored until a level which has been stable for steady microseconds is detected. Level changes on the GPIO are then reported for active microseconds after which the process repeats.

    user_gpio: 0-31
       steady: 0-300000
       active: 0-1000000


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER.

    This filter affects the GPIO samples returned to callbacks set up with gpioSetAlertFunc, gpioSetAlertFuncEx, gpioSetGetSamplesFunc, and gpioSetGetSamplesFuncEx.

    It does not affect interrupts set up with gpioSetISRFunc, gpioSetISRFuncEx, or levels read by gpioRead, gpioRead_Bits_0_31, or gpioRead_Bits_32_53.

    Level changes before and after the active period may be reported. Your software must be designed to cope with such reports.

    int gpioGlitchFilter(unsigned user_gpio, unsigned steady)

    Sets a glitch filter on a GPIO.

    Level changes on the GPIO are not reported unless the level has been stable for at least steady microseconds. The level is then reported. Level changes of less than steady microseconds are ignored.

    user_gpio: 0-31
       steady: 0-300000


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER.

    This filter affects the GPIO samples returned to callbacks set up with gpioSetAlertFunc, gpioSetAlertFuncEx, gpioSetGetSampl5d. This parameter should be set to zero.

    int serClose(unsigned handle)

    This function closes the serial device associated with handle.

    handle: >=0, as returned by a call to serOpen


    Returns 0 if OK, otherwise PI_BAD_HANDLE.

    int serWriteByte(unsigned handle, unsigned bVal)

    This function writes bVal to the serial port associated with handle.

    handle: >=0, as returned by a call to serOpen


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED.

    int serReadByte(unsigned handle)

    This function reads a byte from the serial port associated with handle.

    handle: >=0, as returned by a call to serOpen


    Returns the read byte (>=0) if OK, otherwise PI_BAD_HANDLE, PI_SER_READ_NO_DATA, or PI_SER_READ_FAILED.

    If no data is ready PI_SER_READ_NO_DATA is returned.

    int serWrite(unsigned handle, char *buf, unsigned count)

    This function writes count bytes from buf to the the serial port associated with handle.

    handle: >=0, as returned by a call to serOpen
       buf: the array of bytes to write
     count: the number of bytes to write


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED.

    int serRead(unsigned handle, char *buf, unsigned count)

    This function reads up count bytes from the the serial port associated with handle and writes them to buf.

    handle: >=0, as returned by a call to serOpen
       buf: an array to receive the read data
     count: the maximum number of bytes to read


    Returns the number of bytes read (>0=) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_READ_NO_DATA.

    If no data is ready zero is returned.

    int serDataAvailable(unsigned handle)

    This function returns the number of bytes available to be read from the device associated with handle.

    handle: >=0, as returned by a call to serOpen


    Returns the number of bytes of data available (>=0) if OK, otherwise PI_BAD_HANDLE.

    int gpioTrigger(unsigned user_gpio, unsigned pulseLen, unsigned level)

    This function sends a trigger pulse to a GPIO. The GPIO is set to level for pulseLen microseconds and then reset to not level.

    user_gpio: 0-31
     pulse6.g. to transfer 32 11-bit words buf should contain 64 bytes and count should be 64.

    E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A.

    The other bits in flags should be set to zero.

    int spiClose(unsigned handle)

    This functions closes the SPI device identified by the handle.

    handle: >=0, as returned by a call to spiOpen


    Returns 0 if OK, otherwise PI_BAD_HANDLE.

    int spiRead(unsigned handle, char *buf, unsigned count)

    This function reads count bytes of data from the SPI device associated with the handle.

    handle: >=0, as returned by a call to spiOpen
       buf: an array to receive the read data bytes
     count: the number of bytes to read


    Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED.

    int spiWrite(unsigned handle, char *buf, unsigned count)

    This function writes count bytes of data from buf to the SPI device associated with the handle.

    handle: >=0, as returned by a call to spiOpen
       buf: the data bytes to write
     count: the number of bytes to write


    Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED.

    int spiXfer(unsigned handle, char *txBuf, char *rxBuf, unsigned count)

    This function transfers count bytes of data from txBuf to the SPI device associated with the handle. Simultaneously count bytes of data are read from the device and placed in rxBuf.

    handle: >=0, as returned by a call to spiOpen
     txBuf: the data bytes to write
     rxBuf: the received data bytes
     count: the number of bytes to transfer


    Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED.

    int serOpen(char *sertty, unsigned baud, unsigned serFlags)

    This function opens a serial device at a specified baud rate and with specified flags. The device name must start with /dev/tty or /dev/serial.

      sertty: the serial device to open
        baud: the baud rate in bits per second, see below
    serFlags: 0


    Returns a handle (>=0) if OK, otherwise PI_NO_HANDLE, or PI_SER_OPEN_FAILED.

    The baud rate must be one of 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, or 230400.

    No flags are currently define7bsp; }
             }
          }
       }

       bbSPIClose(CE0);
       bbSPIClose(CE1);

       gpioTerminate();

       return 0;
    }

    int spiOpen(unsigned spiChan, unsigned baud, unsigned spiFlags)

    This function returns a handle for the SPI device on the channel. Data will be transferred at baud bits per second. The flags may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select.

    The Pi has two SPI peripherals: main and auxiliary.

    The main SPI has two chip selects (channels), the auxiliary has three.

    The auxiliary SPI is available on all models but the A and B.

    The GPIO used are given in the following table.

    MISOMOSISCLKCE0CE1CE2
    Main SPI9101187-
    Aux SPI192021181716


     spiChan: 0-1 (0-2 for the auxiliary SPI)
        baud: 32K-125M (values above 30M are unlikely to work)
    spiFlags: see below


    Returns a handle (>=0) if OK, otherwise PI_BAD_SPI_CHANNEL, PI_BAD_SPI_SPEED, PI_BAD_FLAGS, PI_NO_AUX_SPI, or PI_SPI_OPEN_FAILED.

    spiFlags consists of the least significant 22 bits.

    21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
     b  b  b  b  b  b  R  T  n  n  n  n  W  A u2 u1 u0 p2 p1 p0  m  m


    mm defines the SPI mode.

    Warning: modes 1 and 3 do not appear to work on the auxiliary SPI.

    Mode POL PHA
     0    0   0
     1    0   1
     2    1   0
     3    1   1


    px is 0 if CEx is active low (default) and 1 for active high.

    ux is 0 if the CEx GPIO is reserved for SPI (default) and 1 otherwise.

    A is 0 for the main SPI, 1 for the auxiliary SPI.

    W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Main SPI only.

    nnnn defines the number of bytes (0-15) to write before switching the MOSI line to MISO to read data. This field is ignored if W is not set. Main SPI only.

    T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. Auxiliary SPI only.

    R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. Auxiliary SPI only.

    bbbbbb defines the word size in bits (0-32). The default (0) sets 8 bits per word. Auxiliary SPI only.

    The spiRead, spiWrite, and spiXfer functions transfer data packed into 1, 2, or 4 bytes according to the word size in bits.

    For bits 1-8 there will be one byte per word.
    For bits 9-16 there will be two bytes per word.
    For bits 17-32 there will be four bytes per word.

    Multi-byte transfers are made in least significant byte first order.

    E8 SPI on a set of GPIO opened with bbSPIOpen.

    CS: 0-31, the CS GPIO used in a prior call to bbSPIOpen


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_SPI_GPIO.

    int bbSPIXfer(unsigned CS, char *inBuf, char *outBuf, unsigned count)

    This function executes a bit banged SPI transfer.

        CS: 0-31 (as used in a prior call to bbSPIOpen)
     inBuf: pointer to buffer to hold data to be sent
    outBuf: pointer to buffer to hold returned data
     count: size of data transfer


    Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_USER_GPIO, PI_NOT_SPI_GPIO or PI_BAD_POINTER.

    Example

    // gcc -Wall -pthread -o bbSPIx_test bbSPIx_test.c -lpigpio
    // sudo ./bbSPIx_test

    #include <stdio.h>

    #include "pigpio.h"

    #define CE0 5
    #define CE1 6
    #define MISO 13
    #define MOSI 19
    #define SCLK 12

    int main(int argc, char *argv[])
    {
       int i, count, set_val, read_val;
       unsigned char inBuf[3];
       char cmd1[] = {0, 0};
       char cmd2[] = {12, 0};
       char cmd3[] = {1, 128, 0};

       if (gpioInitialise() < 0)
       {
          fprintf(stderr, "pigpio initialisation failed.\n");
          return 1;
       }

       bbSPIOpen(CE0, MISO, MOSI, SCLK, 10000, 0); // MCP4251 DAC
       bbSPIOpen(CE1, MISO, MOSI, SCLK, 20000, 3); // MCP3008 ADC

       for (i=0; i<256; i++)
       {
          cmd1[1] = i;

          count = bbSPIXfer(CE0, cmd1, (char *)inBuf, 2); // > DAC

          if (count == 2)
          {
             count = bbSPIXfer(CE0, cmd2, (char *)inBuf, 2); // < DAC

             if (count == 2)
             {
                set_val = inBuf[1];

                count = bbSPIXfer(CE1, cmd3, (char *)inBuf, 3); // < ADC

                if (count == 3)
                {
                   read_val = ((inBuf[1]&3)<<8) | inBuf[2];
                   printf("%d %d\n", set_val, read_val);
              &n9nbsp; T  T  T RB TE RF TF RE TB


    Bits 0-15 are copied unchanged from the BSC FR register. See pages 165-166 of the Broadcom peripherals document for full details.

    SSSSSnumber of bytes successfully copied to transmit FIFO
    RRRRRnumber of bytes in receieve FIFO
    TTTTTnumber of bytes in transmit FIFO
    RBreceive busy
    TEtransmit FIFO empty
    RFreceive FIFO full
    TFtransmit FIFO full
    REreceive FIFO empty
    TBtransmit busy


    The following example shows how to configure the BSC peripheral as an I2C slave with address 0x13 and send four bytes.

    Example

    bsc_xfer_t xfer;

    xfer.control = (0x13<<16) | 0x305;

    memcpy(xfer.txBuf, "ABCD", 4);
    xfer.txCnt = 4;

    status = bscXfer(&xfer);

    if (status >= 0)
    {
       // process transfer
    }

    int bbSPIOpen(unsigned CS, unsigned MISO, unsigned MOSI, unsigned SCLK, unsigned baud, unsigned spiFlags)

    This function selects a set of GPIO for bit banging SPI with a specified baud rate and mode.

          CS: 0-31
        MISO: 0-31
        MOSI: 0-31
        SCLK: 0-31
        baud: 50-250000
    spiFlags: see below


    spiFlags consists of the least significant 22 bits.

    21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
     0  0  0  0  0  0  R  T  0  0  0  0  0  0  0  0  0  0  0  p  m  m


    mm defines the SPI mode, defaults to 0

    Mode CPOL CPHA
     0    0    0
     1    0    1
     2    1    0
     3    1    1


    p is 0 if CS is active low (default) and 1 for active high.

    T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first.

    R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first.

    The other bits in flags should be set to zero.

    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_SPI_BAUD, or PI_GPIO_IN_USE.

    If more than one device is connected to the SPI bus (defined by SCLK, MOSI, and MISO) each must have its own CS.

    Example

    bbSPIOpen(10, MISO, MOSI, SCLK, 10000, 0); // device 1
    bbSPIOpen(11, MISO, MOSI, SCLK, 20000, 3); // device 2

    int bbSPIClose(unsigned CS)

    This function stops bit banging:sp;          // Read only
       char rxBuf[BSC_FIFO_SIZE]; // Read only
       int txCnt;                 // Write
       char txBuf[BSC_FIFO_SIZE]; // Write
    } bsc_xfer_t;


    To start a transfer set control (see below), copy the bytes to be added to the transmit FIFO (if any) to txBuf and set txCnt to the number of copied bytes.

    Upon return rxCnt will be set to the number of received bytes placed in rxBuf.

    Note that the control word sets the BSC mode. The BSC will stay in that mode until a different control word is sent.

    GPIO used for models other than those based on the BCM2711.

    SDASCLMOSISCLKMISOCE
    I2C1819----
    SPI--18192021


    GPIO used for models based on the BCM2711 (e.g. the Pi4B).

    SDASCLMOSISCLKMISOCE
    I2C1011----
    SPI--101198


    When a zero control word is received the used GPIO will be reset to INPUT mode.

    The returned function value is the status of the transfer (see below).

    If there was an error the status will be less than zero (and will contain the error code).

    The most significant word of the returned status contains the number of bytes actually copied from txBuf to the BSC transmit FIFO (may be less than requested if the FIFO already contained untransmitted data).

    control consists of the following bits.

    22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
     a  a  a  a  a  a  a  -  - IT HC TF IR RE TE BK EC ES PL PH I2 SP EN


    Bits 0-13 are copied unchanged to the BSC CR register. See pages 163-165 of the Broadcom peripherals document for full details.

    aaaaaaadefines the I2C slave address (only relevant in I2C mode)
    ITinvert transmit status flags
    HCenable host control
    TFenable test FIFO
    IRinvert receive status flags
    REenable receive
    TEenable transmit
    BKabort operation and clear FIFOs
    ECsend control register as first I2C byte
    ESsend status register as first I2C byte
    PLset SPI polarity high
    PHset SPI phase high
    I2enable I2C mode
    SPenable SPI mode
    ENenable BSC peripheral


    The returned status has the following format

    20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
     S  S  S  S  S  R  R  R  R  R  T  T&;unsigned">unsigned outLen)

    This function executes a sequence of bit banged I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenated command codes and associated data.

       SDA: 0-31 (as used in a prior call to bbI2COpen)
     inBuf: pointer to the concatenated I2C commands, see below
     inLen: size of command buffer
    outBuf: pointer to buffer to hold returned data
    outLen: size of output buffer


    Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_USER_GPIO, PI_NOT_I2C_GPIO, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN, PI_BAD_I2C_WLEN, PI_I2C_READ_FAILED, or PI_I2C_WRITE_FAILED.

    The following command codes are supported:

    NameCmd & DataMeaning
    End0No more commands
    Escape1Next P is two bytes
    Start2Start condition
    Stop3Stop condition
    Address4 PSet I2C address to P
    Flags5 lsb msbSet I2C flags to lsb + (msb << 8)
    Read6 PRead P bytes of data
    Write7 P ...Write P bytes of data


    The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first).

    The address and flags default to 0. The address and flags maintain their previous value until updated.

    No flags are currently defined.

    The returned I2C data is stored in consecutive locations of outBuf.

    Example

    Set address 0x53
    start, write 0x32, (re)start, read 6 bytes, stop
    Set address 0x1E
    start, write 0x03, (re)start, read 6 bytes, stop
    Set address 0x68
    start, write 0x1B, (re)start, read 8 bytes, stop
    End

    0x04 0x53
    0x02 0x07 0x01 0x32   0x02 0x06 0x06 0x03

    0x04 0x1E
    0x02 0x07 0x01 0x03   0x02 0x06 0x06 0x03

    0x04 0x68
    0x02 0x07 0x01 0x1B   0x02 0x06 0x08 0x03

    0x00

    int bscXfer(bsc_xfer_t *bsc_xfer)

    This function provides a low-level interface to the SPI/I2C Slave peripheral on the BCM chip.

    This peripheral allows the Pi to act as a hardware slave device on an I2C or SPI bus.

    This is not a bit bang version and as such is OS timing independent. The bus timing is handled directly by the chip.

    The output process is simple. You simply append data to the FIFO buffer on the chip. This works like a queue, you add data to the queue and the master removes it.

    I can't get SPI to work properly. I tried with a control word of 0x303 and swapped MISO and MOSI.

    The function sets the BSC mode, writes any data in the transmit buffer to the BSC transmit FIFO, and copies any data in the BSC receive FIFO to the receive buffer.

    bsc_xfer:= a structure defining the transfer

    typedef struct
    {
       uint32_t control;          // Write
       int rxCnt;      &nb<>handle: >=0, as returned by a call to i2cOpen
     inBuf: pointer to the concatenated I2C commands, see below
     inLen: size of command buffer
    outBuf: pointer to buffer to hold returned data
    outLen: size of output buffer


    Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_HANDLE, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN. PI_BAD_I2C_WLEN, or PI_BAD_I2C_SEG.

    The following command codes are supported:

    NameCmd & DataMeaning
    End0No more commands
    Escape1Next P is two bytes
    On2Switch combined flag on
    Off3Switch combined flag off
    Address4 PSet I2C address to P
    Flags5 lsb msbSet I2C flags to lsb + (msb << 8)
    Read6 PRead P bytes of data
    Write7 P ...Write P bytes of data


    The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first).

    The address defaults to that associated with the handle. The flags default to 0. The address and flags maintain their previous value until updated.

    The returned I2C data is stored in consecutive locations of outBuf.

    Example

    Set address 0x53, write 0x32, read 6 bytes
    Set address 0x1E, write 0x03, read 6 bytes
    Set address 0x68, write 0x1B, read 8 bytes
    End

    0x04 0x53   0x07 0x01 0x32   0x06 0x06
    0x04 0x1E   0x07 0x01 0x03   0x06 0x06
    0x04 0x68   0x07 0x01 0x1B   0x06 0x08
    0x00

    int bbI2COpen(unsigned SDA, unsigned SCL, unsigned baud)

    This function selects a pair of GPIO for bit banging I2C at a specified baud rate.

    Bit banging I2C allows for certain operations which are not possible with the standard I2C driver.

    o baud rates as low as 50
    o repeated starts
    o clock stretching
    o I2C on any pair of spare GPIO

     SDA: 0-31
     SCL: 0-31
    baud: 50-500000


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_I2C_BAUD, or PI_GPIO_IN_USE.

    NOTE:

    The GPIO used for SDA and SCL must have pull-ups to 3V3 connected. As a guide the hardware pull-ups on pins 3 and 5 are 1k8 in value.

    int bbI2CClose(unsigned SDA)

    This function stops bit banging I2C on a pair of GPIO previously opened with bbI2COpen.

    SDA: 0-31, the SDA GPIO used in a prior call to bbI2COpen


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_I2C_GPIO.

    int bbI2CZip(unsigned SDA, char *inBuf, unsigned inLen, char *outBuf, int i2cReadDevice(unsigned handle, char *buf, unsigned count)

    This reads count bytes from the raw device into buf.

    handle: >=0, as returned by a call to i2cOpen
       buf: an array to receive the read data bytes
     count: >0, the number of bytes to read


    Returns count (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

    S Addr Rd [A] [buf0] A [buf1] A ... A [bufn] NA P

    int i2cWriteDevice(unsigned handle, char *buf, unsigned count)

    This writes count bytes from buf to the raw device.

    handle: >=0, as returned by a call to i2cOpen
       buf: an array containing the data bytes to write
     count: >0, the number of bytes to write


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

    S Addr Wr [A] buf0 [A] buf1 [A] ... [A] bufn [A] P

    void i2cSwitchCombined(int setting)

    This sets the I2C (i2c-bcm2708) module "use combined transactions" parameter on or off.

    setting: 0 to set the parameter off, non-zero to set it on


    NOTE: when the flag is on a write followed by a read to the same slave address will use a repeated start (rather than a stop/start).

    int i2cSegments(unsigned handle, pi_i2c_msg_t *segs, unsigned numSegs)

    This function executes multiple I2C segments in one transaction by calling the I2C_RDWR ioctl.

     handle: >=0, as returned by a call to i2cOpen
       segs: an array of I2C segments
    numSegs: >0, the number of I2C segments


    Returns the number of segments if OK, otherwise PI_BAD_I2C_SEG.

    int i2cZip(unsigned handle, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen)

    This function executes a sequence of I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenated command codes and associated data.

    Set/clear GPIO pull up/down resistor read Read a GPIO write Write a GPIO PWM (overrides servo commands on same GPIO) set_PWM_dutycycle Start/stop PWM pulses on a GPIO set_PWM_frequency Set PWM frequency of a GPIO set_PWM_range Configure PWM range of a GPIO get_PWM_dutycycle Get PWM dutycycle set on a GPIO get_PWM_frequency Get PWM frequency of a GPIO get_PWM_range Get configured PWM range of a GPIO get_PWM_real_range Get underlying PWM range for a GPIO Servo (overrides PWM commands on same GPIO) set_servo_pulsewidth Start/Stop servo pulses on a GPIO get_servo_pulsewidth Get servo pulsewidth set on a GPIO INTERMEDIATE gpio_trigger Send a trigger pulse to a GPIO set_watchdog Set a watchdog on a GPIO read_bank_1 Read all bank 1 GPIO read_bank_2 Read all bank 2 GPIO clear_bank_1 Clear selected GPIO in bank 1 clear_bank_2 Clear selected GPIO in bank 2 set_bank_1 Set selected GPIO in bank 1 set_bank_2 Set selected GPIO in bank 2 callback Create GPIO level change callback wait_for_edge Wait for GPIO level change ADVANCED notify_open Request a notification handle notify_begin Start notifications for selected GPIO notify_pause Pause notifications notify_close Close a notification hardware_clock Start hardware clock on supported GPIO hardware_PWM Start hardware PWM on supported GPIO set_glitch_filter Set a glitch filter on a GPIO set_noise_filter Set a noise filter on a GPIO >associated with handle.

    handle: >=0, as returned by a call to i2cOpen
    i2cReg: 0-255, the register to read
       buf: an array to receive the read data


    The amount of returned data is set by the device.

    Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

    Block read. SMBus 2.0 5.5.7 S Addr Wr [A] i2cReg [A]
       S Addr Rd [A] [Count] A [buf0] A [buf1] A ... A [bufn] NA P

    int i2cBlockProcessCall(unsigned handle, unsigned i2cReg, char *buf, unsigned count)

    This writes data bytes to the specified register of the device associated with handle and reads a device specified number of bytes of data in return.

    handle: >=0, as returned by a call to i2cOpen
    i2cReg: 0-255, the register to write/read
       buf: an array with the data to send and to receive the read data
     count: 1-32, the number of bytes to write


    Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

    The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received. The total number of bytes sent/received must be 32 or less.

    Block write-block read. SMBus 2.0 5.5.8 S Addr Wr [A] i2cReg [A] count [A] buf0 [A] ... bufn [A]
       S Addr Rd [A] [Count] A [buf0] A ... [bufn] A P

    int i2cReadI2CBlockData(unsigned handle, unsigned i2cReg, char *buf, unsigned count)

    This reads count bytes from the specified register of the device associated with handle . The count may be 1-32.

    handle: >=0, as returned by a call to i2cOpen
    i2cReg: 0-255, the register to read
       buf: an array to receive the read data
     count: 1-32, the number of bytes to read


    Returns the number of bytes read (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

    S Addr Wr [A] i2cReg [A]
       S Addr Rd [A] [buf0] A [buf1] A ... A [bufn] NA P

    int i2cWriteI2CBlockData(unsigned handle, unsigned i2cReg, char *buf, unsigned count)

    This writes 1 to 32 bytes to the specified register of the device associated with handle.

    handle: >=0, as returned by a call to i2cOpen
    i2cReg: 0-255, the register&n@a(unsigned handle, unsigned i2cReg) This reads a single byte from the specified register of the device associated with handle.

    handle: >=0, as returned by a call to i2cOpen
    i2cReg: 0-255, the register to read


    Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

    Read byte. SMBus 2.0 5.5.5 S Addr Wr [A] i2cReg [A] S Addr Rd [A] [Data] NA P

    int i2cReadWordData(unsigned handle, unsigned i2cReg)

    This reads a single 16 bit word from the specified register of the device associated with handle.

    handle: >=0, as returned by a call to i2cOpen
    i2cReg: 0-255, the register to read


    Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

    Read word. SMBus 2.0 5.5.5 S Addr Wr [A] i2cReg [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P

    int i2cProcessCall(unsigned handle, unsigned i2cReg, unsigned wVal)

    This writes 16 bits of data to the specified register of the device associated with handle and reads 16 bits of data in return.

    handle: >=0, as returned by a call to i2cOpen
    i2cReg: 0-255, the register to write/read
      wVal: 0-0xFFFF, the value to write


    Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

    Process call. SMBus 2.0 5.5.6 S Addr Wr [A] i2cReg [A] wValLow [A] wValHigh [A]
       S Addr Rd [A] [DataLow] A [DataHigh] NA P

    int i2cWriteBlockData(unsigned handle, unsigned i2cReg, char *buf, unsigned count)

    This writes up to 32 bytes to the specified register of the device associated with handle.

    handle: >=0, as returned by a call to i2cOpen
    i2cReg: 0-255, the register to write
       buf: an array with the data to send
     count: 1-32, the number of bytes to write


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

    Block write. SMBus 2.0 5.5.7 S Addr Wr [A] i2cReg [A] count [A]
       buf0 [A] buf1 [A] ... [A] bufn [A] P

    int i2cReadBlockData(unsigned handle, unsigned i2cReg, char *buf)

    This reads a block of up to 32 bytes from the specified register of the device A>handle)
    This closes the I2C device associated with the handle.

    handle: >=0, as returned by a call to i2cOpen


    Returns 0 if OK, otherwise PI_BAD_HANDLE.

    int i2cWriteQuick(unsigned handle, unsigned bit)

    This sends a single bit (in the Rd/Wr bit) to the device associated with handle.

    handle: >=0, as returned by a call to i2cOpen
       bit: 0-1, the value to write


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

    Quick command. SMBus 2.0 5.5.1 S Addr bit [A] P

    int i2cWriteByte(unsigned handle, unsigned bVal)

    This sends a single byte to the device associated with handle.

    handle: >=0, as returned by a call to i2cOpen
      bVal: 0-0xFF, the value to write


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

    Send byte. SMBus 2.0 5.5.2 S Addr Wr [A] bVal [A] P

    int i2cReadByte(unsigned handle)

    This reads a single byte from the device associated with handle.

    handle: >=0, as returned by a call to i2cOpen


    Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, or PI_I2C_READ_FAILED.

    Receive byte. SMBus 2.0 5.5.3 S Addr Rd [A] [Data] NA P

    int i2cWriteByteData(unsigned handle, unsigned i2cReg, unsigned bVal)

    This writes a single byte to the specified register of the device associated with handle.

    handle: >=0, as returned by a call to i2cOpen
    i2cReg: 0-255, the register to write
      bVal: 0-0xFF, the value to write


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

    Write byte. SMBus 2.0 5.5.4 S Addr Wr [A] i2cReg [A] bVal [A] P

    int i2cWriteWordData(unsigned handle, unsigned i2cReg, unsigned wVal)

    This writes a single 16 bit word to the specified register of the device associated with handle.

    handle: >=0, as returned by a call to i2cOpen
    i2cReg: 0-255, the register to write
      wVal: 0-0xFFFF, the value to write


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

    Write word. SMBus 2.0 5.5.4 S Addr Wr [A] i2cReg [A] wValLow [A] wValHigh [A] P

    int i2cReadByteDatB bang reading of serial data using gpioSerialReadOpen prior to calling this function.

    int gpioSerialRead(unsigned user_gpio, void *buf, size_t bufSize)

    This function copies up to bufSize bytes of data read from the bit bang serial cyclic buffer to the buffer starting at buf.

    user_gpio: 0-31, previously opened with gpioSerialReadOpen
          buf: an array to receive the read bytes
      bufSize: >=0


    Returns the number of bytes copied if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERIAL_GPIO.

    The bytes returned for each character depend upon the number of data bits data_bits specified in the gpioSerialReadOpen command.

    For data_bits 1-8 there will be one byte per character.
    For data_bits 9-16 there will be two bytes per character.
    For data_bits 17-32 there will be four bytes per character.

    int gpioSerialReadClose(unsigned user_gpio)

    This function closes a GPIO for bit bang reading of serial data.

    user_gpio: 0-31, previously opened with gpioSerialReadOpen


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_SERIAL_GPIO.

    int i2cOpen(unsigned i2cBus, unsigned i2cAddr, unsigned i2cFlags)

    This returns a handle for the device at the address on the I2C bus.

      i2cBus: >=0
     i2cAddr: 0-0x7F
    i2cFlags: 0


    No flags are currently defined. This parameter should be set to zero.

    Physically buses 0 and 1 are available on the Pi. Higher numbered buses will be available if a kernel supported bus multiplexor is being used.

    The GPIO used are given in the following table.

    SDASCL
    I2C 001
    I2C 123


    Returns a handle (>=0) if OK, otherwise PI_BAD_I2C_BUS, PI_BAD_I2C_ADDR, PI_BAD_FLAGS, PI_NO_HANDLE, or PI_I2C_OPEN_FAILED.

    For the SMBus commands the low level transactions are shown at the end of the function description. The following abbreviations are used.

    S      (1 bit) : Start bit
    P      (1 bit) : Stop bit
    Rd/Wr  (1 bit) : Read/Write bit. Rd equals 1, Wr equals 0.
    A, NA  (1 bit) : Accept and not accept bit.

    Addr   (7 bits): I2C 7 bit address.
    i2cReg (8 bits): Command byte, a byte which often selects a register.
    Data   (8 bits): A data byte.
    Count  (8 bits): A byte defining the length of a block operation.

    [..]: Data sent by the device.

    int i2cClose(unsigned PI_NO_TX_WAVE (9999) - no wave being transmitted.

    int gpioWaveTxBusy(void)

    This function checks to see if a waveform is currently being transmitted.

    Returns 1 if a waveform is currently being transmitted, otherwise 0.

    int gpioWaveTxStop(void)

    This function aborts the transmission of the current waveform.

    Returns 0 if OK.

    This function is intended to stop a waveform started in repeat mode.

    int gpioWaveGetMicros(void)

    This function returns the length in microseconds of the current waveform.

    int gpioWaveGetHighMicros(void)

    This function returns the length in microseconds of the longest waveform created since gpioInitialise was called.

    int gpioWaveGetMaxMicros(void)

    This function returns the maximum possible size of a waveform in microseconds.

    int gpioWaveGetPulses(void)

    This function returns the length in pulses of the current waveform.

    int gpioWaveGetHighPulses(void)

    This function returns the length in pulses of the longest waveform created since gpioInitialise was called.

    int gpioWaveGetMaxPulses(void)

    This function returns the maximum possible size of a waveform in pulses.

    int gpioWaveGetCbs(void)

    This function returns the length in DMA control blocks of the current waveform.

    int gpioWaveGetHighCbs(void)

    This function returns the length in DMA control blocks of the longest waveform created since gpioInitialise was called.

    int gpioWaveGetMaxCbs(void)

    This function returns the maximum possible size of a waveform in DMA control blocks.

    int gpioSerialReadOpen(unsigned user_gpio, unsigned baud, unsigned data_bits)

    This function opens a GPIO for bit bang reading of serial data.

    user_gpio: 0-31
         baud: 50-250000
    data_bits: 1-32


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_WAVE_BAUD, PI_BAD_DATABITS, or PI_GPIO_IN_USE.

    The serial data is returned in a cyclic buffer and is read using gpioSerialRead.

    It is the caller's responsibility to read data from the cyclic buffer in a timely fashion.

    int gpioSerialReadInvert(unsigned user_gpio, unsigned invert)

    This function configures the level logic for bit bang serial reads.

    Use PI_BB_SER_INVERT to invert the serial logic and PI_BB_SER_NORMAL for normal logic. Default is PI_BB_SER_NORMAL.

    user_gpio: 0-31
       invert: 0-1


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_GPIO_IN_USE, PI_NOT_SERIAL_GPIO, or PI_BAD_SER_INVERT.

    The GPIO must be opened for bitDn"); getchar();

       for (i=0; i<WAVES; i++)
       {
          gpioWaveAddGeneric(2, (gpioPulse_t[])
             {{1<<GPIO, 0,        20},
              {0, 1<<GPIO, (i+1)*200}});

          wid[i] = gpioWaveCreate();
       }

       gpioWaveChain((char []) {
          wid[4], wid[3], wid[2],       // transmit waves 4+3+2
          255, 0,                       // loop start
             wid[0], wid[0], wid[0],    // transmit waves 0+0+0
             255, 0,                    // loop start
                wid[0], wid[1],         // transmit waves 0+1
                255, 2, 0x88, 0x13,     // delay 5000us
             255, 1, 30, 0,             // loop end (repeat 30 times)
             255, 0,                    // loop start
                wid[2], wid[3], wid[0], // transmit waves 2+3+0
                wid[3], wid[1], wid[2], // transmit waves 3+1+2
             255, 1, 10, 0,             // loop end (repeat 10 times)
          255, 1, 5, 0,                 // loop end (repeat 5 times)
          wid[4], wid[4], wid[4],       // transmit waves 4+4+4
          255, 2, 0x20, 0x4E,           // delay 20000us
          wid[0], wid[0], wid[0],       // transmit waves 0+0+0

          }, 46);

       while (gpioWaveTxBusy()) time_sleep(0.1);

       for (i=0; i<WAVES; i++) gpioWaveDelete(wid[i]);

       printf("stop piscope, press return"); getchar();

       gpioTerminate();
    }

    int gpioWaveTxAt(void)

    This function returns the id of the waveform currently being transmitted using gpioWaveTxSend. Chained waves are not supported.

    Returns the waveform id or one of the following special values:

    PI_WAVE_NOT_FOUND (9998) - transmEl waves with higher numbered wave ids have been deleted or have been flagged for deletion.

    - a new wave is created which uses exactly the same resources as the current wave (see the C source for gpioWaveCreate for details).

    wave_id: >=0, as returned by gpioWaveCreate


    Wave ids are allocated in order, 0, 1, 2, etc.

    Returns 0 if OK, otherwise PI_BAD_WAVE_ID.

    int gpioWaveTxSend(unsigned wave_id, unsigned wave_mode)

    This function transmits the waveform with id wave_id. The mode determines whether the waveform is sent once or cycles endlessly. The SYNC variants wait for the current waveform to reach the end of a cycle or finish before starting the new waveform.

    WARNING: bad things may happen if you delete the previous waveform before it has been synced to the new waveform.

    NOTE: Any hardware PWM started by gpioHardwarePWM will be cancelled.

      wave_id: >=0, as returned by gpioWaveCreate
    wave_mode: PI_WAVE_MODE_ONE_SHOT, PI_WAVE_MODE_REPEAT,
               PI_WAVE_MODE_ONE_SHOT_SYNC, PI_WAVE_MODE_REPEAT_SYNC


    Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE.

    int gpioWaveChain(char *buf, unsigned bufSize)

    This function transmits a chain of waveforms.

    NOTE: Any hardware PWM started by gpioHardwarePWM will be cancelled.

    The waves to be transmitted are specified by the contents of buf which contains an ordered list of wave_ids and optional command codes and related data.

        buf: pointer to the wave_ids and optional command codes
    bufSize: the number of bytes in buf


    Returns 0 if OK, otherwise PI_CHAIN_NESTING, PI_CHAIN_LOOP_CNT, PI_BAD_CHAIN_LOOP, PI_BAD_CHAIN_CMD, PI_CHAIN_COUNTER, PI_BAD_CHAIN_DELAY, PI_CHAIN_TOO_BIG, or PI_BAD_WAVE_ID.

    Each wave is transmitted in the order specified. A wave may occur multiple times per chain.

    A blocks of waves may be transmitted multiple times by using the loop commands. The block is bracketed by loop start and end commands. Loops may be nested.

    Delays between waves may be added with the delay command.

    The following command codes are supported:

    NameCmd & DataMeaning
    Loop Start255 0Identify start of a wave block
    Loop Repeat255 1 x yloop x + y*256 times
    Delay255 2 x ydelay x + y*256 microseconds
    Loop Forever255 3loop forever


    If present Loop Forever must be the last entry in the chain.

    The code is currently dimensioned to support a chain with roughly 600 entries and 20 loop counters.

    Example

    #include <stdio.h>
    #include <pigpio.h>

    #define WAVES 5
    #define GPIO 4

    int main(int argc, char *argv[])
    {
       int i, wid[WAVES];

       if (gpioInitialise()<0) return -1;

       gpioSetMode(GPIO, PI_OUTPUT);

       printf("start piscope, press retur    J  ')!pigpiodpigpiod pigpio Daemonbreadboard.jpgcaps.jpgdriver.jpgpigpiod is a utility which launches the pigpio library as a daemon.

    Once launched the pigpio library runs in the background accepting commands from the pipe and socket interfaces.

    The pigpiod utility requires sudo privileges to launch the library but thereafter the pipe and socket commands may be issued by normal users.

    pigpiod accepts the following configuration options

    <td style="vertical-align: top;">X
    -a valueDMA memory allocation mode0=AUTO, 1=PMAP, 2=MBOXDefault AUTO
    -b valueGPIO sample buffer size in milliseconds100-10000Default 120
    -c valueLibrary internal settingsDefault 0
    -d valuePrimary DMA channel0-14Default 14
    -e valueSecondary DMA channel0-14Default 6. Preferably use one of DMA channels 0 to 6 for Cv  1qindexpigpioThe pigpio libraryrpi.jpgservo.jpgmotor.jpg pigpio is a library for the Raspberry which allows control of the General Purpose Input Outputs (GPIO).  pigpio works on all versions of the Pi.

    Download

    Features

    • hardware timed sampling and time-stamping of GPIO 0-31 every 5 us

    • hardware timed PWM on all of GPIO 0-31

    • hardware timed servo pulses on all of [ v % 1mcifpigpio C I/Fpigpio C Interfaceimu-1.jpglcd.jpgpsu.jpg

      pigpio is a C library for the Raspberry which allows control of the GPIO.

      Features

      o hardware timed PWM on any of GPIO 0-31

      o hardware timed servo pulses on any of GPIO 0-31

      o callbacks when any of GPIO 0-31 change state

      o callbacks at timed intervals

      o reading/writing all of the GPIO in a bank as one operation

      o individually setting GPIO modes, reading and writing

      o notifications when any of GPIO 0-31 change state

      o the construction of output waveforms with microsecond timing

      o rudimentary permission control over GPIO

      o a simple interface to start and stop new threads

      o I2C, SPI, and serial link wrappers

      o creating and running scripts

      GPIO

      ALL GPIO are identified by their Broadcom number.

      Credits

      The PWM and servo pulses are timed using the DMA and PWM peripherals.

      This use was inspired by Richard Hirst's servoblaster kernel module.

      Usage

      Include <pigpio.h> in your source files.

      Assuming your source is in prog.c use the following command to build and run the executable.

      gcc -Wall -pthread -o prog prog.c -lpigpio -lrt
      sudo ./prog


      For examples of usage see the C programs within the pigpio archive file.

      Notes

      All the functions which return an int return < 0 on error.

      gpioInitialise must be called before all other library functions with the following exceptions:

      gpioCfg*
      gpioVersion
      gpioHardwareRevision


      If the library is not initialised all but the gpioCfg*, gpioVersion, and gpioHardwareRevision functions will return error PI_NOT_INITIALISED.

      If the library is initialised the gpioCfg* functions will return error PI_INITIALISED.

      If you intend to rely on signals sent to your application, you should turn off the internal signal handling as shown in this example:

      int cfg = gpioCfgGetInternals();
      cfg |= PI_CFG_NOSIGHANDLER;  // (1<<10)
      gpioCfgSetInternals(cfg);
      int status = gpioInitialise();

      OVERVIEW

      ESSENTIAL
      gpioInitialise Initialise library
      gpioTerminate Stop library
      BASIC
      gpioSetMode Set a GPIO mode
      gpioGetMode Get a GPIO mode
      gpioSetPullUpDown Set/clear GPIO pull up/down resistor
      gpioRead Read a GPIO
      gpioWrite Write a GPIO
      PWM (overrides servo commands on same GPIO)
      gpioPWM Start/stop PWM pulses on a GPIO
      gpioSetPWMfrequency Configure PWM frequency for a GPIO
      gpioSetPWMrange Fwaveforms and added data.

      Step 2. gpioWaveAdd* calls to supply the waveform data.

      Step 3. gpioWaveCreate to create the waveform and get a unique id

      Repeat steps 2 and 3 as needed.

      Step 4. gpioWaveTxSend with the id of the waveform to transmit.

      A waveform comprises one of more pulses. Each pulse consists of a gpioPulse_t structure.

      typedef struct
      {
         uint32_t gpioOn;
         uint32_t gpioOff;
         uint32_t usDelay;
      } gpioPulse_t;


      The fields specify

      1) the GPIO to be switched on at the start of the pulse.
      2) the GPIO to be switched off at the start of the pulse.
      3) the delay in microseconds before the next pulse.

      Any or all the fields can be zero. It doesn't make any sense to set all the fields to zero (the pulse will be ignored).

      When a waveform is started each pulse is executed in order with the specified delay between the pulse and the next.

      Returns the new waveform id if OK, otherwise PI_EMPTY_WAVEFORM, PI_NO_WAVEFORM_ID, PI_TOO_MANY_CBS, or PI_TOO_MANY_OOL.

      int gpioWaveCreatePad(int pctCB, int pctBOOL, int pctTOOL)

      Similar to gpioWaveCreate, this function creates a waveform but pads the consumed resources. Padded waves of equal dimension can be re-cycled efficiently allowing newly created waves to re-use the resources of deleted waves of the same dimension.

      pctCB: 0-100, the percent of all DMA control blocks to consume.
      pctBOOL: 0-100, percent On-Off-Level (OOL) buffer to consume for wave output.
      pctTOOL: 0-100, the percent of OOL buffer to consume for wave input (flags).


      Upon success a wave id greater than or equal to 0 is returned, otherwise PI_EMPTY_WAVEFORM, PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID.

      Waveform data provided by gpioWaveAdd* and rawWaveAdd* functions are consumed by this function.

      A usage would be the creation of two waves where one is filled while the other is being transmitted. Each wave is assigned 50% of the resources. This buffer structure allows the transmission of infinite wave sequences.

      Example

        // get firstWaveChunk, somehow
        gpioWaveAddGeneric(firstWaveChunk);
        wid = gpioWaveCreatePad(50, 50, 0);
        gpioWaveTxSend(wid, PI_WAVE_MODE_ONE_SHOT);
        // get nextWaveChunk

        while (nextWaveChunk) {
           gpioWaveAddGeneric(nextWaveChunk);
           nextWid = gpioWaveCreatePad(50, 50, 0);
           gpioWaveTxSend(nextWid, PI_WAVE_MODE_ONE_SHOT_SYNC);
           while(gpioWaveTxAt() == wid) time_sleep(0.1);
           gpioWaveDelete(wid);
           wid = nextWid;
           // get nextWaveChunk
        }

      int gpioWaveDelete(unsigned wave_id)

      This function deletes the waveform with id wave_id.

      The wave is flagged for deletion. The resources used by the wave will only be reused when either of the following apply.

      - alak 1
      clear_bank_2 Clear selected GPIO in bank 2
      set_bank_1 Set selected GPIO in bank 1
      set_bank_2 Set selected GPIO in bank 2
      start_thread Start a new thread
      stop_thread Stop a previously started thread
      ADVANCED
      get_PWM_real_range Get underlying PWM range for a GPIO
      notify_open Request a notification handle
      notify_begin Start notifications for selected GPIO
      notify_pause Pause notifications
      notify_close Close a notification
      bb_serial_read_open Opens a GPIO for bit bang serial reads
      bb_serial_read Reads bit bang serial data from a GPIO
      bb_serial_read_close Closes a GPIO for bit bang serial reads
      bb_serial_invert Invert serial logic (1 invert, 0 normal)
      hardware_clock Start hardware clock on supported GPIO
      hardware_PWM Start hardware PWM on supported GPIO
      set_glitch_filter Set a glitch filter on a GPIO
      set_noise_filter Set a noise filter on a GPIO
      SCRIPTS
      store_script Store a script
      run_script Run a stored script
      script_status Get script status and parameters
      stop_script Stop a running script
      delete_script Delete a stored script
      WAVES
      wave_clear Deletes all waveforms
      wave_add_new Starts a new waveform
      wave_add_generic Adds a series of pulses to the waveform
      wave_add_serial Adds serial data to the waveform
      wave_create Creates a waveform from added data
      wave_delete Deletes one or more waveforms
      wave_send_once Transmits a waveform once
      wave_send_repeat Transmits a waveform repeatedly
      wave_chainGPIOALL GPIO are identified by their Broadcom number.

      Notes

      The PWM and servo pulses are timed using the DMA and PWM/PCM peripherals.

      Usage

      Include <pigpiod_if.h> in your source files.

      Assuming your source is in prog.c use the following command to build

      gcc -Wall -pthread -o prog prog.c -lpigpiod_if -lrt


      to run make sure the pigpio daemon is running

      sudo pigpiod

       ./prog # sudo is not required to run programs linked to pigpiod_if


      For examples see x_pigpiod_if.c within the pigpio archive file.

      Notes

      All the functions which return an int return < 0 on error

      OVERVIEW

      N
      ESSENTIAL
      pigpio_start Connects to the pigpio daemon
      pigpio_stop Disconnects from the pigpio daemon
      BEGINNER
      set_mode Set a GPIO mode
      get_mode Get a GPIO mode
      set_pull_up_down Set/clear GPIO pull up/down resistor
      gpio_read Read a GPIO
      gpio_write Write a GPIO
      set_PWM_dutycycle Start/stop PWM pulses on a GPIO
      get_PWM_dutycycle Get the PWM dutycycle in use on a GPIO
      set_servo_pulsewidth Start/stop servo pulses on a GPIO
      get_servo_pulsewidth Get the servo pulsewidth in use on a GPIO
      callback Create GPIO level change callback
      callback_ex Create GPIO level change callback
      callback_cancel Cancel a callback
      wait_for_edge Wait for GPIO level change
      INTERMEDIATE
      gpio_trigger Send a trigger pulse to a GPIO.
      set_watchdog Set a watchdog on a GPIO.
      set_PWM_range Configure PWM range for a GPIO
      get_PWM_range Get configured PWM range for a GPIO
      set_PWM_frequency Configure PWM frequency for a GPIO
      get_PWM_frequency Get configured PWM frequency for a GPIO
      read_bank_1 Read all GPIO in bank 1
      read_bank_2 Read all GPIO in bank 2
      clear_bank_1 Clear selected GPIO in banMset_pad_strength Sets a pads drive strength
      get_pad_strength Gets a pads drive strength
      shell Executes a shell command
      Custom
      custom_1 User custom function 1
      custom_2 User custom function 2
      Events
      event_callback Sets a callback for an event
      event_trigger Triggers an event
      wait_for_event Wait for an event
      Scripts
      store_script Store a script
      run_script Run a stored script
      update_script Set a scripts parameters
      script_status Get script status and parameters
      stop_script Stop a running script
      delete_script Delete a stored script
      I2C
      i2c_open Opens an I2C device
      i2c_close Closes an I2C device
      i2c_write_quick SMBus write quick
      i2c_read_byte SMBus read byte
      i2c_write_byte SMBus write byte
      i2c_read_byte_data SMBus read byte data
      i2c_write_byte_data SMBus write byte data
      i2c_read_word_data SMBus read word data
      i2c_write_word_data SMBus write word data
      i2c_read_block_data SMBus read block data
      i2c_write_block_data SMBus write block data
      i2c_read_i2c_block_data SMBus read I2C block data
      i2c_write_i2c_block_data SMBus write I2C block data
      i2c_read_device Reads the raw I2C device
      i2c_write_device Writes the raw I2C device
      i2c_process_call SMBus process call
      i2c_block_process_call SMBus block process call
      i2c_zip Performs multiple I2C transactions
      I2C BIT BANG
      bb_i2c_open Opens GPIO for bit banging I2C
      bb_i2c_close Closes GPIO for bit banging I2C
      bb_i2c_zip Performs multiple bit banged I2C transactions
      I2C/SPI SLAVE
      bsc_xfer I2C/SPI as slave transfer
      bsc_i2c I2C as slave transfer
      SERIAL
      serial_open Opens a serial device
      serial_close Closes a serial device
      serial_read_byte Reads a byte from a serial device
      serial_write_byte Writes a byte to a serial device
      serial_read Reads bytes from a serial device
      serial_write Writes bytes to a serial device
      serial_data_available Returns number of bytes ready to be read
      SERIAL BIT BANG (read only)
      bb_serial_read_open Open a GPIO for bit bang serial reads
      bb_serial_read_close Close a GPIO for bit bang serial reads
      bb_serial_invert Invert serial logic (1 invert, 0 normal)
      bb_serial_read Read bit bang serial data from a GPIO
      SPI
      spi_open Opens a SPI device
      spi_close Closes a SPI device
      spi_read Reads bytes from a SPI device
      spi_write Writes bytes to a SPI device
      spi_xfer Transfers bytes with a SPI device
      SPI BIT BANG
      bb_spi_open Opens GPIO for bit banging SPI
      bb_spi_close Closes GPIO for bit banging SPI
      bb_spi_xfer Transfers bytes with bit banging SPI
      FILES
      file_open Opens a file
      file_close Closes a file
      file_read Reads bytes from a file
      file_write Writes bytes to a file
      file_seek Seeks to a position within a file <O/td>
      file_list List files which match a pattern
      WAVES
      wave_clear Deletes all waveforms
      wave_add_new Starts a new waveform
      wave_add_generic Adds a series of pulses to the waveform
      wave_add_serial Adds serial data to the waveform
      wave_create Creates a waveform from added data
      wave_create_and_pad Creates a waveform of fixed size from added data
      wave_delete Deletes a waveform
      wave_send_once Transmits a waveform once
      wave_send_repeat Transmits a waveform repeatedly
      wave_send_using_mode Transmits a waveform in the chosen mode
      wave_chain Transmits a chain of waveforms
      wave_tx_at Returns the current transmitting waveform
      wave_tx_busy Checks to see if a waveform has ended
      wave_tx_stop Aborts the current waveform
      wave_get_cbs Length in cbs of the current waveform
      wave_get_max_cbs Absolute maximum allowed cbs
      wave_get_micros Length in microseconds of the current waveform
      wave_get_max_micros Absolute maximum allowed micros
      wave_get_pulses Length in pulses of the current waveform
      wave_get_max_pulses Absolute maximum allowed pulses
      UTILITIES
      get_current_tick Get current tick (microseconds)
      get_hardware_revision Get hardware revision
      get_pigpio_version Get the pigpio version
      pigpio.error_text Gets error text from error number
      pigpio.tickDiff Returns difference between two ticks

      class pi

      pigpio.pi(host, port, show_errors)

      Grants access to a Pi's GPIO.

      Parameters

      host:= the host name of the Pi on which the pigpio daemon is
             running.  The default is localhost unPless overridden by
             the PIGPIO_ADDR environment variable.


      Parameters

      port:= the port number on which the pigpio daemon is listening.
             The default is 8888 unless overridden by the PIGPIO_PORT
             environment variable.  The pigpio daemon must have been
             started with the same port number.


      This connects to the pigpio daemon and reserves resources to be used for sending commands and receiving notifications.

      An instance attribute connected may be used to check the success of the connection. If the connection is established successfully connected will be True, otherwise False.

      Example

      pi = pigio.pi()              # use defaults
      pi = pigpio.pi('mypi')       # specify host, default port
      pi = pigpio.pi('mypi', 7777) # specify host and port

      pi = pigpio.pi()             # exit script if no connection
      if not pi.connected:
         exit()

      __repr__()

      bb_i2c_close(SDA)

      This function stops bit banging I2C on a pair of GPIO previously opened with bb_i2c_open.

      Parameters

      SDA:= 0-31, the SDA GPIO used in a prior call to bb_i2c_open


      Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_I2C_GPIO.

      Example

      pi.bb_i2c_close(SDA)

      bb_i2c_open(SDA, SCL, baud)

      This function selects a pair of GPIO for bit banging I2C at a specified baud rate.

      Bit banging I2C allows for certain operations which are not possible with the standard I2C driver.

      o baud rates as low as 50 o repeated starts o clock stretching o I2C on any pair of spare GPIO

      Parameters

       SDA:= 0-31
       SCL:= 0-31
      baud:= 50-500000


      Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_I2C_BAUD, or PI_GPIO_IN_USE.

      NOTE:

      The GPIO used for SDA and SCL must have pull-ups to 3V3 connected. As a guide the hardware pull-ups on pins 3 and 5 are 1k8 in value.

      Example

      h = pi.bb_i2c_open(4, 5, 50000) # bit bang on GPIO 4/5 at 50kbps

      bb_i2c_zip(SDA, data)

      This function executes a sequence of bit banged I2C operations. The operations to be performed are specified by the contents of data which contains the concatenated command codes and associated data.

      Parameters

       SDA:= 0-31 (as used in a prior call to bb_i2c_open)
      data:= the concatenated I2C commands, see below


      The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain theQ error code).

      Example

      (count, data) = pi.bb_i2c_zip(
                         SDA, [4, 0x53, 2, 7, 1, 0x32, 2, 6, 6, 3, 0])


      The following command codes are supported:

      NameCmd & DataMeaning
      End0No more commands
      Escape1Next P is two bytes
      Start2Start condition
      Stop3Stop condition
      Address4 PSet I2C address to P
      Flags5 lsb msbSet I2C flags to lsb + (msb << 8)
      Read6 PRead P bytes of data
      Write7 P ...Write P bytes of data


      The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first).

      The address and flags default to 0. The address and flags maintain their previous value until updated.

      No flags are currently defined.

      Any read I2C data is concatenated in the returned bytearray.

      Example

      Set address 0x53
      start, write 0x32, (re)start, read 6 bytes, stop
      Set address 0x1E
      start, write 0x03, (re)start, read 6 bytes, stop
      Set address 0x68
      start, write 0x1B, (re)start, read 8 bytes, stop
      End

      0x04 0x53
      0x02 0x07 0x01 0x32   0x02 0x06 0x06 0x03

      0x04 0x1E
      0x02 0x07 0x01 0x03   0x02 0x06 0x06 0x03

      0x04 0x68
      0x02 0x07 0x01 0x1B   0x02 0x06 0x08 0x03

      0x00

      bb_serial_invert(user_gpio, invert)

      Invert serial logic.

      Parameters

      user_gpio:= 0-31 (opened in a prior call to bb_serial_read_open)
          invert:= 0-1 (1 invert, 0 normal)


      Example

      status = pi.bb_serial_invert(17, 1)

      bb_serial_read(user_gpio)

      Returns data from the bit bang serial cyclic buffer.

      Parameters

      user_gpio:= 0-31 (opened in a prior call to bb_serial_read_open)


      The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code).

      The bytes returned for each character depend upon the number of data bits bb_bits specified in the bb_serial_read_open command.

      For bb_bits 1-8 there will be one byte per character. For bb_bits 9-16 there will be two bytes per character. For bb_bits 17-32 there will be four bytes per character.

      Example

      (count, data) = pi.bb_serial_read(4)

      bb_serial_read_close(user_gpio)

      Closes a GPIO for bit bang reading of serial data.

      Parameters

      user_gpio:= 0-31 (opened in a prior call to bb_serial_read_open)


      Example

      status = pi.bb_serial_read_close(17)

      bb_serial_read_open(user_gpio, baud, bb_bits)

      Opens a GPIO for bit bang reading of serial data.

      Parameters

      user_gpio:= 0-31, the GPIO to use.
           baud:= 50-250000, the baud rate.
        bb_bits:= 1-32, the number of bits per word, default 8.


      The serial data is held in a cyclic buffer and is read using bb_serial_read.

      It is the caller's responsibility to read data from the cyclic buffer in a timely fashion.

      Example

      status = pi.bb_serial_read_open(4, 19200)
      status = pi.bb_serial_read_open(17, 9600)

      bb_spi_close(CS)

      This function stops bit banging SPI on a set of GPIO opened with bb_spi_open.

      Parameters

      CS:= 0-31, the CS GPIO used in a prior call to bb_spi_open


      Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_SPI_GPIO.

      Example

      pi.bb_spi_close(CS)

      bb_spi_open(CS, MISO, MOSI, SCLK, baud, spi_flags)

      This function selects a set of GPIO for bit banging SPI at a specified baud rate.

      Parameters

            CS := 0-31
          MISO := 0-31
          MOSI := 0-31
          SCLK := 0-31
          baud := 50-250000
      spiFlags := see below


      spiFlags consists of the least significant 22 bits.

      21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
       0  0  0  0  0  0  R  T  0  0  0  0  0  0  0  0  0  0  0  p  m  m


      mm defines the SPI mode, defaults to 0

      Mode CPOL CPHA
       0     0    0
       1     0    1
       2     1    0
       3     1    1


      The following constants may be used to set the mode:

      pigpio.SPI_MODE_0
      pigpio.SPI_MODE_1
      pigpio.SPI_MODE_2
      pigpio.SPI_MODE_3


      Alternatively pigpio.SPI_CPOL and/or pigpio.SPI_CPHA may be used.

      p is 0 if CS is active low (default) and 1 for active high. pigpio.SPI_CS_HIGH_ACTIVE may be used to set this flag.

      T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. pigpio.SPI_TX_LSBFIRST may be used to set this flag.

      R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. pigpio.SPI_RXS_LSBFIRST may be used to set this flag.

      The other bits in spiFlags should be set to zero.

      Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_SPI_BAUD, or PI_GPIO_IN_USE.

      If more than one device is connected to the SPI bus (defined by SCLK, MOSI, and MISO) each must have its own CS.

      Example

      bb_spi_open(10, MISO, MOSI, SCLK, 10000, 0); // device 1
      bb_spi_open(11, MISO, MOSI, SCLK, 20000, 3); // device 2

      bb_spi_xfer(CS, data)

      This function executes a bit banged SPI transfer.

      Parameters

        CS:= 0-31 (as used in a prior call to bb_spi_open)
      data:= data to be sent


      The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code).

      Example

      #!/usr/bin/env python

      import pigpio

      CE0=5
      CE1=6
      MISO=13
      MOSI=19
      SCLK=12

      pi = pigpio.pi()
      if not pi.connected:
         exit()

      pi.bb_spi_open(CE0, MISO, MOSI, SCLK, 10000, 0) # MCP4251 DAC
      pi.bb_spi_open(CE1, MISO, MOSI, SCLK, 20000, 3) # MCP3008 ADC

      for i in range(256):

         count, data = pi.bb_spi_xfer(CE0, [0, i]) # Set DAC value

         if count == 2:

            count, data = pi.bb_spi_xfer(CE0, [12, 0]) # Read back DAC

            if count == 2:

               set_val = data[1]

               count, data = pi.bb_spi_xfer(CE1, [1, 128, 0]) # Read ADC

               if count == 3:

                  read_val = ((data[1]&3)<<8) | data[2]

                  print("{} {}".format(set_val, read_val))

      pi.bb_spi_close(CE0)
      pi.bb_spi_close(CE1)

      pi.stop()

      bsc_i2c(i2c_address, data)

      This function allows the Pi to act as a slave I2C device.

      This function is not available on the BCM2711 (e.g. as used in the Pi4B).

      The data bytes (if any) are written to the BSC transmit FIFO and the bytes in the BSC receive FIFO are returned.

      Parameters

      i2c_address:= the I2C slave address.
             data:= the data bytes to transmit.


      The returned value is a tuple of the status, the number of bytes read, and a bytearray containing the read bytes.

      See bsc_xfer for details of the status value.

      If there was an error the status will be less than zero (and will contain the error code).

      Note that an i2c_address of 0 may be used to close the BSC device and reassign the used GPIO as inputs.

      This example assumes GPIO 2/3 are connected to GPIO 18/19 (GPIO 10/11 on the BCM2711).

      Example

      #!/usr/bin/env python
      import time
      import pigpio

      I2C_ADDR=0x13

      def i2c(id, tick):
        &nbTsp; global pi

          s, b, d = pi.bsc_i2c(I2C_ADDR)
          if b:
              if d[0] == ord('t'): # 116 send 'HH:MM:SS*'

                  print("sent={} FR={} received={} [{}]".
                     format(s>>16, s&0xfff,b,d))

                  s, b, d = pi.bsc_i2c(I2C_ADDR,
                     "{}*".format(time.asctime()[11:19]))

              elif d[0] == ord('d'): # 100 send 'Sun Oct 30*'

                  print("sent={} FR={} received={} [{}]".
                     format(s>>16, s&0xfff,b,d))

                  s, b, d = pi.bsc_i2c(I2C_ADDR,
                     "{}*".format(time.asctime()[:10]))

      pi = pigpio.pi()

      if not pi.connected:
          exit()

      # Respond to BSC slave activity

      e = pi.event_callback(pigpio.EVENT_BSC, i2c)

      pi.bsc_i2c(I2C_ADDR) # Configure BSC as I2C slave

      time.sleep(600)

      e.cancel()

      pi.bsc_i2c(0) # Disable BSC peripheral

      pi.stop()


      While running the above.

      $ i2cdetect -y 1
          0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
      00:          -- -- -- -- -- -- -- -- -- -- -- -- --
      10: -- -- -- 13 -- -- -- -- -- -- -- -- -- -- -- --
      20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      70: -- -- -- -- -- -- -- --

      $ pigs i2co 1 0x13 0
      0

      $ pigs i2cwd 0 116
      $ pigs i2crd 0 9 -a
      9 10:13:58*

      $ pigs i2cwd 0 116
      $ pigs i2crd 0 9 -a
      9 10:14:29*

      $ pigs i2cwd 0 100
      $ pigs i2crd 0 11 -a
      11 Sun Oct 30*

      $ pigs i2cwd 0 100
      $ pigs i2crd 0 11 -a
      11 Sun Oct 30*

      $ pigs i2cwd 0 116
      $ pigs i2crd 0 9 -a
      9 10:23:16*

      $ pigs i2cwd 0 100
      $ pigs i2crd 0 11 -a
      11 Sun Oct 30*

      bsc_xfer(bsc_control, data)

      This function provides a low-level interface to the SPI/I2C Slave peripheral on the BCM chip.

      This peripheral allows the Pi to act as a hardware slave device on an I2C or SPI bus.

      This is not a bit bang version and as such is OS timing independent. The bus timing is handled directly by the chip.

      The output process is simple. You simply append data to the FIFO buffer on the chip. This works like a queue, you add data to the queue and the master removes it.

      I can't get SPI to work properly. I tried with a control word of 0x303 and swapped MISO and MOSI.

      The function sets the BSC mode, writes any data in the transmit buffer to the BSC transmit FIFO, and copies any data in the BSC receive FIFO to the receive buffer.

      Parameters

      bsc_control:= see below
             data:= the data bytes to place in the transmit FIFO.


      The returned value is a tuple of the status (see below), the number of bytes read, and a bytearray containing the read bytes. If there was an error the status will be less than zero (and will contain the error code).

      Note that the control word sets the BSC mode. The BSC will stay in that mode until a different control word is sent.

      GPIO used for models other than those based on the BCM2711.

      SDASCLMOSISCLKMISOCE
      I2C1819----
      SPI--18192021


      GPIO used for models based on the BCM2711 (e.g. the Pi4B).

      SDASCLMOSISCLKMISOCE
      I2C1011----
      SPI--101198


      When a zero control word is received the used GPIO will be reset to INPUT mode.

      bsc_control consists of the following bits:

      22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
       a  a  a  a  a  a  a  -  - IT HC TF IR RE TE BK EC ES PL PH I2 SP EN


      Bits 0-13 are copied unchanged to the BSC CR register. See pages 163-165 of the Broadcom peripherals document for full details.

      aaaaaaadefines the I2C slave address (only relevant in I2C mode)
      ITinvert transmit status flags
      HCenable host control
      TFenable test FIFO
      IRinvert receive status flags
      REenable receive
      TEenable transmit
      BKabort operation and clear FIFOs
      ECsend control register as first I2C byte
      ESsend status register as first I2C byte
      PLset SPI polarity high
      PHset SPI phase high
      I2enable I2C mode
      SPenable SPI mode
      ENenable BSC peripheral


      The status has the following format:

      20 19 18 17 16 15 14 13 12 11 10  9  8&nVbsp; 7  6  5  4  3  2  1  0
       S  S  S  S  S  R  R  R  R  R  T  T  T  T  T RB TE RF TF RE TB


      Bits 0-15 are copied unchanged from the BSC FR register. See pages 165-166 of the Broadcom peripherals document for full details.

      SSSSSnumber of bytes successfully copied to transmit FIFO
      RRRRRnumber of bytes in receieve FIFO
      TTTTTnumber of bytes in transmit FIFO
      RBreceive busy
      TEtransmit FIFO empty
      RFreceive FIFO full
      TFtransmit FIFO full
      REreceive FIFO empty
      TBtransmit busy


      Example

      (status, count, data) = pi.bsc_xfer(0x330305, "Hello!")

      callback(user_gpio, edge, func)

      Calls a user supplied function (a callback) whenever the specified GPIO edge is detected.

      Parameters

      user_gpio:= 0-31.
           edge:= EITHER_EDGE, RISING_EDGE (default), or FALLING_EDGE.
           func:= user supplied callback function.


      The user supplied callback receives three parameters, the GPIO, the level, and the tick.

      Parameter   Value    Meaning

      GPIO        0-31     The GPIO which has changed state

      level       0-2      0 = change to low (a falling edge)
                           1 = change to high (a rising edge)
                           2 = no level change (a watchdog timeout)

      tick        32 bit   The number of microseconds since boot
                           WARNING: this wraps around from
                           4294967295 to 0 roughly every 72 minutes


      If a user callback is not specified a default tally callback is provided which simply counts edges. The count may be retrieved by calling the tally function. The count may be reset to zero by calling the reset_tally function.

      The callback may be cancelled by calling the cancel function.

      A GPIO may have multiple callbacks (although I can't think of a reason to do so).

      The GPIO are sampled at a rate set when the pigpio daemon is started (default 5 us).

      The number of samples per second is given in the following table.

                    samples
                    per sec

               1  1,000,000
               2   &Wnbsp;500,000
      sample   4    250,000
      rate     5    200,000
      (us)     8    125,000
              10    100,000


      GPIO level changes shorter than the sample rate may be missed.

      The daemon software which generates the callbacks is triggered 1000 times per second. The callbacks will be called once per level change since the last time they were called. i.e. The callbacks will get all level changes but there will be a latency.

      If you want to track the level of more than one GPIO do so by maintaining the state in the callback. Do not use read. Remember the event that triggered the callback may have happened several milliseconds before and the GPIO may have changed level many times since then.

      Example

      def cbf(gpio, level, tick):
         print(gpio, level, tick)

      cb1 = pi.callback(22, pigpio.EITHER_EDGE, cbf)

      cb2 = pi.callback(4, pigpio.EITHER_EDGE)

      cb3 = pi.callback(17)

      print(cb3.tally())

      cb3.reset_tally()

      cb1.cancel() # To cancel callback cb1.

      clear_bank_1(bits)

      Clears GPIO 0-31 if the corresponding bit in bits is set.

      Parameters

      bits:= a 32 bit mask with 1 set if the corresponding GPIO is
             to be cleared.


      A returned status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO.

      Example

      pi.clear_bank_1(int("111110010000",2))

      clear_bank_2(bits)

      Clears GPIO 32-53 if the corresponding bit (0-21) in bits is set.

      Parameters

      bits:= a 32 bit mask with 1 set if the corresponding GPIO is
             to be cleared.


      A returned status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO.

      Example

      pi.clear_bank_2(0x1010)

      custom_1(arg1, arg2, argx)

      Calls a pigpio function customised by the user.

      Parameters

      arg1:= >=0, default 0.
      arg2:= >=0, default 0.
      argx:= extra arguments (each 0-255), default empty.


      The returned value is an integer which by convention should be >=0 for OK and <0 for error.

      Example

      value = pi.custom_1()

      value = pi.custom_1(23)

      value = pi.custom_1(0, 55)

      value = pi.custom_1(23, 56, [1, 5, 7])

      value = pi.custom_1(23, 56, b"hello")

      value = pi.custom_1(23, 56, "hello")

      custom_2(arg1, argx, retMax)

      Calls a pigpio function customised by the user.

      Parameters

        arg1:= >=0, default 0.
        argx:= extra arguments (each 0-255), default empty.
      retMax:= >=0, maximum number of bytes to return, default 8192.


      The returned value is a tuple of theX number of bytes returned and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code).

      Example

      (count, data) = pi.custom_2()

      (count, data) = pi.custom_2(23)

      (count, data) = pi.custom_2(23, [1, 5, 7])

      (count, data) = pi.custom_2(23, b"hello")

      (count, data) = pi.custom_2(23, "hello", 128)

      delete_script(script_id)

      Deletes a stored script.

      Parameters

      script_id:= id of stored script.


      Example

      status = pi.delete_script(sid)

      event_callback(event, func)

      Calls a user supplied function (a callback) whenever the specified event is signalled.

      Parameters

      event:= 0-31.
       func:= user supplied callback function.


      The user supplied callback receives two parameters, the event id, and the tick.

      If a user callback is not specified a default tally callback is provided which simply counts events. The count may be retrieved by calling the tally function. The count may be reset to zero by calling the reset_tally function.

      The callback may be canceled by calling the cancel function.

      An event may have multiple callbacks (although I can't think of a reason to do so).

      Example

      def cbf(event, tick):
         print(event, tick)

      cb1 = pi.event_callback(22, cbf)

      cb2 = pi.event_callback(4)

      print(cb2.tally())

      cb2.reset_tally()

      cb1.cancel() # To cancel callback cb1.

      event_trigger(event)

      This function signals the occurrence of an event.

      Parameters

      event:= 0-31, the event


      Returns 0 if OK, otherwise PI_BAD_EVENT_ID.

      An event is a signal used to inform one or more consumers to start an action. Each consumer which has registered an interest in the event (e.g. by calling event_callback) will be informed by a callback.

      One event, EVENT_BSC (31) is predefined. This event is auto generated on BSC slave activity.

      The meaning of other events is arbitrary.

      Note that other than its id and its tick there is no data associated with an event.

      Example

      pi.event_trigger(23)

      file_close(handle)

      Closes the file associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to file_open).


      Example

      pi.file_close(handle)

      file_list(fpattern)

      Returns a list of files which match a pattern.

      Parameters

      fpattern:= file pattern to match.


      Returns the number of returned bytes if OK, otherwise PI_NO_FILE_ACCESS, or PI_NO_FILE_MATCH.

      The pattern must match an entry in /opt/pigpio/access. The pattern may contain wildcards. See file_open.

      NOTE

      The returned value is not the number of files, it is the number of bytes in the buffer. The file names are separated by newline characters.

      Example

      #!/usr/bin/env&nbYsp;python

      import pigpio

      pi = pigpio.pi()

      if not pi.connected:
         exit()

      # Assumes /opt/pigpio/access contains the following line:
      # /ram/*.c r

      c, d = pi.file_list("/ram/p*.c")
      if c > 0:
         print(d)

      pi.stop()

      file_open(file_name, file_mode)

      This function returns a handle to a file opened in a specified mode.

      Parameters

      file_name:= the file to open.
      file_mode:= the file open mode.


      Returns a handle (>=0) if OK, otherwise PI_NO_HANDLE, PI_NO_FILE_ACCESS, PI_BAD_FILE_MODE, PI_FILE_OPEN_FAILED, or PI_FILE_IS_A_DIR.

      Example

      h = pi.file_open("/home/pi/shared/dir_3/file.txt",
              pigpio.FILE_WRITE | pigpio.FILE_CREATE)

      pi.file_write(h, "Hello world")

      pi.file_close(h)


      File

      A file may only be opened if permission is granted by an entry in /opt/pigpio/access. This is intended to allow remote access to files in a more or less controlled manner.

      Each entry in /opt/pigpio/access takes the form of a file path which may contain wildcards followed by a single letter permission. The permission may be R for read, W for write, U for read/write, and N for no access.

      Where more than one entry matches a file the most specific rule applies. If no entry matches a file then access is denied.

      Suppose /opt/pigpio/access contains the following entries:

      /home/* n
      /home/pi/shared/dir_1/* w
      /home/pi/shared/dir_2/* r
      /home/pi/shared/dir_3/* u
      /home/pi/shared/dir_1/file.txt n


      Files may be written in directory dir_1 with the exception of file.txt.

      Files may be read in directory dir_2.

      Files may be read and written in directory dir_3.

      If a directory allows read, write, or read/write access then files may be created in that directory.

      In an attempt to prevent risky permissions the following paths are ignored in /opt/pigpio/access:

      a path containing ..
      a path containing only wildcards (*?)
      a path containing less than two non-wildcard parts


      Mode

      The mode may have the following values:

      ConstantValueMeaning
      FILE_READ1open file for reading
      FILE_WRITE2open file for writing
      FILE_RW3open file for reading and writing


      The following values may be or'd into the mode:

      NameValueMeaning
      FILE_APPEND4All writes append data to the end of the file
      FILE_CREATE8The file is created if it doesn't exist
      FILE_TRUNC16The file is truncated


      Newly created files are owned by root with permissions owner read and write.

      Example

      #!/usr/bin/env python

      import pigpio

      pi = pigpio.pi()

      if not pi.connected:
         exit()

      # Assumes /opt/pigpio/access contains the following line:
      # /ram/*.c r

      handle = pi.file_open("/ram/pigpio.c", pigpio.FILE_READ)

      done = False

      while not done:
         c, d = pi.file_read(handle, 60000^)
         if c > 0:
            print(d)
         else:
            done = True

      pi.file_close(handle)

      pi.stop()

      file_read(handle, count)

      Reads up to count bytes from the file associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to file_open).
       count:= >0, the number of bytes to read.


      The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code).

      Example

      (b, d) = pi.file_read(h2, 100)
      if b > 0:
         # process read data

      file_seek(handle, seek_offset, seek_from)

      Seeks to a position relative to the start, current position, or end of the file. Returns the new position.

      Parameters

           handle:= >=0 (as returned by a prior call to file_open).
      seek_offset:= byte offset.
        seek_from:= FROM_START, FROM_CURRENT, or FROM_END.


      Example

      new_pos = pi.file_seek(h, 100, pigpio.FROM_START)

      cur_pos = pi.file_seek(h, 0, pigpio.FROM_CURRENT)

      file_size = pi.file_seek(h, 0, pigpio.FROM_END)

      file_write(handle, data)

      Writes the data bytes to the file associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to file_open).
        data:= the bytes to write.


      Example

      pi.file_write(h1, b'\x02\x03\x04')

      pi.file_write(h2, b'help')

      pi.file_write(h2, "hello")

      pi.file_write(h1, [2, 3, 4])

      get_PWM_dutycycle(user_gpio)

      Returns the PWM dutycycle being used on the GPIO.

      Parameters

      user_gpio:= 0-31.


      Returns the PWM dutycycle.

      For normal PWM the dutycycle will be out of the defined range for the GPIO (see get_PWM_range).

      If a hardware clock is active on the GPIO the reported dutycycle will be 500000 (500k) out of 1000000 (1M).

      If hardware PWM is active on the GPIO the reported dutycycle will be out of a 1000000 (1M).

      Example

      pi.set_PWM_dutycycle(4, 25)
      print(pi.get_PWM_dutycycle(4))
      25

      pi.set_PWM_dutycycle(4, 203)
      print(pi.get_PWM_dutycycle(4))
      203

      get_PWM_frequency(user_gpio)

      Returns the frequency of PWM being used on the GPIO.

      Parameters

      user_gpio:= 0-31.


      Returns the frequency (in Hz) used for the GPIO.

      For normal PWM the frequency will be that defined for the GPIO by set_PWM_frequency.

      If a hardware clock is active on the GPIO the reported frequency will be that set by hardware_clock.

      If hardwbsp;   printf("pos=%d\ ", pos);
            }
            gpioDelay(20000); /* check pos 50 times per second */
         }

         gpioTerminate();
      }

      void encoderPulse(int gpio, int level, uint32_t tick)
      {
         /*

                   +---------+         +---------+      0
                   |         |         |         |
         A         |         |         |         |
                   |         |         |         |
         +---------+         +---------+         +----- 1

             +---------+         +---------+            0
             |         |         |         |
         B   |         |         |         |
             |         |         |         |
         ----+         +---------+         +---------+  1

         */

         static int levA=0, levB=0, lastGpio = -1;

         if (gpio == ENCODER_A) levA = level; else levB = level;

         if (gpio != lastGpio) /* debounce */
         {
            lastGpio = gpio;

            if ((gpio == ENCODER_A) && (level == 0))
            {
               if (!levB) ++encoderPos;
            }
            else if ((gpio == ENCODER_B) && (level == 1))
            {
               if (levA) --encoderPos;
            }
         }
      }

      BUILD

      cc -o rotary_encoder rotary_encoder.c -lpigpio -lrt -lpthread

      RUN

      sudo ./rotary_encoder

      While the program is running you can capture the waveform using the notification feature built in to pigpio.  Issue the following commands on the Pi.

      pigs no
      pig2vcd  </dev/pigpio0 >re.vcd &
      pigs nb 0 0x40080 # set bits for gpios 7 (0x80) and 18 (0x40000)

      Twiddle the rotary encoder forwards and backwards for a few seconds.  Then enter

      pigs nc 0

      The file re.vcd will contain the captured waveform, which can be viewed using GTKWave.


      Overview

      rotary encoder waveform overview

      Detail of switch bounce.  Contact A bounces for circa 700 us before completing the level transition

      rotary encoder waveform detail
       !-%!/sifSocket I/FSocket Interfaceremote-2.jpgserial.jpgsrf02.jpg pigpio provides a socket interface to many of its functions.

      The socket interface is available whenever pigpio is running, either because it has been started as a daemon, or it has been linked in to a running user program.

      The socket interface can be disabled by the program which initialises the library.  pigpiod offers the -k option to disable the socket interface.  User programs should call gpioCfgInterfaces if they wish to disable the socket interface.

      pigpio listens for connections on port 8888 by default.  This default may be overridden when pigpio starts by the gpioCfgSocketPort function call.  The pigpio daemon uses this function to provide an option to change the port number.

      The pigs utility is an example of using the socket interface from C.

      Request

      pigpio expects messages of type cmdCmd_t immediately followed with an extension for a few commands.

      The caller should fill in cmd, p1, p2, p3/res, and any extension as needed.  p3 will always be zero unless the command requires an extension in which case p3 will be the length in bytes of the extension.

      The cmdCmd_t is echoed back with the result, if any, in p3/res, and an extension immediately afterwards for a few commands.


            gpioDelay(10);  // 10 micros delay

            gpioWrite(MOTORCLK, PI_HIGH);
         }

         gpioWrite(MOTORLATCH, PI_HIGH);
      }

      void init(void)
      {
         latch_state = 0;

         latch_tx();

         gpioWrite(MOTORENABLE, PI_LOW);
      }

      void DCMotorInit(uint8_t num)
      {
         switch (num)
         {
            case 1: latch_state &= ~BIT(MOTOR1_A) & ~BIT(MOTOR1_B); break;
            case 2: latch_state &= ~BIT(MOTOR2_A) & ~BIT(MOTOR2_B); break;
            case 3: latch_state &= ~BIT(MOTOR3_A) & ~BIT(MOTOR3_B); break;
            case 4: latch_state &= ~BIT(MOTOR4_A) & ~BIT(MOTOR4_B); break;
            default: return;
         }

         latch_tx();

         printf("Latch=%08X\ ", latch_state);
      }

      void DCMotorRun(uint8_t motornum, uint8_t cmd)
      {
         uint8_t a, b;

         switch (motornum)
         {
            case 1: a = MOTOR1_A; b = MOTOR1_B; break;
            case 2: a = MOTOR2_A; b = MOTOR2_B; break;
            case 3: a = MOTOR3_A; b = MOTOR3_B; break;
            case 4: a = MOTOR4_A; b = MOTOR4_B; break;
            default: return;
         }
       
         switch (cmd)
         {
            case FORWARD:  latch_state |=  BIT(a); latch_state &= ~BIT(b); break;
            case BACKWARD: latch_state &= ~BIT(a); latch_state |=  BIT(b); break;
            case RELEASE:  latch_state &= ~BIT(a); latch_state &= ~BIT(b); break;
            default: return;
         }

         latch_tx();

         printf("Latch=%08X\ ", latch_state);
      }

      int main (int argc, char *argv[])
      {
         int i;

         if (gpioInitialise()<0) return 1;

         gpioSetMode(MOTORLATCH,  PI_OUTPUT);
         gpioSetMode(MOTORENABLE, PI_OUTPUT);
         gpioSetMode(MOTORDATA,   PI_OUTPUT);
         gpioSetMode(MOTORCLK,    PI_OUTPUT);

         gpioSetMode(MOTOR_3_PWM, PI_OUTPUT);
         gpioSetMode(MOTOR_4_PWM, PI_OUTPUT);

         gpioPWM(MOTOR_3_PWM, 0);
         gpioPWM(MOTOR_4_PWM, 0);

         init();

         for (i=60; i<160; i+=20)
         {
            gpioPWM(MOTOR_3_PWM, i);
            gpioPWM(MOTOR_4_PWM, 220-i);

            DCMotorRun(3, FORWARD);
            DCMotorRun(4, BACKWARD);

            sleep(2);

            DCMotorRun(3, RELEASE);
            DCMotorRun(4, RELEASE);

            sleep(2);

            gpioPWM(MOTOR_4_PWM, i);
            gpioPWM(MOTOR_3_PWM, 220-i);

            DCMotorRun(3, BACKWARD);
            DCMotorRun(4, FORWARD);

            sleep(2);

            DCMotorRun(3, RELEASE);
            DCMotorRun(4, RELEASE);

            sleep(2);
         }

         gpioPWM(MOTOR_4_PWM, 0);
         gpioPWM(MOTOR_3_PWM, 0);

         DCMotorRun(3, RELEASE);
         DCMotorRun(4, RELEASE);

         gpioTerminate();
      }
      ds a handle (>=0) for the device at the I2C bus address.

      Parameters

          i2c_bus:= >=0.
      i2c_address:= 0-0x7F.
        i2c_flags:= 0, no flags are currently defined.


      Physically buses 0 and 1 are available on the Pi. Higher numbered buses will be available if a kernel supported bus multiplexor is being used.

      The GPIO used are given in the following table.

      COMMAND cmd
      p1 p2 p3 Extension
      MODES 0 gpio mode 0 -
      MODEG 1 gpio 0 0 -
      PUD 2 gpio pud 0 -
      READ 3 gpio 0 0 -
      WRITE 4 gpio level 0 -
      PWM 5 gpio dutycycle 0 -
      PRS 6 gpio range 0 -
      PFS 7 gpio frequency 0 -
      SERVO 8 gpio pulsewidth 0 -
      WDOG 9 gpio timeout 0 -
      BR1 10 0 0 0 -
      BR2 11 0 0 0 -
      BC1 12 bits 0 0 -
      BC2 13 bits 0 0 -
      BS1 14 bits 0 0 -
      BS2 15 bits 0 0 -
      TICK 16 0 0 0 -
      HWVER 17 0 0 0 -
      NO 18 0 0 0 -
      NB  7  )%%pifPipe I/F Pipe Interfaceswitches.jpguln2003a.jpgyl-40.jpg pigpio provides a pipe interface to many of its functions.

      The pipe interface is available whenever pigpio is running, either because it has been started as a daemon, or it has been linked in to a running user program.  The pipe interface can be disabled by the program which initialises the library.  pigpiod offers the -f option to disable the pipe interface.  User programs should call gpioCfgInterfaces if they wish to disable the pipe interface.

      pigpio listens for commands on pipe /dev/pigpio.  The commands consist of a command identifier with, depending on the command, zero, one, or two parameters.  The result, if any, may be read from pipe /dev/pigout.  If any errors are detected a message will be written to pipe /dev/pigerr.


      The format of the commands is identical to those used by pigs. 66G pig2vcdpig2vcdpig2vcdwheel.jpgsrf04.jpgservo.jpgpig2vcd is a utility which reads notifications on stdin and writes the output as a Value Change Dump (VCD) file on stdout.

      The VCD file can be viewed using GTKWave.

      Notifications

      Notifications consist of 12 bytes with the following binary format.

      typedef struct
      {
         uint16_t seqno;
         uint16_t flags;
         uint32_t tick;
         uint32_t level;
      } gpioReport_t;


      seqno: starts at 0 each time the handle is opened and then increments by one for each report.

      flags: two flags are defined, PI_NTFY_FLAGS_WDOG and PI_NTFY_FLAGS_ALIVE. If bit 5 is set (PI_NTFY_FLAGS_WDOG) then bits 0-4 of the flags indicate a gpio which has had a watchdog timeout; if bit 6 is set (PI_NTFY_FLAGS_ALIVE) this indicates a keep alive signal on the pipe/socket and is sent once a minute in the absence of other notification activity.

      tick: the number of microseconds since system boot. It wraps around after 1h12m.

      level: indicates the level of each gpio. If bit 1<<x is set then gpio x is high. pig2vcd takes these notifications and outputs a text format VCD.

      VCD format

      The VCD starts with a header.

      $date 2013-05-31 18:49:36 $end
      $version pig2vcd V1 $end
      $timescale 1 us $end
      $scope module top $end
      $var wire 1 A 0 $end
      $var wire 1 B 1 $end
      $var wire 1 C 2 $end
      $var wire 1 D 3 $end
      $var wire 1 E 4 $end
      $var wire 1 F 5 $end
      $var wire 1 G 6 $end
      $var wire 1 H 7 $end
      $var wire 1 I 8 $end
      $var wire 1 J 9 $end
      $var wire 1 K 10 $end
      $var wire 1 L 11 $end
      $var wire 1 M 12 $end
      $var wire 1 N 13 $end
      $var wire 1 O 14 $end
      $var wire 1 P 15 $end
      $var wire 1 Q 16 $end
      $var wire 1 R 17 $end
      $var wire 1 S 18 $end
      $var wire 1 T 19 $end
      $var wire 1 U 20 $end
      $var wire 1 V 21 $end
      $var wire 1 W 22 $end
      $var wire 1 X 23 $end
      $var wire 1 Y 24 $end
      $var wire 1 Z 25 $end
      $var wire 1 a 26 $end
      $var wire 1 b 27 $end
      $var wire 1 c 28 $end
      $var wire 1 d 29 $end
      $var wire 1 e 30 $end
      $var wire 1 f 31 $end
      $upscope $end
      $enddefinitions $end


      The header defines gpio identifiers and their name. Each gpio identifier must be unique. pig2vcd arbitrarily uses 'A' through 'Z' for gpios 0 through 25, and 'a' through 'f' for gpios 26 through 31. The corresponding names are 0 through 31.


      The VCD file may be edited to give a frendlier name, e.g. 8 could be changed to ENCODER_A if an encoder switch A is connected to gpio 8.

      Following the header pig2vcd takes notifications and outputs a timestamp followed by a list of one or more gpios which have changed state. The timestamp consists of a '#' followed by the microsecond tick. The state lines contain the new state followed by the gpio identifier.

      #1058747
      0H
      0I
      #1059012
      1H
      #1079777
      1I
      #1079782
      0I
      #1079852
      1I
      #1079857
      0I
      0H
      #1165113
      1H
      #1165118
      0H
      #1165153
      1H
      _are PWM is active on the GPIO the reported frequency will be that set by hardware_PWM.

      Example

      pi.set_PWM_frequency(4,0)
      print(pi.get_PWM_frequency(4))
      10

      pi.set_PWM_frequency(4, 800)
      print(pi.get_PWM_frequency(4))
      800

      get_PWM_range(user_gpio)

      Returns the range of PWM values being used on the GPIO.

      Parameters

      user_gpio:= 0-31.


      If a hardware clock or hardware PWM is active on the GPIO the reported range will be 1000000 (1M).

      Example

      pi.set_PWM_range(9, 500)
      print(pi.get_PWM_range(9))
      500

      get_PWM_real_range(user_gpio)

      Returns the real (underlying) range of PWM values being used on the GPIO.

      Parameters

      user_gpio:= 0-31.


      If a hardware clock is active on the GPIO the reported real range will be 1000000 (1M).

      If hardware PWM is active on the GPIO the reported real range will be approximately 250M divided by the set PWM frequency.

      Example

      pi.set_PWM_frequency(4, 800)
      print(pi.get_PWM_real_range(4))
      250

      get_current_tick()

      Returns the current system tick.

      Tick is the number of microseconds since system boot. As an unsigned 32 bit quantity tick wraps around approximately every 71.6 minutes.

      Example

      t1 = pi.get_current_tick()
      time.sleep(1)
      t2 = pi.get_current_tick()

      get_hardware_revision()

      Returns the Pi's hardware revision number.

      The hardware revision is the last few characters on the Revision line of /proc/cpuinfo.

      The revision number can be used to determine the assignment of GPIO to pins (see
      gpio).

      There are at least three types of board.

      Type 1 boards have hardware revision numbers of 2 and 3.

      Type 2 boards have hardware revision numbers of 4, 5, 6, and 15.

      Type 3 boards have hardware revision numbers of 16 or greater.

      If the hardware revision can not be found or is not a valid hexadecimal number the function returns 0.

      Example

      print(pi.get_hardware_revision())
      2

      get_mode(gpio)

      Returns the GPIO mode.

      Parameters

      gpio:= 0-53.


      Returns a value as follows

      0 = INPUT
      1 = OUTPUT
      2 = ALT5
      3 = ALT4
      4 = ALT0
      5 = ALT1
      6 = ALT2
      7 = ALT3


      Example

      print(pi.get_mode(0))
      4

      get_pad_strength(pad)

      This function returns the pad drive strength in mA.

      Parameters

      pad:= 0-2, the pad to get.


      Returns the pad drive strength if OK, otherwise PI_BAD_PAD.

      PadGPIO
      00-27
      128-45
      246-53


      Example

      strength = pi.get_pad_strength(0) # Get pad 0 strength.

      get_pigpio_version()

      Returns the pigpio software version.

      Example

      v = pi.get_pigpio_version()

      get_ser`vo_pulsewidth(user_gpio)

      Returns the servo pulsewidth being used on the GPIO.

      Parameters

      user_gpio:= 0-31.


      Returns the servo pulsewidth.

      Example

      pi.set_servo_pulsewidth(4, 525)
      print(pi.get_servo_pulsewidth(4))
      525

      pi.set_servo_pulsewidth(4, 2130)
      print(pi.get_servo_pulsewidth(4))
      2130

      gpio_trigger(user_gpio, pulse_len, level)

      Send a trigger pulse to a GPIO. The GPIO is set to level for pulse_len microseconds and then reset to not level.

      Parameters

      user_gpio:= 0-31
      pulse_len:= 1-100
          level:= 0-1


      Example

      pi.gpio_trigger(23, 10, 1)

      hardware_PWM(gpio, PWMfreq, PWMduty)

      Starts hardware PWM on a GPIO at the specified frequency and dutycycle. Frequencies above 30MHz are unlikely to work.

      NOTE: Any waveform started by wave_send_once, wave_send_repeat, or wave_chain will be cancelled.

      This function is only valid if the pigpio main clock is PCM. The main clock defaults to PCM but may be overridden when the pigpio daemon is started (option -t).

      Parameters

         gpio:= see descripton
      PWMfreq:= 0 (off) or 1-125M (1-187.5M for the BCM2711).
      PWMduty:= 0 (off) to 1000000 (1M)(fully on).


      Returns 0 if OK, otherwise PI_NOT_PERMITTED, PI_BAD_GPIO, PI_NOT_HPWM_GPIO, PI_BAD_HPWM_DUTY, PI_BAD_HPWM_FREQ.

      The same PWM channel is available on multiple GPIO. The latest frequency and dutycycle setting will be used by all GPIO which share a PWM channel.

      The GPIO must be one of the following:

      12  PWM channel 0  All models but A and B
      13  PWM channel 1  All models but A and B
      18  PWM channel 0  All models
      19  PWM channel 1  All models but A and B

      40  PWM channel 0  Compute module only
      41  PWM channel 1  Compute module only
      45  PWM channel 1  Compute module only
      52  PWM channel 0  Compute module only
      53  PWM channel 1  Compute module only


      The actual number of steps beween off and fully on is the integral part of 250M/PWMfreq (375M/PWMfreq for the BCM2711).

      The actual frequency set is 250M/steps (375M/steps for the BCM2711).

      There will only be a million steps for a PWMfreq of 250 (375 for the BCM2711). Lower frequencies will have more steps and higher frequencies will have fewer steps. PWMduty is automatically scaled to take this into account.

      Example

      pi.hardware_PWM(18, 800, 250000) # 800Hz 25% dutycycle

      pi.hardware_PWM(18, 2000, 750000) # 2000Hz 75% dutycycle

      hardware_clock(gpio, clkfreq)

      Starts a hardware clock on a GPIO at the specified frequency. Frequencies above 30MHz are unlikely to work.

      Parameters

         gpio:= see description
      clkfreq:= 0 (ocff) or 4689-250M (13184-375M for the BCM2711)


      Returns 0 if OK, otherwise PI_NOT_PERMITTED, PI_BAD_GPIO, PI_NOT_HCLK_GPIO, PI_BAD_HCLK_FREQ,or PI_BAD_HCLK_PASS.

      The same clock is available on multiple GPIO. The latest frequency setting will be used by all GPIO which share a clock.

      The GPIO must be one of the following:

      4   clock 0  All models
      5   clock 1  All models but A and B (reserved for system use)
      6   clock 2  All models but A and B
      20  clock 0  All models but A and B
      21  clock 1  All models but A and Rev.2 B (reserved for system use)

      32  clock 0  Compute module only
      34  clock 0  Compute module only
      42  clock 1  Compute module only (reserved for system use)
      43  clock 2  Compute module only
      44  clock 1  Compute module only (reserved for system use)


      Access to clock 1 is protected by a password as its use will likely crash the Pi. The password is given by or'ing 0x5A000000 with the GPIO number.

      Example

      pi.hardware_clock(4, 5000) # 5 KHz clock on GPIO 4

      pi.hardware_clock(4, 40000000) # 40 MHz clock on GPIO 4

      i2c_block_process_call(handle, reg, data)

      Writes data bytes to the specified register of the device associated with handle and reads a device specified number of bytes of data in return.

      Parameters

      handle:= >=0 (as returned by a prior call to i2c_open).
         reg:= >=0, the device register.
        data:= the bytes to write.


      The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received. The total number of bytes sent/received must be 32 or less.

      SMBus 2.0 5.5.8 - Block write-block read. S Addr Wr [A] reg [A] len(data) [A] data0 [A] ... datan [A]
         S Addr Rd [A] [Count] A [Data] ... A P


      The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code).

      Example

      (b, d) = pi.i2c_block_process_call(h, 10, b'\x02\x05\x00')

      (b, d) = pi.i2c_block_process_call(h, 10, b'abcdr')

      (b, d) = pi.i2c_block_process_call(h, 10, "abracad")

      (b, d) = pi.i2c_block_process_call(h, 10, [2, 5, 16])

      i2c_close(handle)

      Closes the I2C device associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to i2c_open).


      Example

      pi.i2c_close(h)

      i2c_open(i2c_bus, i2c_address, i2c_flags)

      Returnga>
      Transmits a chain of waveforms
      wave_tx_busy Checks to see if the waveform has ended
      wave_tx_stop Aborts the current waveform
      wave_get_micros Length in microseconds of the current waveform
      wave_get_high_micros Length of longest waveform so far
      wave_get_max_micros Absolute maximum allowed micros
      wave_get_pulses Length in pulses of the current waveform
      wave_get_high_pulses Length of longest waveform so far
      wave_get_max_pulses Absolute maximum allowed pulses
      wave_get_cbs Length in cbs of the current waveform
      wave_get_high_cbs Length of longest waveform so far
      wave_get_max_cbs Absolute maximum allowed cbs
      I2C
      i2c_open Opens an I2C device
      i2c_close Closes an I2C device
      i2c_write_quick smbus write quick
      i2c_write_byte smbus write byte
      i2c_read_byte smbus read byte
      i2c_write_byte_data smbus write byte data
      i2c_write_word_data smbus write word data
      i2c_read_byte_data smbus read byte data
      i2c_read_word_data smbus read word data
      i2c_process_call smbus process call
      i2c_write_block_data smbus write block data
      i2c_read_block_data smbus read block data
      i2c_block_process_call smbus block process call
      i2c_write_i2c_block_data smbus write I2C block data
      i2c_read_i2c_block_data smbus read I2C block data
      i2c_read_device Reads the raw I2C device
      i2c_write_device Writes the raw I2C device
      i2c_zip Performs multiple I2C transactions
      bb_i2c_open Opens GPIO for bit banging I2C
      bb_i2c_close Closes GPIO for bit banging I2C
      bb_i2c_zip Performs multiple bit banged I2C transactions
      SPI
      SDASCL
      I2C 001
      I2C 123


      For the SMBus commands the low level transactions are shown at the end of the function description. The following abbreviations are used:

      S     (1 bit) : Start bit
      P     (1 bit) : Stop bit
      Rd/Wr (1 bit) : Read/Write bit. Rd equals 1, Wr equals 0.
      A, NA (1 bit) : Accept and not accept bit.
      Addr  (7 bits): I2C 7 bit address.
      reg   (8 bits): Command byte, which often selects a register.
      Data  (8 bits): A data byte.
      Count (8 bits): A byte defining the length of a block operation.

      [..]: Data sent by the device.


      Example

      h = pi.i2c_open(1, 0x53) # open device at address 0x53 on bus 1

      i2c_process_call(handle, reg, word_val)

      Writes 16 bits of data to the specified register of the device associated with handle and reads 16 bits of data in return.

      Parameters

        handle:= >=0 (as returned by a prior call to i2c_open).
           reg:= >=0, the device register.
      word_val:= 0-65535, the value to write.


      SMBus 2.0 5.5.6 - Process call. S Addr Wr [A] reg [A] word_val_Low [A] word_val_High [A]
         S Addr Rd [A] [DataLow] A [DataHigh] NA P


      Example

      r = pi.i2c_process_call(h, 4, 0x1231)
      r = pi.i2c_process_call(h, 6, 0)

      i2c_read_block_data(handle, reg)

      Reads a block of up to 32 bytes from the specified register of the device associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to i2c_open).
         reg:= >=0, the device register.


      SMBus 2.0 5.5.7 - Block read. S Addr Wr [A] reg [A]
         S Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P


      The amount of returned data is set by the device.

      The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code).

      Example

      (b, d) = pi.i2c_read_block_data(h, 10)
      if b >= 0:
      &enbsp;  # process data
      else:
         # process read failure

      i2c_read_byte(handle)

      Reads a single byte from the device associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to i2c_open).


      SMBus 2.0 5.5.3 - Receive byte. S Addr Rd [A] [Data] NA P


      Example

      b = pi.i2c_read_byte(2) # read a byte from device 2

      i2c_read_byte_data(handle, reg)

      Reads a single byte from the specified register of the device associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to i2c_open).
         reg:= >=0, the device register.


      SMBus 2.0 5.5.5 - Read byte. S Addr Wr [A] reg [A] S Addr Rd [A] [Data] NA P


      Example

      # read byte from reg 17 of device 2
      b = pi.i2c_read_byte_data(2, 17)

      # read byte from reg  1 of device 0
      b = pi.i2c_read_byte_data(0, 1)

      i2c_read_device(handle, count)

      Returns count bytes read from the raw device associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to i2c_open).
       count:= >0, the number of bytes to read.


      S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P


      The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code).

      Example

      (count, data) = pi.i2c_read_device(h, 12)

      i2c_read_i2c_block_data(handle, reg, count)

      Reads count bytes from the specified register of the device associated with handle . The count may be 1-32.

      Parameters

      handle:= >=0 (as returned by a prior call to i2c_open).
         reg:= >=0, the device register.
       count:= >0, the number of bytes to read.


      S Addr Wr [A] reg [A]
         S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P


      The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code).

      Example

      (b, d) = pi.i2c_read_i2c_block_data(h, 4, 32)
      if b >= 0:
         # process data
      else:
         # process read failure

      i2c_read_word_data(handle, reg)

      Reads fa single 16 bit word from the specified register of the device associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to i2c_open).
         reg:= >=0, the device register.


      SMBus 2.0 5.5.5 - Read word. S Addr Wr [A] reg [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P


      Example

      # read word from reg 2 of device 3
      w = pi.i2c_read_word_data(3, 2)

      # read word from reg 7 of device 2
      w = pi.i2c_read_word_data(2, 7)

      i2c_write_block_data(handle, reg, data)

      Writes up to 32 bytes to the specified register of the device associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to i2c_open).
         reg:= >=0, the device register.
        data:= the bytes to write.


      SMBus 2.0 5.5.7 - Block write. S Addr Wr [A] reg [A] len(data) [A] data0 [A] data1 [A] ... [A]
         datan [A] P


      Example

      pi.i2c_write_block_data(4, 5, b'hello')

      pi.i2c_write_block_data(4, 5, "data bytes")

      pi.i2c_write_block_data(5, 0, b'\x00\x01\x22')

      pi.i2c_write_block_data(6, 2, [0, 1, 0x22])

      i2c_write_byte(handle, byte_val)

      Sends a single byte to the device associated with handle.

      Parameters

        handle:= >=0 (as returned by a prior call to i2c_open).
      byte_val:= 0-255, the value to write.


      SMBus 2.0 5.5.2 - Send byte. S Addr Wr [A] byte_val [A] P


      Example

      pi.i2c_write_byte(1, 17)   # send byte   17 to device 1
      pi.i2c_write_byte(2, 0x23) # send byte 0x23 to device 2

      i2c_write_byte_data(handle, reg, byte_val)

      Writes a single byte to the specified register of the device associated with handle.

      Parameters

        handle:= >=0 (as returned by a prior call to i2c_open).
           reg:= >=0, the device register.
      byte_val:= 0-255, the value to write.


      SMBus 2.0 5.5.4 - Write byte. S Addr Wr [A] reg [A] byte_val [A] P


      Example

      # send byte 0xC5 to reg 2 of device 1
      pi.i2c_write_byte_data(1, 2, 0xC5)

      # send byte 9 to reg 4 of device 2
      pi.i2c_write_byte_data(2, 4, 9)

      i2c_write_device(handle, data)

      Writes the data bytes to the raw device associated with handle.

      Parameters<l/small>

      handle:= >=0 (as returned by a prior call to i2c_open).
        data:= the bytes to write.


      S Addr Wr [A] data0 [A] data1 [A] ... [A] datan [A] P


      Example

      pi.i2c_write_device(h, b"\x12\x34\xA8")

      pi.i2c_write_device(h, b"help")

      pi.i2c_write_device(h, 'help')

      pi.i2c_write_device(h, [23, 56, 231])

      i2c_write_i2c_block_data(handle, reg, data)

      Writes data bytes to the specified register of the device associated with handle . 1-32 bytes may be written.

      Parameters

      handle:= >=0 (as returned by a prior call to i2c_open).
         reg:= >=0, the device register.
        data:= the bytes to write.


      S Addr Wr [A] reg [A] data0 [A] data1 [A] ... [A] datan [NA] P


      Example

      pi.i2c_write_i2c_block_data(4, 5, 'hello')

      pi.i2c_write_i2c_block_data(4, 5, b'hello')

      pi.i2c_write_i2c_block_data(5, 0, b'\x00\x01\x22')

      pi.i2c_write_i2c_block_data(6, 2, [0, 1, 0x22])

      i2c_write_quick(handle, bit)

      Sends a single bit to the device associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to i2c_open).
         bit:= 0 or 1, the value to write.


      SMBus 2.0 5.5.1 - Quick command. S Addr bit [A] P


      Example

      pi.i2c_write_quick(0, 1) # send 1 to device 0
      pi.i2c_write_quick(3, 0) # send 0 to device 3

      i2c_write_word_data(handle, reg, word_val)

      Writes a single 16 bit word to the specified register of the device associated with handle.

      Parameters

        handle:= >=0 (as returned by a prior call to i2c_open).
           reg:= >=0, the device register.
      word_val:= 0-65535, the value to write.


      SMBus 2.0 5.5.4 - Write word. S Addr Wr [A] reg [A] word_val_Low [A] word_val_High [A] P


      Example

      # send word 0xA0C5 to reg 5 of device 4
      pi.i2c_write_word_data(4, 5, 0xA0C5)

      # send word 2 to reg 2 of device 5
      pi.i2c_write_word_data(5, 2, 23)

      i2c_zip(handle, data)

      This function executes a sequence of I2C operations. The operations to be performed are specified by the contents of data which contains the concatenated command codes and associated data.

      Parameters

      handle:= >=0 (as returned by a prior call to i2c_open).
        data:= the&nbh>
      spi_open Opens a SPI device
      spi_close Closes a SPI device
      spi_read Reads bytes from a SPI device
      spi_write Writes bytes to a SPI device
      spi_xfer Transfers bytes with a SPI device
      SERIAL
      serial_open Opens a serial device
      serial_close Closes a serial device
      serial_write_byte Writes a byte to a serial device
      serial_read_byte Reads a byte from a serial device
      serial_write Writes bytes to a serial device
      serial_read Reads bytes from a serial device
      serial_data_available Returns number of bytes ready to be read
      CUSTOM
      custom_1 User custom function 1
      custom_2 User custom function 2
      UTILITIES
      get_current_tick Get current tick (microseconds)
      get_hardware_revision Get hardware revision
      get_pigpio_version Get the pigpio version
      pigpiod_if_version Get the pigpiod_if version
      pigpio_error Get a text description of an error code.
      time_sleep Sleeps for a float number of seconds
      time_time Float number of seconds since the epoch

      FUNCTIONS

      double time_time(void)

      Return the current time in seconds since the Epoch.

      void time_sleep(double seconds)

      Delay execution for a given number of seconds.

      seconds: the number of seconds to delay.

      char *pigpio_error(int errnum)

      Return a text description for an error code.

      errnum: the error code.

      unsigned pigpiod_if_version(void)

      Return the pigpiod_if version.

      pthread_t *start_thread(gpioThreadFunc_t thread_func, void *userdata)

      Starts a new thread of execution with thread_func as the main routine.
      thread_func: the main function for the new thread.
         userdata: a pointer to an arbitrary argument.


      Returns a pointer to pthread_t if OK, otherwise NULL.

      The function is passed the single argument userdata.

      The thread can be cancelled by passing the pointer to pthread_t to stop_thread.

      void stop_thread(pthread_t *pth)

      Cancels the thread pointed at by pth.

      pth: the thread to be stopped.


      No value is returned.

      The thread to be stopped should have been started with start_thread.

      int pigpio_start(char *addrStr, char *portStr)

      Connect to the pigpio daemon. Reserving command and notification streams.

      addrStr: specifies the host or IP address of the Pi running the
               pigpio daemon.  It may be NULL in which case localhost
               is used unless overridden by the PIGPIO_ADDR environment
               variable.

      portStr: specifies the port address used by the Pi running the
               pigpio daemon.  It may be NULL in which case "8888"
               is used unless overridden by the PIGPIO_PORT environment
               variable.

      void pigpio_stop(void)

      Terminates the connection to the pigpio daemon and releases resources used by the library.

      int set_mode(unsigned gpio, unsigned mode)

      Set the GPIO mode.

      gpio: 0-53.
      mode: PI_INPUT, PI_OUTPUT, PI_ALT0, PI_ALT1,
            PI_ALT2, PI_ALT3, PI_ALT4, PI_ALT5.


      Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_MODE, or PI_NOT_PERMITTED.

      int get_mode(unsigned gpio)

      Get the GPIO mode.

      gpio: 0-53.


      Returns the GPIO mode if OK, otherwise PI_BAD_GPIO.

      int set_pull_up_down(unsigned gpio, unsigned pud)

      Set or clear the GPIO pull-up/down resistor.

      gpio: 0-53.
       pud: PI_PUD_UP, PI_PUD_DOWN, PI_PUD_OFF.


      Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_PUD, or PI_NOT_PERMITTED.

      int gpio_read(unsigned gpio)

      Read the GPIO level.

      gpio:0-53.


      Returns the GPIO level if OK, otherwise PI_BAD_GPIO.

      int gpio_write(unsigned gpio, unsigned level)    !CexamplesExamples@Examplesrotary.jpgrf-rx.jpgpins.jpgThe following examples show various ways pigpio may be used to communicate with sensors via the GPIO.

      Although many are complete programs they are intended to be a starting point in producing your own code, not an end point.

      Index

      Hardware

      Shell code

      C code

      C++ code

      pigpiod_if2 code

      Python code

      Miscellaneous related code

      External links

      Hardware

      A few practical examples of using pigpio with hardware. Write the GPIO level.

       gpio: 0-53.
      level: 0, 1.


      Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_LEVEL, or PI_NOT_PERMITTED.

      Notes

      If PWM or servo pulses are active on the GPIO they are switched off.

      int set_PWM_dutycycle(unsigned user_gpio, unsigned dutycycle)

      Start (non-zero dutycycle) or stop (0) PWM pulses on the GPIO.

      user_gpio: 0-31.
      dutycycle: 0-range (range defaults to 255).


      Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_DUTYCYCLE, or PI_NOT_PERMITTED. Notes

      The set_PWM_range function may be used to change the default range of 255.

      int get_PWM_dutycycle(unsigned user_gpio)

      Return the PWM dutycycle in use on a GPIO.

      user_gpio: 0-31.


      Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_PWM_GPIO.

      For normal PWM the dutycycle will be out of the defined range for the GPIO (see get_PWM_range).

      If a hardware clock is active on the GPIO the reported dutycycle will be 500000 (500k) out of 1000000 (1M).

      If hardware PWM is active on the GPIO the reported dutycycle will be out of a 1000000 (1M).

      int set_PWM_range(unsigned user_gpio, unsigned range)

      Set the range of PWM values to be used on the GPIO.

      user_gpio: 0-31.
          range: 25-40000.


      Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_DUTYRANGE, or PI_NOT_PERMITTED.

      Notes

      If PWM is currently active on the GPIO its dutycycle will be scaled to reflect the new range.

      The real range, the number of steps between fully off and fully on for each of the 18 available GPIO frequencies is

        25(#1),    50(#2),   100(#3),   125(#4),    200(#5),    250(#6),
       400(#7),   500(#8),   625(#9),   800(#10),  1000(#11),  1250(#12),
      2000(#13), 2500(#14), 4000(#15), 5000(#16), 10000(#17), 20000(#18)


      The real value set by set_PWM_range is (dutycycle * real range) / range.

      int get_PWM_range(unsigned user_gpio)

      Get the range of PWM values being used on the GPIO.

      user_gpio: 0-31.


      Returns the dutycycle range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO.

      If a hardware clock or hardware PWM is active on the GPIO the reported range will be 1000000 (1M).

      int get_PWM_real_range(unsigned user_gpio)

      Get the real underlying range of PWM values being used on the GPIO.

      user_gpio: 0-31.


      Returns the real range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO.

      If a hardware clock is active on the GPIO the reported real range will be 1000000 (1M).

      If hardware PWM is active on the GPIO the reported real range will be approximately 250M divided by the set PWM frequency.

      int set_PWM_frequency(unsigned user_gpio, u \) %/!'5ex_ir_remoteIR RemoteTIR Remote Exampledriver.jpgimu-3.jpgir-motion.jpg

      The following code shows one way to read an infrared remote control device (the sort used in TVs and stereo systems).

      SETUP

      fritzing diagramThe device used is a SFH5110 (IR Receiver for remote control, carrier 38 kHz).

      Pin 1 (left from front) may be=   sitemapSite Map'Site Mapir-rx.jpgimu-2.jpgcaps.jpg /)9!sex_rotary_encoderRotary EncoderJRotary Encoder Examplemsp430.jpgleds.jpgldr.jpg

      The following code shows one way to read an incremental mechanical rotary enoder (the sort used for volume control in audio systems).  These rotary encoders have two switches A and B which return a quadrature output, i.e. they are 90 degrees out of phase.

      SETUP

      fritzing diagramThe common (centre) terminal should be connected to a Pi ground.

      The A and B terminals may be connected to any spare gpios.

      Here A to gpio18 (P1-12), common to ground (P1-20), B to gpio7 (P1-26).

      photo of set-up

      CODE

      #include <stdio.h>

      #include <pigpio.h>

      /*
         Rotary encoder connections:

         Encoder A      - gpio 18   (pin P1-12)
         Encoder B      - gpio 7    (pin P1-26)
         Encoder Common - Pi ground (pin P1-20)
      */

      #define ENCODER_A 18
      #define ENCODER_B  7

      static volatile int encoderPos;

      /* forward declaration */

      void encoderPulse(int gpio, int lev, uint32_t tick);

      int main(int argc, char * argv[])
      {
         int pos=0;

         if (gpioInitialise()<0) return 1;

         gpioSetMode(ENCODER_A, PI_INPUT);
         gpioSetMode(ENCODER_B, PI_INPUT);

         /* pull up is needed as encoder common is grounded */

         gpioSetPullUpDown(ENCODER_A, PI_PUD_UP);
         gpioSetPullUpDown(ENCODER_B, PI_PUD_UP);

         encoderPos = pos;

         /* monitor encoder level changes */

         gpioSetAlertFunc(ENCODER_A, encoderPulse);
         gpioSetAlertFunc(ENCODER_B, encoderPulse);

         while (1)
         {
            if (pos != encoderPos)
            {
               pos = encoderPos;
           &nZtsp;concatenated I2C commands, see below


      The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code).

      Example

      (count, data) = pi.i2c_zip(h, [4, 0x53, 7, 1, 0x32, 6, 6, 0])


      The following command codes are supported:

      NameCmd & DataMeaning
      End0No more commands
      Escape1Next P is two bytes
      On2Switch combined flag on
      Off3Switch combined flag off
      Address4 PSet I2C address to P
      Flags5 lsb msbSet I2C flags to lsb + (msb << 8)
      Read6 PRead P bytes of data
      Write7 P ...Write P bytes of data


      The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first).

      The address defaults to that associated with the handle. The flags default to 0. The address and flags maintain their previous value until updated.

      Any read I2C data is concatenated in the returned bytearray.

      Example

      Set address 0x53, write 0x32, read 6 bytes
      Set address 0x1E, write 0x03, read 6 bytes
      Set address 0x68, write 0x1B, read 8 bytes
      End

      0x04 0x53   0x07 0x01 0x32   0x06 0x06
      0x04 0x1E   0x07 0x01 0x03   0x06 0x06
      0x04 0x68   0x07 0x01 0x1B   0x06 0x08
      0x00

      notify_begin(handle, bits)

      Starts notifications on a handle.

      Parameters

      handle:= >=0 (as returned by a prior call to notify_open)
        bits:= a 32 bit mask indicating the GPIO to be notified.


      The notification sends state changes for each GPIO whose corresponding bit in bits is set.

      The following code starts notifications for GPIO 1, 4, 6, 7, and 10 (1234 = 0x04D2 = 0b0000010011010010).

      Example

      h = pi.notify_open()
      if h >= 0:
         pi.notify_begin(h, 1234)

      notify_close(handle)

      Stops notifications on a handle and releases the handle for reuse.

      Parameters

      handle:= >=0 (as returned by a prior call to notify_open)


      Example

      h = pi.notify_open()
      if h >= 0:
         pi.notify_begin(h, 1234)
         ...
         pi.notify_close(h)
         ...

      notify_open()

      Returns a notification handle (>=0).

      A notification is a method for being notified of GPIO state changes via a pipe.

      Pipes are only accessible from the local machine so this function serves no purpose if you are using Python from a remote machine. The in-built (socket) notifications provided by
      callback frequency)

      Set the frequency (in Hz) of the PWM to be used on the GPIO.

      user_gpio: 0-31.
      frequency: >=0 (Hz).


      Returns the numerically closest frequency if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_PERMITTED.

      If PWM is currently active on the GPIO it will be switched off and then back on at the new frequency.

      Each GPIO can be independently set to one of 18 different PWM frequencies.

      The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5, 8, or 10 microseconds (default 5). The sample rate is set when the pigpio daemon is started.

      The frequencies for each sample rate are:

                             Hertz

             1: 40000 20000 10000 8000 5000 4000 2500 2000 1600
                 1250  1000   800  500  400  250  200  100   50

             2: 20000 10000  5000 4000 2500 2000 1250 1000  800
                  625   500   400  250  200  125  100   50   25

             4: 10000  5000  2500 2000 1250 1000  625  500  400
                  313   250   200  125  100   63   50   25   13
      sample
       rate
       (us)  5:  8000  4000  2000 1600 1000  800  500  400  320
                  250   200   160  100   80   50   40   20   10

             8:  5000  2500  1250 1000  625  500  313  250  200
                  156   125   100   63   50   31   25   13    6

            10:  4000  2000  1000  800  500  400  250  200  160
                  125   100    80   50   40   25   20   10    5

      int get_PWM_frequency(unsigned user_gpio)

      Get the frequency of PWM being used on the GPIO.

      user_gpio: 0-31.


      For normal PWM the frequency will be that defined for the GPIO by set_PWM_frequency.

      If a hardware clock is active on the GPIO the reported frequency will be that set by hardware_clock.

      If hardware PWM is active on the GPIO the reported frequency will be that set by hardware_PWM.

      Returns the frequency (in hertz) used for the GPIO if OK, otherwise PI_BAD_USER_GPIO.

      The following code shows a method of reading a class of sonar rangers.  These rangers requires a trigger pulse.  Shortly after receiving a trigger they transmit a noise pulse and set the echo line high.  When the echo is received the echo line is set low.

      SETUP

      fritzing diagram




      The ranger used is a SRF05 (check the pinouts, there are many variants).

      The fritzing diagram shows the back of the ranger, i.e. pin 1 is the rightmost.

      Pin 1 is 5V.
      Pin 2 is the trigger line.
      Pin 3 is the echo line.
      Pin 4 is out (unused).
      Pin 5N ;#!#ex_LDRLight Dependent Resitor^LDR Examplekeypad.jpgldr-cap.jpgmeter.jpg

      The following code shows a method of reading analogue sensors on the digital input only Pi.  A Light Dependent Resistor (LDR) varies its resistance according to the incident light intensisty.

      SETUP

      fritzing diagramThe LDR used is a Cadmium Sulphide device with a 1MOhm dark resistance and 2-4KOhm at 100 lux.  The capacitor is a 104 ceramic.

      One end of the capacitor is connected to Pi ground.

      One end of the LDR is connected to Pi 3V3.

      The other ends of the capacitor and LDR are connected to a spare gpio.

      Here P1-1 is used for 3V3, P1-20 is used for ground, and gpio 18 (P1-12) is used for the gpio.

      photo of set-up

      CODE

      #include <stdio.h>

      #include <pigpio.h>

      /* ---------------%r"set_servo_pulsewidth">
      int set_servo_pulsewidth(unsigned user_gpio, unsigned pulsewidth)

      Start (500-2500) or stop (0) servo pulses on the GPIO.

       user_gpio: 0-31.
      pulsewidth: 0 (off), 500 (anti-clockwise) - 2500 (clockwise).


      Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_PULSEWIDTH or PI_NOT_PERMITTED.

      The selected pulsewidth will continue to be transmitted until changed by a subsequent call to set_servo_pulsewidth.

      The pulsewidths supported by servos varies and should probably be determined by experiment. A value of 1500 should always be safe and represents the mid-point of rotation.

      You can DAMAGE a servo if you command it to move beyond its limits.

      OTHER UPDATE RATES:

      This function updates servos at 50Hz. If you wish to use a different update frequency you will have to use the PWM functions.

      Update Rate (Hz)     50   100  200  400  500
      1E6/Hz            20000 10000 5000 2500 2000


      Firstly set the desired PWM frequency using set_PWM_frequency.

      Then set the PWM range using set_PWM_range to 1E6/Hz. Doing this allows you to use units of microseconds when setting the servo pulsewidth.

      E.g. If you want to update a servo connected to GPIO 25 at 400Hz

      set_PWM_frequency(25, 400);
      set_PWM_range(25, 2500);


      Thereafter use the set_PWM_dutycycle function to move the servo, e.g. set_PWM_dutycycle(25, 1500) will set a 1500 us pulse.

      int get_servo_pulsewidth(unsigned user_gpio)

      Return the servo pulsewidth in use on a GPIO.

      user_gpio: 0-31.


      Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERVO_GPIO.

      int notify_open(void)

      Get a free notification handle.

      Returns a handle greater than or equal to zero if OK, otherwise PI_NO_HANDLE.

      A notification is a method for being notified of GPIO state changes via a pipe.

      Pipes are only accessible from the local machine so this function serves no purpose if you are using the library from a remote machine. The in-built (socket) notifications provided by callback should be used instead.

      Notifications for handle x will be available at the pipe named /dev/pigpiox (where x is the handle number). E.g. if the function returns 15 then the notifications must be read from /dev/pigpio15.

      int notify_begin(unsigned handle, uint32_t bits)

      Start notifications on a previously opened handle.

      handle: 0-31 (as returned by notify_open)
        bits: a mask indicating the GPIO to be notified.


      Returns 0 if OK, otherwise PI_BAD_HANDLE.

      The notification sends state changes for each GPIO whose corresponding bit in bits is set.

      Each notification occupies 12 bytes in the fifo as follows:

      typedef struct
      {
         uint16_t seqno;
         uint16_t flags;
         uint32_t tick;
         uint32_t level;
      } gpioReport_t;


      seqno: starts at 0 each time the h $$ PY  1#+downloadDownload#(Download & Installrf-tx.jpgrpi.jpgspeaker.jpg If the pigpio daemon is running it should be killed (sudo killall pigpiod) before make install and restarted afterwards (sudo pigpiod).

      The initial part of the make, the compilation of pigpio.c, takes 100 seconds on early model Pis.  Be patient.  The overall install takes just over 3 minutes.

      Download and install latest version

      wget https://github.com/joan2937/pigpio/archive/master.zip
      unzip master.zip
      cd pigpio-master
      make
      sudo make install

      If the Python part of the install fails it may be because you need the setup tools.

      sudo apt install python-setuptools python3-setuptools


      To check the library

      These tests make extensive use of GPIO 25 (pin 22).  Make sure nothing, or only a LED, is connected to the GPIO before running the tests.  Most tests are statistical in nature and so may on occasion fail.  Repeated failures on the same test or many failures in a group of tests indicate a problem.

      sudo ./x_pigpio # check C I/F

      sudo pigpiod    # start daemon

      ./x_pigpiod_if2 # check C      I/F to daemon
      ./x_pigpio.py   # check Python I/F to daemon
      ./x_pigs        # check pigs   I/F to daemon
      ./x_pipe        # check pipe   I/F to daemon


      To compile, link, and run a C program

      gcc -Wall -pthread -o foobar foobar.c -lpigpio -lrt
      sudo ./foobar


      To start the pigpio daemon

      sudo pigpiod

      To stop the pigpio daemon

      sudo killall pigpiod

      github

      git clone https://github.com/joan2937/pigpio

      Raspbian (raspberrypi.org image)

      This may not be the most recent version.  You can check the version with the command pigpiod -v.

      sudo apt-get update
      sudo apt-get install pigpio python-pigpio python3-pigpio


      andle is opened and then increments by one for each report.

      flags: two flags are defined, PI_NTFY_FLAGS_WDOG and PI_NTFY_FLAGS_ALIVE.

      PI_NTFY_FLAGS_WDOG, if bit 5 is set then bits 0-4 of the flags indicate a GPIO which has had a watchdog timeout.

      PI_NTFY_FLAGS_ALIVE, if bit 6 is set this indicates a keep alive signal on the pipe/socket and is sent once a minute in the absence of other notification activity.

      tick: the number of microseconds since system boot. It wraps around after 1h12m.

      level: indicates the level of each GPIO. If bit 1<<x is set then GPIO x is high.

      int notify_pause(unsigned handle)

      Pause notifications on a previously opened handle.

      handle: 0-31 (as returned by notify_open)


      Returns 0 if OK, otherwise PI_BAD_HANDLE.

      Notifications for the handle are suspended until notify_begin is called again.

      int notify_close(unsigned handle)

      Stop notifications on a previously opened handle and release the handle for reuse.

      handle: 0-31 (as returned by notify_open)


      Returns 0 if OK, otherwise PI_BAD_HANDLE.

      int set_watchdog(unsigned user_gpio, unsigned timeout)

      Sets a watchdog for a GPIO.

      user_gpio: 0-31.
        timeout: 0-60000.


      Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_BAD_WDOG_TIMEOUT.

      The watchdog is nominally in milliseconds.

      Only one watchdog may be registered per GPIO.

      The watchdog may be cancelled by setting timeout to 0.

      Once a watchdog has been started callbacks for the GPIO will be triggered every timeout interval after the last GPIO activity.

      The callback will receive the special level PI_TIMEOUT.

      int set_glitch_filter(unsigned user_gpio, unsigned steady)

      Sets a glitch filter on a GPIO.

      Level changes on the GPIO are not reported unless the level has been stable for at least steady microseconds. The level is then reported. Level changes of less than steady microseconds are ignored.

      user_gpio: 0-31
         steady: 0-300000


      Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER.

      This filter affects the GPIO samples returned to callbacks set up with callback, callback_ex and wait_for_edge.

      It does not affect levels read by gpio_read, read_bank_1, or read_bank_2. Each (stable) edge will be timestamped steady microseconds after it was first detected.

      int set_noise_filter(unsigned user_gpio, unsigned steady, unsigned active)

      Sets a noise filter on a GPIO.

      Level changes on the GPIO are ignored until a level which has been stable for steady microseconds is detected. Level changes on the GPIO are then reported for active microseconds after which the process repeats.

      The shield used is a clone of the Adafruit motor shield.  See shieldlist.org for details.

      For the demonstration DC motors 3 and 4 are being driven forwards and backwards with changing speeds (speeds are controlled via PWM).

      Seven connections are made between the Pi and the shield.  Four to latch the motor states (latch, enable, data, clock); Two to control motor speed (PWM 3 and 4); and ground.

      The code used was ported from the Adafruit Arduino code and converted to use the pigpio library.  Only the DC motor code was ported.

      A video of the shield in use is available at youtube.com

      #include <stdio.h>


      #include <pigpio.h>

      /*
         This code may be used to drive the Adafruit (or clones) Motor Shield.

         The code as written only supports DC motors.

         http://shieldlist.org/adafruit/motor

         The shield pinouts are

         D12 MOTORLATCH
         D11 PMW motor 1
         D10 Servo 1
         D9  Servo 2
         D8  MOTORDATA

         D7  MOTORENABLE
         D6  PWM motor 4
         D5  PWM motor 3
         D4  MOTORCLK
         D3  PWM motor 2

         The motor states (forward, backward, brake, release) are encoded using the
         MOTOR_ latch pins.  This saves four gpios.
      */

      typedef unsigned char uint8_t;

      #define BIT(bit) (1 << (bit))

      /* assign gpios to drive the shield pins */

      /*      Shield      Pi */

      #define MOTORLATCH  14
      #define MOTORCLK    24
      #define MOTORENABLE 25
      #define MOTORDATA   15

      #define MOTOR_3_PWM  7
      #define MOTOR_4_PWM  8

      /*
         The only other connection needed between the Pi and the shield
         is ground to ground. I used Pi P1-6 to shield gnd (next to D13).
      */

      /* assignment of motor states to latch */

      #define MOTOR1_A 2
      #define MOTOR1_B 3
      #define MOTOR2_A 1
      #define MOTOR2_B 4
      #define MOTOR4_A 0
      #define MOTOR4_B 6
      #define MOTOR3_A 5
      #define MOTOR3_B 7

      #define FORWARD  1
      #define BACKWARD 2
      #define BRAKE    3
      #define RELEASE  4

      static uint8_t latch_state;

      void latch_tx(void)
      {
         unsigned char i;

         gpioWrite(MOTORLATCH, PI_LOW);

         gpioWrite(MOTORDATA, PI_LOW);

         for (i=0; i<8; i++)
         {
            gpioDelay(10);  // 10 micros delay

            gpioWrite(MOTORCLK, PI_LOW);

            if (latch_state & BIT(7-i)) gpioWrite(MOTORDATA, PI_HIGH);
            else                        gpioWrite(MObv> should be used instead.

      Notifications for handle x will be available at the pipe named /dev/pigpiox (where x is the handle number).

      E.g. if the function returns 15 then the notifications must be read from /dev/pigpio15.

      Notifications have the following structure:

      H seqno
      H flags
      I tick
      I level


      seqno: starts at 0 each time the handle is opened and then increments by one for each report.

      flags: three flags are defined, PI_NTFY_FLAGS_WDOG, PI_NTFY_FLAGS_ALIVE, and PI_NTFY_FLAGS_EVENT.

      If bit 5 is set (PI_NTFY_FLAGS_WDOG) then bits 0-4 of the flags indicate a GPIO which has had a watchdog timeout.

      If bit 6 is set (PI_NTFY_FLAGS_ALIVE) this indicates a keep alive signal on the pipe/socket and is sent once a minute in the absence of other notification activity.

      If bit 7 is set (PI_NTFY_FLAGS_EVENT) then bits 0-4 of the flags indicate an event which has been triggered.

      tick: the number of microseconds since system boot. It wraps around after 1h12m.

      level: indicates the level of each GPIO. If bit 1<<x is set then GPIO x is high.

      Example

      h = pi.notify_open()
      if h >= 0:
         pi.notify_begin(h, 1234)

      notify_pause(handle)

      Pauses notifications on a handle.

      Parameters

      handle:= >=0 (as returned by a prior call to notify_open)


      Notifications for the handle are suspended until notify_begin is called again.

      Example

      h = pi.notify_open()
      if h >= 0:
         pi.notify_begin(h, 1234)
         ...
         pi.notify_pause(h)
         ...
         pi.notify_begin(h, 1234)
         ...

      read(gpio)

      Returns the GPIO level.

      Parameters

      gpio:= 0-53.


      Example

      pi.set_mode(23, pigpio.INPUT)

      pi.set_pull_up_down(23, pigpio.PUD_DOWN)
      print(pi.read(23))
      0

      pi.set_pull_up_down(23, pigpio.PUD_UP)
      print(pi.read(23))
      1

      read_bank_1()

      Returns the levels of the bank 1 GPIO (GPIO 0-31).

      The returned 32 bit integer has a bit set if the corresponding GPIO is high. GPIO n has bit value (1<<n).

      Example

      print(bin(pi.read_bank_1()))
      0b10010100000011100100001001111

      read_bank_2()

      Returns the levels of the bank 2 GPIO (GPIO 32-53).

      The returned 32 bit integer has a bit set if the corresponding GPIO is high. GPIO n has bit value (1<<(n-32)).

      Example

      print(bin(pi.read_bank_2()))
      0b1111110000000000000000

      run_script(script_id, params)

      Runs a stored script.

      Parameters

      script_id:= id of stored script.
         params:= up to 10 parameters required by the script.


      Example

      s = pi.run_script(sid, [par1, par2])

      s = pi.run_script(sid)

      s = pi.run_script(sid, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])

      script_status(script_id)

      Returns the run status of a stored script as well as the curren @  !!! piscopepiscopeppiscopepisc-1.jpgpisc-2.jpgpisc-3.jpg

      Introduction

      piscope is a logic analyser (digital waveform viewer) for the Raspberry.  It shows the state (high or low) of selected GPIO in real-time.

      See video.

      piscope uses the services of the pigpio library.  pigpio needs to be running on the Pi whose GPIO are to be monitored.

      The pigpio library may be started as a daemon (background process) by the following command.

      sudo pigpiod

      piscope may be invoked in several different ways

      Pi
      pi_host ~ $ piscope &
      Pi captures data
      Pi processes data
      Pi displays data
      Pi plus Linux PC

      (with the
      display on a remote
        Linux PC)
      remote_host ~ $ ssh -X pi_host
      pi_host ~ $ piscope &
      Pi captures data
      Pi processes data
      Remote Linux PC displays data
      Pi plus Windows PC

      (with the
      display on a remote
        Windows PC)
      You need to install an SSH client (putty suggested) and a X11 server (xming suggested).

      Run Program Files -> Xming -> XLaunch and accept the defaults.

      Run putty and enter the Pi's host name or IP address.  Click on SSH X11 and tick Enable X11 forwarding and then select Open.


      pi_host ~ $ piscope &
      Pi captures data
      Pi processes data
      Remote Windows PC displays data
      Pi plus Linux PC

      (with the display and processing on a remote Linux PC)
      remote_host ~ $ export PIGPIO_ADDR=pi_host
      remote_host ~ $ piscope &
      Pi captures data
      Remote processes data
      Remote displays data

      piscope operates in one of three modes

      Twt values of parameters 0 to 9.

      Parameters

      script_id:= id of stored script.


      The run status may be

      PI_SCRIPT_INITING
      PI_SCRIPT_HALTED
      PI_SCRIPT_RUNNING
      PI_SCRIPT_WAITING
      PI_SCRIPT_FAILED


      The return value is a tuple of run status and a list of the 10 parameters. On error the run status will be negative and the parameter list will be empty.

      Example

      (s, pars) = pi.script_status(sid)

      serial_close(handle)

      Closes the serial device associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to serial_open).


      Example

      pi.serial_close(h1)

      serial_data_available(handle)

      Returns the number of bytes available to be read from the device associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to serial_open).


      Example

      rdy = pi.serial_data_available(h1)

      if rdy > 0:
         (b, d) = pi.serial_read(h1, rdy)

      serial_open(tty, baud, ser_flags)

      Returns a handle for the serial tty device opened at baud bits per second. The device name must start with /dev/tty or /dev/serial.

      Parameters

            tty:= the serial device to open.
           baud:= baud rate in bits per second, see below.
      ser_flags:= 0, no flags are currently defined.


      Normally you would only use the serial_* functions if you are or will be connecting to the Pi over a network. If you will always run on the local Pi use the standard serial module instead.

      The baud rate must be one of 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, or 230400.

      Example

      h1 = pi.serial_open("/dev/ttyAMA0", 300)

      h2 = pi.serial_open("/dev/ttyUSB1", 19200, 0)

      h3 = pi.serial_open("/dev/serial0", 9600)

      serial_read(handle, count)

      Reads up to count bytes from the device associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to serial_open).
       count:= >0, the number of bytes to read (defaults to 1000).


      The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code).

      If no data is ready a bytes read of zero is returned. Example

      (b, d) = pi.serial_read(h2, 100)
      if b > 0:
         # process read data

      serial_read_byte(handle)

      Returns a single byte from the device associated with handle.

      Parameters

      handle:= >=0 (as returned byx a prior call to serial_open).


      If no data is ready a negative error code will be returned.

      Example

      b = pi.serial_read_byte(h1)

      serial_write(handle, data)

      Writes the data bytes to the device associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to serial_open).
        data:= the bytes to write.


      Example

      pi.serial_write(h1, b'\x02\x03\x04')

      pi.serial_write(h2, b'help')

      pi.serial_write(h2, "hello")

      pi.serial_write(h1, [2, 3, 4])

      serial_write_byte(handle, byte_val)

      Writes a single byte to the device associated with handle.

      Parameters

        handle:= >=0 (as returned by a prior call to serial_open).
      byte_val:= 0-255, the value to write.


      Example

      pi.serial_write_byte(h1, 23)

      pi.serial_write_byte(h1, ord('Z'))

      set_PWM_dutycycle(user_gpio, dutycycle)

      Starts (non-zero dutycycle) or stops (0) PWM pulses on the GPIO.

      Parameters

      user_gpio:= 0-31.
      dutycycle:= 0-range (range defaults to 255).


      The set_PWM_range function can change the default range of 255.

      Example

      pi.set_PWM_dutycycle(4,   0) # PWM off
      pi.set_PWM_dutycycle(4,  64) # PWM 1/4 on
      pi.set_PWM_dutycycle(4, 128) # PWM 1/2 on
      pi.set_PWM_dutycycle(4, 192) # PWM 3/4 on
      pi.set_PWM_dutycycle(4, 255) # PWM full on

      set_PWM_frequency(user_gpio, frequency)

      Sets the frequency (in Hz) of the PWM to be used on the GPIO.

      Parameters

      user_gpio:= 0-31.
      frequency:= >=0 Hz


      Returns the numerically closest frequency if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_PERMITTED.

      If PWM is currently active on the GPIO it will be switched off and then back on at the new frequency.

      Each GPIO can be independently set to one of 18 different PWM frequencies.

      The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5, 8, or 10 microseconds (default 5). The sample rate is set when the pigpio daemon is started.

      The frequencies for each sample rate are:

                             Hertz

             1: 40000 20000 10000 8000 5000 4000 2500 2000 1600
                 1250  1000   800  500  400  250  200  100   50

             2: 20000 10000  5000 4000 2500 2000 1250 1000  800
                  625   500   400  250 &nzbsp;200  125  100   50   25

             4: 10000  5000  2500 2000 1250 1000  625  500  400
                  313   250   200  125  100   63   50   25   13
      sample
       rate
       (us)  5:  8000  4000  2000 1600 1000  800  500  400  320
                  250   200   160  100   80   50   40   20   10

             8:  5000  2500  1250 1000  625  500  313  250  200
                  156   125   100   63   50   31   25   13    6

            10:  4000  2000  1000  800  500  400  250  200  160
                  125   100    80   50   40   25   20   10    5


      Example

      pi.set_PWM_frequency(4,0)
      print(pi.get_PWM_frequency(4))
      10

      pi.set_PWM_frequency(4,100000)
      print(pi.get_PWM_frequency(4))
      8000

      set_PWM_range(user_gpio, range_)

      Sets the range of PWM values to be used on the GPIO.

      Parameters

      user_gpio:= 0-31.
         range_:= 25-40000.


      Example

      pi.set_PWM_range(9, 100)  # now  25 1/4,   50 1/2,   75 3/4 on
      pi.set_PWM_range(9, 500)  # now 125 1/4,  250 1/2,  375 3/4 on
      pi.set_PWM_range(9, 3000) # now 750 1/4, 1500 1/2, 2250 3/4 on

      set_bank_1(bits)

      Sets GPIO 0-31 if the corresponding bit in bits is set.

      Parameters

      bits:= a 32 bit mask with 1 set if the corresponding GPIO is
             to be set.


      A returned status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO.

      Example

      pi.set_bank_1(int("111110010000",2))

      set_bank_2(bits)

      Sets GPIO 32-53 if the corresponding bit (0-21) in bits is set.

      Parameters

      bits:= a 32 bit mask with 1 set if the corresponding GPIO is
             to be set.


      A returned status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO.

      Example

      pi.set_bank_2(0x303)

      set_glitch_filter(user_gpio, steady)

      S 77?&  -!!5pythonPythonPython Interfacelcd.jpgkeypad.jpgdriver.jpgpigpio is a Python module for the Raspberry which talks to the pigpio daemon to allow control of the general purpose input outputs (GPIO).

      Features

      o the pigpio Python module can run on Windows, Macs, or Linux

      o controls one or more Pi's

      o hardware timed PWM on any of GPIO 0-31

      o hardware timed servo pulses on any of GPIO 0-31

      o callbacks when any of GPIO 0-31 change state

      o creating and transmitting precisely timed waveforms

      o reading/writing GPIO and setting their modes

      o wrappers for I2C, SPI, and serial links

      o creating and running scripts on the pigpio daemon

      GPIO

      ALL GPIO are identified by their Broadcom number.

      Notes

      Transmitted waveforms are accurate to a microsecond.

      Callback level changes are time-stamped and will be accurate to within a few microseconds.

      Settings

      A number of settings are determined when the pigpio daemon is started.

      o the sample rate (1, 2, 4, 5, 8, or 10 us, default 5 us).

      o the set of GPIO which may be updated (generally written to). The default set is those available on the Pi board revision.

      o the available PWM frequencies (see set_PWM_frequency).

      Exceptions

      By default a fatal exception is raised if you pass an invalid argument to a pigpio function.

      If you wish to handle the returned status yourself you should set pigpio.exceptions to False.

      You may prefer to check the returned status in only a few parts of your code. In that case do the following:

      Example

      pigpio.exceptions = False

      # Code where you want to test the error status.

      pigpio.exceptions = True

      Usage

      This module uses the services of the C pigpio library. pigpio must be running on the Pi(s) whose GPIO are to be manipulated.

      The normal way to start pigpio is as a daemon (during system start).

      sudo pigpiod

      Your Python program must import pigpio and create one or more instances of the pigpio.pi class. This class gives access to a specified Pi's GPIO.

      Example

      pi1 = pigpio.pi()       # pi1 accesses the local Pi's GPIO
      pi2 = pigpio.pi('tom')  # pi2 accesses tom's GPIO
      pi3 = pigpio.pi('dick') # pi3 accesses dick's GPIO

      pi1.write(4, 0) # set local Pi's GPIO 4 low
      pi2.write(4, 1) # set tom's GPIO 4 to high
      pi3.read(4)     # get level of dick's GPIO 4


      The later example code snippets assume that pi is an instance of the pigpio.pi class.

      OVERVIEW

      ?{ets a glitch filter on a GPIO.

      Level changes on the GPIO are not reported unless the level has been stable for at least steady microseconds. The level is then reported. Level changes of less than steady microseconds are ignored.

      Parameters

      user_gpio:= 0-31
         steady:= 0-300000


      Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER.

      This filter affects the GPIO samples returned to callbacks set up with callback and wait_for_edge.

      It does not affect levels read by read, read_bank_1, or read_bank_2.

      Each (stable) edge will be timestamped steady microseconds after it was first detected.

      Example

      pi.set_glitch_filter(23, 100)

      set_mode(gpio, mode)

      Sets the GPIO mode.

      Parameters

      gpio:= 0-53.
      mode:= INPUT, OUTPUT, ALT0, ALT1, ALT2, ALT3, ALT4, ALT5.


      Example

      pi.set_mode( 4, pigpio.INPUT)  # GPIO  4 as input
      pi.set_mode(17, pigpio.OUTPUT) # GPIO 17 as output
      pi.set_mode(24, pigpio.ALT2)   # GPIO 24 as ALT2

      set_noise_filter(user_gpio, steady, active)

      Sets a noise filter on a GPIO.

      Level changes on the GPIO are ignored until a level which has been stable for steady microseconds is detected. Level changes on the GPIO are then reported for active microseconds after which the process repeats.

      Parameters

      user_gpio:= 0-31
         steady:= 0-300000
         active:= 0-1000000


      Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER.

      This filter affects the GPIO samples returned to callbacks set up with callback and wait_for_edge.

      It does not affect levels read by read, read_bank_1, or read_bank_2.

      Level changes before and after the active period may be reported. Your software must be designed to cope with such reports.

      Example

      pi.set_noise_filter(23, 1000, 5000)

      set_pad_strength(pad, pad_strength)

      This function sets the pad drive strength in mA.

      Parameters

               pad:= 0-2, the pad to set.
      pad_strength:= 1-16 mA.


      Returns 0 if OK, otherwise PI_BAD_PAD, or PI_BAD_STRENGTH.

      ESSENTIAL
      pigpio.pi Initialise Pi connection
      stop Stop a Pi connection
      BASIC
      set_mode Set a GPIO mode
      get_mode Get a GPIO mode
      set_pull_up_down
      PadGPIO
      00-27
      128-45
      246-53


      Example

      pi.set_pad_strength(2, 14) # Set pad 2 to 14 mA.

      set_pull_up_down(gpio, pud)

      Sets or clears the internal GPIO pull-up/down resistor.

      Parameters

      gpio:= 0-53.
       pud:= PUD_UP, PUD_DOWN, PUD_OFF.


      Example

      pi.|set_pull_up_down(17, pigpio.PUD_OFF)
      pi.set_pull_up_down(23, pigpio.PUD_UP)
      pi.set_pull_up_down(24, pigpio.PUD_DOWN)

      set_servo_pulsewidth(user_gpio, pulsewidth)

      Starts (500-2500) or stops (0) servo pulses on the GPIO.

      Parameters

       user_gpio:= 0-31.
      pulsewidth:= 0 (off),
                   500 (most anti-clockwise) - 2500 (most clockwise).


      The selected pulsewidth will continue to be transmitted until changed by a subsequent call to set_servo_pulsewidth.

      The pulsewidths supported by servos varies and should probably be determined by experiment. A value of 1500 should always be safe and represents the mid-point of rotation.

      You can DAMAGE a servo if you command it to move beyond its limits.

      Example

      pi.set_servo_pulsewidth(17, 0)    # off
      pi.set_servo_pulsewidth(17, 1000) # safe anti-clockwise
      pi.set_servo_pulsewidth(17, 1500) # centre
      pi.set_servo_pulsewidth(17, 2000) # safe clockwise

      set_watchdog(user_gpio, wdog_timeout)

      Sets a watchdog timeout for a GPIO.

      Parameters

         user_gpio:= 0-31.
      wdog_timeout:= 0-60000.


      The watchdog is nominally in milliseconds.

      Only one watchdog may be registered per GPIO.

      The watchdog may be cancelled by setting timeout to 0.

      Once a watchdog has been started callbacks for the GPIO will be triggered every timeout interval after the last GPIO activity.

      The callback will receive the special level TIMEOUT.

      Example

      pi.set_watchdog(23, 1000) # 1000 ms watchdog on GPIO 23
      pi.set_watchdog(23, 0)    # cancel watchdog on GPIO 23

      shell(shellscr, pstring)

      This function uses the system call to execute a shell script with the given string as its parameter.

      Parameters

      shellscr:= the name of the script, only alphanumerics,
                    '-' and '_' are allowed in the name
      pstring := the parameter string to pass to the script


      The exit status of the system call is returned if OK, otherwise PI_BAD_SHELL_STATUS.

      shellscr must exist in /opt/pigpio/cgi and must be executable.

      The returned exit status is normally 256 times that set by the shell script exit function. If the script can't be found 32512 will be returned.

      The following table gives some example returned statuses:

      Script exit statusReturned system call status
      1256
      51280
      102560
      20051200
      script not found32512


      Example

      // pass two parameters, hello and world
      status = pi.shell("scr1", "hello world");

      // pass three parameters, hello, string with spaces, and world
      status = pi.shell("scr1", "hello 'string with spaces' world");

      // };pass one parameter, hello string with spaces world
      status = pi.shell("scr1", "\"hello string with spaces world\"");

      spi_close(handle)

      Closes the SPI device associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to spi_open).


      Example

      pi.spi_close(h)

      spi_open(spi_channel, baud, spi_flags)

      Returns a handle for the SPI device on the channel. Data will be transferred at baud bits per second. The flags may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select.

      The Pi has two SPI peripherals: main and auxiliary.

      The main SPI has two chip selects (channels), the auxiliary has three.

      The auxiliary SPI is available on all models but the A and B.

      The GPIO used are given in the following table.

      MISOMOSISCLKCE0CE1CE2
      Main SPI9101187-
      Aux SPI192021181716


      Parameters

      spi_channel:= 0-1 (0-2 for the auxiliary SPI).
             baud:= 32K-125M (values above 30M are unlikely to work).
        spi_flags:= see below.


      spi_flags consists of the least significant 22 bits.

      21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
       b  b  b  b  b  b  R  T  n  n  n  n  W  A u2 u1 u0 p2 p1 p0  m  m


      mm defines the SPI mode.

      WARNING: modes 1 and 3 do not appear to work on the auxiliary SPI.

      Mode POL PHA
       0    0   0
       1    0   1
       2    1   0
       3    1   1


      px is 0 if CEx is active low (default) and 1 for active high.

      ux is 0 if the CEx GPIO is reserved for SPI (default) and 1 otherwise.

      A is 0 for the main SPI, 1 for the auxiliary SPI.

      W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Main SPI only.

      nnnn defines the number of bytes (0-15) to write before switching the MOSI line to MISO to read data. This field is ignored if W is not set. Main SPI only.

      T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. Auxiliary SPI only.

      R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. Auxiliary SPI only.

      bbbbbb defines the word size in bits (0-32). The default (0) sets 8 bits per word. Auxiliary SPI only.

      The spi_read, spi_write, and spi_xfer functions transfer data packed into 1, 2, or 4 bytes according to the word size in bits.

      For bits 1-8 there will be one byte per character. For bits 9-16 there will be two bytes per character. For bits 17-32 there will be four bytes per chara~cter.

      Multi-byte transfers are made in least significant byte first order.

      E.g. to transfer 32 11-bit words data should contain 64 bytes.

      E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A.

      The other bits in flags should be set to zero.

      Example

      # open SPI device on channel 1 in mode 3 at 50000 bits per second

      h = pi.spi_open(1, 50000, 3)

      spi_read(handle, count)

      Reads count bytes from the SPI device associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to spi_open).
       count:= >0, the number of bytes to read.


      The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code).

      Example

      (b, d) = pi.spi_read(h, 60) # read 60 bytes from device h
      if b == 60:
         # process read data
      else:
         # error path

      spi_write(handle, data)

      Writes the data bytes to the SPI device associated with handle.

      Parameters

      handle:= >=0 (as returned by a prior call to spi_open).
        data:= the bytes to write.


      Example

      pi.spi_write(0, b'\x02\xc0\x80') # write 3 bytes to device 0

      pi.spi_write(0, b'defgh')        # write 5 bytes to device 0

      pi.spi_write(0, "def")           # write 3 bytes to device 0

      pi.spi_write(1, [2, 192, 128])   # write 3 bytes to device 1

      spi_xfer(handle, data)

      Writes the data bytes to the SPI device associated with handle, returning the data bytes read from the device.

      Parameters

      handle:= >=0 (as returned by a prior call to spi_open).
        data:= the bytes to write.


      The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code).

      Example

      (count, rx_data) = pi.spi_xfer(h, b'\x01\x80\x00')

      (count, rx_data) = pi.spi_xfer(h, [1, 128, 0])

      (count, rx_data) = pi.spi_xfer(h, b"hello")

      (count, rx_data) = pi.spi_xfer(h, "hello")

      stop()

      Release pigpio resources.

      Example

      pi.stop()

      stop_script(script_id)

      Stops a running script.

      Parameters

      script_id:= id of stored script.


      Example

      status = pi.stop_script(sid)

      store_script(script)

      Store a script for later execution.

      See http://abyz.me.uk/rpi/pigpio/pigs.html#Scripts for details.

      Parameters

      script:= the script text as a series of bytes.


      Returns a >=0 script id if OK.

      Example

      sid = pi.store_script(
         b'tag 0 w 22 1 mils 100 w 22 0 mils 100 dcr p0 jp 0')

      update_script(script_id, params)

      Sets the parameters of a script. The script may or may not be running. The first parameters of the script are overwritten with the new values.

      Parameters

      script_id:= id of stored script.
         params:= up to 10 parameters required by the script.


      Example

      s = pi.update_script(sid, [par1, par2])

      s = pi.update_script(sid, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])

      wait_for_edge(user_gpio, edge, wait_timeout)

      Wait for an edge event on a GPIO.

      Parameters

         user_gpio:= 0-31.
              edge:= EITHER_EDGE, RISING_EDGE (default), or
                     FALLING_EDGE.
      wait_timeout:= >=0.0 (default 60.0).


      The function returns when the edge is detected or after the number of seconds specified by timeout has expired.

      Do not use this function for precise timing purposes, the edge is only checked 20 times a second. Whenever you need to know the accurate time of GPIO events use a callback function.

      The function returns True if the edge is detected, otherwise False.

      Example

      if pi.wait_for_edge(23):
         print("Rising edge detected")
      else:
         print("wait for edge timed out")

      if pi.wait_for_edge(23, pigpio.FALLING_EDGE, 5.0):
         print("Falling edge detected")
      else:
         print("wait for falling edge timed out")

      wait_for_event(event, wait_timeout)

      Wait for an event.

      Parameters

             event:= 0-31.
      wait_timeout:= >=0.0 (default 60.0).


      The function returns when the event is signalled or after the number of seconds specified by timeout has expired.

      The function returns True if the event is detected, otherwise False.

      Example

      if pi.wait_for_event(23):
         print("event detected")
      else:
         print("wait for event timed out")

      wave_add_generic(pulses)

      Adds a list of pulses to the current waveform.

      Parameters

      pulses:= list of pulses to add to the waveform.


      Returns the new total number of pulses in the current waveform.

      The pulses are interleaved in time order within the existing waveform (if any).

      Merging allows the waveform to be built in parts, that is the settings for GPIO#1 can be added, and then GPIO#2 etc.

      If the added waveform is intended to start after or within the existing waveform then the first pulse should consist solely of a delay.

      Example

      G1=4
      G2=24

      pi.set_mode(G1, pigpio.OUTPUT)
      pi.set_mode(G2, pigpio.OUTPUT)

      flash_500=[] # flash every 500 ms
      flash_100=[] # flash every 100 ms

      #                              ON     OFF  DELAY

      flash_500.append(pigpio.pulse(1<<G1, 1<<G2, 500000))
      flash_500.append(pigpio.pulse(1<<G2, 1<<G1, 500000))

      flash_100.append(pigpio.pulse(1<<G1, 1<<G2, 100000))
      flash_100.append(pigpio.pulse(1<<G2, 1<<G1, 100000))

      pi.wave_clear() # clear any existing waveforms

      pi.wave_add_generic(flash_500) # 500 ms flashes
      f500 = pi.wave_create() # create and save id

      pi.wave_add_generic(flash_100) # 100 ms flashes
      f100 = pi.wave_create() # create and save id

      pi.wave_send_repeat(f500)

      time.sleep(4)

      pi.wave_send_repeat(f100)

      time.sleep(4)

      pi.wave_send_repeat(f500)

      time.sleep(4)

      pi.wave_tx_stop() # stop waveform

      pi.wave_clear() # clear all waveforms

      wave_add_new()

      Starts a new empty waveform.

      You would not normally need to call this function as it is automatically called after a waveform is created with the
      wave_create function.

      Example

      pi.wave_add_new()

      wave_add_serial(user_gpio, baud, data, offset, bb_bits, bb_stop)

      Adds a waveform representing serial data to the existing waveform (if any). The serial data starts offset microseconds from the start of the waveform.

      Parameters

      user_gpio:= GPIO to transmit data.  You must set the GPIO mode
                  to output.
           baud:= 50-1000000 bits per second.
           data:= the bytes to write.
         offset:= number of microseconds from the start of the
                  waveform, default 0.
        bb_bits:= number of data bits, default 8.
        bb_stop:= number of stop half bits, default 2.


      Returns the new total number of pulses in the current waveform.

      The serial data is formatted as one start bit, bb_bits data bits, and bb_stop/2 stop bits.

      It is legal to add serial data streams with different baud rates to the same waveform.

      The bytes required for each character depend upon bb_bits.

      For bb_bits 1-8 there will be one byte per character. For bb_bits 9-16 there will be two bytes per character. For bb_bits 17-32 there will be four bytes per character.

      Example

      pi.wave_add_serial(4, 300, 'Hello world')

      pi.wave_add_serial(4, 300, b"Hello world")

      pi.wave_add_serial(4, 300, b'\x23\x01\x00\x45')

      pi.wave_add_serial(17, 38400, [23, 128, 234], 5000)

      wave_chain(data)

      This function transmits a chain of waveforms.

      NOTE: Any hardware PWM started by hardware_PWM will be cancelled.

      The waves to be transmitted are specified by the contents of data which contains an ordered list of wave_ids and optional command codes and related data.

      Returns 0 if OK, otherwise PI_CHAIN_NESTING, PI_CHAIN_LOOP_CNT, PI_BAD_CHAIN_LOOP, PI_BAD_CHAIN_CMD, PI_CHAIN_COUNTER, PI_BAD_CHAIN_DELAY, PI_CHAIN_TOO_BIG, or PI_BAD_WAVE_ID.

      Each wave is transmitted in the order specified. A wave may occur multiple times per chain.

      A blocks of waves may be transmitted multiple times by using the loop commands. The block is bracketed by loop start and end commands. Loops may be nested.

      Delays between waves may be added with the delay command.

      The following command codes are supported:

      NameCmd & DataMeaning
      Loop Start255 0Identify start of a wave block
      Loop Repeat255 1 x yloop x + y*256 times
      Delay255 2 x ydelay x + y*256 microseconds
      Loop Forever255 3loop forever


      If present Loop Forever must be the last entry in the chain.

      The code is currently dimensioned to support a chain with roughly 600 entries and 20 loop counters.

      Example

      #!/usr/bin/env python

      import time
      import pigpio

      WAVES=5
      GPIO=4

      wid=[0]*WAVES

      pi = pigpio.pi() # Connect to local Pi.

      pi.set_mode(GPIO, pigpio.OUTPUT);

      for i in range(WAVES):
         pi.wave_add_generic([
            pigpio.pulse(1<<GPIO, 0, 20),
            pigpio.pulse(0, 1<<GPIO, (i+1)*200)]);

         wid[i] = pi.wave_create();

      pi.wave_chain([
         wid[4], wid[3], wid[2],       # transmit waves 4+3+2
         255, 0,                       # loop start
            wid[0], wid[0], wid[0],    # transmit waves 0+0+0
            255, 0,                    # loop start
               wid[0], wid[1],         # transmit waves 0+1
               255, 2, 0x88, 0x13,     # delay 5000us
            255, 1, 30, 0,             # loop end (repeat 30 times)
            255, 0,                    # loop start
               wid[2], wid[3], wid[0], # transmit waves 2+3+0
               wid[3], wid[1], wid[2], # transmit waves 3+1+2
            255, 1, 10, 0,             # loop end (repeat 10 times)
         255, 1, 5, 0,                 # loop end (repeat 5 times)
         wid[4], wid[4], wid[4],       # transmit waves 4+4+4
         255, 2, 0x20, 0x4E,           # delay 20000us
         wid[0], wid[0], wid[0],       # transmit waves 0+0+0
         ])

      while pi.wave_tx_busy():
         time.sleep(0.1);

      for i in range(WAVES):
         pi.wave_delete(wid[i])

      pi.stop()

      wave_clear()

      Clears all waveforms and any data added by calls to the wave_add_* functions.

      Example

      pi.wave_clear()

      wave_create()

      Creates a waveform from the data provided by the prior calls to the wave_add_* functions.

      Returns a wave id (>=0) if OK, otherwise PI_EMPTY_WAVEFORM, PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID.

      The data provided by the wave_add_* functions is consumed by this function.

      As many waveforms may be created as there is space available. The wave id is passed to wave_send_* to specify the waveform to transmit.

      Normal usage would be

      Step 1. wave_clear to clear all waveforms and added data.

      Step 2. wave_add_* calls to supply the waveform data.

      Step 3. wave_create to create the waveform and get a unique id

      Repeat steps 2 and 3 as needed.

      Step 4. wave_send_* with the id of the waveform to transmit.

      A waveform comprises one or more pulses.

      A pulse specifies

      1) the GPIO to be switched on at the start of the pulse. 2) the GPIO to be switched off at the start of the pulse. 3) the delay in microseconds before the next pulse.

      Any or all the fields can be zero. It doesn't make any sense to set all the fields to zero (the pulse will be ignored).

      When a waveform is started each pulse is executed in order with the specified delay between the pulse and the next.

      Example

      wid = pi.wave_create()

      wave_create_and_pad(percent)

      This function creates a waveform like wave_create but pads the consumed resources. Where percent gives the percentage of the resources to use (in terms of the theoretical maximum, not the current amount free). This allows the reuse of deleted waves while a transmission is active.

      Upon success a wave id greater than or equal to 0 is returned, otherwise PI_EMPTY_WAVEFORM, PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID.

      percent: 0-100, size of waveform as percentage of maximum available.


      The data provided by the wave_add_* functions are consumed by this function.

      As many waveforms may be created as there is space available. The wave id is passed to wave_send_* to specify the waveform to transmit.

      A usage would be the creation of two waves where one is filled while the other is being transmitted. Each wave is assigned 50% of the resources. This buffer structure allows the transmission of infinite wave sequences.

      Normal usage:

      Step 1. wave_clear to clear all waveforms and added data.

      Step 2. wave_add_* calls to supply the waveform data.

      Step 3. wave_create_and_pad to create a waveform of uniform size.

      Step 4. wave_send_* with the id of the waveform to transmit.

      Repeat steps 2-4 as needed.

      Step 5. Any wave id can now be deleted and another wave of the same size can be created in its place.

      Example

      wid = pi.wave_create_and_pad(50)

      wave_delete(wave_id)

      This function deletes the waveform with id wave_id.

      Parameters

      wave_id:= >=0 (as returned by a prior call to wave_create).


      Wave ids are allocated in order, 0, 1, 2, etc.

      The wave is flagged for deletion. The resources used by the wave will only be reused when either of the following apply.

      - all waves with higher numbered wave ids have been deleted or have been flagged for deletion.

      - a new wave is created which uses exactly the same resources as the current wave (see the C source for gpioWaveCreate for details).

      Example

      pi.wave_delete(6) # delete waveform with id 6

      pi.wave_delete(0) # delete waveform with id 0

      wave_get_cbs()

      Returns the length in DMA control blocks of the current waveform.

      Example

      cbs = pi.wave_get_cbs()

      wave_get_max_cbs()

      Returns the maximum possible size of a waveform in DMA control blocks.

      Example

      cbs = pi.wave_get_max_cbs()

      wave_get_max_micros()

      Returns the maximum possible size of a waveform in microseconds.

      Example

      micros = pi.wave_get_max_micros()

      wave_get_max_pulses()

      Returns the maximum possible size of a waveform in pulses.

      Example

      pulses = pi.wave_get_max_pulses()

      wave_get_micros()

      Returns the length in microseconds of the current waveform.

      Example

      micros = pi.wave_get_micros()

      wave_get_pulses()

      Returns the length in pulses of the current waveform.

      Example

      pulses = pi.wave_get_pulses()

      wave_send_once(wave_id)

      Transmits the waveform with id wave_id. The waveform is sent once.

      NOTE: Any hardware PWM started by hardware_PWM will be cancelled.

      Parameters

      wave_id:= >=0 (as returned by a prior call to wave_create).


      Returns the number of DMA control blocks used in the waveform.

      Example

      cbs = pi.wave_send_once(wid)

      wave_send_repeat(wave_id)

      Transmits the waveform with id wave_id. The waveform repeats until wave_tx_stop is called or another call to wave_send_* is made.

      NOTE: Any hardware PWM started by hardware_PWM will be cancelled.

      Parameters

      wave_id:= >=0 (as returned by a prior call to wave_create).


      Returns the number of DMA control blocks used in the waveform.

      Example

      cbs = pi.wave_send_repeat(wid)

      wave_send_using_mode(wave_id, mode)

      Transmits the waveform with id wave_id using mode mode.

      Parameters

      wave_id:= >=0 (as returned by a prior call to wave_create).
         mode:= WAVE_MODE_ONE_SHOT, WAVE_MODE_REPEAT,
                WAVE_MODE_ONE_SHOT_SYNC, or WAVE_MODE_REPEAT_SYNC.


      WAVE_MODE_ONE_SHOT: same as wave_send_once.

      WAVE_MODE_REPEAT same as wave_send_repeat.

      WAVE_MODE_ONE_SHOT_SYNC same as wave_send_once but tries to sync with the previous waveform.

      WAVE_MODE_REPEAT_SYNC same as wave_send_repeat but tries to sync with the previous waveform.

      WARNING: bad things may happen if you delete the previous waveform before it has been synced to the new waveform.

      NOTE: Any hardware PWM started by hardware_PWM will be cancelled.

      Parameters

      wave_id:= >=0 (as returned by a prior call to wave_create).


      Returns the number of DMA control blocks used in the waveform.

      Example

      cbs = pi.wave_send_using_mode(wid, WAVE_MODE_REPEAT_SYNC)

      wave_tx_at()

      Returns the id of the waveform currently being transmitted using wave_send*. Chained waves are not supported.

      Returns the waveform id or one of the following special values:

      WAVE_NOT_FOUND (9998) - transmitted wave not found. NO_TX_WAVE (9999) - no wave being transmitted.

      Example

      wid = pi.wave_tx_at()

      wave_tx_busy()

      Returns 1 if a waveform is currently being transmitted, otherwise 0.

      Example

      pi.wave_send_once(0) # send first waveform

      while pi.wave_tx_busy(): # wait for waveform to be sent
         time.sleep(0.1)

      pi.wave_send_once(1) # send next waveform

      wave_tx_repeat()

      This function is deprecated and has beeen removed.

      Use
      wave_create/wave_send_* instead.

      wave_tx_start()

      This function is deprecated and has been removed.

      Use
      wave_create/wave_send_* instead.

      wave_tx_stop()

      Stops the transmission of the current waveform.

      This function is intended to stop a waveform started with wave_send_repeat.

      Example

      pi.wave_send_repeat(3)

      time.sleep(5)

      pi.wave_tx_stop()

      write(gpio, level)

      Sets the GPIO level.

      Parameters

       GPIO:= 0-53.
      level:= 0, 1.


      If PWM or servo pulses are active on the GPIO they are switched off.

      <b>Example


      pi.set_mode(17, pigpio.OUTPUT)

      pi.write(17,0)
      print(pi.read(17))
      0

      pi.write(17,1)
      print(pi.read(17))
      1

      class pulse

      pigpio.pulse(gpio_on, gpio_off, delay)

      Initialises a pulse.

      Parameters

       gpio_on:= the GPIO to switch on at the start of the pulse.
      gpio_off:= the GPIO to switch off at the start of the pulse.
         delay:= the delay in microseconds before the next pulse.

      FUNCTIONS

      pigpio.error_text(errnum)

      Returns a text description of a pigpio error.

      Parameters

      errnum:= <0, the error number


      Example

      print(pigpio.error_text(-5))
      level not 0-1

      pigpio.tickDiff(t1, t2)

      Returns the microsecond difference between two ticks.

      Parameters

      t1:= the earlier tick
      t2:= the later tick


      Example

      print(pigpio.tickDiff(4294967272, 12))
      36

      pigpio.u2i(uint32)

      Converts a 32 bit unsigned number to signed.

      Parameters

      uint32:= an unsigned 32 bit number


      Example

      print(u2i(4294967272))
      -24
      print(u2i(37))
      37

      PARAMETERS

      active: 0-1000000

      The number of microseconds level changes are reported for once a noise filter has been triggered (by steady microseconds of a stable level).

      arg1:

      An unsigned argument passed to a user customised function. Its meaning is defined by the customiser.

      arg2:

      An unsigned argument passed to a user customised function. Its meaning is defined by the customiser.

      argx:

      An array of bytes passed to a user customised function. Its meaning and content is defined by the customiser.

      baud:

      The speed of serial communication (I2C, SPI, serial link, waves) in bits per second.

      bb_bits: 1-32

      The number of data bits to be used when adding serial data to a waveform.

      bb_stop: 2-8

      The number of (half) stop bits to be used when adding serial data to a waveform.

      bit: 0-1

      A value of 0 or 1.

      bits: 32 bit number

      A mask used to select GPIO to be operated on. If bit n is set then GPIO n is selected. A convenient way of setting bit n is to bit or in the value (1<<n).

      To select GPIO 1, 7, 23

      bits = (1<<1) | (1<<7) | (1<<23)

      bsc_control:

      22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
       a  a  a  a  a  a  a  -  - IT HC TF IR RE TE BK EC ES PL PH I2 SP EN


      aaaaaaa defines the I2C slave address (only relevant in I2C mode)

      Bits 0-13 are copied unchanged to the BSC CR register. See pages 163-165 of the Broadcom peripherals document.

      byte_val: 0-255

      A whole number.

      clkfreq: 4689-250M (13184-375M for the BCM2711)

      The hardware clock frequency.

      connected:

      True if a connection was established, False otherwise.

      count:

      The number of bytes of data to be transferred.

      CS:

      The GPIO used for the slave select signal when bit banging SPI.

      data:

      Data to be transmitted, a series of bytes.

      delay: >=1

      The length of a pulse in microseconds.

      dutycycle: 0-range_

      A number between 0 and range_.

      The dutycycle sets the proportion of time on versus time off during each PWM cycle.

      DutycycleOn time
      0Off
      range_ * 0.2525% On
      range_ * 0.5050% On
      range_ * 0.7575% On
      range_Fully On

      edge: 0-2

      EITHER_EDGE = 2
      FALLING_EDGE = 1
      RISING_EDGE = 0

      errnum: <0

      PI_BAD_USER_GPIO = -2
      PI_BAD_GPIO = -3
      PI_BAD_MODE = -4
      PI_BAD_LEVEL = -5
      PI_BAD_PUD = -6
      PI_BAD_PULSEWIDTH = -7
      PI_BAD_DUTYCYCLE = -8
      PI_BAD_WDOG_TIMEOUT = -15
      PI_BAD_DUTYRANGE = -21
      PI_NO_HANDLE = -24
      PI_BAD_HANDLE = -25
      PI_BAD_WAVE_BAUD = -35
      PI_TOO_MANY_PULSES = -36
      PI_TOO_MANY_CHARS = -37
      PI_NOT_SERIAL_GPIO = -38
      PI_NOT_PERMITTED = -41
      PI_SOME_PERMITTED = -42
      PI_BAD_WVSC_COMMND = -43
      PI_BAD_WVSM_COMMND = -44
      PI_BAD_WVSP_COMMND = -45
      PI_BAD_PULSELEN = -46
      PI_BAD_SCRIPT = -47
      PI_BAD_SCRIPT_ID = -48
      PI_BAD_SER_OFFSET = -49
      PI_GPIO_IN_USE = -50
      PI_BAD_SERIAL_COUNT = -51
      PI_BAD_PARAM_NUM = -52
      PI_DUP_TAG = -53
      PI_TOO_MANY_TAGS = -54
      PI_BAD_SCRIPT_CMD = -55
      PI_BAD_VAR_NUM = -56
      PI_NO_SCRIPT_ROOM = -57
      PI_NO_MEMORY = -58
      PI_SOCK_READ_FAILED = -59
      PI_SOCK_WRIT_FAILED = -60
      PI_TOO_MANY_PARAM = -61
      PI_SCRIPT_NOT_READY = -62
      PI_BAD_TAG = -63
      PI_BAD_MICS_DELAY = -64
      PI_BAD_MILS_DELAY = -65
      PI_BAD_WAVE_ID = -66
      PI_TOO_MANY_CBS = -67
      PI_TOO_MANY_OOL = -68
      PI_EMPTY_WAVEFORM = -69
      PI_NO_WAVEFORM_ID = -70
      PI_I2C_OPEN_FAILED = -71
      PI_SER_OPEN_FAILED = -72
      PI_SPI_OPEN_FAILED = -73
      PI_BAD_I2C_BUS = -74
      PI_BAD_I2C_ADDR = -75
      PI_BAD_SPI_CHANNEL = -76
      PI_BAD_FLAGS = -77
      PI_BAD_SPI_SPEED = -78
      PI_BAD_SER_DEVICE = -79
      PI_BAD_SER_SPEED = -80
      PI_BAD_PARAM = -81
      PI_I2C_WRITE_FAILED = -82
      PI_I2C_READ_FAILED = -83
      PI_BAD_SPI_COUNT = -84
      PI_SER_WRITE_FAILED = -85
      PI_SER_READ_FAILED = -86
      PI_SER_READ_NO_DATA = -87
      PI_UNKNOWN_COMMAND = -88
      PI_SPI_XFER_FAILED = -89
      PI_NO_AUX_SPI = -91
      PI_NOT_PWM_GPIO = -92
      PI_NOT_SERVO_GPIO = -93
      PI_NOT_HCLK_GPIO = -94
      PI_NOT_HPWM_GPIO = -95
      PI_BAD_HPWM_FREQ = -96
      PI_BAD_HPWM_DUTY = -97
      PI_BAD_HCLK_FREQ = -98
      PI_BAD_HCLK_PASS = -99
      PI_HPWM_ILLEGAL = -100
      PI_BAD_DATABITS = -101
      PI_BAD_STOPBITS = -102
      PI_MSG_TOOBIG = -103
      PI_BAD_MALLOC_MODE = -104
      PI_BAD_SMBUS_CMD =&r>user_gpio: 0-31
         steady: 0-300000
         active: 0-1000000


      Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER.

      This filter affects the GPIO samples returned to callbacks set up with callback, callback_ex and wait_for_edge.

      It does not affect levels read by gpio_read, read_bank_1, or read_bank_2.

      Level changes before and after the active period may be reported. Your software must be designed to cope with such reports.

      uint32_t read_bank_1(void)

      Read the levels of the bank 1 GPIO (GPIO 0-31).

      The returned 32 bit integer has a bit set if the corresponding GPIO is logic 1. GPIO n has bit value (1<<n).

      uint32_t read_bank_2(void)

      Read the levels of the bank 2 GPIO (GPIO 32-53).

      The returned 32 bit integer has a bit set if the corresponding GPIO is logic 1. GPIO n has bit value (1<<(n-32)).

      int clear_bank_1(uint32_t bits)

      Clears GPIO 0-31 if the corresponding bit in bits is set.

      bits: a bit mask with 1 set if the corresponding GPIO is
            to be cleared.


      Returns 0 if OK, otherwise PI_SOME_PERMITTED.

      A status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO.

      int clear_bank_2(uint32_t bits)

      Clears GPIO 32-53 if the corresponding bit (0-21) in bits is set.

      bits: a bit mask with 1 set if the corresponding GPIO is
            to be cleared.


      Returns 0 if OK, otherwise PI_SOME_PERMITTED.

      A status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO.

      int set_bank_1(uint32_t bits)

      Sets GPIO 0-31 if the corresponding bit in bits is set.

      bits: a bit mask with 1 set if the corresponding GPIO is
            to be set.


      Returns 0 if OK, otherwise PI_SOME_PERMITTED.

      A status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO.

      int set_bank_2(uint32_t bits)

      Sets GPIO 32-53 if the corresponding bit (0-21) in bits is set.

      bits: a bit mask with 1 set if the corresponding GPIO is
            to be set.


      Returns 0 if OK, otherwise PI_SOME_PERMITTED.

      A status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO.

      int hardware_clock(unsigned gpio, unsigned clkfreq)

      Starts a hardware clock on a GPIO at the specified frequency. Frequencies above 30MHz are unlikely to work.

           gpio: see description
      frequency: 0 (off) or 4689-250000000&nnbsp;-107
      PI_NOT_I2C_GPIO = -108
      PI_BAD_I2C_WLEN = -109
      PI_BAD_I2C_RLEN = -110
      PI_BAD_I2C_CMD = -111
      PI_BAD_I2C_BAUD = -112
      PI_CHAIN_LOOP_CNT = -113
      PI_BAD_CHAIN_LOOP = -114
      PI_CHAIN_COUNTER = -115
      PI_BAD_CHAIN_CMD = -116
      PI_BAD_CHAIN_DELAY = -117
      PI_CHAIN_NESTING = -118
      PI_CHAIN_TOO_BIG = -119
      PI_DEPRECATED = -120
      PI_BAD_SER_INVERT = -121
      PI_BAD_FOREVER = -124
      PI_BAD_FILTER = -125
      PI_BAD_PAD = -126
      PI_BAD_STRENGTH = -127
      PI_FIL_OPEN_FAILED = -128
      PI_BAD_FILE_MODE = -129
      PI_BAD_FILE_FLAG = -130
      PI_BAD_FILE_READ = -131
      PI_BAD_FILE_WRITE = -132
      PI_FILE_NOT_ROPEN = -133
      PI_FILE_NOT_WOPEN = -134
      PI_BAD_FILE_SEEK = -135
      PI_NO_FILE_MATCH = -136
      PI_NO_FILE_ACCESS = -137
      PI_FILE_IS_A_DIR = -138
      PI_BAD_SHELL_STATUS = -139
      PI_BAD_SCRIPT_NAME = -140
      PI_BAD_SPI_BAUD = -141
      PI_NOT_SPI_GPIO = -142
      PI_BAD_EVENT_ID = -143
      PI_CMD_INTERRUPTED = -144
      PI_NOT_ON_BCM2711   = -145
      PI_ONLY_ON_BCM2711  = -146

      event: 0-31

      An event is a signal used to inform one or more consumers to start an action.

      file_mode:

      The mode may have the following values

      FILE_READ   1
      FILE_WRITE  2
      FILE_RW     3


      The following values can be or'd into the file open mode

      FILE_APPEND 4
      FILE_CREATE 8
      FILE_TRUNC  16

      file_name:

      A full file path. To be accessible the path must match an entry in /opt/pigpio/access.

      fpattern:

      A file path which may contain wildcards. To be accessible the path must match an entry in /opt/pigpio/access.

      frequency: 0-40000

      Defines the frequency to be used for PWM on a GPIO. The closest permitted frequency will be used.

      func:

      A user supplied callback function.

      gpio: 0-53

      A Broadcom numbered GPIO. All the user GPIO are in the range 0-31.

      There are 54 General Purpose Input Outputs (GPIO) named GPIO0 through GPIO53.

      They are split into two banks. Bank 1 consists of GPIO0 through GPIO31. Bank 2 consists of GPIO32 through GPIO53.

      All the GPIO which are safe for the user to read and write are in bank 1. Not all GPIO in bank 1 are safe though. Type 1 boards have 17 safe GPIO. Type 2 boards have 21. Type 3 boards have 26.

      See get_hardware_revision.

      The user GPIO are marked with an X in the following table

                0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
      Type 1    X  X  -  -  X  -  -  X  X  X  X  X  -  -  X  X
      Type 2    -  -  X  X  X  -  -  X  X  X  X  X  -  -  X  X
      Type 3          X  X  X  X  X  X  X  X  X  X  X  X  X  X

               16 17 18&nbsp;19 20 21 22 23 24 25 26 27 28 29 30 31
      Type 1    -  X  X  -  -  X  X  X  X  X  -  -  -  -  -  -
      Type 2    -  X  X  -  -  -  X  X  X  X  -  X  X  X  X  X
      Type 3    X  X  X  X  X  X  X  X  X  X  X  X  -  -  -  -

      gpio_off:

      A mask used to select GPIO to be operated on. See bits.

      This mask selects the GPIO to be switched off at the start of a pulse.

      gpio_on:

      A mask used to select GPIO to be operated on. See bits.

      This mask selects the GPIO to be switched on at the start of a pulse.

      handle: >=0

      A number referencing an object opened by one of the following

      file_open i2c_open notify_open serial_open spi_open

      host:

      The name or IP address of the Pi running the pigpio daemon.

      i2c_address: 0-0x7F

      The address of a device on the I2C bus.

      i2c_bus: >=0

      An I2C bus number.

      i2c_flags: 0

      No I2C flags are currently defined.

      invert: 0-1

      A flag used to set normal or inverted bit bang serial data level logic.

      level: 0-1 (2)

      CLEAR = 0
      HIGH = 1
      LOW = 0
      OFF = 0
      ON = 1
      SET = 1
      TIMEOUT = 2 # only returned for a watchdog timeout

      MISO:

      The GPIO used for the MISO signal when bit banging SPI.

      mode:

      1.The operational mode of a GPIO, normally INPUT or OUTPUT.

      ALT0 = 4
      ALT1 = 5
      ALT2 = 6
      ALT3 = 7
      ALT4 = 3
      ALT5 = 2
      INPUT = 0
      OUTPUT = 1


      2. The mode of waveform transmission.

      WAVE_MODE_ONE_SHOT = 0
      WAVE_MODE_REPEAT = 1
      WAVE_MODE_ONE_SHOT_SYNC = 2
      WAVE_MODE_REPEAT_SYNC = 3

      MOSI:

      The GPIO used for the MOSI signal when bit banging SPI.

      offset: >=0

      The offset wave data starts from the beginning of the waveform being currently defined.

      pad: 0-2

      A set of GPIO which share common drivers.

      PadGPIO
      00-27
      128-45
      246-53

      pad_strength: 1-16

      The mA which may be drawn from each GPIO whilst still guaranteeing the high and low levels.

      params: 32 bit number

      When scripts are started they can receive up to 10 parameters to define their operation.

      percent: : 0-100

      The size of waveform as percentage of maximum available.

      port:

      The port used by the pigpio daemon, defaults to 8888.

      pstring:

      The string to be passed to a shell script to be executed.

      pud: 0-2

      PUD_DOWN = 1
      PUD_OFF = 0
      PUD_UP = 2

      </a>pulse_len: 1-100

      The length of the trigger pulse in microseconds.

      pulses:

      A list of class pulse objects defining the characteristics of a waveform.

      pulsewidth:

      The servo pulsewidth in microseconds. 0 switches pulses off.

      PWMduty: 0-1000000 (1M)

      The hardware PWM dutycycle.

      PWMfreq: 1-125M (1-187.5M for the BCM2711)

      The hardware PWM frequency.

      range_: 25-40000

      Defines the limits for the dutycycle parameter.

      range_ defaults to 255.

      reg: 0-255

      An I2C device register. The usable registers depend on the actual device.

      retMax: >=0

      The maximum number of bytes a user customised function should return, default 8192.

      SCL:

      The user GPIO to use for the clock when bit banging I2C.

      SCLK: :

      The GPIO used for the SCLK signal when bit banging SPI.

      script:

      The text of a script to store on the pigpio daemon.

      script_id: >=0

      A number referencing a script created by store_script.

      SDA:

      The user GPIO to use for data when bit banging I2C.

      seek_from: 0-2

      Direction to seek for file_seek.

      FROM_START=0
      FROM_CURRENT=1
      FROM_END=2

      seek_offset:

      The number of bytes to move forward (positive) or backwards (negative) from the seek position (start, current, or end of file).

      ser_flags: 32 bit

      No serial flags are currently defined.

      serial_*:

      One of the serial_ functions.

      shellscr:

      The name of a shell script. The script must exist in /opt/pigpio/cgi and must be executable.

      show_errors:

      Controls the display of pigpio daemon connection failures. The default of True prints the probable failure reasons to standard output.

      spi_channel: 0-2

      A SPI channel.

      spi_flags: 32 bit

      See spi_open.

      steady: 0-300000

      The number of microseconds level changes must be stable for before reporting the level changed (set_glitch_filter) or triggering the active part of a noise filter (set_noise_filter).

      t1:

      A tick (earlier).

      t2:

      A tick (later).

      tty:

      A Pi serial tty device, e.g. /dev/ttyAMA0, /dev/ttyUSB0

      uint32:

      An unsigned 32 bit number.

      user_gpio: 0-31

      A Broadcom numbered GPIO.

      All the user GPIO are in the range 0-31.

      Not all the GPIO within this range are usable, some are reserved for system use.

      See gpio.

      wait_timeout: 0.0 -

      The number of seconds to wait in wait_for_edge before timing out.

      wave_add_*:

      One of the following

      wave_add_new wave_add_generic wave_add_serial

      wave_id: >=0

      A number referencing a wave created by wave_create.

      wave_send_*:

      One of the following

      wave_send_once wave_send_repeat

      wdog_timeout: 0-60000

      Defines a GPIO watchdog timeout in milliseconds. If no level change is detected on the GPIO for timeout millisecond a watchdog timeout report is issued (with level TIMEOUT).

      word_val: 0-65535

      A whole number.

      bsp;(250M)


      Returns 0 if OK, otherwise PI_NOT_PERMITTED, PI_BAD_GPIO, PI_NOT_HCLK_GPIO, PI_BAD_HCLK_FREQ,or PI_BAD_HCLK_PASS.

      The same clock is available on multiple GPIO. The latest frequency setting will be used by all GPIO which share a clock.

      The GPIO must be one of the following.

      4   clock 0  All models
      5   clock 1  All models but A and B (reserved for system use)
      6   clock 2  All models but A and B
      20  clock 0  All models but A and B
      21  clock 1  All models but A and Rev.2 B (reserved for system use)

      32  clock 0  Compute module only
      34  clock 0  Compute module only
      42  clock 1  Compute module only (reserved for system use)
      43  clock 2  Compute module only
      44  clock 1  Compute module only (reserved for system use)


      Access to clock 1 is protected by a password as its use will likely crash the Pi. The password is given by or'ing 0x5A000000 with the GPIO number.

      int hardware_PWM(unsigned gpio, unsigned PWMfreq, uint32_t PWMduty)

      Starts hardware PWM on a GPIO at the specified frequency and dutycycle. Frequencies above 30MHz are unlikely to work.

      NOTE: Any waveform started by wave_send_once, wave_send_repeat, or wave_chain will be cancelled.

      This function is only valid if the pigpio main clock is PCM. The main clock defaults to PCM but may be overridden when the pigpio daemon is started (option -t).

         gpio: see descripton
      PWMfreq: 0 (off) or 1-125000000 (125M)
      PWMduty: 0 (off) to 1000000 (1M)(fully on)


      Returns 0 if OK, otherwise PI_NOT_PERMITTED, PI_BAD_GPIO, PI_NOT_HPWM_GPIO, PI_BAD_HPWM_DUTY, PI_BAD_HPWM_FREQ, or PI_HPWM_ILLEGAL.

      The same PWM channel is available on multiple GPIO. The latest frequency and dutycycle setting will be used by all GPIO which share a PWM channel.

      The GPIO must be one of the following.

      12  PWM channel 0  All models but A and B
      13  PWM channel 1  All models but A and B
      18  PWM channel 0  All models
      19  PWM channel 1  All models but A and B

      40  PWM channel 0  Compute module only
      41  PWM channel 1  Compute module only
      45  PWM channel 1  Compute module only
      52  PWM channel 0  Compute module only
      53  PWM channel 1  Compute module only

      uint32_t get_current_tick(void)

      Gets the current system tick.

      Tick is the number of microseconds since system boot.

      As tick is an unsigned 32 bit quantity it wraps around after 2**32 microseconds, which is approximately 1 hour 12 minutes.

      uint32_t get_hardware_revision(void)

      Get the Pi's hardware revision number.

      The hardware revision is the last few characters on the Revision line of /proc/cpuinfo.

      If the hardware revision can not be found or is not a valid hexadecimal number the function returns 0.

      The revision number can be used to determine the assignment of GPIO to pins (see gpio).

      There are at least three types of board.

      Type 1 boards have hardware revision numbers of 2 and 3.

      Type 2 boards have hardware revision numbers of 4, 5, 6, and 15.

      Type 3 boards have hardware revision numbers of 16 or greater.

      uint32_t get_pigpio_version(void)

      Returns the pigpio version.

      int wave_clear(void)

      This function clears all waveforms and any data added by calls to the wave_add_* functions.

      Returns 0 if OK.

      int wave_add_new(void)

      This function starts a new empty waveform. You wouldn't normally need to call this function as it is automatically called after a waveform is created with the wave_create function.

      Returns 0 if OK.

      int wave_add_generic(unsigned numPulses, gpioPulse_t *pulses)

      This function adds a number of pulses to the current waveform.

      numPulses: the number of pulses.
         pulses: an array of pulses.


      Returns the new total number of pulses in the current waveform if OK, otherwise PI_TOO_MANY_PULSES.

      The pulses are interleaved in time order within the existing waveform (if any).

      Merging allows the waveform to be built in parts, that is the settings for GPIO#1 can be added, and then GPIO#2 etc.

      If the added waveform is intended to start after or within the existing waveform then the first pulse should consist solely of a delay.

      int wave_add_serial(unsigned user_gpio, unsigned baud, unsigned data_bits, unsigned stop_bits, unsigned offset, unsigned numBytes, char *str)

      This function adds a waveform representing serial data to the existing waveform (if any). The serial data starts offset microseconds from the start of the waveform.

      user_gpio: 0-31.
           baud: 50-1000000
      data_bits: number of data bits (1-32)
      stop_bits: number of stop half bits (2-8)
         offset: >=0
       numBytes: >=1
            str: an array of chars.


      Returns the new total number of pulses in the current waveform if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_WAVE_BAUD, PI_BAD_DATABITS, PI_BAD_STOP_BITS, PI_TOO_MANY_CHARS, PI_BAD_SER_OFFSET, or PI_TOO_MANY_PULSES.

      NOTES:

      The serial data is formatted as one start bit, data_bits data bits, and stop_bits/2 stop bits.

      It is legal to add serial data streams with different baud rates to the same waveform.

      numBytes is the number of bytes of data in str.

      The bytes required for each character depend upon data_bits.

      For data_bits 1-8 there will be one byte per character.
      For data_bits 9-16 there will be two bytes per character.
      For data_bits 17-32 there will be four bytes per character.

      int wave_create(void)

      This function creates a waveform from the data provided by the prior calls to the wave_add_* functions. Upon success a wave id greater than or equal to 0 is returned, otherwise PI_EMPTY_WAVEFORM, PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID.

      The data provided by the wave_add_* functions is consumed by this function.

      As many waveforms may be created as there is space available. The wave id is passed to wave_send_* to specify the waveform to transmit.

      Normal usage would be

      Step 1. wave_clear to clear all waveforms and added data.

      Step 2. wave_add_* calls to supply the waveform data.

      Step 3. wave_create to create the waveform and get a unique id

      Repeat steps 2 and 3 as needed.

      Step 4. wave_send_* with the id of the waveform to transmit.

      A waveform comprises one or more pulses. Each pulse consists of a gpioPulse_t structure.

      typedef struct
      {
         uint32_t gpioOn;
         uint32_t gpioOff;
         uint32_t usDelay;
      } gpioPulse_t;


      The fields specify

      1) the GPIO to be switched on at the start of the pulse.
      2) the GPIO to be switched off at the start of the pulse.
      3) the delay in microseconds before the next pulse.


      Any or all the fields can be zero. It doesn't make any sense to set all the fields to zero (the pulse will be ignored).

      When a waveform is started each pulse is executed in order with the specified delay between the pulse and the next.

      Returns the new waveform id if OK, otherwise PI_EMPTY_WAVEFORM, PI_NO_WAVEFORM_ID, PI_TOO_MANY_CBS, or PI_TOO_MANY_OOL.

      int wave_delete(unsigned wave_id)

      This function deletes the waveform with id wave_id.

      wave_id: >=0, as returned by wave_create.


      Wave ids are allocated in order, 0, 1, 2, etc.

      The wave is flagged for deletion. The resources used by the wave will only be reused when either of the following apply.

      - all waves with higher numbered wave ids have been deleted or have been flagged for deletion.

      - a new wave is created which uses exactly the same resources as the current wave (see the C source for gpioWaveCreate for details).

      Returns 0 if OK, otherwise PI_BAD_WAVE_ID.

      int wave_send_once(unsigned wave_id)

      This function transmits the waveform with id wave_id. The waveform is sent once.

      NOTE: Any hardware PWM started by hardware_PWM will be cancelled.

      wave_id: >=0, as returned by wave_create.


      Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE.

      int wave_send_repeat(unsigned wave_id)

      This function transmits the waveform with id wave_id. The waveform cycles until cancelled (either by the sending of a new waveform or by wave_tx_stop).

      NOTE: Any hardware PWM started by hardware_PWM will be cancelled.

      wave_id: >=0, as returned by wave_create.


      Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE.

      int wave_chain(char *buf, unsigned bufSize)

      This function transmits a chain of waveforms.

      NOTE: Any hardware PWM started by hardware_PWM will be cancelled.

      The waves to be transmitted are specified by the contents of buf which contains an ordered list of wave_ids and optional command codes and related data.

          buf: pointer to the wave_ids and optional command codes
      bufSize: the number of bytes in buf


      Returns 0 if OK, otherwise PI_CHAIN_NESTING, PI_CHAIN_LOOP_CNT, PI_BAD_CHAIN_LOOP, PI_BAD_CHAIN_CMD, PI_CHAIN_COUNTER, PI_BAD_CHAIN_DELAY, PI_CHAIN_TOO_BIG, or PI_BAD_WAVE_ID.

      Each wave is transmitted in the order specified. A wave may occur multiple times per chain.

      A blocks of waves may be transmitted multiple times by using the loop commands. The block is bracketed by loop start and end commands. Loops may be nested.

      Delays between waves may be added with the delay command.

      The following command codes are supported:

      NameCmd & DataMeaning
      Loop Start255 0Identify start of a wave block
      Loop Repeat255 1 x yloop x + y*256 times
      Delay255 2 x ydelay x + y*256 microseconds
      Loop Forever255 3loop forever


      If present Loop Forever must be the last entry in the chain.

      The code is currently dimensioned to support a chain with roughly 600 entries and 20 loop counters.

      Example

      #include <stdio.h>
      #include <pigpiod_if.h>

      #define WAVES 5
      #define GPIO 4

      int main(int argc, char *argv[])
      {
         int i, wid[WAVES];

         if (pigpio_start(0, 0)<0) return -1;

         set_mode(GPIO, PI_OUTPUT);

         for (i=0; i<WAVES; i++)
         {
            wave_add_generic(2, (gpioPulse_t[])
               {{1<<GPIO, 0,        20},
                {0, 1<<GPIO, (i+1)*200}});

            wid[i] = wave_create();
         }

         wave_chain((char []) {
            wid[4], wid[3], wid[2],       // transmit waves 4+3+2
            255, 0,                       // loop start
               wid[0], wid[0], wid[0],    // transmit waves 0+0+0
               255, 0,                    // loop start
                  wid[0], wid[1],   &nbsp;     // transmit waves 0+1
                  255, 2, 0x88, 0x13,     // delay 5000us
               255, 1, 30, 0,             // loop end (repeat 30 times)
               255, 0,                    // loop start
                  wid[2], wid[3], wid[0], // transmit waves 2+3+0
                  wid[3], wid[1], wid[2], // transmit waves 3+1+2
               255, 1, 10, 0,             // loop end (repeat 10 times)
            255, 1, 5, 0,                 // loop end (repeat 5 times)
            wid[4], wid[4], wid[4],       // transmit waves 4+4+4
            255, 2, 0x20, 0x4E,           // delay 20000us
            wid[0], wid[0], wid[0],       // transmit waves 0+0+0

            }, 46);

         while (wave_tx_busy()) time_sleep(0.1);

         for (i=0; i<WAVES; i++) wave_delete(wid[i]);

         pigpio_stop();
      }

      int wave_tx_busy(void)

      This function checks to see if a waveform is currently being transmitted.

      Returns 1 if a waveform is currently being transmitted, otherwise 0.

      int wave_tx_stop(void)

      This function stops the transmission of the current waveform.

      Returns 0 if OK.

      This function is intended to stop a waveform started with the repeat mode.

      int wave_get_micros(void)

      This function returns the length in microseconds of the current waveform.

      int wave_get_high_micros(void)

      This function returns the length in microseconds of the longest waveform created since the pigpio daemon was started.

      int wave_get_max_micros(void)

      This function returns the maximum possible size of a waveform in
      microseconds.

      int wave_get_pulses(void)

      This function returns the length in pulses of the current waveform.

      int wave_get_high_pulses(void)

      This function returns the length in pulses of the longest waveform created since the pigpio daemon was started.

      int wave_get_max_pulses(void)

      This function returns the maximum possible size of a waveform in pulses.

      int wave_get_cbs(void)

      This function returns the length in DMA control blocks of the current waveform.

      int wave_get_high_cbs(void)

      This function returns the length in DMA control blocks of the longest waveform created since the pigpio daemon was started.

      int wave_get_max_cbs(void)

      This function returns the maximum possible size of a waveform in DMA control blocks.

      int gpio_trigger(unsigned user_gpio, unsigned pulseLen, unsigned level)

      This function sends a trigger pulse to a GPIO. The GPIO is set to level for pulseLen microseconds and then reset to not level.

      user_gpio: 0-31.
       pulseLen: 1-100.
          level: 0,1.


      Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_LEVEL, PI_BAD_PULSELEN, or PI_NOT_PERMITTED.

      int store_script(char *script)

      This function stores a script for later execution.

      See http://abyz.me.uk/rpi/pigpio/pigs.html#Scripts for details.

      script: the text of the script.


      The function returns a script id if the script is valid, otherwise PI_BAD_SCRIPT.

      int run_script(unsigned script_id, unsigned numPar, uint32_t *param)

      This function runs a stored script.

      script_id: >=0, as returned by store_script.
         numPar: 0-10, the number of parameters.
          param: an array of parameters.


      The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM

      param is an array of up to 10 parameters which may be referenced in the script as p0 to p9.

      int script_status(unsigned script_id, uint32_t *param)

      This function returns the run status of a stored script as well as the current values of parameters 0 to 9.

      script_id: >=0, as returned by store_script.
          param: an array to hold the returned 10 parameters.


      The function returns greater than or equal to 0 if OK, otherwise PI_BAD_SCRIPT_ID.

      The run status may be

      PI_SCRIPT_INITING
      PI_SCRIPT_HALTED
      PI_SCRIPT_RUNNING
      PI_SCRIPT_WAITING
      PI_SCRIPT_FAILED


      The current value of script parameters 0 to 9 are returned in param.

      int stop_script(unsigned script_id)

      This function stops a running script.

      script_id: >=0, as returned by store_script.


      The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID.

      int delete_script(unsigned script_id)

      This function deletes a stored script.

      script_id: >=0, as returned by store_script</a>.


      The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID.

      int bb_serial_read_open(unsigned user_gpio, unsigned baud, unsigned data_bits)

      This function opens a GPIO for bit bang reading of serial data.

      user_gpio: 0-31.
           baud: 50-250000
      data_bits: 1-32


      Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_WAVE_BAUD, or PI_GPIO_IN_USE.

      The serial data is returned in a cyclic buffer and is read using bb_serial_read.

      It is the caller's responsibility to read data from the cyclic buffer in a timely fashion.

      int bb_serial_read(unsigned user_gpio, void *buf, size_t bufSize)

      This function copies up to bufSize bytes of data read from the bit bang serial cyclic buffer to the buffer starting at buf.

      user_gpio: 0-31, previously opened with bb_serial_read_open.
            buf: an array to receive the read bytes.
        bufSize: >=0


      Returns the number of bytes copied if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERIAL_GPIO.

      The bytes returned for each character depend upon the number of data bits data_bits specified in the bb_serial_read_open command.

      For data_bits 1-8 there will be one byte per character.
      For data_bits 9-16 there will be two bytes per character.
      For data_bits 17-32 there will be four bytes per character.

      int bb_serial_read_close(unsigned user_gpio)

      This function closes a GPIO for bit bang reading of serial data.

      user_gpio: 0-31, previously opened with bb_serial_read_open.


      Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_SERIAL_GPIO.

      int bb_serial_invert(unsigned user_gpio, unsigned invert)

      This function inverts serial logic for big bang serial reads.

      user_gpio: 0-31, previously opened with bb_serial_read_open.
         invert: 0-1, 1 invert, 0 normal.


      Returns 0 if OK, otherwise PI_NOT_SERIAL_GPIO or PI_BAD_SER_INVERT.

      int i2c_open(unsigned i2c_bus, unsigned i2c_addr, unsigned i2c_flags)

      This returns a handle for the device at address i2c_addr on bus i2c_bus.

        i2c_bus: >=0.
       i2c_addr: 0-0x7F.
      i2c_flags: 0.


      No flags are currently defined. This parameter should be set to zero.

      Physically buses 0 and 1 are available on the Pi. Higher numbered buses will be available if a kernel supported bus multiplexor is being used.

      The GPIO used are given in the following table.

      SDASCL
      I2C 001
      I2C 123


      Returns a handle (>=0) if OK, otherwise PI_BAD_I2C_BUS, PI_BAD_I2C_ADDR, PI_BAD_FLAGS, PI_NO_HANDLE, or PI_I2C_OPEN_FAILED.

      For the SMBus commands the low level transactions are shown at the end of the function description. The following abbreviations are used.

      S     (1 bit) : Start bit
      P     (1 bit) : Stop bit
      Rd/Wr (1 bit) : Read/Write bit. Rd equals 1, Wr equals 0.
      A, NA (1 bit) : Accept and not accept bit.

      Addr  (7 bits): I2C 7 bit address.
      Comm  (8 bits): Command byte, a data byte which often selects a register.
      Data  (8 bits): A data byte.
      Count (8 bits): A data byte containing the length of a block operation.

      [..]: Data sent by the device.

      int i2c_close(unsigned handle)

      This closes the I2C device associated with the handle.

      handle: >=0, as returned by a call to i2c_open.


      Returns 0 if OK, otherwise PI_BAD_HANDLE.

      int i2c_write_quick(unsigned handle, unsigned bit)

      This sends a single bit (in the Rd/Wr bit) to the device associated with handle.

      handle: >=0, as returned by a call to i2c_open.
         bit: 0-1, the value to write.


      Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

      Quick command. SMBus 2.0 5.5.1 S Addr Rd/Wr [A] P

      int i2c_write_byte(unsigned handle, unsigned bVal)

      This sends a single byte to the device associated with handle.

      handle: >=0, as returned by a call to i2c_open.
        bVal: 0-0xFF, the value to write.


      Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

      Send byte. SMBus 2.0 5.5.2 S Addr Wr [A] Data [A] P

      int i2c_read_byte(unsigned handle)

      This reads a single byte from the device associated with handle.

      handle: >=0, as returned by a call to i2c_open.


      Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, or PI_I2C_READ_FAILED.

      Receive byte. SMBus 2.0 5.5.3 S Addr Rd [A] [Data] NA P

      int i2c_write_byte_data(unsigned handle, unsigned i2c_reg, unsigned bVal)

      This writes a single byte to the specified register of the device associated with handle.

       handle: >=0, as returned by a call&nbsp;to i2c_open.
      i2c_reg: 0-255, the register to write.
         bVal: 0-0xFF, the value to write.


      Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

      Write byte. SMBus 2.0 5.5.4 S Addr Wr [A] Comm [A] Data [A] P

      int i2c_write_word_data(unsigned handle, unsigned i2c_reg, unsigned wVal)

      This writes a single 16 bit word to the specified register of the device associated with handle.

       handle: >=0, as returned by a call to i2c_open.
      i2c_reg: 0-255, the register to write.
         wVal: 0-0xFFFF, the value to write.


      Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

      Write word. SMBus 2.0 5.5.4 S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] P

      int i2c_read_byte_data(unsigned handle, unsigned i2c_reg)

      This reads a single byte from the specified register of the device associated with handle.

       handle: >=0, as returned by a call to i2c_open.
      i2c_reg: 0-255, the register to read.


      Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

      Read byte. SMBus 2.0 5.5.5 S Addr Wr [A] Comm [A] S Addr Rd [A] [Data] NA P

      int i2c_read_word_data(unsigned handle, unsigned i2c_reg)

      This reads a single 16 bit word from the specified register of the device associated with handle.

       handle: >=0, as returned by a call to i2c_open.
      i2c_reg: 0-255, the register to read.


      Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

      Read word. SMBus 2.0 5.5.5 S Addr Wr [A] Comm [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P

      int i2c_process_call(unsigned handle, unsigned i2c_reg, unsigned wVal)

      This writes 16 bits of data to the specified register of the device associated with handle and and reads 16 bits of data in return.

       handle: >=0, as returned by a call to i2c_open.
      i2c_reg: 0-255, the register to write/read.
         wVal: 0-0xFFFF, the value to write.


      Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

      Process call. SMBus 2.0 5.5.6 S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A]
         S Addr Rd [A] [DataLow] A [DataHigh] NA P

      int i2c_write_block_data(unsigned handle, unsigned i2c_reg, char *buf, unsigned count)

      This writes up to 32 bytes to the specified register of the device associated with handle.

       handle: >=0, as returned by a call to i2c_open.
      i2c_reg: 0-255, the register to write.
          buf: an array with the data to send.
        count: 1-32, the number of bytes to write.


      Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

      Block write. SMBus 2.0 5.5.7 S Addr Wr [A] Comm [A] Count [A] Data [A] Data [A] ... [A] Data [A] P

      int i2c_read_block_data(unsigned handle, unsigned i2c_reg, char *buf)

      This reads a block of up to 32 bytes from the specified register of the device associated with handle.

       handle: >=0, as returned by a call to i2c_open.
      i2c_reg: 0-255, the register to read.
          buf: an array to receive the read data.


      The amount of returned data is set by the device.

      Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

      Block read. SMBus 2.0 5.5.7 S Addr Wr [A] Comm [A]
         S Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P

      int i2c_block_process_call(unsigned handle, unsigned i2c_reg, char *buf, unsigned count)

      This writes data bytes to the specified register of the device associated with handle and reads a device specified number of bytes of data in return.

       handle: >=0, as returned by a call to i2c_open.
      i2c_reg: 0-255, the register to write/read.
          buf: an array with the data to send and to receive the read data.
        count: 1-32, the number of bytes to write.


      Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

      The smbus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received. The total number of bytes sent/received must be 32 or less.

      Block write-block read. SMBus 2.0 5.5.8 S Addr Wr [A] Comm [A] Count [A] Data [A] ...
         S Addr Rd [A] [Count] A [Data] ... A P

      int i2c_read_i2c_block_data(unsigned handle, unsigned i2c_reg, char

    19 handle bits 0 -
    NP 20 handle 0 0 -
    NC 21 handle 0 0 -
    PRG 22 gpio 0 0 -
    PFG 23 gpio 0 0 -
    PRRG 24 gpio 0 0 -
    HELP
    25 N/A
    N/A
    N/A
    N/A
    PIGPV 26 0 0 0 -
    WVCLR 27 0 0 0 -
    WVAG 28 0 0 12*X gpioPulse_t pulse[X]
    WVAS 29 gpio baud 12+X uint32_t databits
    uint32_t stophalfbits
    uint32_t offset
    uint8_t data[X]
    N/A
    30 0 0 0 -
    N/A
    31 0 0 0 -
    WVBSY 32 0 0 0 -
    WVHLT 33 0 0 0 -
    WVSM 34 subcmd 0 0 -
    WVSP 35 subcmd 0 0 -
    WVSC 36 subcmd 0 0 -
    TRIG 37 gpio pulselen 4 uint32_t level
    PROC 38 0 0 X uint8_t text[X]
    PROCD 39 script_id 0 0 -
    PROCR 40 script_id 0 4*X
    uint32_t pars[X]
    PROCS 41 script_id 0 0 -
    SLRO 42 gpio baud 4 uint32_t databits
    SLR 43 gpio count 0 -
    SLRC 44 gpio 0 0 -
    PROCP 45 script_id 0 0 -
    MICS 46 micros 0 0 -
    MILS 47 millis 0 0 -
    PARSE 48 N/A N/A
    N/A
    N/A
    WVCRE 49 0 0 0 -
    WVDEL 50 wave_id 0 0 -
    WVTX 51 wave_id 0 0 -
    WVTXR 52 wave_id 0 0 -
    WVNEW 53 0 0 0 -
    I2CO 54 bus device 4 uint32_t flags
    I2CC 55 handle 0 0 -
    I2CRD 56 handle count 0 -
    I2CWD 57 handle 0 X uint8_t data[X]
    I2CWQ 58 handle bit 0 -
    I2CRS 59 handle 0 0 -
    I2CWS 60 handle byte 0 -
    I2CRB 61 handle register 0 -
    I2CWB 62 handle register 4 uint32_t byte
    I2CRW 63 handle register 0 -
    I2CWW 64 handle register 4 uint32_t word
    I2CRK 65 handle register
    0 -
    I2CWK 66 handle register
    X uint8_t bvs[X]
    I2CRI 67 handle register
    4 uint32_t num
    I2CWI 68 handle register
    X
    uint8_t bvs[X]
    I2CPC 69 handle register
    4 uint32_t word
    I2CPK 70 handle register
    X
    uint8_t data[X]
    SPIO
    71 channel baud 4 uint32_t flags
    SPIC 72 handle 0 0 -
    SPIR 73 handle count 0 -
    SPIW 74 handle 0 X uint8_t data[X]
    SPIX 75 handle 0 X uint8_t data[X]
    SERO 76 baud flags X uint8_t device[X]
    SERC 77 handle 0 0 -
    SERRB 78 handle 0 0 -
    SERWB 79 handle byte 0 -
    SERR 80 handle count 0 -
    SERW 81 handle 0 X uint8_t data[X]
    SERDA 82 handle 0 0 -
    GDC
    83
    gpio
    0
    0
    -
    GPW
    84
    gpio
    0
    0
    -
    HC
    85
    gpio
    frequency
    0
    -
    HP
    86
    gpio
    frequency
    4
    uint32_t dutycycle
    CF1
    87
    arg1
    arg2
    X
    uint8_t argx[X]
    CF2
    88
    arg1
    retMax
    X
    uint8_t argx[X]
    BI2CC
    89
    sda
    0
    0
    -
    BI2CO
    90
    sda
    scl
    4
    uint32_t baud
    BI2CZ
    91
    sda
    0
    X
    uint8_t data[X]
    I2CZ
    92
    handle
    0
    X
    uint8_t data[X]
    WVCHA
    93
    0
    0
    X
    uint8_t data[X]
    SLRI
    94
    gpio
    invert
    0
    -
    CGI
    95
    0
    0
    0
    -
    CSI
    96
    config
    0
    0
    -
    FG
    97
    gpio
    steady
    0
    -
    FN
    98
    gpio
    steady
    4
    uint32_t active
    NOIB 99 0 0 0 -
    WVTXM
    100
    wave_id
    mode
    0
    -
    WVTAT
    101
    0
    0
    0
    -
    PADS
    102
    pad
    strength
    0
    -
    PADG
    103
    pad
    0
    0
    -
    FO
    104
    mode
    0
    uint8_t file[X]
    FC
    105
    handle
    0
    0
    -
    FR
    106
    handle
    count
    0
    -
    FW
    107
    handle
    0
    X
    uint8_t data[X]
    FS
    108
    handle
    offset
    4
    uint32_t from
    FL
    109
    count
    0
    X
    uint8_t pattern[X]
    SHELL
    110
    len(name)
    0
    len(name)+
    1+
    len(string)
    uint8_t name[len(name)]
    uint8_t null (0)
    uint8_t string[len(string)]
    BSPIC
    111
    CS
    0
    0
    -
    BSPIO
    112
    CS
    0
    20
    uint32_t MISO
    uint32_t MOSI
    uint32_t SCLK
    uint32_t baud
    uint32_t spi_flags
    BSPIX
    113
    CS
    0
    X
    uint8_t data[X]
    BSCX
    114
    control
    0
    X
    uint8_t data[X]
    EVM
    115
    handle
    bits
    0
    -
    EVT
    116
    event
    0
    0
    -
    PROCU
    117
    script_id
    0
    4*X
    uint32_t pars[X]

    Response

    The response has cmd/p1/p2 as in the request.  p3/res holds the return value.  If the command returns additional values they will be in the immediately following extension.

    Normally res should be treated as a 32 bit signed value and will be greater than or equal to zero.  Upon failure res will be less than 0 and contains an error code.

    There are a few commands where the returned value should be treated as a 32 bit unsigned value.  These commands can not fail.  They are indicated with a * after the command name.

    Commands with an extension have the size of the extension in bytes returned in res (or <0 on error as above).

    COMMAND cmd
    p1
    p2
    res
    Extension
    MODES 0 -
    -
    0 -
    MODEG 1 -
    -
    mode
    -
    PUD 2 -
    -
    0 -
    READ 3 -
    -
    level
    -
    WRITE 4 -
    -
    0 -
    PWM 5 -
    -
    0 -
    PRS 6 -
    -
    0 -
    PFS 7 -
    -
    0 -
    SERVO 8 -
    -
    0 -
    WDOG 9 -
    -
    0 -
    BR1 * 10 -
    -
    bits
    -
    BR2 * 11 -
    -
    bits
    -
    BC1 12 -
    -
    0 -
    BC2 13 -
    -
    0 -
    BS1 14 -
    -
    0 -
    BS2 15 -
    -
    0 -
    TICK *
    16 -
    -
    tick
    -
    HWVER *
    17 -
    -
    version
    -
    NO 18 -
    -
    handle
    -
    NB 19 -
    -
    0 -
    NP 20 -
    -
    0 -
    NC 21 -
    -
    0 -
    PRG 22 -
    -
    range
    -
    PFG 23 -
    -
    frequency
    -
    PRRG 24 -
    -
    real range
    -
    HELP 25 -
    -
    N/A
    N/A
    PIGPV *
    26 -
    -
    version
    -
    WVCLR 27 -
    -
    0 -
    WVAG 28 -
    -
    wave pulses
    -
    WVAS 29 -
    -
    wave pulses
    -
    N/A
    30 -
    -
    -
    -
    N/A
    31 -
    -
    -
    -
    WVBSY 32 -
    -
    busy (1) or not busy (0)
    -
    WVHLT 33 -
    -
    0 -
    WVSM 34 -
    -
    wave micros
    wave micros - high
    wave micros - max
    -
    WVSP 35 -
    -
    wave pulses
    wave pulses - high
    wave pulses - max
    -
    WVSC 36 -
    -
    wave DMA CBs
    wave DMA CBs - high
    wave DMA CBs - max
    -
    TRIG 37 -
    -
    0
    -
    PROC 38 -
    -
    script id
    -
    PROCD 39 -
    -
    0 -
    PROCR 40 -
    -
    script status
    -
    PROCS 41 -
    -
    0 -
    SLRO 42 -
    -
    0
    -
    SLR 43 -
    -
    X
    uint8_t data[X]
    SLRC 44 -
    -
    0 -
    PROCP 45 -
    -
    44 uint32_t script_status
    uint32_t pars[10]
    MICS 46 -
    -
    0 -
    MILS 47 -
    -
    0 -
    PARSE 48 -
    -
    N/A
    -
    WVCRE 49 -
    -
    wave id
    -
    WVDEL 50 -
    -
    0 -
    WVTX 51 -
    -
    wave DMA CBs
    -
    WVTXR 52 -
    -
    wave DMA CBs
    -
    WVNEW 53 -
    -
    0 -
    I2CO 54 -
    -
    handle -
    I2CC 55 -
    -
    0 -
    I2CRD 56 -
    -
    X
    uint8_t data[X]
    I2CWD 57 -
    -
    0
    -
    I2CWQ 58 -
    -
    0 -
    I2CRS 59 -
    -
    byte value
    -
    I2CWS 60 -
    -
    0 -
    I2CRB 61 -
    -
    byte value
    -
    I2CWB 62 -
    -
    0
    -
    I2CRW 63 -
    -
    word value
    -
    I2CWW 64 -
    -
    0
    -
    I2CRK 65 -
    -
    0 -
    I2CWK 66 -
    -
    0
    -
    I2CRI 67 -
    -
    X
    uint8_t data[X]
    I2CWI 68 -
    -
    0
    -
    I2CPC 69 -
    -
    word value
    -
    I2CPK 70 -
    -
    X
    uint8_t data[X]
    SPIO
    71 -
    -
    handle
    -
    SPIC 72 -
    -
    0 -
    SPIR 73 -
    -
    X
    uint8_t data[X]
    SPIW 74 -
    -
    0
    -
    SPIX 75 -
    -
    X uint8_t data[X]
    SERO 76 -
    -
    handle
    -
    SERC 77 -
    -
    0 -
    SERRB 78 -
    -
    byte value
    -
    SERWB 79 -
    -
    0 -
    SERR 80 -
    -
    X
    uint8_t data[X]
    SERW 81 -
    -
    0
    -
    SERDA 82 -
    -
    data ready count
    -
    GDC
    83
    -
    -
    dutycycle
    -
    GPW
    84
    -
    -
    pulsewidth
    -
    HC
    85
    -
    -
    0
    -
    HP
    86
    -
    -
    0
    -
    CF1
    87
    -
    -
    value
    -
    CF2
    88
    -
    -
    X
    uint8_t retBuf[X]
    BI2CC
    89
    -
    -
    0
    -
    BI2CO
    90
    -
    -
    handle
    -
    BI2CZ
    91
    -
    -
    X
    uint8_t data[X]
    I2CZ
    92
    -
    -
    X
    uint8_t data[X]
    WVCHA
    93
    -
    -
    0
    -
    SLRI
    94
    -
    -
    0
    -
    CGI
    95
    -
    -
    config
    -
    CSI
    96
    -
    -
    0
    -
    FG
    97
    -
    -
    0
    -
    FN
    98
    -
    -
    0
    -
    NOIB 99 -
    -
    0 -
    WVTXM
    100
    -
    -
    wave DMA CBs
    -
    WVTAT
    101
    -
    -
    wave id
    -
    PADS
    102
    -
    -
    0
    -
    PADG
    103
    -
    -
    strength
    -
    FO
    104
    -
    -
    handle
    -
    </td>
    FC
    105
    -
    -
    0
    -
    FR
    106
    -
    -
    X
    uint8_t data[X]
    FW
    107
    -
    -
    0
    -
    FS
    108
    -
    -
    position
    -
    FL
    109
    -
    -
    X
    uint8_t filenames[X]
    SHELL
    110
    -
    -
    exit status
    -
    BSPIC
    111
    -
    -
    0
    -
    BSPIO
    112
    -
    -
    0
    -
    BSPIX
    113
    -
    -
    X
    uint8_t data[X]
    BSCX
    114
    -
    -
    X+4
    uint32_t status
    uint8_t data[X]
    EVM
    115
    -
    -
    0
    -
    EVT
    116
    -
    -
    0
    -
    PROCU
    117
    -
    -
    0
    -

    cmdCmd_t

    typedef struct
    {
       uint32_t cmd;
       uint32_t p1;
       uint32_t p2;
       union
       {
          uint32_t p3;
          uint32_t ext_len;
          uint32_t res;
       };
    } cmdCmd_t;

    td>spiXfer Transfers bytes with a SPI device SPI BIT BANG bbSPIOpen Opens GPIO for bit banging SPI bbSPIClose Closes GPIO for bit banging SPI bbSPIXfer Performs bit banged SPI transactions FILES fileOpen Opens a file fileClose Closes a file fileRead Reads bytes from a file fileWrite Writes bytes to a file fileSeek Seeks to a position within a file fileList List files which match a pattern WAVES gpioWaveClear Deletes all waveforms gpioWaveAddNew Starts a new waveform gpioWaveAddGeneric Adds a series of pulses to the waveform gpioWaveAddSerial Adds serial data to the waveform gpioWaveCreate Creates a waveform from added data gpioWaveCreatePad Creates a waveform of fixed size from added data gpioWaveDelete Deletes a waveform gpioWaveTxSend Transmits a waveform gpioWaveChain Transmits a chain of waveforms gpioWaveTxAt Returns the current transmitting waveform gpioWaveTxBusy Checks to see if the waveform has ended gpioWaveTxStop Aborts the current waveform gpioWaveGetCbs Length in CBs of the current waveform gpioWaveGetHighCbs Length of longest waveform so far gpioWaveGetMaxCbs Absolute maximum allowed CBs gpioWaveGetMicros Length in micros of the current waveform gpioWaveGetHighMicros Length of longest waveform so far gpioWaveGetMaxMicros Absolute maximum allowed micros gpioWaveGetPulses Length in pulses of the current waveform gpioWaveGetHighPulses Length of longest waveform so far i2cWriteBlockData SMBus write block data i2cReadI2CBlockData SMBus read I2C block data i2cWriteI2CBlockData SMBus write I2C block data i2cReadDevice Reads the raw I2C device i2cWriteDevice Writes the raw I2C device i2cProcessCall SMBus process call i2cBlockProcessCall SMBus block process call i2cSwitchCombined Sets or clears the combined flag i2cSegments Performs multiple I2C transactions i2cZip Performs multiple I2C transactions I2C BIT BANG bbI2COpen Opens GPIO for bit banging I2C bbI2CClose Closes GPIO for bit banging I2C bbI2CZip Performs bit banged I2C transactions I2C/SPI SLAVE bscXfer I2C/SPI as slave transfer SERIAL serOpen Opens a serial device serClose Closes a serial device serReadByte Reads a byte from a serial device serWriteByte Writes a byte to a serial device serRead Reads bytes from a serial device serWrite Writes bytes to a serial device serDataAvailable Returns number of bytes ready to be read SERIAL BIT BANG (read only) gpioSerialReadOpen Opens a GPIO for bit bang serial reads gpioSerialReadClose Closes a GPIO for bit bang serial reads gpioSerialReadInvert Configures normal/inverted for serial reads gpioSerialRead Reads bit bang serial data from a GPIO SPI spiOpen Opens a SPI device spiClose Closes a SPI device spiRead Reads bytes from a SPI device spiWrite Writes bytes to a SPI device <r Set a noise filter on a GPIO gpioSetPad Sets a pads drive strength gpioGetPad Gets a pads drive strength shell Executes a shell command gpioSetISRFunc Request a GPIO interrupt callback gpioSetISRFuncEx Request a GPIO interrupt callback, extended gpioSetSignalFunc Request a signal callback gpioSetSignalFuncEx Request a signal callback, extended gpioSetGetSamplesFunc Requests a GPIO samples callback gpioSetGetSamplesFuncEx Requests a GPIO samples callback, extended Custom gpioCustom1 User custom function 1 gpioCustom2 User custom function 2 Events eventMonitor Sets the events to monitor eventSetFunc Request an event callback eventSetFuncEx Request an event callback, extended eventTrigger Trigger an event Scripts gpioStoreScript Store a script gpioRunScript Run a stored script gpioUpdateScript Set a scripts parameters gpioScriptStatus Get script status and parameters gpioStopScript Stop a running script gpioDeleteScript Delete a stored script I2C i2cOpen Opens an I2C device i2cClose Closes an I2C device i2cWriteQuick SMBus write quick i2cReadByte SMBus read byte i2cWriteByte SMBus write byte i2cReadByteData SMBus read byte data i2cWriteByteData SMBus write byte data i2cReadWordData SMBus read word data i2cWriteWordData SMBus write word data i2cReadBlockData SMBus read block data gpioGetPWMdutycycle Get dutycycle setting on a GPIO gpioGetPWMfrequency Get configured PWM frequency for a GPIO gpioGetPWMrange Get configured PWM range for a GPIO gpioGetPWMrealRange Get underlying PWM range for a GPIO Servo (overrides PWM commands on same GPIO) gpioServo Start/stop servo pulses on a GPIO gpioGetServoPulsewidth Get pulsewidth setting on a GPIO INTERMEDIATE gpioTrigger Send a trigger pulse to a GPIO gpioSetWatchdog Set a watchdog on a GPIO gpioRead_Bits_0_31 Read all GPIO in bank 1 gpioRead_Bits_32_53 Read all GPIO in bank 2 gpioWrite_Bits_0_31_Clear Clear selected GPIO in bank 1 gpioWrite_Bits_32_53_ClearClear selected GPIO in bank 2 gpioWrite_Bits_0_31_Set Set selected GPIO in bank 1 gpioWrite_Bits_32_53_Set Set selected GPIO in bank 2 gpioSetAlertFunc Request a GPIO level change callback gpioSetAlertFuncEx Request a GPIO change callback, extended gpioSetTimerFunc Request a regular timed callback gpioSetTimerFuncEx Request a regular timed callback, extended gpioStartThread Start a new thread gpioStopThread Stop a previously started thread ADVANCED gpioNotifyOpen Request a notification handle gpioNotifyClose Close a notification gpioNotifyOpenWithSize Request a notification with sized pipe gpioNotifyBegin Start notifications for selected GPIO gpioNotifyPause Pause notifications gpioHardwareClock Start hardware clock on supported GPIO gpioHardwarePWM Start hardware PWM on supported GPIO gpioGlitchFilter Set a glitch filter on a GPIO gpioNoiseFilte> *buf, unsigned count)
    This reads count bytes from the specified register of the device associated with handle . The count may be 1-32.

     handle: >=0, as returned by a call to i2c_open.
    i2c_reg: 0-255, the register to read.
        buf: an array to receive the read data.
      count: 1-32, the number of bytes to read.


    Returns the number of bytes read (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

    S Addr Wr [A] Comm [A]
       S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P

    int i2c_write_i2c_block_data(unsigned handle, unsigned i2c_reg, char *buf, unsigned count)

    This writes 1 to 32 bytes to the specified register of the device associated with handle.

     handle: >=0, as returned by a call to i2c_open.
    i2c_reg: 0-255, the register to write.
        buf: the data to write.
      count: 1-32, the number of bytes to write.


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

    S Addr Wr [A] Comm [A] Data [A] Data [A] ... [A] Data [A] P

    int i2c_read_device(unsigned handle, char *buf, unsigned count)

    This reads count bytes from the raw device into buf.

    handle: >=0, as returned by a call to i2c_open.
       buf: an array to receive the read data bytes.
     count: >0, the number of bytes to read.


    Returns count (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

    int i2c_write_device(unsigned handle, char *buf, unsigned count)

    This writes count bytes from buf to the raw device.

    handle: >=0, as returned by a call to i2c_open.
       buf: an array containing the data bytes to write.
     count: >0, the number of bytes to write.


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

    int i2c_zip(unsigned handle, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen)

    This function executes a sequence of I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenate A A W !!!=pdifpigpiod_ifpigpiod_ifpot.jpgrotary.jpgpsu.jpg

    THIS LIBRARY IS DEPRECATED. NEW CODE SHOULD BE WRITTEN TO USE THE MORE VERSATILE pigpiod_if2 LIBRARY.

    pigpiod_if is a C library for the Raspberry which allows control of the GPIO via the socket interface to the pigpio daemon.

    Features

    o hardware timed PWM on any of GPIO 0-31

    o hardware timed servo pulses on any of GPIO 0-31

    o callbacks when any of GPIO 0-31 change state

    o callbacks at timed intervals

    o reading/writing all of the GPIO in a bank as one operation

    o individually setting GPIO modes, reading and writing

    o notifications when any of GPIO 0-31 change state

    o the construction of output waveforms with microsecond timing

    o rudimentary permission control over GPIO

    o a simple interface to start and stop new threads

    o I2C, SPI, and serial link wrappers

    o creating and running scripts on Ka  '!UmiscMiscXMiscellaneousmsp430.jpgmotor.jpgleds.jpg There are two C libraries which provide a socket interface to the pigpio daemon.  They provide an interface very similar to the pigpio Python module.
    • The original pigpiod_if library is now deprecated and will no longer be updated.  This library is limited to controlling one Pi at a time.
    • The new pigpiod_if2 library which should be used for new code.  This library allows multiple Pis to be controlled at one time.
    Additional details of the pigpio socket interface.

    Additional details of the pigpio pipe interface.

    pig2vcd is a utility which converts pigpio notifications into the VCD (Value Change Dump) format.  VCD can be read by many programs, in particular GTKWave. d command codes and associated data.

    handle: >=0, as returned by a call to i2cOpen
     inBuf: pointer to the concatenated I2C commands, see below
     inLen: size of command buffer
    outBuf: pointer to buffer to hold returned data
    outLen: size of output buffer


    Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_HANDLE, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN. PI_BAD_I2C_WLEN, or PI_BAD_I2C_SEG.

    The following command codes are supported:

    NameCmd & DataMeaning
    End0No more commands
    Escape1Next P is two bytes
    On2Switch combined flag on
    Off3Switch combined flag off
    Address4 PSet I2C address to P
    Flags5 lsb msbSet I2C flags to lsb + (msb << 8)
    Read6 PRead P bytes of data
    Write7 P ...Write P bytes of data


    The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first).

    The address defaults to that associated with the handle. The flags default to 0. The address and flags maintain their previous value until updated.

    The returned I2C data is stored in consecutive locations of outBuf.

    Example

    Set address 0x53, write 0x32, read 6 bytes
    Set address 0x1E, write 0x03, read 6 bytes
    Set address 0x68, write 0x1B, read 8 bytes
    End

    0x04 0x53   0x07 0x01 0x32   0x06 0x06
    0x04 0x1E   0x07 0x01 0x03   0x06 0x06
    0x04 0x68   0x07 0x01 0x1B   0x06 0x08
    0x00

    int bb_i2c_open(unsigned SDA, unsigned SCL, unsigned baud)

    This function selects a pair of GPIO for bit banging I2C at a specified baud rate.

    Bit banging I2C allows for certain operations which are not possible with the standard I2C driver.

    o baud rates as low as 50
    o repeated starts
    o clock stretching
    o I2C on any pair of spare GPIO

     SDA: 0-31
     SCL: 0-31
    baud: 50-500000


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_I2C_BAUD, or PI_GPIO_IN_USE.

    NOTE:

    The GPIO used for SDA and SCL must have pull-ups to 3V3 connected. As a guide the hardware pull-ups on pins 3 and 5 are 1k8 in value.

    int bb_i2c_close(unsigned SDA)

    This function stops bit banging I2C on a pair of GPIO previously opened with bb_i2c_open.

    SDA: 0-31, the SDA GPIO used in a prior call to bb_i2c_open


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_I2C_GPIO.

    int bb_i2c_zip(unsigned SDA, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen)

    This function executes a sequence of bit banged I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenated command codes and associated data.

       SDA: 0-31 (as used in a prior call to bb_i2c_open)
     inBuf: pointer to the concatenated I2C commands, see below
     inLen: size of command buffer
    outBuf: pointer to buffer to hold returned data
    outLen: size of output buffer


    Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_USER_GPIO, PI_NOT_I2C_GPIO, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN, PI_BAD_I2C_WLEN, PI_I2C_READ_FAILED, or PI_I2C_WRITE_FAILED.

    The following command codes are supported:

    NameCmd & DataMeaning
    End0No more commands
    Escape1Next P is two bytes
    Start2Start condition
    Stop3Stop condition
    Address4 PSet I2C address to P
    Flags5 lsb msbSet I2C flags to lsb + (msb << 8)
    Read6 PRead P bytes of data
    Write7 P ...Write P bytes of data


    The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first).

    The address and flags default to 0. The address and flags maintain their previous value until updated.

    No flags are currently defined.

    The returned I2C data is stored in consecutive locations of outBuf.

    Example

    Set address 0x53
    start, write 0x32, (re)start, read 6 bytes, stop
    Set address 0x1E
    start, write 0x03, (re)start, read 6 bytes, stop
    Set address 0x68
    start, write 0x1B, (re)start, read 8 bytes, stop
    End

    0x04 0x53
    0x02 0x07 0x01 0x32   0x02 0x06 0x06 0x03

    0x04 0x1E
    0x02 0x07 0x01 0x03   0x02 0x06 0x06 0x03

    0x04 0x68
    0x02 0x07 0x01 0x1B   0x02 0x06 0x08 0x03

    0x00

    int spi_open(unsigned spi_channel, unsigned baud, unsigned spi_flags)

    This function returns a handle for the SPI device on the channel. Data will be transferred at baud bits per second. The flags may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select.

    The Pi has two SPI peripherals: main and auxiliary.

    The main SPI has two chip selects (channels), the auxiliary has three.

    The auxiliary SPI is available on all models but the A and B.

    The GPIO used are given in the following table.

    MISOMOSISCLKCE0CE1CE2
    Main SPI9101187-
    Aux SPI192021181716


    spi_channel: 0-1 (0-2 for the auxiliary SPI).
           baud: 32K-125M (values above 30M are unlikely to work).
      spi_flags: see below.


    Returns a handle (>=0) if OK, otherwise PI_BAD_SPI_CHANNEL, PI_BAD_SPI_SPEED, PI_BAD_FLAGS, PI_NO_AUX_SPI, or PI_SPI_OPEN_FAILED.

    spi_flags consists of the least significant 22 bits.

    21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
     b  b  b  b  b  b  R  T  n  n  n  n  W  A u2 u1 u0 p2 p1 p0  m  m


    mm defines the SPI mode.

    Warning: modes 1 and 3 do not appear to work on the auxiliary SPI.

    Mode POL PHA
     0    0   0
     1    0   1
     2    1   0
     3    1   1


    px is 0 if CEx is active low (default) and 1 for active high.

    ux is 0 if the CEx GPIO is reserved for SPI (default) and 1 otherwise.

    A is 0 for the main SPI, 1 for the auxiliary SPI.

    W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Main SPI only.

    nnnn defines the number of bytes (0-15) to write before switching the MOSI line to MISO to read data. This field is ignored if W is not set. Main SPI only.

    T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. Auxiliary SPI only.

    R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. Auxiliary SPI only.

    bbbbbb defines the word size in bits (0-32). The default (0) sets 8 bits per word. Auxiliary SPI only.

    The spi_read, spi_write, and spi_xfer functions transfer data packed into 1, 2, or 4 bytes according to the word size in bits.

    For bits 1-8 there will be one byte per word.
    For bits 9-16 there will be two bytes per word.
    For bits 17-32 there will be four bytes per word.

    Multi-byte transfers are made in least significant byte first order.

    E.g. to transfer 32 11-bit words buf should contain 64 bytes and count should be 64.

    E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A.

    The other bits in flags should be set to zero.

    int spi_close(unsigned handle)

    This functions closes the SPI device identified by the handle.

    handle: >=0, as returned by a call to spi_open.


    Returns 0 if OK, otherwise PI_BAD_HANDLE.

    int spi_read(unsigned handle, char *buf, unsigned count)

    This function reads count bytes of data from the SPI device associated with the handle.

    handle: >=0, as returned by a call to spi_open.
       buf: an array to receive the read data bytes.
     count: the number of bytes to read.


    Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED.

    int spi_write(unsigned handle, char *buf, unsigned count)

    This function writes count bytes of data from buf to the SPI device associated with the handle.

    handle: >=0, as returned by a call to spi_open.
       buf: the data bytes to write.
     count: the number of bytes to write.


    Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED.

    int spi_xfer(unsigned handle, char *txBuf, char *rxBuf, unsigned count)

    This function transfers count bytes of data from txBuf to the SPI device associated with the handle. Simultaneously count bytes of data are read from the device and placed in rxBuf.

    handle: >=0, as returned by a call to spi_open.
     txBuf: the data bytes to write.
     rxBuf: the received data bytes.
     count: the number of bytes to transfer.


    Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED.

    int serial_open(char *ser_tty, unsigned baud, unsigned ser_flags)

    This function opens a serial device at a specified baud rate with specified flags. The device name must start with /dev/tty or /dev/serial.

      ser_tty: the serial device to open.
         baud: the baud rate in bits per second, see below.
    ser_flags: 0.


    Returns a handle (>=0) if OK, otherwise PI_NO_HANDLE, or PI_SER_OPEN_FAILED.

    The baud rate must be one of 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, or 230400.

    No flags are currently defined. This parameter should be set to zero.

    int serial_close(unsigned handle)

    This function closes the serial device associated with handle.

    handle: >=0, as returned by a call to serial_open.


    Returns 0 if OK, otherwise PI_BAD_HANDLE.

    int serial_write_byte(unsigned handle, unsigned bVal)

    This function writes bVal to the serial port associated with handle.

    handle: >=0, as returned by a call to serial_open.


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED.

    int serial_read_byte(unsigned handle)

    This function reads a byte from the serial port associated with handle.

    handle: >=0, as returned by a call to serial_openIntroduction The socket and pipe interfaces allow control of the Pi's GPIO by passing messages to the running pigpio library.

    The normal way to start the pigpio library would be as a daemon during boot.

    sudo pigpiod

    Features

    o hardware timed PWM on any of GPIO 0-31

    o hardware timed servo pulses on any of GPIO 0-31

    o reading/writing all of the GPIO in a bank as one operation

    o individually setting GPIO modes, reading and writing

    o notifications when any of GPIO 0-31 change state

    o the construction of output waveforms with microsecond timing

    o I2C, SPI, and serial link wrappers

    o creating and running scripts on the pigpio daemon

    GPIO

    ALL GPIO are identified by their Broadcom number.

    Usage

    pigs is a program and internally uses the socket interface to pigpio whereas /dev/pigpio uses the pipe interface.

    pigs and the pipe interface share the same commands and are invoked in a similar fashion from the command line.

    The pigpio library must be running, either by running a program linked with the library or starting the pigpio daemon (sudo pigpiod).

    pigs {command}+

    echo "{command}+" >/dev/pigpio

    pigs will show the result of the command on screen.

    The pigs process returns an exit status (which can be displayed with the command echo $?).

    PIGS_OK            0
    PIGS_CONNECT_ERR 255
    PIGS_OPTION_ERR  254
    PIGS_SCRIPT_ERR  253



    The results of /dev/pigpio commands need to be read from /dev/pigout, e.g. cat /dev/pigout (try cat /dev/pigout& so that all subsequent results are shown on screen).

    In both cases if an error was detected a message will have been written to /dev/pigerr (try cat /dev/pigerr&). This is likely to be more informative than the message returned by pigs or the error code returned by the pipe interface.

    Several commands may be entered on a line. If present PROC and PARSE must be the last command on a line.

    E.g.

    pigs w 22 1 mils 1000 w 22 0


    is equivalent to

    pigs w 22 1
    pigs mils 1000
    pigs w 22 0


    and

    echo "m 4 w w 4 0 mils 250 m 4 r r 4" >/dev/pigpio


    is equivalent to

    echo "m 4 w"    >/dev/pigpio
    echo "w 4 0"    >/dev/pigpio
    echo "mils 250" >/dev/pigpio
    echo "m 4 r"    >/dev/pigpio
    echo "r 4"     &E>.


    Returns the read byte (>=0) if OK, otherwise PI_BAD_HANDLE, PI_SER_READ_NO_DATA, or PI_SER_READ_FAILED.

    If no data is ready PI_SER_READ_NO_DATA is returned.

    int serial_write(unsigned handle, char *buf, unsigned count)

    This function writes count bytes from buf to the the serial port associated with handle.

    handle: >=0, as returned by a call to serial_open.
       buf: the array of bytes to write.
     count: the number of bytes to write.


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED.

    int serial_read(unsigned handle, char *buf, unsigned count)

    This function reads up to count bytes from the the serial port associated with handle and writes them to buf.

    handle: >=0, as returned by a call to serial_open.
       buf: an array to receive the read data.
     count: the maximum number of bytes to read.


    Returns the number of bytes read (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_SER_READ_NO_DATA, or PI_SER_WRITE_FAILED.

    If no data is ready zero is returned.

    int serial_data_available(unsigned handle)

    Returns the number of bytes available to be read from the device associated with handle.

    handle: >=0, as returned by a call to serial_open.


    Returns the number of bytes of data available (>=0) if OK, otherwise PI_BAD_HANDLE.

    int custom_1(unsigned arg1, unsigned arg2, char *argx, unsigned argc)

    This function is available for user customisation.

    It returns a single integer value.

    arg1: >=0
    arg2: >=0
    argx: extra (byte) arguments
    argc: number of extra arguments


    Returns >= 0 if OK, less than 0 indicates a user defined error.

    int custom_2(unsigned arg1, char *argx, unsigned argc, char *retBuf, unsigned retMax)

    This function is available for user customisation.

    It differs from custom_1 in that it returns an array of bytes rather than just an integer.

    The return value is an integer indicating the number of returned bytes.   arg1: >=0
      argc: extra (byte) arguments
     count: number of extra arguments
    retBuf: buffer for returned data
    retMax: maximum number of bytes to return


    Returns >= 0 if OK, less than 0 indicates a user defined error.

    Note, the number of returned bytes will be retMax or less.

    int callback(unsigned user_gpio, unsigned edge, CBFunc_t f)

    This function initialises a new callback.

    user_gpio: 0-31.
         edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE.
            f: the callback function.


    The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback.

    The callback is called with the GPIO, edge, and tick, whenever the GPIO has the identified edge.

    Parameter   Value    Meaning

    GPIO        0-31     The GPIO which has changed state

    edge        0-2      0 = change to low (a falling edge)
                         1 = change to high (a rising edge)
                         2 = no level change (a watchdog timeout)

    tick        32 bit   The number of microseconds since boot
                         WARNING: this wraps around from
                         4294967295 to 0 roughly every 72 minutes

    int callback_ex(unsigned user_gpio, unsigned edge, CBFuncEx_t f, void *userdata)

    This function initialises a new callback.

    user_gpio: 0-31.
         edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE.
            f: the callback function.
     userdata: a pointer to arbitrary user data.


    The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback.

    The callback is called with the GPIO, edge, tick, and user, whenever the GPIO has the identified edge.

    Parameter   Value    Meaning

    GPIO        0-31     The GPIO which has changed state

    edge        0-2      0 = change to low (a falling edge)
                         1 = change to high (a rising edge)
                         2 = no level change (a watchdog timeout)

    tick        32 bit   The number of microseconds since boot
                &nbsp;        WARNING: this wraps around from
                         4294967295 to 0 roughly every 72 minutes

    userdata    pointer  Pointer to an arbitrary object

    int callback_cancel(unsigned callback_id)

    This function cancels a callback identified by its id.

    callback_id: >=0, as returned by a call to callback or callback_ex.


    The function returns 0 if OK, otherwise pigif_callback_not_found.

    int wait_for_edge(unsigned user_gpio, unsigned edge, double timeout)

    This function waits for edge on the GPIO for up to timeout seconds.

    user_gpio: 0-31.
         edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE.
      timeout: >=0.


    The function returns 1 if the edge occurred, otherwise 0.

    The function returns when the edge occurs or after the timeout.

    PARAMETERS

    active: 0-1000000

    The number of microseconds level changes are reported for once a noise filter has been triggered (by steady microseconds of a stable level).

    *addrStr

    A string specifying the host or IP address of the Pi running the pigpio daemon. It may be NULL in which case localhost is used unless overridden by the PIGPIO_ADDR environment variable.

    arg1

    An unsigned argument passed to a user customised function. Its meaning is defined by the customiser.

    arg2

    An unsigned argument passed to a user customised function. Its meaning is defined by the customiser.

    argc

    The count of bytes passed to a user customised function.

    *argx

    A pointer to an array of bytes passed to a user customised function. Its meaning and content is defined by the customiser.

    baud

    The speed of serial communication (I2C, SPI, serial link, waves) in bits per second.

    bit

    A value of 0 or 1.

    bits

    A value used to select GPIO. If bit n of bits is set then GPIO n is selected.

    A convenient way to set bit n is to or in (1<<n).

    e.g. to select bits 5, 9, 23 you could use (1<<5) | (1<<9) | (1<<23).

    *buf

    A buffer to hold data being sent or being received.

    bufSize

    The size in bytes of a buffer.

    bVal: 0-255 (Hex 0x0-0xFF, Octal 0-0377)

    An 8-bit byte value.

    callback_id

    A >=0, as returned by a call to callback or callback_ex. This is passed to callback_cancel to cancel the callback.

    CBFunc_t

    typedef void (*CBFunc_t)
       (unsigned user_gpio, unsigned level, uint32_t tick);

    CBFuncEx_t

    typedef void (*CBFuncEx_t)
       (unsigned user_gpio, unsigned level, uint32_t tick, void * user);

    char

    A single character, an 8 bit quantity able to store 0-255.

    clkfreq: 4689-250000000 (250M)

    The hardware clock frequency.

    count

    The number of bytes to be transferred in an I2C, SPI, or Serial command.

    data_bits: 1-32

    The number of data bits in each character of serial data.

    #define PI_MIN_WAVE_DATABITS 1
    #define PI_MAX_WAVE_DATABITS 32

    double

    A floating point number.

    dutycycle: 0-range

    A number representing the ratio of on time to off time for PWM.

    The number may vary between 0 and range (default 255) where 0 is off and range is fully on.

    edge

    Used to identify a GPIO level transition of interest. A rising edge is a level change from 0 to 1. A falling edge is a level change from 1 to 0.

    RISING_EDGE  0
    FALLING_EDGE 1
    EITHER_EDGE. 2

    errnum

    A negative number indicating a function call failed and the nature of the error.

    f

    A function.

    frequency: >=0

    The number of times a GPIO is swiched on and off per second. This can be set per GPIO and may be as little as 5Hz or as much as 40KHz. The GPIO will be on for a proportion of the time as defined by its dutycycle.

    gpio

    A Broadcom numbered GPIO, in the range 0-53.

    There are 54 General Purpose Input Outputs (GPIO) named gpio0 through gpio53.

    They are split into two banks. Bank 1 consists of gpio0 through gpio31. Bank 2 consists of gpio32 through gpio53.

    All the GPIO which are safe for the user to read and write are in bank 1. Not all GPIO in bank 1 are safe though. Type 1 boards have 17 safe GPIO. Type 2 boards have 21. Type 3 boards have 26.

    See get_hardware_revision.

    The user GPIO are marked with an X in the following table.

              0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
    Type 1    X  X  -  -  X  -  -  X  X  X  X  X  -  -  X  X
    Type 2    -  -  X  X  X  -  -  X  X  X  X  X  -  -  X  X
    Type 3          X  X  X  X  X  X  X  X  X  X  X  X  X  X

             16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
    Type 1    -  X  X  -  -  X  X  X  X  X  -  -  -  -  -  -
    Type 2    -  X  X  -  -  -  X  X  X  X  -  X  X  X  X  X
    Type 3    X  X  X  X  X  X  X  X  X  X  X  X  -  -  -  -

    gpioPulse_t

    typedef struct
    {
    uint32_t gpioOn;
    uint32_t gpioOff;
    uint32_t usDelay;
    } gpioPulse_t;

    gpioThreadFunc_t

    typedef void *(gpioThreadFunc_t) (void *);

    handle: >=0

    A number referencing an object opened by one of i2c_open, notify_open, serial_open, and spi_open.

    i2c_addr: 0-0x7F

    The address of a device on the I2C bus.

    i2c_bus: >=0

    An I2C bus number.

    i2c_flags: 0

    Flags which modify an I2C open command. None are currently defined.

    i2c_reg: 0-255

    A register of an I2C device.

    *inBuf

    A buffer used to pass data to a function.

    inLen

    The number of bytes of data in a buffer.

    int

    A whole number, negative or positive.

    invert

    A flag used to set normal or inverted bit bang serial data level logic.

    level

    The level of a GPIO. Low or High.

    PI_OFF 0
    PI_ON 1

    PI_CLEAR 0
    PI_SET 1

    PI_LOW 0
    PI_HIGH 1


    There is one exception. If a watchdog expires on a GPIO the level will be reported as PI_TIMEOUT. See set_watchdog.

    PI_TIMEOUT 2

    mode: 0-7

    The operational mode of a GPIO, normally INPUT or OUTPUT.

    PI_INPUT 0
    PI_OUTPUT 1
    PI_ALT0 4
    PI_ALT1 5
    PI_ALT2 6
    PI_ALT3 7
    PI_ALT4 3
    PI_ALT5 2

    numBytes

    The number of bytes used to store characters in a string. Depending on the number of bits per character there may be 1, 2, or 4 bytes per character.

    numPar: 0-10

    The number of parameters passed to a script.

    numPulses

    The number of pulses to be added to a waveform.

    offset

    The associated data starts this number of microseconds from the start of the waveform.

    *outBuf

    A buffer used to return data from a function.

    outLen

    The size in bytes of an output buffer.

    *param

    An array of script parameters.

    *portStr

    A string specifying the port address used by the Pi running the pigpio daemon. It may be NULL in which case "8888" is used unless overridden by the PIGPIO_PORT environment variable.

    *pth

    A thread identifier, returned by start_thread.

    pthread_t

    A thread identifier.

    pud: 0-2

    The setting of the pull up/down resistor for a GPIO, which may be off, pull-up, or pull-down. PI_PUD_OFF 0
    PI_PUD_DOWN 1
    PI_PUD_UP 2

    pulseLen

    1-100, the length of a trigger pulse in microseconds.

    *pulses

    An array of pulses to be added to a waveform.

    pulsewidth: 0, 500-2500

    PI_SERVO_OFF 0
    PI_MIN_SERVO_PULSEWIDTH 500
    PI_MAX_SERVO_PULSEWIDTH 2500

    PWMduty: 0-1000000 (1M)

    The hardware PWM dutycycle.

    #define PI_HW_PWM_RANGE 1000000

    PWMfreq: 1-125000000 (125M)

    The hardware PWM frequency.

    #define PI_HW_PWM_MIN_FREQ 1
    #define PI_HW_PWM_MAX_FREQ 125000000

    range: 25-40000

    The permissible dutycycle values are 0-range. PI_MIN_DUTYCYCLE_RANGE 25
    PI_MAX_DUTYCYCLE_RANGE 40000

    *retBuf

    A buffer to hold a number of bytes returned to a used customised function,

    retMax

    The maximum number of bytes a user customised function should return.

    *rxBuf

    A pointer to a buffer to receive data.

    SCL

    The user GPIO to use for the clock when bit banging I2C.

    *script

    A pointer to the text of a script.

    script_id

    An id of a stored script as returned by store_script.

    SDA

    The user GPIO to use for data when bit banging I2C.

    seconds

    The number of seconds.

    ser_flags

    Flags which modify a serial open command. None are currently defined.

    *ser_tty

    The name of a serial tty device, e.g. /dev/ttyAMA0, /dev/ttyUSB0, /dev/tty1.

    size_t

    A standard type used to indicate the size of an object in bytes.

    spi_channel

    A SPI channel, 0-2.

    spi_flags

    See spi_open.

    steady: 0-300000

    The number of microseconds level changes must be stable for before reporting the level changed (set_glitch_filter) or triggering the active part of a noise filter (set_noise_filter).

    stop_bits: 2-8

    The number of (half) stop bits to be used when adding serial data to a waveform.

    #define PI_MIN_WAVE_HALFSTOPBITS 2
    #define PI_MAX_WAVE_HALFSTOPBITS 8

    *str

    An array of characters.

    thread_func

    A function of type gpioThreadFunc_t used as the main function of a thread.

    timeout

    A GPIO watchdog timeout in milliseconds. PI_MIN_WDOG_TIMEOUT 0
    PI_MAX_WDOG_TIMEOUT 60000

    *txBuf

    An array of bytes to transmit.

    uint32_t: 0-0-4,294,967,295 (Hex 0x0-0xFFFFFFFF)

    A 32-bit unsigned value.

    unsigned

    A whole number >= 0.

    user_gpio

    0-31, a Broadcom numbered GPIO.

    See gpio.

    *userdata

    A pointer to arbitrary user data. This may be used to identify the instance.

    void

    Denoting no parameter is required

    wave_add_*

    One of wave_add_new, wave_add_generic, wave_add_serial.

    wave_id

    A number representing a waveform created by wave_create.

    wave_send_*

    One of wave_send_once, wave_send_repeat.

    wVal: 0-65535 (Hex 0x0-0xFFFF, Octal 0-0177777)

    A 16-bit word value.

    pigpiod_if Error Codes


    typedef enum
    {
       pigif_bad_send           = -2000,
       pigif_bad_recv           = -2001,
       pigif_bad_getaddrinfo    = -2002,
       pigif_bad_connect        = -2003,
       pigif_bad_socket         = -2004,
       pigif_bad_noib           = -2005,
       pigif_duplicate_callback = -2006,
       pigif_bad_malloc         = -2007,
       pigif_bad_callback       = -2008,
       pigif_notify_failed      = -2009,
       pigif_callback_not_found = -2010,
    } pigifError_t;

    "#gpioWaveGetMaxPulses">gpioWaveGetMaxPulses Absolute maximum allowed pulses UTILITIES gpioDelay Delay for a number of microseconds gpioTick Get current tick (microseconds) gpioHardwareRevision Get hardware revision gpioVersion Get the pigpio version getBitInBytes Get the value of a bit putBitInBytes Set the value of a bit gpioTime Get current time gpioSleep Sleep for specified time time_sleep Sleeps for a float number of seconds time_time Float number of seconds since the epoch CONFIGURATION gpioCfgBufferSize Configure the GPIO sample buffer size gpioCfgClock Configure the GPIO sample rate gpioCfgDMAchannel Configure the DMA channel (DEPRECATED) gpioCfgDMAchannels Configure the DMA channels gpioCfgPermissions Configure the GPIO access permissions gpioCfgInterfaces Configure user interfaces gpioCfgSocketPort Configure socket port gpioCfgMemAlloc Configure DMA memory allocation mode gpioCfgNetAddr Configure allowed network addresses gpioCfgGetInternals Get internal configuration settings gpioCfgSetInternals Set internal configuration settings EXPERT rawWaveAddSPI Not intended for general use rawWaveAddGeneric Not intended for general use rawWaveCB Not intended for general use rawWaveCBAdr Not intended for general use rawWaveGetOOL Not intended for general use rawWaveSetOOL Not intended for general use rawWaveGetOut Not intended for general use rawWaveSetOut Not intended for general use rawWaveGetIn Not intended for general use rawWaveSetIn Not intended for general use rawWaveInfo Not intended for general use rawDumpWave Not intended for general use rawDumpScript Not intended for general use

    FUNCTIONS

    int gpioInitialise(void)

    Initialises the library.

    Returns the pigpio version number if OK, otherwise PI_INIT_FAILED.

    gpioInitialise must be called before using the other library functions with the following exceptions:

    gpioCfg*
    gpioVersion
    gpioHardwareRevision


    Example

    if (gpioInitialise() < 0)
    {
       // pigpio initialisation failed.
    }
    else
    {
       // pigpio initialised okay.
    }

    void gpioTerminate(void)

    Terminates the library.

    Returns nothing.

    Call before program exit.

    This function resets the used DMA channels, releases memory, and terminates any running threads.

    Example

    gpioTerminate();

    int gpioSetMode(unsigned gpio, unsigned mode)

    Sets the GPIO mode, typically input or output.

    gpio: 0-53
    mode: 0-7


    Returns 0 if OK, otherwise PI_BAD_GPIO or PI_BAD_MODE.

    Arduino style: pinMode.

    Example

    gpioSetMode(17, PI_INPUT);  // Set GPIO17 as input.

    gpioSetMode(18, PI_OUTPUT); // Set GPIO18 as output.

    gpioSetMode(22,PI_ALT0);    // Set GPIO22 to alternative mode 0.


    See http://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf page 102 for an overview of the modes.

    int gpioGetMode(unsigned gpio)

    Gets the GPIO mode.

    gpio: 0-53


    Returns the GPIO mode if OK, otherwise PI_BAD_GPIO.

    Example

    if (gpioGetMode(17) != PI_ALT0)
    {
       gpioSetMode(17, PI_ALT0);  // set GPIO17 to ALT0
    }

    int gpioSetPullUpDown(unsigned gpio, unsigned pud)

    Sets or clears resistor pull ups or downs on the GPIO.

    gpio: 0-53
     pud: 0-2


    Returns 0 if OK, otherwise PI_BAD_GPIO or PI_BAD_PUD.

    Example

    gpioSetPullUpDown(17, PI_PUD_UP);   // Sets a pull-up.

    gpioSetPullUpDown(18, PI_PUD_DOWN); // Sets a pull-down.

    gpioSetPullUpDown(23, PI_PUD_OFF);  // Clear any pull-ups/downs.

    int gpioRead(unsigned gpio)

    Reads the GPIO level, on or off.

    gpio: 0-53


    Returns the GPIO level if OK, otherwise PI_BAD_GPIO.

    Arduino style: digitalRead. <br>
    Example

    printf("GPIO24 is level %d", gpioRead(24));

    int gpioWrite(unsigned gpio, unsigned level)

    Sets the GPIO level, on or off.

     gpio: 0-53
    level: 0-1


    Returns 0 if OK, otherwise PI_BAD_GPIO or PI_BAD_LEVEL.

    If PWM or servo pulses are active on the GPIO they are switched off.

    Arduino style: digitalWrite

    Example

    gpioWrite(24, 1); // Set GPIO24 high.

    int gpioPWM(unsigned user_gpio, unsigned dutycycle)

    Starts PWM on the GPIO, dutycycle between 0 (off) and range (fully on). Range defaults to 255.

    user_gpio: 0-31
    dutycycle: 0-range


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_BAD_DUTYCYCLE.

    Arduino style: analogWrite

    This and the servo functionality use the DMA and PWM or PCM peripherals to control and schedule the pulse lengths and dutycycles.

    The gpioSetPWMrange function may be used to change the default range of 255.

    Example

    gpioPWM(17, 255); // Sets GPIO17 full on.

    gpioPWM(18, 128); // Sets GPIO18 half on.

    gpioPWM(23, 0);   // Sets GPIO23 full off.

    int gpioGetPWMdutycycle(unsigned user_gpio)

    Returns the PWM dutycycle setting for the GPIO.

    user_gpio: 0-31


    Returns between 0 (off) and range (fully on) if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_PWM_GPIO.

    For normal PWM the dutycycle will be out of the defined range for the GPIO (see gpioGetPWMrange).

    If a hardware clock is active on the GPIO the reported dutycycle will be 500000 (500k) out of 1000000 (1M).

    If hardware PWM is active on the GPIO the reported dutycycle will be out of a 1000000 (1M).

    Normal PWM range defaults to 255.

    int gpioSetPWMrange(unsigned user_gpio, unsigned range)

    Selects the dutycycle range to be used for the GPIO. Subsequent calls to gpioPWM will use a dutycycle between 0 (off) and range (fully on).

    user_gpio: 0-31
        range: 25-40000


    Returns the real range for the given GPIO's frequency if OK, otherwise PI_BAD_USER_GPIO or PI_BAD_DUTYRANGE.

    If PWM is currently active on the GPIO its dutycycle will be scaled to reflect the new range.

    The real range, the number of steps between fully off and fully on for each frequency, is given in the following table.

      25,   50,  100,  125,  200,  250,  400,   500,   625,
     800, 1000, 1250, 2000, 2500, 4000, 5000, 10000, 20000


    The real value set by gpioPWM is (dutycycle * real range) / range.

    Example

    gpioSetPWMrange(24, 2000); // Now 2000 is fully on
                               //&nbsp;    1000 is half on
                               //      500 is quarter on, etc.

    int gpioGetPWMrange(unsigned user_gpio)

    Returns the dutycycle range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO.

    user_gpio: 0-31


    If a hardware clock or hardware PWM is active on the GPIO the reported range will be 1000000 (1M).

    Example

    r = gpioGetPWMrange(23);

    int gpioGetPWMrealRange(unsigned user_gpio)

    Returns the real range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO.

    user_gpio: 0-31


    If a hardware clock is active on the GPIO the reported real range will be 1000000 (1M).

    If hardware PWM is active on the GPIO the reported real range will be approximately 250M divided by the set PWM frequency.

    Example

    rr = gpioGetPWMrealRange(17);

    int gpioSetPWMfrequency(unsigned user_gpio, unsigned frequency)

    Sets the frequency in hertz to be used for the GPIO.

    user_gpio: 0-31
    frequency: >=0


    Returns the numerically closest frequency if OK, otherwise PI_BAD_USER_GPIO.

    If PWM is currently active on the GPIO it will be switched off and then back on at the new frequency.

    Each GPIO can be independently set to one of 18 different PWM frequencies.

    The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5, 8, or 10 microseconds (default 5).

    The frequencies for each sample rate are:

                           Hertz

           1: 40000 20000 10000 8000 5000 4000 2500 2000 1600
               1250  1000   800  500  400  250  200  100   50

           2: 20000 10000  5000 4000 2500 2000 1250 1000  800
                625   500   400  250  200  125  100   50   25

           4: 10000  5000  2500 2000 1250 1000  625  500  400
                313   250   200  125  100   63   50   25   13
    sample
     rate
     (us)  5:  8000  4000  2000 1600 1000  800  500  400  320
                250   200   160  100   80   50   40   20   10

           8:  5000  2500  1250 1000  625  500  313  250  200
                156   125   100   63   50   31   25   13    6

          10:  4000  2000  1000  800  500  400  250  200  160
                125   100    80   50   40   25   20   10    5


    Example

    gpioSetPWMfrequency(23, 0); // Set GPIO23 to lowest frequency.

    gpioSetPWMfrequency(24, 500); // Set GPIO24 to 500Hz.

    gpioSetPWMfrequency(25, 100000); // Set GPIO25 to highest frequency.

    int gpioGetPWMfrequency(unsigned user_gpio)

    Returns the frequency (in hertz) used for the GPIO if OK, otherwise PI_BAD_USER_GPIO.

    user_gpio: 0-31


    For normal PWM the frequency will be that defined for the GPIO by gpioSetPWMfrequency.

    If a hardware clock is active on the GPIO the reported frequency will be that set by gpioHardwareClock.

    If hardware PWM is active on the GPIO the reported frequency will be that set by gpioHardwarePWM.

    Example

    f = gpioGetPWMfrequency(23); // Get frequency used for GPIO23.

    int gpioServo(unsigned user_gpio, unsigned pulsewidth)

    Starts servo pulses on the GPIO, 0 (off), 500 (most anti-clockwise) to 2500 (most clockwise).

     user_gpio: 0-31
    pulsewidth: 0, 500-2500


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_BAD_PULSEWIDTH.

    The range supported by servos varies and should probably be determined by experiment. A value of 1500 should always be safe and represents the mid-point of rotation. You can DAMAGE a servo if you command it to move beyond its limits.

    The following causes an on pulse of 1500 microseconds duration to be transmitted on GPIO 17 at a rate of 50 times per second. This will command a servo connected to GPIO 17 to rotate to its mid-point.

    Example

    gpioServo(17, 1000); // Move servo to safe position anti-clockwise.

    gpioServo(23, 1500); // Move servo to centre position.

    gpioServo(25, 2000); // Move servo to safe position clockwise.


    OTHER UPDATE RATES:

    This function updates servos at 50Hz. If you wish to use a different update frequency you will have to use the PWM functions.

    PWM Hz    50   100  200  400  500
    1E6/Hz 20000 10000 5000 2500 2000


    Firstly set the desired PWM frequency using gpioSetPWMfrequency.

    Then set the PWM range using gpioSetPWMrange to 1E6/frequency. Doing this allows you to use units of microseconds when setting the servo pulsewidth.

    E.g. If you want to update a servo connected to GPIO25 at 400Hz

    gpioSetPWMfrequency(25, 400);

    gpioSetPWMrange(25, 2500);


    Thereafter use the PWM command to move the servo, e.g. gpioPWM(25, 1500) will set a 1500 us pulse.

    int gpioGetServoPulsewidth(unsigned user_gpio)

    Returns the servo pulsewidth setting for the GPIO.

    user_gpio: 0-31


    Returns 0 (off), 500 (most anti-clockwise) to 2500 (most clockwise) if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERVO_GPIO.

    int gpioSetAlertFunc(unsigned user_gpio, gpioAlertFunc_t f)

    Registers a function to be called (a callback) when the specified GPIO changes state.

    user_gpio: 0-31
            f: the callback function


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO.

    One callback may be registered per GPIO.

    The callback is passed the GPIO, the new level, and the tick.

    Parameter   Value    Meaning

    GPIO        0-31     The GPIO which has changed state

    level       0-2      0 = change to low (a falling edge)
                         1 = change to high (a rising edge)
                         2 = no level change (a watchdog timeout)

    tick        32 bit   The number of microseconds since boot
                         WARNING: this wraps around from
                         4294967295 to 0 roughly every 72 minutes


    The alert may be cancelled by passing NULL as the function.

    The GPIO are sampled at a rate set when the library is started.

    If a value isn't specifically set the default of 5 us is used.

    The number of samples per second is given in the following table.

                  samples
                  per sec

             1  1,000,000
             2    500,000
    sample   4    250,000
    rate     5    200,000
    (us)     8    125,000
            10    100,000


    Level changes shorter than the sample rate may be missed.

    The thread which calls the alert functions is triggered nominally 1000 times per second. The active alert functions will be called once per level change since the last time the thread was activated. i.e. The active alert functions will get all level changes but there will be a latency.

    If you want to track the level of more than one GPIO do so by maintaining the state in the callback. Do not use gpioRead. Remember the event that triggered the camber.

    Commands

    Many pigpio commands may be used within a script. However some commands do not work within the script model as designed and are not permitted.

    The following commands are not permitted within a script:

    File - FL FO FR FW

    I2C - BI2CZ I2CPK I2CRD I2CRI I2CRK I2CWD I2CWI I2CWK I2CZ

    Misc - BSCX CF1 CF2 SHELL

    Script control - PARSE PROC PROCD PROCP PROCR PROCS PROCU

    Serial - SERO SERR SERW SLR

    SPI - BSPIO BSPIX SPIR SPIW SPIX

    Waves - WVAG WVAS WVCHA WVGO WVGOR

    The following commands are only permitted within a script:

    CommandDescriptionDefinition
    ADD xAdd x to accumulatorA+=x; F=A
    AND xAnd x with accumulatorA&=x; F=A
    CALL LCall subroutine at tag Lpush(PC+1); PC=L
    CMP xCompare x with accumulatorF=A-x
    DCR yDecrement register--*y; F=*y
    DCRADecrement accumulator--A; F=A
    DIV xDivide x into accumulatorA/=x; F=A
    EVTWTWait for an event to occurA=wait(x); F=A
    HALTHaltHalt
    INR yIncrement register++*y; F=*y
    INRAIncrement accumulator++A; F=A
    JM LJump if minus to tag Lif (F<0) PC=L
    JMP LJump to tag LPC=L
    JNZ LJump if non-zero to tag Lif (F) PC=L
    JP LJump if positive to tag Lif (F>=0) PC=L
    JZ LJump if zero to tag Lif (!F) PC=L
    LD y xLoad register with x*y=x
    LDA xLoad accumulator with xA=x
    MLT xMultiply x with accumulatorA*=x; F=A
    MOD xModulus x with accumulatorA%=x; F=A
    OR xOr x with accumulatorA|=x; F=A
    POP yPop registery=pop()
    POPAPop accumulatorA=pop()
    PUSH yPush registerpush(y)
    PUSHAPush accumulatorpush(A)
    RETReturn from subroutinePC=pop()
    RL y xRotate left register x bits*y<<=x; F=*y
    RLA xRotate left accumulator x bitsA<<=x; F=A
    RR y xRotate right register x bits*y>>=x; F=*y
    RRA xRotate right accumulator x bitsA>>=x; F=A
    STA yStore accumulator in registery=A
    SUB xSubtract x from accumulatorA-=x; F=A
    SYS strRun external script (/opt/pigpio/cgi/str)system(str); F=A
    TAG LLabel the current script positionN/A
    WAIT xWait for a GPIO in x to change stateA=wait(x); F=A
    X y1 y2Exchange contents of registers y1 and y2t=*y1;*y1=*y2;*y2=t
    XA yExchange contents of accumulator and registert=A;A=*y;*y=t
    XOR xXor x with accumulatorA^=x; F=A


    x may be a constant, a parameter (p0-p9), or a variable (v0-v149).

    y may be a parameter (p0-p9), or a variable (v0-v149). If p or v isn't specified y is assumed to be a variable.

    The EVTWT command parameter is a bit-mask with 1 set for events of interest.

    The WAIT command parameter is a bit-mask with 1 set for GPIO of interest.

    The SYS script receives two unsigned parameters: the accumulator A and the current GPIO levels.

    ommands are only used on safe GPIO.

    See g

    uvs - values

    The command expects an arbitrary number of >=0 values (possibly none). Any after the first two must be <= 255.

    v - value

    The command expects a number.

    wid - wave id (>=0)

    The command expects a wave id.

    When a waveform is created it is given an id (0, 1, 2, ...).

    wmde - mode (0-3)

    The command expects a wave transmission mode.

    0 = send once
    1 = send repeatedly
    2 = send once but first sync with previous wave
    3 = send repeatedly but first sync with previous wave

    ws - wave stats sucommand (0-2)

    The command expects a subcommand.

    0 = current value.
    1 = highest value so far.
    2 = maximum possible value.

    wv - word value (0-65535)

    The command expects a word value.

    Scripts

    Scripts are programs to be stored and executed by the pigpio daemon. They are intended to mitigate any performance problems associated with the pigpio daemon server/client model.

    Example

    A trivial example might be useful. Suppose you want to toggle a GPIO on and off as fast as possible.

    From the command line you could write

    for ((i=0; i<1000;i++)); do pigs w 22 1 w 22 0; done


    Timing that you will see it takes about 14 seconds, or roughly 70 toggles per second.

    Using the pigpio Python module you could use code such as

    #!/usr/bin/env python

    import time

    import pigpio

    PIN=4

    TOGGLE=10000

    pi = pigpio.pi() # Connect to local Pi.

    s = time.time()

    for i in range(TOGGLE):
       pi.write(PIN, 1)
       pi.write(PIN, 0)

    e = time.time()

    print("pigpio did {} toggles per second".format(int(TOGGLE/(e-s))))

    pi.stop()


    Timing that shows a speed improvement to roughly 800 toggles per second.

    Now let's use a script.

    pigs proc tag 999 w 22 1 w 22 0 dcr p0 jp 999


    Ignore the details for now.

    Let's time the script running.

    Again, ignore the details for now.

    time (pigs procr 0 10000000; while a=$(pigs procp 0); [[ ${a::1} -eq 2 ]];\
     do sleep 0.2; done)


    The script takes roughly 12 seconds to complete, or 800,000 toggles per second.

    That is the advantage of a stored script.

    Some details.

    pigs proc tag 999 w 22 1 w 22 0 dcr p0 jp 999


    proc introduces a script. Everything after proc is part of the script.
    tag 999 names the current position in the script.
    w 22 1 writes 1 to GPIO 22.
    w 22 0 writes 0 to GPIO 22.
    dcr p0 decrements parameter 0.
    jp 999 jumps to tag 999 if the result is positive.

    time (pigs procr 0 10000000; while a=$(pigs procp 0); [[ ${a::1} -eq 2 ]];\
     do sleep 0.2; done)


    pigs procr 0 10000000 starts script 0 with parameter 0 of 10 million.

    The rest is bash apart from

    pigs procp 0 asks for the status and parameters of script 0. The status will be 2 while the script is running and 1 when it is complete.

    Virtual machine

    A script runs within a virtual machine with

    a 32 bit accumulator A.
    a flags register F.
    a program counter PC.

    Each script has

    10 parameters named 0 through 9.
    150 variables named 0 through 149.
    50 labels which are named by any unique nullback may have happened several milliseconds before and the GPIO may have changed level many times since then.

    The tick value is the time stamp of the sample in microseconds, see gpioTick for more details.

    Example

    void aFunction(int gpio, int level, uint32_t tick)
    {
       printf("GPIO %d became %d at %d", gpio, level, tick);
    }

    // call aFunction whenever GPIO 4 changes state

    gpioSetAlertFunc(4, aFunction);

    int gpioSetAlertFuncEx(unsigned user_gpio, gpioAlertFuncEx_t f, void *userdata)

    Registers a function to be called (a callback) when the specified GPIO changes state.

    user_gpio: 0-31
            f: the callback function
     userdata: pointer to arbitrary user data


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO.

    One callback may be registered per GPIO.

    The callback is passed the GPIO, the new level, the tick, and the userdata pointer.

    Parameter   Value    Meaning

    GPIO        0-31     The GPIO which has changed state

    level       0-2      0 = change to low (a falling edge)
                         1 = change to high (a rising edge)
                         2 = no level change (a watchdog timeout)

    tick        32 bit   The number of microseconds since boot
                         WARNING: this wraps around from
                         4294967295 to 0 roughly every 72 minutes

    userdata    pointer  Pointer to an arbitrary object


    See gpioSetAlertFunc for further details.

    Only one of gpioSetAlertFunc or gpioSetAlertFuncEx can be registered per GPIO.

    int gpioSetISRFunc(unsigned gpio, unsigned edge, int timeout, gpioISRFunc_t f)

    Registers a function to be called (a callback) whenever the specified GPIO interrupt occurs.

       gpio: 0-53
       edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE
    timeout: interrupt timeout in milliseconds (<=0 to cancel)
          f: the callback function


    Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_EDGE, or PI_BAD_ISR_INIT.

    One function may be registered per GPIO.

    The function is passed the GPIO, the current level, and the current tick. The level will be PI_TIMEOUT if the optional interrupt timeout expires.

    Parameter   Value    Meaning

    GPIO        0-53     The GPIO which has changed state

    level       0-2      0 = change to low (a falling edge)
                         1 = change to high (a rising edge)
                         2 = no level change (interrupt timeout)

    tick        32 bit   The number of microseconds since boot
                         WARNING: this wraps around from
                         4294967295 to 0 roughly every 72 minutes


    The underlying Linux sysfs GPIO interface is used to provide the interrupt services.

    The first time the function is called, with a non-NULL f, the GPIO is exported, set to be an input, and set to interrupt on the given edge and timeout.

    Subsequent calls, with a non-NULL f, can vary one or more of the edge, timeout, or function.

    The ISR may be cancelled by passing a NULL f, in which case the GPIO is unexported.

    The tick is that read at the time the process was informed of the interrupt. This will be a variable number of microseconds after the interrupt occurred. Typically the latency will be of the order of 50 microseconds. The latency is not guaranteed and will vary with system load.

    The level is that read at the time the process was informed of the interrupt, or PI_TIMEOUT if the optional interrupt timeout expired. It may not be the same as the expected edge as interrupts happening in rapid succession may be missed by the kernel (i.e. this mechanism can not be used to capture several interrupts only a few microseconds apart).

    int gpioSetISRFuncEx(unsigned gpio, unsigned edge, int timeout, gpioISRFuncEx_t f, void *userdata)

    Registers a function to be called (a callback) whenever the specified GPIO interrupt occurs.

        gpio: 0-53
        edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE
     timeout: interrupt timeout in milliseconds (<=0 to cancel)
           f: the callback function
    userdata: pointer to arbitrary user data


    Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_EDGE, or PI_BAD_ISR_INIT.

    The function is passed the GPIO, the current level, the current tick, and the userdata pointer.

    Parameter   Value    Meaning

    GPIO        0-53     The GPIO which has changed state

    level       0-2      0 = change to low (a falling edge)
                 &nbsp;       1 = change to high (a rising edge)
                         2 = no level change (interrupt timeout)

    tick        32 bit   The number of microseconds since boot
                         WARNING: this wraps around from
                         4294967295 to 0 roughly every 72 minutes

    userdata    pointer  Pointer to an arbitrary object


    Only one of gpioSetISRFunc or gpioSetISRFuncEx can be registered per GPIO.

    See gpioSetISRFunc for further details.

    int gpioNotifyOpen(void)

    This function requests a free notification handle.

    Returns a handle greater than or equal to zero if OK, otherwise PI_NO_HANDLE.

    A notification is a method for being notified of GPIO state changes via a pipe or socket.

    Pipe notifications for handle x will be available at the pipe named /dev/pigpiox (where x is the handle number). E.g. if the function returns 15 then the notifications must be read from /dev/pigpio15.

    Socket notifications are returned to the socket which requested the handle.

    Example

    h = gpioNotifyOpen();

    if (h >= 0)
    {
       sprintf(str, "/dev/pigpio%d", h);

       fd = open(str, O_RDONLY);

       if (fd >= 0)
       {
          // Okay.
       }
       else
       {
          // Error.
       }
    }
    else
    {
       // Error.
    }

    int gpioNotifyOpenWithSize(int bufSize)

    This function requests a free notification handle.

    It differs from gpioNotifyOpen in that the pipe size may be specified, whereas gpioNotifyOpen uses the default pipe size.

    See gpioNotifyOpen for further details.

    int gpioNotifyBegin(unsigned handle, uint32_t bits)

    This function starts notifications on a previously opened handle.

    handle: >=0, as returned by gpioNotifyOpen
      bits: a bit mask indicating the GPIO of interest


    Returns 0 if OK, otherwise PI_BAD_HANDLE.

    The notification sends state changes for each GPIO whose corresponding bit in bits is set.

    Each notification occupies 12 bytes in the fifo and has the following structure.

    typedef struct
    {
       uint16_t seqno;
       uint16_t flags;
       uint32_t tick;
       uint32_t level;
    } gpioReport_t;


    seqno: starts at 0 each time the handle is opened and then increments by one for each report.

    flags: three flags are defined, PI_NTFY_FLAGS_W^DOG, PI_NTFY_FLAGS_ALIVE, and PI_NTFY_FLAGS_EVENT.

    If bit 5 is set (PI_NTFY_FLAGS_WDOG) then bits 0-4 of the flags indicate a GPIO which has had a watchdog timeout.

    If bit 6 is set (PI_NTFY_FLAGS_ALIVE) this indicates a keep alive signal on the pipe/socket and is sent once a minute in the absence of other notification activity.

    If bit 7 is set (PI_NTFY_FLAGS_EVENT) then bits 0-4 of the flags indicate an event which has been triggered.

    tick: the number of microseconds since system boot. It wraps around after 1h12m.

    level: indicates the level of each GPIO. If bit 1<<x is set then GPIO x is high.

    Example

    // Start notifications for GPIO 1, 4, 6, 7, 10.

    //                         1
    //                         0  76 4  1
    // (1234 = 0x04D2 = 0b0000010011010010)

    gpioNotifyBegin(h, 1234);

    int gpioNotifyPause(unsigned handle)

    This function pauses notifications on a previously opened handle.

    handle: >=0, as returned by gpioNotifyOpen


    Returns 0 if OK, otherwise PI_BAD_HANDLE.

    Notifications for the handle are suspended until gpioNotifyBegin is called again.

    Example

    gpioNotifyPause(h);

    int gpioNotifyClose(unsigned handle)

    This function stops notifications on a previously opened handle and releases the handle for reuse.

    handle: >=0, as returned by gpioNotifyOpen


    Returns 0 if OK, otherwise PI_BAD_HANDLE.

    Example

    gpioNotifyClose(h);

    int gpioWaveClear(void)

    This function clears all waveforms and any data added by calls to the gpioWaveAdd* functions.

    Returns 0 if OK.

    Example

    gpioWaveClear();

    int gpioWaveAddNew(void)

    This function starts a new empty waveform.

    You wouldn't normally need to call this function as it is automatically called after a waveform is created with the gpioWaveCreate function.

    Returns 0 if OK.

    Example

    gpioWaveAddNew();

    int gpioWaveAddGeneric(unsigned numPulses, gpioPulse_t *pulses)

    This function adds a number of pulses to the current waveform.

    numPulses: the number of pulses
       pulses: an array of pulses


    Returns the new total number of pulses in the current waveform if OK, otherwise PI_TOO_MANY_PULSES.

    The pulses are interleaved in time order within the existing waveform (if any).

    Merging allows the waveform to be built in parts, that is the settings for GPIO#1 can be added, and then GPIO#2 etc.

    If the added waveform is intended to start after or within the existing waveform then the first pulse should consist of a delay. l> callback_ex(int pi, unsigned user_gpio, unsigned edge, CBFuncEx_t f, void *userdata) This function initialises a new callback.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31.
         edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE.
            f: the callback function.
     userdata: a pointer to arbitrary user data.


    The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback.

    The callback is called with the GPIO, edge, tick, and the userdata pointer, whenever the GPIO has the identified edge.

    Parameter   Value    Meaning

    GPIO        0-31     The GPIO which has changed state

    edge        0-2      0 = change to low (a falling edge)
                         1 = change to high (a rising edge)
                         2 = no level change (a watchdog timeout)

    tick        32 bit   The number of microseconds since boot
                         WARNING: this wraps around from
                         4294967295 to 0 roughly every 72 minutes

    userdata    pointer  Pointer to an arbitrary object

    int callback_cancel(unsigned callback_id)

    This function cancels a callback identified by its id.

    callback_id: >=0, as returned by a call to callback or callback_ex.


    The function returns 0 if OK, otherwise pigif_callback_not_found.

    int wait_for_edge(int pi, unsigned user_gpio, unsigned edge, double timeout)

    This function waits for an edge on the GPIO for up to timeout seconds.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31.
         edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE.
      timeout: >=0.


    The function returns when the edge occurs or after the timeout.

    Do not use this function for precise timing purposes, the edge is only checked 20 times a second. Whenever you need to know the accurate time of GPIO events use a callback function.

    The function retusp;0)
       {
          buf[c] = 0;
          printf("%s", buf);
       }

       pigpio_stop(pi);
    }

    int callback(int pi, unsigned user_gpio, unsigned edge, CBFunc_t f)

    This function initialises a new callback.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31.
         edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE.
            f: the callback function.


    The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback.

    The callback is called with the GPIO, edge, and tick, whenever the GPIO has the identified edge.

    Parameter   Value    Meaning

    GPIO        0-31     The GPIO which has changed state

    edge        0-2      0 = change to low (a falling edge)
                         1 = change to high (a rising edge)
                         2 = no level change (a watchdog timeout)

    tick        32 bit   The number of microseconds since boot
                         WARNING: this wraps around from
                         4294967295 to 0 roughly every 72 minutes


    The GPIO are sampled at a rate set when the pigpio daemon is started (default 5 us).

    The number of samples per second is given in the following table.

                  samples
                  per sec

             1  1,000,000
             2    500,000
    sample   4    250,000
    rate     5    200,000
    (us)     8    125,000
            10    100,000


    GPIO level changes shorter than the sample rate may be missed.

    The daemon software which generates the callbacks is triggered 1000 times per second. The callbacks will be called once per level change since the last time they were called. i.e. The callbacks will get all level changes but there will be a latency.

    If you want to track the level of more than one GPIO do so by maintaining the state in the callback. Do not use gpio_read. Remember the event that triggered the callback may have happened several milliseconds before and the GPIO may have changed level many times since then.

    int

    Returns the number of bytes read (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_FILE_NOT_ROPEN, or PI_BAD_FILE_WRITE.

    Example

       bytes = file_read(pi, handle, buf, sizeof(buf));

       if (bytes >= 0)
       {
          // process read data
       }

    int file_seek(int pi, unsigned handle, int32_t seekOffset, int seekFrom)

    This function seeks to a position within the file associated with handle.

            pi: >=0 (as returned by pigpio_start).
        handle: >=0 (as returned by file_open).
    seekOffset: the number of bytes to move.  Positive offsets
                move forward, negative offsets backwards.
      seekFrom: one of PI_FROM_START (0), PI_FROM_CURRENT (1),
                or PI_FROM_END (2).


    Returns the new byte position within the file (>=0) if OK, otherwise PI_BAD_HANDLE, or PI_BAD_FILE_SEEK.

    Example

    file_seek(pi, handle, 123, PI_FROM_START); // Start plus 123

    size = file_seek(pi, handle, 0, PI_FROM_END); // End, return size

    pos = file_seek(pi, handle, 0, PI_FROM_CURRENT); // Current position

    int file_list(int pi, char *fpat, char *buf, unsigned count)

    This function returns a list of files which match a pattern.

       pi: >=0 (as returned by pigpio_start).
     fpat: file pattern to match.
      buf: an array to receive the matching file names.
    count: the maximum number of bytes to read.


    Returns the number of returned bytes if OK, otherwise PI_NO_FILE_ACCESS, or PI_NO_FILE_MATCH.

    The pattern must match an entry in /opt/pigpio/access. The pattern may contain wildcards. See file_open.

    NOTE

    The returned value is not the number of files, it is the number of bytes in the buffer. The file names are separated by newline characters.

    Example

    #include <stdio.h>
    #include <pigpiod_if2.h>

    int main(int argc, char *argv[])
    {
       int pi, handle, c;
       char buf[60000];

       pi = pigpio_start(NULL, NULL);

       if (pi < 0) return 1;

       // assumes /opt/pigpio/access contains the following line
       // /ram/*.c r

       c = file_list(pi, "/ram/p*.c", buf, sizeof(buf));

       if (c >=&nb>PI_FILE_CREATE8The file is created if it doesn't existPI_FILE_TRUNC16The file is truncated

    Newly created files are owned by root with permissions owner read and write.

    Example

    #include <stdio.h>
    #include <pigpiod_if2.h>

    int main(int argc, char *argv[])
    {
       int pi, handle, c;
       char buf[60000];

       pi = pigpio_start(NULL, NULL);

       if (pi < 0) return 1;

       // assumes /opt/pigpio/access contains the following line
       // /ram/*.c r

       handle = file_open(pi, "/ram/pigpio.c", PI_FILE_READ);

       if (handle >= 0)
       {
          while ((c=file_read(pi, handle, buf, sizeof(buf)-1)))
          {
             buf[c] = 0;
             printf("%s", buf);
          }

          file_close(pi, handle);
       }

       pigpio_stop(pi);
    }

    int file_close(int pi, unsigned handle)

    This function closes the file associated with handle.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0 (as returned by file_open).


    Returns 0 if OK, otherwise PI_BAD_HANDLE.

    Example

    file_close(pi, handle);

    int file_write(int pi, unsigned handle, char *buf, unsigned count)

    This function writes count bytes from buf to the the file associated with handle.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0 (as returned by file_open).
       buf: the array of bytes to write.
     count: the number of bytes to write.


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_FILE_NOT_WOPEN, or PI_BAD_FILE_WRITE.

    Example

    if (file_write(pi, handle, buf, 100) == 0)
    {
       // file written okay
    }
    else
    {
       // error
    }

    int file_read(int pi, unsigned handle, char *buf, unsigned count)

    This function reads up to count bytes from the the file associated with handle and writes them to buf.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0 (as returned by file_open).
       buf: an array to receive the read data.
     cound if OK, otherwise PI_BAD_SHELL_STATUS.

    scriptName must exist in /opt/pigpio/cgi and must be executable.

    The returned exit status is normally 256 times that set by the shell script exit function. If the script can't be found 32512 will be returned.

    The following table gives some example returned statuses.

    Script exit statusReturned system call status
    1256
    51280
    102560
    20051200
    script not found32512


    Example

    // pass two parameters, hello and world
    status = shell_(pi, "scr1", "hello world");

    // pass three parameters, hello, string with spaces, and world
    status = shell_(pi, "scr1", "hello 'string with spaces' world");

    // pass one parameter, hello string with spaces world
    status = shell_(pi, "scr1", "\"hello string with spaces world\"");

    int file_open(int pi, char *file, unsigned mode)

    This function returns a handle to a file opened in a specified mode.

      pi: >=0 (as returned by pigpio_start).
    file: the file to open.
    mode: the file open mode.


    Returns a handle (>=0) if OK, otherwise PI_NO_HANDLE, PI_NO_FILE_ACCESS, PI_BAD_FILE_MODE, PI_FILE_OPEN_FAILED, or PI_FILE_IS_A_DIR.

    File

    A file may only be opened if permission is granted by an entry in /opt/pigpio/access. This is intended to allow remote access to files in a more or less controlled manner.

    Each entry in /opt/pigpio/access takes the form of a file path which may contain wildcards followed by a single letter permission. The permission may be R for read, W for write, U for read/write, and N for no access.

    Where more than one entry matches a file the most specific rule applies. If no entry matches a file then access is denied.

    Suppose /opt/pigpio/access contains the following entries

    /home/* n
    /home/pi/shared/dir_1/* w
    /home/pi/shared/dir_2/* r
    /home/pi/shared/dir_3/* u
    /home/pi/shared/dir_1/file.txt n


    Files may be written in directory dir_1 with the exception of file.txt.

    Files may be read in directory dir_2.

    Files may be read and written in directory dir_3.

    If a directory allows read, write, or read/write access then files may be created in that directory.

    In an attempt to prevent risky permissions the following paths are ignored in /opt/pigpio/access.

    a path containing ..
    a path containing only wildcards (*?)
    a path containing less than two non-wildcard parts


    Mode

    The mode may have the following values.

    MacroValueMeaning
    PI_FILE_READ1open file for reading
    PI_FILE_WRITE2open file for writing
    PI_FILE_RW3open file for reading and writing


    The following values may be or'd into the mode.

    int pi, unsigned arg1, char *argx, unsigned argc, char *retBuf, unsigned retMax) This function is available for user customisation.

    It differs from custom_1 in that it returns an array of bytes rather than just an integer.

    The return value is an integer indicating the number of returned bytes.     pi: >=0 (as returned by pigpio_start).
      arg1: >=0
      argc: extra (byte) arguments
     count: number of extra arguments
    retBuf: buffer for returned data
    retMax: maximum number of bytes to return


    Returns >= 0 if OK, less than 0 indicates a user defined error.

    Note, the number of returned bytes will be retMax or less.

    int get_pad_strength(int pi, unsigned pad)

    This function returns the pad drive strength in mA.

     pi: >=0 (as returned by pigpio_start).
    pad: 0-2, the pad to get.


    Returns the pad drive strength if OK, otherwise PI_BAD_PAD.

    MacroValueMeaning
    PI_FILE_APPEND4Writes append data to the end of the file
    PadGPIO
    00-27
    128-45
    246-53


    Example

    strength = get_pad_strength(pi, 0); //  get pad 0 strength

    int set_pad_strength(int pi, unsigned pad, unsigned padStrength)

    This function sets the pad drive strength in mA.

             pi: >=0 (as returned by pigpio_start).
            pad: 0-2, the pad to set.
    padStrength: 1-16 mA.


    Returns 0 if OK, otherwise PI_BAD_PAD, or PI_BAD_STRENGTH.

    PadGPIO
    00-27
    128-45
    246-53


    Example

    set_pad_strength(pi, 0, 10); // set pad 0 strength to 10 mA

    int shell_(int pi, char *scriptName, char *scriptString)

    This function uses the system call to execute a shell script with the given string as its parameter.

              pi: >=0 (as returned by pigpio_start).
      scriptName: the name of the script, only alphanumeric characters,
                  '-' and '_' are allowed in the name.
    scriptString: the string to pass to the script.


    The exit status of the system call is returnel>

    This function reads a byte from the serial port associated with handle.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0, as returned by a call to serial_open.


    Returns the read byte (>=0) if OK, otherwise PI_BAD_HANDLE, PI_SER_READ_NO_DATA, or PI_SER_READ_FAILED.

    If no data is ready PI_SER_READ_NO_DATA is returned.

    int serial_write(int pi, unsigned handle, char *buf, unsigned count)

    This function writes count bytes from buf to the the serial port associated with handle.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0, as returned by a call to serial_open.
       buf: the array of bytes to write.
     count: the number of bytes to write.


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED.

    int serial_read(int pi, unsigned handle, char *buf, unsigned count)

    This function reads up to count bytes from the the serial port associated with handle and writes them to buf.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0, as returned by a call to serial_open.
       buf: an array to receive the read data.
     count: the maximum number of bytes to read.


    Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_SER_READ_NO_DATA, or PI_SER_WRITE_FAILED.

    If no data is ready zero is returned.

    int serial_data_available(int pi, unsigned handle)

    Returns the number of bytes available to be read from the device associated with handle.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0, as returned by a call to serial_open.


    Returns the number of bytes of data available (>=0) if OK, otherwise PI_BAD_HANDLE.

    int custom_1(int pi, unsigned arg1, unsigned arg2, char *argx, unsigned argc)

    This function is available for user customisation.

    It returns a single integer value.

      pi: >=0 (as returned by pigpio_start).
    arg1: >=0
    arg2: >=0
    argx: extra (byte) arguments
    argc: number of extra arguments


    Returns >= 0 if OK, less than 0 indicates a user defined error.

    int custom_2(<L is high. The start and stop sequences mark the beginning and end of a transaction with the slave device.

    I2C start and stop sequences

    Data is transferred in 8-bit bytes. The bytes are placed on the SDA line starting with the most significant bit. The SCL line is then pulsed high, then low. For every byte transferred, the device receiving the data sends back an acknowledge bit, so there are actually 9 SCL clock pulses to transfer each 8-bit byte of data. If the receiving device sends back a low ACK bit, then it has received the data and is ready to accept another byte. If it sends back a high then it is indicating it cannot accept any further data and the master should terminate the transfer by sending a stop sequence.

    I2C waveform

    What is Serial?

    Serial is a data link between the Pi and one other device.

    Data may be sent and received.  Either the Pi or the device can initiate a transfer.

    Serial is a low to medium speed link.  On the Pi speeds of 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, and 230400 bps may be used.

    Serial is implemented with one line for transmit called TXD and one line for receive called RXD.

    If only receive or transmit are required the other line need not be connected.

    The Pi uses GPIO 14 (pin 8) for TXD and GPIO 15 (pin 10) for RXD.

    Data is normally transmitted in 8-bit bytes with a start bit, eight data bits, no parity, and one stop bit.  This is represented as 8N1.  The number of transmitted bits per second (bps) is called the baud rate.   The time for each bit, 1 / baud rate seconds, is referred to as the bit period.

    The lines are in the high state when no data is being transmitted.  The start of a byte is signalled by the line going low for one bit period (the start bit).  The data bits are then sent least significant bit firsts (low if the bit is 0, high if the bit is 1).  The data bits are followed by the optional parity bit.  Finally the line is set high for at least the number of stop bit periods.  The line will stay high if there are no more bytes to be transmitted.

    Serial waveform

    What is SPI?

    SPI is a data link between the Pi (master) and one or more slaves.

    Data may be sent and received but the Pi initiates all transfers.

    SPI is a medium to high speed link.  On the Pi speeds of 32 kbps to 8 Mbps may be used.

    SPI is implemented as a bus with three lines called

    • MOSI - for data from the Pi to the slave
    • MISO - for data from the slave to the Pi
    • SCLK - for a clock
    Only one slave device may be communicated with at a time.  An additional line per slave called slave select is used to identify the slave to be addressed.

    The Pi has two SPI buses

    1. the main SPI bus
      • MOSI GPIO 10 (pin 19)
      • MISO GPIO 9 (pin 21)
      • SCLK GPIO 11 (pin 23)
      • Slave selects
        • CE0 GPIO 8 (pin 24)
        • CE1 GPIO 7 (pin 26)
    2. the auxiliary SPI bus
      • MOSI GPIO 20 (pin 38)
      • MISO GPIO 19 (pin 35)
      • SCLK GPIO 21 (pin 40)
      • Slave selects
        • CE0 GPIO 18 (pin 12)
        • CE1 GPIO 17 (pin 11)
        • CE2 GPIO 16 (pin 36)

    SPI waveform


    Which library should I use?


    s %d\n", GPIO, level); gpioTerminate(); }

    Build

    gcc -pthread -o read_cif read_cif.c -lpigpio

    Run

    sudo ./read_cif

    C via pigpio daemon

    read_pdif.c
    #include <stdio.h>
    #include <pigpiod_if2.h>
    
    int main(int argc, char *argv[])
    {
       int pi;
       int GPIO=4;
       int level;
    
       pi = pigpio_start(0, 0); /* Connect to local Pi. */
    
       if (pi < 0)
       {
          printf("Can't connect to pigpio daemon\n");
          return 1;
       }
    
       level = gpio_read(pi, GPIO);
    
       printf("GPIO %d is %d\n", GPIO, level);
    
       pigpio_stop(pi); /* Disconnect from local Pi. */
       
       return 0;
    }
    

    Build

    gcc -pthread -o read_pdif read_pdif.c -lpigpiod_if2

    Run

    ./read_pdif

    Python

    read_gpio.py
    #!/usr/bin/env python
    
    import pigpio
    
    GPIO=4
    
    pi = pigpio.pi()
    if not pi.connected:
       exit()
    
    level = pi.read(GPIO)
    
    print("GPIO {} is {}".format(GPIO, level))
    
    pi.stop()
        

    Run

    python read_gpio.py

    pigs

    pigs r 4
        

    pipe I/F

    echo "r 4" >/dev/pigpio
    cat /dev/pigout
        

    make fails with clock skew

    If make fails with one of the following messages it is probably because the Pi's clock is wrong.

    make: Warning: File 'xxx' has modification time x s in the future
    make: warning: Clock skew detected. Your build may be incomplete.

    make uses the current time to work out which files need to be rebuilt (a file is rebuilt if it depends on other files which have a later time-stamp).

    The solution is to make sure the system clock is correct.  If the Pi is networked this will not normally be a problem.

    To set the date and time use the date command as in the following example.

    sudo date -d "2017-03-01 18:47:00"

    Porting pigpio to another CPU/SoC

    Sound isn't working

    The Pi contains two pieces of hardware, a PWM peripheral and a PCM peripheral, to generate sound.  The PWM peripheral is normally used and generates medium quality audio out of the headphone jack.  The PCM peripheral may be used by add-ons such as HATs and generates high quality audio.

    pigpio uses at least one of these peripherals during normal operation (for timing DMA transfers).  pigpio will use both peripherals if waves or the hardware PWM function is used.

    By default pigpio uses the PCM peripheral leaving the PWM peripheral free for medium quality audio.

    You can change the default with a configuration option.  For C use gpioCfgClock, for the pigpio daemon use the -t option.

    What is I2C?

    I2C is a data link between the Pi (master) and one or more slaves.

    Data may be sent and received but the Pi initiates all transfers.

    I2C is a medium speed link.  On the Pi the default speed is 100 kbps, but 400 kbps also works.

    I2C is implemented as a bus with two lines called

    • SDA - for data
    • SCL - for a clock
    On the Pi bus 1 is used which uses GPIO 2 (pin 3) for SDA and GPIO 3 (pin 5) for SCL.

    Only one slave device may be communicated with at a time.  Each message from the Pi includes the slave to be addressed and whether a read or write is to be performed.

    When the Pi (master) wishes to talk to a slave it begins by issuing a start sequence on the I2C bus. A start sequence is one of two special sequences defined for the I2C bus, the other being the stop sequence. The start sequence and stop sequence are special in that these are the only places where the SDA (data line) is allowed to change while the SCL (clock line) is high. When data is being transferred, SDA must remain stable and not change whilst SC.

    This program checks the Pi's (user) gpios.
    
    The program reads and writes all the gpios. Make sure NOTHING
    is connected to the gpios during this test.
    
    The program uses the pigpio daemon which must be running.
    
    To start the daemon use the command sudo pigpiod.
    
    Press the ENTER key to continue or ctrl-C to abort...
    
    Testing...
    Write 1 to gpio 17 failed.
    Pull up on gpio 17 failed.
    Write 1 to gpio 18 failed.
    Pull up on gpio 18 failed.
    Write 0 to gpio 23 failed.
    Pull down on gpio 23 failed.
    Write 0 to gpio 24 failed.
    Pull down on gpio 24 failed.
    Write 1 to gpio 27 failed.
    Pull up on gpio 27 failed.
    Skipped non-user gpios: 0 1 28 29 30 31
    Tested user gpios: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
    19 20 21 22 23 24 25 26 27 Failed user gpios: 17 18 23 24 27

    How do I debounce inputs?

    Some devices like mechanical switches can generate multiple interrupts as they bounce between on and off.  It is possible to debounce the inputs in hardware by the correct use of resistors and capacitors.

    In software use the glitch filter which ignores all events shorter than a set number of microseconds.  C gpioGlitchFilter, Python set_glitch_filter.

    How fast is SPI?

    The SPI throughput in samples per second depends on a number of factors.

    • The SPI bit rate (transfer rate in bits per second)
    • The number of bytes transferred per sample (a 12 bit ADC sample may require 3 bytes to transfer)
    • The driver used

    Two of those factors are fixed, the variable is the driver used.

    The pigpio driver is considerably faster than the Linux SPI driver as is demonstrated by the following graphs.

    Each graph shows the SPI bit rate in bits per second along the horizontal axis.  The samples per second achieved is shown on the vertical axis.  Each graph contains plots assuming 1 to 5 bytes per transfer.

    The source code used for the tests is spi-driver-speed.c and spi-pigpio-speed.c

    spi-lnx-pibr1.png


    spi-pig-pibr1.png


    spi-lnx-pi3b.png


    spi-pig-pi3b.png

    Library update didn't work

    pigpio places files in the following locations

    /usr/local/include (pigpio.h, pigpiod_if.h, pigpiod_if2.h)
    /usr/local/lib (libpigpio.so, libpigpiod_if.so, libpigpiod_if2.so)
    /usr/local/bin (pig2vcd, pigpiod, pigs)
    /usr/local/man (man pages)

    The raspberrypi.org image containing pigpio uses different locations.

    /usr/include (pigpio.h, pigpiod_if.h, pigpiod_if2.h)
    /usr/lib (libpigpio.so, libpigpiod_if.so, libpigpiod_if2.so)
    /usr/bin (pig2vcd, pigpiod, pigs)
    /usr/man (man pages)

    Mostly this doesn't matter as the /usr/local directories will generally be earlier in the search path.  The pigpio built includes, binaries, and manuals are normally found first.

    However the wrong libraries may be linked during the compilation.  If this is the case remove the /usr/lib entries for libpigpio.so , libpigpiod_if.so, and libpigpiod_if2.so

    Hello World!

    The following examples show how to use the various components of the pigpio library.

    Each example shows how to read the level of a GPIO.

    C

    read_cif.c
    #include <stdio.h>
    #include <pigpio.h>
    
    int main(int argc, char *argv[])
    {
       int GPIO=4;
       int level;
    
       if (gpioInitialise() < 0) return 1;
    
       level = gpioRead(GPIO);
    
       printf("GPIO %d i is ground.

    photo of set-up

    CODE

    #include <stdio.h>

    #include <pigpio.h>

    /*

    P1  Name  gpio    used for

     2  5V    ---     5V
     6  GND   ---     Ground
    24  CE0   8       Sonar echo
    26  CE1   7       Sonar trigger

    */

    #define SONAR_TRIGGER 7
    #define SONAR_ECHO    8

    /* forward prototypes */

    void sonarTrigger(void);

    void sonarEcho(int gpio, int level, uint32_t tick);

    int main(int argc, char *argv[])
    {
       if (gpioInitialise()<0) return 1;

       gpioSetMode(SONAR_TRIGGER, PI_OUTPUT);
       gpioWrite  (SONAR_TRIGGER, PI_OFF);

       gpioSetMode(SONAR_ECHO,    PI_INPUT);

       /* update sonar 20 times a second, timer #0 */

       gpioSetTimerFunc(0, 50, sonarTrigger); /* every 50ms */

       /* monitor sonar echos */

       gpioSetAlertFunc(SONAR_ECHO, sonarEcho);

       while (1) sleep(1);

       gpioTerminate();

       return 0;
    }

    void sonarTrigger(void)
    {
       /* trigger a sonar reading */

       gpioWrite(SONAR_TRIGGER, PI_ON);

       gpioDelay(10); /* 10us trigger pulse */

       gpioWrite(SONAR_TRIGGER, PI_OFF);
    }

    void sonarEcho(int gpio, int level, uint32_t tick)
    {
       static uint32_t startTick, firstTick=0;

       int diffTick;

       if (!firstTick) firstTick = tick;

       if (level == PI_ON)
       {
          startTick = tick;
       }
       else if (level == PI_OFF)
       {
          diffTick = tick - startTick;

          printf("%u %u\ ", tick-firstTick, diffTick);
       }
    }

    BUILD

    cc -o sonar sonar.c -lpigpio -lrt -lpthread

    RUN

    sudo ./sonar >sonar.dat &

    While the program is running you can capture the waveform using the notification feature built in to pigpio.  Issue the following commands on the Pi.

    pigs no
    pig2vcd  </dev/pigpio0 >sonar.vcd &
    pigs nb 0 0x180 # set bits for gpios 7 and 8

    Move an object in front of the sonar ranger for a few seconds.

    pigs nc 0

    The file sonar.vcd will contain the captured waveform, which can be viewed using GTKWave.

    Overview

    LDR waveform 1

    Reading circa every 10ms

    Sonar waveform 2

    One reading, circa 400us

    Sonar waveform 3

    another

    Sonar waveform 4

    The file sonar.dat will contain pairs of timestamps and echo length (in us).  The following  script will convert the timestamps into seconds.

    awk '{print $1/1000000, $2}' sonar.dat >sonar-secs.dat

    Gnuplot is a useful tool to graph data.

    plot 'sonar-secs.dat' title 'Sonar'

    gnuplot 1
     plot [10:25] 'sonar-secs.dat' title 'Sonar'

    gnuplot 1

    can be configured to use or not use an internal pull up or pull down resistor. This is useful to provide a default state for inputs.

    A pull up will default the input to 1 (high).

    A pull down will default the input to 0 (low).

    To set the pull up down state use the command character for the state.

    Pull Up DownOffPull DownPull Up
    Command CharacterODU


    There is no mechanism to read the pull up down state.

    pad - 0-2

    A set of GPIO which share common drivers.

    PadGPIO
    00-27
    128-45
    246-53

    padma - 1-16

    The mA which may be drawn from each GPIO whilst still guaranteeing the high and low levels.

    pars - script parameters

    The command expects 0 to 10 numbers as parameters to be passed to the script.

    pat - a file name pattern

    A file path which may contain wildcards. To be accessible the path must match an entry in /opt/pigpio/access.

    pdc - hardware PWM dutycycle (0-1000000)

    The command expects a dutycycle.

    percent - percent (1-100)

    The percent of wave resources to allocate to a wave. It can be useful to create waves of fixed sizes to prevent wave fragmentation (where there are plenty of resources but not a large enough contiguous space).

    pf - hardware PWM frequency (1-125M, 1-187.5M for the BCM2711)

    The command expects a frequency.

    pl - pulse length (1-100)

    The command expects a pulse length in microseconds.

    r - register (0-255)

    The command expects an I2C register number.

    sb - serial stop (half) bits (2-8)

    The command expects the number of stop (half) bits per serial character.

    scl - user GPIO (0-31)

    The command expects the number of the GPIO to be used for SCL when bit banging I2C.

    sclk - user GPIO (0-31)

    The GPIO used for the SCLK signal when bit banging SPI.

    sda - user GPIO (0-31)

    The command expects the number of the GPIO to be used for SDA when bit banging I2C.

    sef - serial flags (32 bits)

    The command expects a flag value. No serial flags are currently defined.

    sid - script id (>= 0)

    The command expects a script id as returned by a call to PROC.

    spf - SPI flags (32 bits)

    See SPIO and BSPIO.

    stdy - 0-300000

    The number of microseconds level changes must be stable for before reporting the level changed (FG) or triggering the active part of a noise filter (FN).

    str - a string

    The command expects a string.

    t - a string

    The command expects a string.

    trips - triplets

    The command expects 1 or more triplets of GPIO on, GPIO off, delay.

    E.g. 0x400000 0 100000 0 0x400000 900000 defines two pulses as follows

    GPIO onGPIO offdelay
    0x400000 (GPIO 22)0 (None)100000 (1/10th s)
    0 (None)0x400000 (GPIO 22)900000 (9/10th s)

    u - user GPIO (0-31)

    The command expects the number of a user GPIO.

    A number of commands are restricted to GPIO in bank 1, in particular the PWM commands, the servo command, the watchdog command, and the notification command.

    It is your responsibility to ensure that the PWM and servo c/td>16171819202122232425262728293031Type 1-XX--XXXXX------Type 2-XX---XXXX-XXXXXType 3XXXXXXXXXXXX----

    You are not prevented from writing to unsafe GPIO. The consequences of doing so range from no effect, to a crash, or corrupted data.

    h - handle (>=0)

    The command expects a handle.

    A handle is a number referencing an object opened by one of FO, I2CO, NO, SERO, SPIO.

    ib - I2C bus (>=0)

    The command expects an I2C bus number.

    id - I2C device (0-0x7F)

    The command expects the address of an I2C device.

    if - I2C flags (0)

    The command expects an I2C flags value. No flags are currently defined.

    L - level (0-1)

    The command expects a GPIO level.

    m - mode (RW540123)

    The command expects a mode character.

    Each GPIO can be configured to be in one of 8 different modes. The modes are named Input, Output, ALT0, ALT1, ALT2, ALT3, ALT4, and ALT5.

    To set the mode use the code for the mode.

    The value is returned by the mode get command.

    ModeInputOutputALT0ALT1ALT2ALT3ALT4ALT5
    CodeRW012345
    Value01456732

    miso - GPIO (0-31)

    The GPIO used for the MISO signal when bit banging SPI.

    mode - file open mode

    One of the following values.

    ValueMeaning
    READ1open file for reading
    WRITE2open file for writing
    RW3open file for reading and writing


    The following values can be or'd into the mode.

    ValueMeaning
    APPEND4All writes append data to the end of the file
    CREATE8The file is created if it doesn't exist
    TRUNC16The file is truncated

    mosi - GPIO (0-31)

    The GPIO used for the MOSI signal when bit banging SPI.

    name - the name of a script

    Only alphanumeric characters, '-' and '_' are allowed in the name.

    num - maximum number of bytes to return (1-)

    The command expects the maximum number of bytes to return.

    For the I2C and SPI commands the requested number of bytes will always be returned.

    For the serial and file commands the smaller of the number of bytes available to be read (which may be zero) and num bytes will be returned.

    o - offset (>=0)

    Serial data is stored offset microseconds from the start of the waveform.

    p - PUD (ODU)

    The command expects a PUD character.

    Each GPIO cancelled.

    Upon success the number of DMA control blocks in the waveform is returned. On error a negative status code will be returned.

    Example

    $ pigs wvtxr 1
    75

    $ pigs wvtxr 2
    -66
    ERROR: non existent wave id

    Parameters

    actv - 0-1000000

    The number of microseconds level changes are reported for once a noise filter has been triggered (by stdy microseconds of a stable level).

    b - baud

    The command expects the baud rate in bits per second for the transmission of serial data (I2C/SPI/serial link, waves).

    bctl - BSC control word

    The command expects a BSC control word, see BSCX.

    bit - bit value (0-1)

    The command expects 0 or 1.

    bits - a bit mask

    A mask is used to select one or more GPIO. A GPIO is selected if bit (1<<GPIO) is set in the mask.

    E.g. a mask of 6 (binary 110) select GPIO 1 and 2, a mask of 0x103 (binary 100000011) selects GPIO 0, 1, and 8.

    bv - a byte value (0-255)

    The command expects a byte value.

    bvs - byte values (0-255)

    The command expects one or more byte values.

    c - SPI channel (0-1)

    The command expects a SPI channel.

    cf - hardware clock frequency (4689-250M, 13184-375M for the BCM2711)

    The command expects a frequency.

    cs - GPIO (0-31)

    The GPIO used for the slave select signal when bit banging SPI.

    db - serial data bits (1-32)

    The command expects the number of data bits per serial character.

    dev - a tty serial device (/dev/tty* or /dev/serial*)

    The command expects the name of a tty serial device, e.g.

    /dev/ttyAMA0
    /dev/ttyUSB0
    /dev/tty0
    /dev/serial0

    event - 0-31

    An event is a signal used to inform one or more consumers to start an action.

    file - a file name

    The file name must match an entry in /opt/pigpio/access.

    from - 0-2

    Position to seek from FS.

    From
    0start
    1current position
    2end

    g - GPIO (0-53)

    The command expects a GPIO.

    There are 54 General Purpose Input Outputs (GPIO) named gpio0 through gpio53.

    They are split into two banks. Bank 1 consists of gpio0 through gpio31. Bank 2 consists of gpio32 through gpio53.

    All the GPIO which are safe for the user to read and write are in bank 1. Not all GPIO in bank 1 are safe though. Type 1 boards have 17 safe GPIO. Type 2 boards have 21. Type 3 boards have 26.

    See HWVER.

    The user GPIO are marked with an X in the following table.

    0123456789101112131415
    Type 1XX--X--XXXXX--XX
    Type 2--XXX--XXXXX--XX
    Type 3XXXXXXXXXXXXXX
    <sources as the current wave (see the C source for gpioWaveCreate for details).

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs wvdel 0

    $ pigs wvdel 0
    -66
    ERROR: non existent wave id

    WVHLT - Stop waveform

    This command aborts the transmission of the current waveform.

    Nothing is returned.

    This command is intended to stop a waveform started in the repeat mode.

    Example

    $ pigs wvhlt

    WVNEW - Initialise a new waveform

    This clears any existing waveform data ready for the creation of a new waveform.

    Nothing is returned.

    Example

    $ pigs wvnew

    WVSC ws - Get waveform DMA CB stats

    The statistic requested by ws is returned.

    ws identifies the subcommand as follows.

    0 Get Cbs
    1 Get High Cbs
    2 Get Max Cbs

    Example

    $ pigs wvas 4 9600 0 23 45 67 89 90
    37

    $ pigs wvsc 0
    74
    $ pigs wvsc 1
    74
    $ pigs wvsc 2
    25016

    WVSM ws - Get waveform time stats

    The statistic requested by ws is returned.

    ws identifies the subcommand as follows.

    0 Get Micros
    1 Get High Micros
    2 Get Max Micros

    Example

    $ pigs wvsm 0
    5314
    $ pigs wvsm 1
    5314
    $ pigs wvsm 2
    1800000000

    WVSP ws - Get waveform pulse stats

    The statistic requested by ws is returned.

    ws identifies the subcommand as follows.

    0 Get Pulses
    1 Get High Pulses
    2 Get Max Pulses

    Example

    $ pigs wvsp 0
    37
    $ pigs wvsp 1
    37
    $ pigs wvsp 2
    12000

    WVTX wid - Transmits waveform once

    This command transmits the waveform with id wid once.

    NOTE: Any hardware PWM started by HP will be cancelled.

    Upon success the number of DMA control blocks in the waveform is returned. On error a negative status code will be returned.

    Example

    $ pigs wvtx 1
    75

    $ pigs wvtx 2
    -66
    ERROR: non existent wave id

    WVTXM wid wmde - Transmits waveform using mode

    This command transmits the waveform with id wid using mode wmde.

    The mode may be send once (0), send repeatedly (1), send once but first sync with previous wave (2), or send repeatedly but first sync with previous wave (3).

    WARNING: bad things may happen if you delete the previous waveform before it has been synced to the new waveform.

    NOTE: Any hardware PWM started by HP will be cancelled.

    Upon success the number of DMA control blocks in the waveform is returned. On error a negative status code will be returned.

    Example

    $ pigs wvtxm 1 3
    75

    $ pigs wvtxm 2 0
    -66
    ERROR: non existent wave id

    WVTXR wid - Transmits waveform repeatedly

    This command transmits the waveform with id wid repeatedly.

    NOTE: Any hardware PWM started by HP will be- Create a waveformThis command creates a waveform from the data provided by the prior calls to the WVAG and WVAS commands.

    Upon success a wave id (>=0) is returned. On error a negative status code will be returned.

    The data provided by the WVAG and WVAS commands is consumed by this command.

    As many waveforms may be created as there is space available. The wave id is passed to WVTX or WVTXR to specify the waveform to transmit.

    Normal usage would be

    Step 1. WVCLR to clear all waveforms and added data.

    Step 2. WVAG/WVAS calls to supply the waveform data.

    Step 3. WVCRE to create the waveform and get a unique id.

    Repeat steps 2 and 3 as needed.

    Step 4. WVTX or WVTXR with the id of the waveform to transmit.

    A waveform comprises of one or more pulses.

    A pulse specifies

    1) the GPIO to be switched on at the start of the pulse.
    2) the GPIO to be switched off at the start of the pulse.
    3) the delay in microseconds before the next pulse.

    Any or all the fields can be zero. It doesn't make any sense to set all the fields to zero (the pulse will be ignored).

    When a waveform is started each pulse is executed in order with the specified delay between the pulse and the next.

    Example

    $ pigs wvas 4 9600 0 23 45 67 89 90
    37
    $ pigs wvcre
    0

    $ pigs wvcre
    -69
    ERROR: attempt to create an empty waveform

    WVCAP percent - Create a waveform of fixed size

    Create a waveform of fixed size. Similar to WVCRE, this command creates a waveform but pads the consumed resources to a fixed size, specified as a percent of the total resources. Padded waves of equal size can be re-cycled efficiently allowing newly created waves to re-use the resources of deleted waves of the same dimension.

    Upon success a wave id (>=0) is returned. On error a negative status code will be returned.

    The data provided by the WVAG and WVAS commands are consumed by this command.

    As many waveforms may be created as there is space available. The wave id is passed to WVTX or WVTXR to specify the waveform to transmit.

    Normal usage would be

    Step 1. WVCLR to clear all waveforms and added data.

    Step 2. WVAG/WVAS calls to supply the waveform data.

    Step 3. WVCAP to create a waveform of a uniform size.

    Step 4. WVTX or WVTXR with the id of the waveform to transmit.

    Repeat steps 2 - 4 as needed.

    Step 5. Any wave id can now be deleted and another wave of the same size can be created in its place.

    Example

    Example

    # Create a wave that consumes 50% of the total resource:

    $ pigs wvag 16 0 5000000 0 16 5000000
    2
    $ pigs wvcap 50
    0
    $ pigs wvtx 0
    11918

    WVDEL wid - Delete selected waveform

    This command deletes the waveform with id wid.

    The wave is flagged for deletion. The resources used by the wave will only be reused when either of the following apply.

    - all waves with higher numbered wave ids have been deleted or have been flagged for deletion.

    - a new wave is created which uses exactly the same rebsp; buf: the data bytes to write.
     count: the number of bytes to write.


    Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED.

    int spi_xfer(int pi, unsigned handle, char *txBuf, char *rxBuf, unsigned count)

    This function transfers count bytes of data from txBuf to the SPI device associated with the handle. Simultaneously count bytes of data are read from the device and placed in rxBuf.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0, as returned by a call to spi_open.
     txBuf: the data bytes to write.
     rxBuf: the received data bytes.
     count: the number of bytes to transfer.


    Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED.

    int serial_open(int pi, char *ser_tty, unsigned baud, unsigned ser_flags)

    This function opens a serial device at a specified baud rate with specified flags. The device name must start with /dev/tty or /dev/serial.

           pi: >=0 (as returned by pigpio_start).
      ser_tty: the serial device to open.
         baud: the baud rate in bits per second, see below.
    ser_flags: 0.


    Returns a handle (>=0) if OK, otherwise PI_NO_HANDLE, or PI_SER_OPEN_FAILED.

    The baud rate must be one of 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, or 230400.

    No flags are currently defined. This parameter should be set to zero.

    int serial_close(int pi, unsigned handle)

    This function closes the serial device associated with handle.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0, as returned by a call to serial_open.


    Returns 0 if OK, otherwise PI_BAD_HANDLE.

    int serial_write_byte(int pi, unsigned handle, unsigned bVal)

    This function writes bVal to the serial port associated with handle.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0, as returned by a call to serial_open.


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED.

    int serial_read_byte(int pi, unsigned handle)
    Mode POL PHA
     0    0   0
     1    0   1
     2    1   0
     3    1   1


    px is 0 if CEx is active low (default) and 1 for active high.

    ux is 0 if the CEx GPIO is reserved for SPI (default) and 1 otherwise.

    A is 0 for the main SPI, 1 for the auxiliary SPI.

    W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Main SPI only.

    nnnn defines the number of bytes (0-15) to write before switching the MOSI line to MISO to read data. This field is ignored if W is not set. Main SPI only.

    T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. Auxiliary SPI only.

    R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. Auxiliary SPI only.

    bbbbbb defines the word size in bits (0-32). The default (0) sets 8 bits per word. Auxiliary SPI only.

    The spi_read, spi_write, and spi_xfer functions transfer data packed into 1, 2, or 4 bytes according to the word size in bits.

    For bits 1-8 there will be one byte per character.
    For bits 9-16 there will be two bytes per character.
    For bits 17-32 there will be four bytes per character.

    Multi-byte transfers are made in least significant byte first order.

    E.g. to transfer 32 11-bit words buf should contain 64 bytes and count should be 64.

    E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A.

    The other bits in flags should be set to zero.

    int spi_close(int pi, unsigned handle)

    This functions closes the SPI device identified by the handle.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0, as returned by a call to spi_open.


    Returns 0 if OK, otherwise PI_BAD_HANDLE.

    int spi_read(int pi, unsigned handle, char *buf, unsigned count)

    This function reads count bytes of data from the SPI device associated with the handle.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0, as returned by a call to spi_open.
       buf: an array to receive the read data bytes.
     count: the number of bytes to read.


    Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED.

    int spi_write(int pi, unsigned handle, char *buf, unsigned count)

    This function writes count bytes of data from buf to the SPI device associated with the handle.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0, as returned by a call to spi_open.
     &n;= bb_spi_xfer(pi, CE0, cmd1, (char *)inBuf, 2); // > DAC

          if (count == 2)
          {
             count = bb_spi_xfer(pi, CE0, cmd2, (char *)inBuf, 2); // < DAC

             if (count == 2)
             {
                set_val = inBuf[1];

                count = bb_spi_xfer(pi, CE1, cmd3, (char *)inBuf, 3); // < ADC

                if (count == 3)
                {
                   read_val = ((inBuf[1]&3)<<8) | inBuf[2];
                   printf("%d %d\n", set_val, read_val);
                }
             }
          }
       }

       bb_spi_close(pi, CE0);
       bb_spi_close(pi, CE1);

       pigpio_stop(pi);
    }

    int spi_open(int pi, unsigned spi_channel, unsigned baud, unsigned spi_flags)

    This function returns a handle for the SPI device on the channel. Data will be transferred at baud bits per second. The flags may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select.

    The Pi has two SPI peripherals: main and auxiliary.

    The main SPI has two chip selects (channels), the auxiliary has three.

    The auxiliary SPI is available on all models but the A and B.

    The GPIO used are given in the following table.

    MISOMOSISCLKCE0CE1CE2
    Main SPI9101187-
    Aux SPI192021181716


             pi: >=0 (as returned by pigpio_start).
    spi_channel: 0-1 (0-2 for the auxiliary SPI).
           baud: 32K-125M (values above 30M are unlikely to work).
      spi_flags: see below.


    Returns a handle (>=0) if OK, otherwise PI_BAD_SPI_CHANNEL, PI_BAD_SPI_SPEED, PI_BAD_FLAGS, PI_NO_AUX_SPI, or PI_SPI_OPEN_FAILED.

    spi_flags consists of the least significant 22 bits.

    21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
     b  b  b  b  b  b  R  T  n  n  n  n  W  A u2 u1 u0 p2 p1 p0  m  m


    mm defines the SPI mode.

    Warning: modes 1 and 3 do not afor active high.

    T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first.

    R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first.

    The other bits in flags should be set to zero.

    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_SPI_BAUD, or PI_GPIO_IN_USE.

    If more than one device is connected to the SPI bus (defined by SCLK, MOSI, and MISO) each must have its own CS.

    Example

    bb_spi_open(pi,10, MISO, MOSI, SCLK, 10000, 0); // device 1
    bb_spi_open(pi,11, MISO, MOSI, SCLK, 20000, 3); // device 2

    int bb_spi_close(int pi, unsigned CS)

    This function stops bit banging SPI on a set of GPIO opened with bbSPIOpen.

    pi: >=0 (as returned by pigpio_start).
    CS: 0-31, the CS GPIO used in a prior call to bb_spi_open


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_SPI_GPIO.

    int bb_spi_xfer(int pi, unsigned CS, char *txBuf, char *rxBuf, unsigned count)

    This function executes a bit banged SPI transfer.

       pi: >=0 (as returned by pigpio_start).
       CS: 0-31 (as used in a prior call to bb_spi_open)
    txBuf: pointer to buffer to hold data to be sent
    rxBuf: pointer to buffer to hold returned data
    count: size of data transfer


    Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_USER_GPIO, PI_NOT_SPI_GPIO or PI_BAD_POINTER.

    Example

    // gcc -Wall -pthread -o bb_spi_x_test bb_spi_x_test.c -lpigpiod_if2
    // ./bb_spi_x_test

    #include <stdio.h>

    #include "pigpiod_if2.h"

    #define CE0 5
    #define CE1 6
    #define MISO 13
    #define MOSI 19
    #define SCLK 12

    int main(int argc, char *argv[])
    {
       int i, pi, count, set_val, read_val;
       unsigned char inBuf[3];
       char cmd1[] = {0, 0};
       char cmd2[] = {12, 0};
       char cmd3[] = {1, 128, 0};

       if ((pi = pigpio_start(0, 0)) < 0)
       {
          fprintf(stderr, "pigpio initialisation failed (%d).\n", pi);
          return 1;
       }

       bb_spi_open(pi, CE0, MISO, MOSI, SCLK, 10000, 0); // MCP4251 DAC
       bb_spi_open(pi, CE1, MISO, MOSI, SCLK, 20000, 3); // MCP3008 ADC

       for (i=0; i<256; i++)
       {
          cmd1[1] = i;

          count read), otherwise PI_BAD_USER_GPIO, PI_NOT_I2C_GPIO, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN, PI_BAD_I2C_WLEN, PI_I2C_READ_FAILED, or PI_I2C_WRITE_FAILED.

    The following command codes are supported:

    NameCmd & DataMeaning
    End0No more commands
    Escape1Next P is two bytes
    Start2Start condition
    Stop3Stop condition
    Address4 PSet I2C address to P
    Flags5 lsb msbSet I2C flags to lsb + (msb << 8)
    Read6 PRead P bytes of data
    Write7 P ...Write P bytes of data


    The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first).

    The address and flags default to 0. The address and flags maintain their previous value until updated.

    No flags are currently defined.

    The returned I2C data is stored in consecutive locations of outBuf.

    Example

    Set address 0x53
    start, write 0x32, (re)start, read 6 bytes, stop
    Set address 0x1E
    start, write 0x03, (re)start, read 6 bytes, stop
    Set address 0x68
    start, write 0x1B, (re)start, read 8 bytes, stop
    End

    0x04 0x53
    0x02 0x07 0x01 0x32   0x02 0x06 0x06 0x03

    0x04 0x1E
    0x02 0x07 0x01 0x03   0x02 0x06 0x06 0x03

    0x04 0x68
    0x02 0x07 0x01 0x1B   0x02 0x06 0x08 0x03

    0x00

    int bb_spi_open(int pi, unsigned CS, unsigned MISO, unsigned MOSI, unsigned SCLK, unsigned baud, unsigned spi_flags)

    This function selects a set of GPIO for bit banging SPI at a specified baud rate.

           pi: >=0 (as returned by pigpio_start).
           CS: 0-31
         MISO: 0-31
         MOSI: 0-31
         SCLK: 0-31
         baud: 50-250000
    spi_flags: see below


    spi_flags consists of the least significant 22 bits.

    21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
     0  0  0  0  0  0  R  T  0  0  0  0  0  0  0  0  0  0  0  p  m  m


    mm defines the SPI mode, defaults to 0

    Mode CPOL CPHA
     0    0    0
     1    0    1
     2    1    0
     3    1    1


    p is 0 if CS is active low (default) and 1
    NOTE: Any hardware PWM started by HP will be cancelled.

    The waves to be transmitted are specified by the contents of bvs which contains an ordered list of wave_ids and optional command codes and related data.

    Upon success 0 is returned. On error a negative status code will be returned.

    Each wave is transmitted in the order specified. A wave may occur multiple times per chain.

    A blocks of waves may be transmitted multiple times by using the loop commands. The block is bracketed by loop start and end commands. Loops may be nested.

    Delays between waves may be added with the delay command.

    The following command codes are supported:

    NameCmd & DataMeaning
    Loop Start255 0Identify start of a wave block
    Loop Repeat255 1 x yloop x + y*256 times
    Delay255 2 x ydelay x + y*256 microseconds
    Loop Forever255 3loop forever


    If present Loop Forever must be the last entry in the chain.

    The code is currently dimensioned to support a chain with roughly 600 entries and 20 loop counters.

    Example

    #!/bin/bash

    GPIO=4
    WAVES=5

    pigs m $GPIO w

    for ((i=0; i<$WAVES; i++))
    do
       pigs wvag $((1<<GPIO)) 0 20 0 $((1<<GPIO)) $(((i+1)*200))
       w[i]=$(pigs wvcre)
    done

    # transmit waves 4+3+2
    # loop start
    #    transmit waves 0+0+0
    #    loop start
    #       transmit waves 0+1
    #       delay 5000us
    #    loop end (repeat 30 times)
    #    loop start
    #       transmit waves 2+3+0
    #       transmit waves 3+1+2
    #    loop end (repeat 10 times)
    # loop end (repeat 5 times)
    # transmit waves 4+4+4
    # delay 20000us
    # transmit waves 0+0+0

    pigs wvcha \
       ${w[4]} ${w[3]} ${w[2]} \
       255 0 \
          ${w[0]} ${w[0]} ${w[0]} \
          255 0 \
             ${w[0]} ${w[1]} \
             255 2 0x88 0x13 \
          255 1 30 0 \
          255 0 \
             ${w[2]} ${w[3]} ${w[0]} \
             ${w[3]} ${w[1]} ${w[2]} \
          255 1 10 0 \
       255 1 5 0 \
       ${w[4]} ${w[4]} ${w[4]} \
       255 2 0x20 0x4E \
       ${w[0]} ${w[0]} ${w[0]}

    while [[ $(pigs wvbsy) -eq 1 ]]; do sleep 0.1; done

    for ((i=0; i<$WAVES; i++)); do echo ${w[i]}; pigs wvdel ${w[i]}; done

    WVCLR - Clear all waveforms

    This command clears all waveforms.

    Nothing is returned.

    Example

    $ pigs wvclr

    WVCRE es of data



    The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first).

    The address defaults to that associated with the handle. The flags default to 0. The address and flags maintain their previous value until updated.

    The returned I2C data is stored in consecutive locations of outBuf.

    Example

    Set address 0x53, write 0x32, read 6 bytes
    Set address 0x1E, write 0x03, read 6 bytes
    Set address 0x68, write 0x1B, read 8 bytes
    End

    0x04 0x53   0x07 0x01 0x32   0x06 0x06
    0x04 0x1E   0x07 0x01 0x03   0x06 0x06
    0x04 0x68   0x07 0x01 0x1B   0x06 0x08
    0x00

    int bb_i2c_open(int pi, unsigned SDA, unsigned SCL, unsigned baud)

    This function selects a pair of GPIO for bit banging I2C at a specified baud rate.

    Bit banging I2C allows for certain operations which are not possible with the standard I2C driver.

    o baud rates as low as 50
    o repeated starts
    o clock stretching
    o I2C on any pair of spare GPIO

      pi: >=0 (as returned by pigpio_start).
     SDA: 0-31
     SCL: 0-31
    baud: 50-500000


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_I2C_BAUD, or PI_GPIO_IN_USE.

    NOTE:

    The GPIO used for SDA and SCL must have pull-ups to 3V3 connected. As a guide the hardware pull-ups on pins 3 and 5 are 1k8 in value.

    int bb_i2c_close(int pi, unsigned SDA)

    This function stops bit banging I2C on a pair of GPIO previously opened with bb_i2c_open.

     pi: >=0 (as returned by pigpio_start).
    SDA: 0-31, the SDA GPIO used in a prior call to bb_i2c_open


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_I2C_GPIO.

    int bb_i2c_zip(int pi, unsigned SDA, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen)

    This function executes a sequence of bit banged I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenated command codes and associated data.

        pi: >=0 (as returned by pigpio_start).
       SDA: 0-31 (as used in a prior call to bb_i2c_open)
     inBuf: pointer to the concatenated I2C commands, see below
     inLen: size of command buffer
    outBuf: pointer to buffer to hold returned data
    outLen: size of output buffer


    Returns >= 0 if OK (the number of bytes ce(int pi, unsigned handle, char *buf, unsigned count)

    This reads count bytes from the raw device into buf.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0, as returned by a call to i2c_open.
       buf: an array to receive the read data bytes.
     count: >0, the number of bytes to read.


    Returns count (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

    S Addr Rd [A] [buf0] A [buf1] A ... A [bufn] NA P

    int i2c_write_device(int pi, unsigned handle, char *buf, unsigned count)

    This writes count bytes from buf to the raw device.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0, as returned by a call to i2c_open.
       buf: an array containing the data bytes to write.
     count: >0, the number of bytes to write.


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

    S Addr Wr [A] buf0 [A] buf1 [A] ... [A] bufn [A] P

    int i2c_zip(int pi, unsigned handle, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen)

    This function executes a sequence of I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenated command codes and associated data.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0, as returned by a call to i2cOpen
     inBuf: pointer to the concatenated I2C commands, see below
     inLen: size of command buffer
    outBuf: pointer to buffer to hold returned data
    outLen: size of output buffer


    Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_HANDLE, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN. PI_BAD_I2C_WLEN, or PI_BAD_I2C_SEG.

    The following command codes are supported:

    NameCmd & DataMeaning
    End0No more commands
    Escape1Next P is two bytes
    On2Switch combined flag on
    Off3Switch combined flag off
    Address4 PSet I2C address to P
    Flags5 lsb msbSet I2C flags to lsb + (msb << 8)
    Read6 PRead P bytes of data
    Write7 P ...Write P bytsigned">unsigned count) This writes data bytes to the specified register of the device associated with handle and reads a device specified number of bytes of data in return.

         pi: >=0 (as returned by pigpio_start).
     handle: >=0, as returned by a call to i2c_open.
    i2c_reg: 0-255, the register to write/read.
        buf: an array with the data to send and to receive the read data.
      count: 1-32, the number of bytes to write.


    Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

    The smbus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received. The total number of bytes sent/received must be 32 or less.

    Block write-block read. SMBus 2.0 5.5.8 S Addr Wr [A] i2c_reg [A] count [A] buf0 [A] ...
       S Addr Rd [A] [Count] A [Data] ... A P

    int i2c_read_i2c_block_data(int pi, unsigned handle, unsigned i2c_reg, char *buf, unsigned count)

    This reads count bytes from the specified register of the device associated with handle . The count may be 1-32.

         pi: >=0 (as returned by pigpio_start).
     handle: >=0, as returned by a call to i2c_open.
    i2c_reg: 0-255, the register to read.
        buf: an array to receive the read data.
      count: 1-32, the number of bytes to read.


    Returns the number of bytes read (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

    S Addr Wr [A] i2c_reg [A]
       S Addr Rd [A] [buf0] A [buf1] A ... A [bufn] NA P

    int i2c_write_i2c_block_data(int pi, unsigned handle, unsigned i2c_reg, char *buf, unsigned count)

    This writes 1 to 32 bytes to the specified register of the device associated with handle.

         pi: >=0 (as returned by pigpio_start).
     handle: >=0, as returned by a call to i2c_open.
    i2c_reg: 0-255, the register to write.
        buf: the data to write.
      count: 1-32, the number of bytes to write.


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

    S Addr Wr [A] i2c_reg [A] buf0 [A] buf1 [A] ... [A] bufn [A] P

    int i2c_read_devied handle, unsigned i2c_reg, unsigned wVal)

    This writes 16 bits of data to the specified register of the device associated with handle and and reads 16 bits of data in return.

         pi: >=0 (as returned by pigpio_start).
     handle: >=0, as returned by a call to i2c_open.
    i2c_reg: 0-255, the register to write/read.
       wVal: 0-0xFFFF, the value to write.


    Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

    Process call. SMBus 2.0 5.5.6 S Addr Wr [A] i2c_reg [A] wVal_Low [A] wVal_High [A]
       S Addr Rd [A] [DataLow] A [DataHigh] NA P

    int i2c_write_block_data(int pi, unsigned handle, unsigned i2c_reg, char *buf, unsigned count)

    This writes up to 32 bytes to the specified register of the device associated with handle.

         pi: >=0 (as returned by pigpio_start).
     handle: >=0, as returned by a call to i2c_open.
    i2c_reg: 0-255, the register to write.
        buf: an array with the data to send.
      count: 1-32, the number of bytes to write.


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

    Block write. SMBus 2.0 5.5.7 S Addr Wr [A] i2c_reg [A] count [A] buf0 [A] buf1 [A] ...
       [A] bufn [A] P

    int i2c_read_block_data(int pi, unsigned handle, unsigned i2c_reg, char *buf)

    This reads a block of up to 32 bytes from the specified register of the device associated with handle.

         pi: >=0 (as returned by pigpio_start).
     handle: >=0, as returned by a call to i2c_open.
    i2c_reg: 0-255, the register to read.
        buf: an array to receive the read data.


    The amount of returned data is set by the device.

    Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

    Block read. SMBus 2.0 5.5.7 S Addr Wr [A] i2c_reg [A]
       S Addr Rd [A] [Count] A [buf0] A [buf1] A ... A [bufn] NA P

    int i2c_block_process_call(int pi, unsigned handle, unsigned i2c_reg, char *buf, unsigned bVal)

    This writes a single byte to the specified register of the device associated with handle.

         pi: >=0 (as returned by pigpio_start).
     handle: >=0, as returned by a call to i2c_open.
    i2c_reg: 0-255, the register to write.
       bVal: 0-0xFF, the value to write.


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

    Write byte. SMBus 2.0 5.5.4 S Addr Wr [A] i2c_reg [A] bVal [A] P

    int i2c_write_word_data(int pi, unsigned handle, unsigned i2c_reg, unsigned wVal)

    This writes a single 16 bit word to the specified register of the device associated with handle.

         pi: >=0 (as returned by pigpio_start).
     handle: >=0, as returned by a call to i2c_open.
    i2c_reg: 0-255, the register to write.
       wVal: 0-0xFFFF, the value to write.


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

    Write word. SMBus 2.0 5.5.4 S Addr Wr [A] i2c_reg [A] wval_Low [A] wVal_High [A] P

    int i2c_read_byte_data(int pi, unsigned handle, unsigned i2c_reg)

    This reads a single byte from the specified register of the device associated with handle.

         pi: >=0 (as returned by pigpio_start).
     handle: >=0, as returned by a call to i2c_open.
    i2c_reg: 0-255, the register to read.


    Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

    Read byte. SMBus 2.0 5.5.5 S Addr Wr [A] i2c_reg [A] S Addr Rd [A] [Data] NA P

    int i2c_read_word_data(int pi, unsigned handle, unsigned i2c_reg)

    This reads a single 16 bit word from the specified register of the device associated with handle.

         pi: >=0 (as returned by pigpio_start).
     handle: >=0, as returned by a call to i2c_open.
    i2c_reg: 0-255, the register to read.


    Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED.

    Read word. SMBus 2.0 5.5.5 S Addr Wr [A] i2c_reg [A]
       S Addr Rd [A] [DataLow] A [DataHigh] NA P

    int i2c_process_call(int pi, unsignbsp; (1 bit) : Stop bit
    Rd/Wr   (1 bit) : Read/Write bit. Rd equals 1, Wr equals 0.
    A, NA   (1 bit) : Accept and not accept bit.

    Addr    (7 bits): I2C 7 bit address.
    i2c_reg (8 bits): A byte which often selects a register.
    Data    (8 bits): A data byte.
    Count   (8 bits): A byte defining the length of a block operation.

    [..]: Data sent by the device.

    int i2c_close(int pi, unsigned handle)

    This closes the I2C device associated with the handle.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0, as returned by a call to i2c_open.


    Returns 0 if OK, otherwise PI_BAD_HANDLE.

    int i2c_write_quick(int pi, unsigned handle, unsigned bit)

    This sends a single bit (in the Rd/Wr bit) to the device associated with handle.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0, as returned by a call to i2c_open.
       bit: 0-1, the value to write.


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

    Quick command. SMBus 2.0 5.5.1 S Addr bit [A] P

    int i2c_write_byte(int pi, unsigned handle, unsigned bVal)

    This sends a single byte to the device associated with handle.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0, as returned by a call to i2c_open.
      bVal: 0-0xFF, the value to write.


    Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED.

    Send byte. SMBus 2.0 5.5.2 S Addr Wr [A] bVal [A] P

    int i2c_read_byte(int pi, unsigned handle)

    This reads a single byte from the device associated with handle.

        pi: >=0 (as returned by pigpio_start).
    handle: >=0, as returned by a call to i2c_open.


    Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, or PI_I2C_READ_FAILED.

    Receive byte. SMBus 2.0 5.5.3 S Addr Rd [A] [Data] NA P

    int i2c_write_byte_data(int pi, unsigned handle, unsigned i2c_reg, pigpio_start).
    user_gpio: 0-31, previously opened with bb_serial_read_open.
          buf: an array to receive the read bytes.
      bufSize: >=0


    Returns the number of bytes copied if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERIAL_GPIO.

    The bytes returned for each character depend upon the number of data bits data_bits specified in the bb_serial_read_open command.

    For data_bits 1-8 there will be one byte per character.
    For data_bits 9-16 there will be two bytes per character.
    For data_bits 17-32 there will be four bytes per character.

    int bb_serial_read_close(int pi, unsigned user_gpio)

    This function closes a GPIO for bit bang reading of serial data.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31, previously opened with bb_serial_read_open.


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_SERIAL_GPIO.

    int bb_serial_invert(int pi, unsigned user_gpio, unsigned invert)

    This function inverts serial logic for big bang serial reads.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31, previously opened with bb_serial_read_open.
       invert: 0-1, 1 invert, 0 normal.


    Returns 0 if OK, otherwise PI_NOT_SERIAL_GPIO or PI_BAD_SER_INVERT.

    int i2c_open(int pi, unsigned i2c_bus, unsigned i2c_addr, unsigned i2c_flags)

    This returns a handle for the device at address i2c_addr on bus i2c_bus.

           pi: >=0 (as returned by pigpio_start).
      i2c_bus: >=0.
     i2c_addr: 0-0x7F.
    i2c_flags: 0.


    No flags are currently defined. This parameter should be set to zero.

    Physically buses 0 and 1 are available on the Pi. Higher numbered buses will be available if a kernel supported bus multiplexor is being used.

    The GPIO used are given in the following table.

    SDASCL
    I2C 001
    I2C 123


    Returns a handle (>=0) if OK, otherwise PI_BAD_I2C_BUS, PI_BAD_I2C_ADDR, PI_BAD_FLAGS, PI_NO_HANDLE, or PI_I2C_OPEN_FAILED.

    For the SMBus commands the low level transactions are shown at the end of the function description. The following abbreviations are used.

    S       (1 bit) : Start bit
    P     &nart).
    script_id: >=0, as returned by store_script.
       numPar: 0-10, the number of parameters.
        param: an array of parameters.


    The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM.

    param is an array of up to 10 parameters which may be referenced in the script as p0 to p9.

    int script_status(int pi, unsigned script_id, uint32_t *param)

    This function returns the run status of a stored script as well as the current values of parameters 0 to 9.

           pi: >=0 (as returned by pigpio_start).
    script_id: >=0, as returned by store_script.
        param: an array to hold the returned 10 parameters.


    The function returns greater than or equal to 0 if OK, otherwise PI_BAD_SCRIPT_ID.

    The run status may be

    PI_SCRIPT_INITING
    PI_SCRIPT_HALTED
    PI_SCRIPT_RUNNING
    PI_SCRIPT_WAITING
    PI_SCRIPT_FAILED


    The current value of script parameters 0 to 9 are returned in param.

    int stop_script(int pi, unsigned script_id)

    This function stops a running script.

           pi: >=0 (as returned by pigpio_start).
    script_id: >=0, as returned by store_script.


    The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID.

    int delete_script(int pi, unsigned script_id)

    This function deletes a stored script.

           pi: >=0 (as returned by pigpio_start).
    script_id: >=0, as returned by store_script.


    The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID.

    int bb_serial_read_open(int pi, unsigned user_gpio, unsigned baud, unsigned data_bits)

    This function opens a GPIO for bit bang reading of serial data.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31.
         baud: 50-250000
    data_bits: 1-32


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_WAVE_BAUD, or PI_GPIO_IN_USE.

    The serial data is returned in a cyclic buffer and is read using bb_serial_read.

    It is the caller's responsibility to read data from the cyclic buffer in a timely fashion.

    int bb_serial_read(int pi, unsigned user_gpio, void *buf, size_t bufSize)

    This function copies up to bufSize bytes of data read length in DMA control blocks of the current waveform.

    pi: >=0 (as returned by pigpio_start).

    int wave_get_high_cbs(int pi)

    This function returns the length in DMA control blocks of the longest waveform created since the pigpio daemon was started.

    pi: >=0 (as returned by pigpio_start).

    int wave_get_max_cbs(int pi)

    This function returns the maximum possible size of a waveform in DMA control blocks.

    pi: >=0 (as returned by pigpio_start).

    int gpio_trigger(int pi, unsigned user_gpio, unsigned pulseLen, unsigned level)

    This function sends a trigger pulse to a GPIO. The GPIO is set to level for pulseLen microseconds and then reset to not level.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31.
     pulseLen: 1-100.
        level: 0,1.


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_LEVEL, PI_BAD_PULSELEN, or PI_NOT_PERMITTED.

    int store_script(int pi, char *script)

    This function stores a script for later execution.

    See http://abyz.me.uk/rpi/pigpio/pigs.html#Scripts for details.

        pi: >=0 (as returned by pigpio_start).
    script: the text of the script.


    The function returns a script id if the script is valid, otherwise PI_BAD_SCRIPT.

    int run_script(int pi, unsigned script_id, unsigned numPar, uint32_t *param)

    This function runs a stored script.

           pi: >=0 (as returned by pigpio_start).
    script_id: >=0, as returned by store_script.
       numPar: 0-10, the number of parameters.
        param: an array of parameters.


    The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM

    param is an array of up to 10 parameters which may be referenced in the script as p0 to p9.

    int update_script(int pi, unsigned script_id, unsigned numPar, uint32_t *param)

    This function sets the parameters of a script. The script may or may not be running. The first numPar parameters of the script are overwritten with the new values.

           pi: >=0 (as returned by pigpio_stbsp;   }, 46);

       while (wave_tx_busy(pi)) time_sleep(0.1);

       for (i=0; i<WAVES; i++) wave_delete(pi, wid[i]);

       pigpio_stop(pi);
    }

    int wave_tx_at(int pi)

    This function returns the id of the waveform currently being transmitted by wave_send*. Chained waves are not supported.

    pi: >=0 (as returned by pigpio_start).


    Returns the waveform id or one of the following special values:

    PI_WAVE_NOT_FOUND (9998) - transmitted wave not found.
    PI_NO_TX_WAVE (9999) - no wave being transmitted.

    int wave_tx_busy(int pi)

    This function checks to see if a waveform is currently being transmitted.

    pi: >=0 (as returned by pigpio_start).


    Returns 1 if a waveform is currently being transmitted, otherwise 0.

    int wave_tx_stop(int pi)

    This function stops the transmission of the current waveform.

    pi: >=0 (as returned by pigpio_start).


    Returns 0 if OK.

    This function is intended to stop a waveform started with the repeat mode.

    int wave_get_micros(int pi)

    This function returns the length in microseconds of the current waveform.

    pi: >=0 (as returned by pigpio_start).

    int wave_get_high_micros(int pi)

    This function returns the length in microseconds of the longest waveform created since the pigpio daemon was started.

    pi: >=0 (as returned by pigpio_start).

    int wave_get_max_micros(int pi)

    This function returns the maximum possible size of a waveform in
    microseconds.

    pi: >=0 (as returned by pigpio_start).

    int wave_get_pulses(int pi)

    This function returns the length in pulses of the current waveform.

    pi: >=0 (as returned by pigpio_start).

    int wave_get_high_pulses(int pi)

    This function returns the length in pulses of the longest waveform created since the pigpio daemon was started.

    pi: >=0 (as returned by pigpio_start).

    int wave_get_max_pulses(int pi)

    This function returns the maximum possible size of a waveform in pulses.

    pi: >=0 (as returned by pigpio_start).

    int wave_get_cbs(int pi)

    This function returns the d>Loop Forever

    255 3loop forever


    If present Loop Forever must be the last entry in the chain.

    The code is currently dimensioned to support a chain with roughly 600 entries and 20 loop counters.

    Example

    #include <stdio.h>
    #include <pigpiod_if2.h>

    #define WAVES 5
    #define GPIO 4

    int main(int argc, char *argv[])
    {
       int i, pi, wid[WAVES];

       pi = pigpio_start(0, 0);
       if (pi<0) return -1;

       set_mode(pi, GPIO, PI_OUTPUT);

       for (i=0; i<WAVES; i++)
       {
          wave_add_generic(pi, 2, (gpioPulse_t[])
             {{1<<GPIO, 0,        20},
              {0, 1<<GPIO, (i+1)*200}});

          wid[i] = wave_create(pi);
       }

       wave_chain(pi, (char []) {
          wid[4], wid[3], wid[2],       // transmit waves 4+3+2
          255, 0,                       // loop start
             wid[0], wid[0], wid[0],    // transmit waves 0+0+0
             255, 0,                    // loop start
                wid[0], wid[1],         // transmit waves 0+1
                255, 2, 0x88, 0x13,     // delay 5000us
             255, 1, 30, 0,             // loop end (repeat 30 times)
             255, 0,                    // loop start
                wid[2], wid[3], wid[0], // transmit waves 2+3+0
                wid[3], wid[1], wid[2], // transmit waves 3+1+2
             255, 1, 10, 0,             // loop end (repeat 10 times)
          255, 1, 5, 0,                 // loop end (repeat 5 times)
          wid[4], wid[4], wid[4],       // transmit waves 4+4+4
          255, 2, 0x20, 0x4E,           // delay 20000us
          wid[0], wid[0], wid[0],       // transmit waves 0+0+0

      &nis function transmits the waveform with id wave_id. The waveform cycles until cancelled (either by the sending of a new waveform or by wave_tx_stop).

    NOTE: Any hardware PWM started by hardware_PWM will be cancelled.

         pi: >=0 (as returned by pigpio_start).
    wave_id: >=0, as returned by wave_create.


    Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE.

    int wave_send_using_mode(int pi, unsigned wave_id, unsigned mode)

    Transmits the waveform with id wave_id using mode mode.

         pi: >=0 (as returned by pigpio_start).
    wave_id: >=0, as returned by wave_create.
       mode: PI_WAVE_MODE_ONE_SHOT, PI_WAVE_MODE_REPEAT,
             PI_WAVE_MODE_ONE_SHOT_SYNC, or PI_WAVE_MODE_REPEAT_SYNC.


    PI_WAVE_MODE_ONE_SHOT: same as wave_send_once.

    PI_WAVE_MODE_REPEAT same as wave_send_repeat.

    PI_WAVE_MODE_ONE_SHOT_SYNC same as wave_send_once but tries to sync with the previous waveform.

    PI_WAVE_MODE_REPEAT_SYNC same as wave_send_repeat but tries to sync with the previous waveform.

    WARNING: bad things may happen if you delete the previous waveform before it has been synced to the new waveform.

    NOTE: Any hardware PWM started by hardware_PWM will be cancelled.

    Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE.

    int wave_chain(int pi, char *buf, unsigned bufSize)

    This function transmits a chain of waveforms.

    NOTE: Any hardware PWM started by hardware_PWM will be cancelled.

    The waves to be transmitted are specified by the contents of buf which contains an ordered list of wave_ids and optional command codes and related data.

         pi: >=0 (as returned by pigpio_start).
        buf: pointer to the wave_ids and optional command codes
    bufSize: the number of bytes in buf


    Returns 0 if OK, otherwise PI_CHAIN_NESTING, PI_CHAIN_LOOP_CNT, PI_BAD_CHAIN_LOOP, PI_BAD_CHAIN_CMD, PI_CHAIN_COUNTER, PI_BAD_CHAIN_DELAY, PI_CHAIN_TOO_BIG, or PI_BAD_WAVE_ID.

    Each wave is transmitted in the order specified. A wave may occur multiple times per chain.

    A blocks of waves may be transmitted multiple times by using the loop commands. The block is bracketed by loop start and end commands. Loops may be nested.

    Delays between waves may be added with the delay command.

    The following command codes are supported:


    Returns the new waveform id if OK, otherwise PI_EMPTY_WAVEFORM, PI_NO_WAVEFORM_ID, PI_TOO_MANY_CBS, or PI_TOO_MANY_OOL.

    int wave_create_and_pad(int pi, int percent)

    This function creates a waveform like wave_create but pads the consumed resources. Where percent gives the percentage of the resources to use (in terms of the theoretical maximum, not the current amount free). This allows the reuse
    of deleted waves while a transmission is active.

    pi: >=0 (as returned by pigpio_start).
    percent: 0-100, size of waveform as percentage of maximum available.


    The data provided by the wave_add_* functions are consumed by this function.

    As many waveforms may be created as there is space available. The wave id is passed to wave_send_* to specify the waveform to transmit.

    A usage would be the creation of two waves where one is filled while the other is being transmitted. Each wave is assigned 50% of the resources. This buffer structure allows the transmission of infinite wave sequences.

    Normal usage:

    Step 1. wave_clear to clear all waveforms and added data.

    Step 2. wave_add_* calls to supply the waveform data.

    Step 3. wave_create_and_pad to create a waveform of uniform size.

    Step 4. wave_send_* with the id of the waveform to transmit.

    Repeat steps 2-4 as needed.

    Step 5. Any wave id can now be deleted and another wave of the same size can be created in its place.

    Returns the new waveform id if OK, otherwise PI_EMPTY_WAVEFORM, PI_NO_WAVEFORM_ID, PI_TOO_MANY_CBS, or PI_TOO_MANY_OOL.

    int wave_delete(int pi, unsigned wave_id)

    This function deletes the waveform with id wave_id.

         pi: >=0 (as returned by pigpio_start).
    wave_id: >=0, as returned by wave_create.


    Wave ids are allocated in order, 0, 1, 2, etc.

    The wave is flagged for deletion. The resources used by the wave will only be reused when either of the following apply.

    - all waves with higher numbered wave ids have been deleted or have been flagged for deletion.

    - a new wave is created which uses exactly the same resources as the current wave (see the C source for gpioWaveCreate for details).

    Returns 0 if OK, otherwise PI_BAD_WAVE_ID.

    int wave_send_once(int pi, unsigned wave_id)

    This function transmits the waveform with id wave_id. The waveform is sent once.

    NOTE: Any hardware PWM started by hardware_PWM will be cancelled.

         pi: >=0 (as returned by pigpio_start).
    wave_id: >=0, as returned by wave_create.


    Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE.

    int wave_send_repeat(int pi, unsigned wave_id)

    Thhref="#user_gpio">user_gpio, unsigned baud, unsigned data_bits, unsigned stop_bits, unsigned offset, unsigned numBytes, char *str) This function adds a waveform representing serial data to the existing waveform (if any). The serial data starts offset microseconds from the start of the waveform.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31.
         baud: 50-1000000
    data_bits: number of data bits (1-32)
    stop_bits: number of stop half bits (2-8)
       offset: >=0
     numBytes: >=1
          str: an array of chars.


    Returns the new total number of pulses in the current waveform if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_WAVE_BAUD, PI_BAD_DATABITS, PI_BAD_STOP_BITS, PI_TOO_MANY_CHARS, PI_BAD_SER_OFFSET, or PI_TOO_MANY_PULSES.

    NOTES:

    The serial data is formatted as one start bit, data_bits data bits, and stop_bits/2 stop bits.

    It is legal to add serial data streams with different baud rates to the same waveform.

    numBytes is the number of bytes of data in str.

    The bytes required for each character depend upon data_bits.

    For data_bits 1-8 there will be one byte per character.
    For data_bits 9-16 there will be two bytes per character.
    For data_bits 17-32 there will be four bytes per character.

    int wave_create(int pi)

    This function creates a waveform from the data provided by the prior calls to the wave_add_* functions. Upon success a wave id greater than or equal to 0 is returned, otherwise PI_EMPTY_WAVEFORM, PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID.

    pi: >=0 (as returned by pigpio_start).


    The data provided by the wave_add_* functions is consumed by this function.

    As many waveforms may be created as there is space available. The wave id is passed to wave_send_* to specify the waveform to transmit.

    Normal usage would be

    Step 1. wave_clear to clear all waveforms and added data.

    Step 2. wave_add_* calls to supply the waveform data.

    Step 3. wave_create to create the waveform and get a unique id

    Repeat steps 2 and 3 as needed.

    Step 4. wave_send_* with the id of the waveform to transmit.

    A waveform comprises one or more pulses. Each pulse consists of a gpioPulse_t structure.

    typedef struct
    {
       uint32_t gpioOn;
       uint32_t gpioOff;
       uint32_t usDelay;
    } gpioPulse_t;


    The fields specify

    1) the GPIO to be switched on at the start of the pulse.
    2) the GPIO to be switched off at the start of the pulse.
    3) the delay in microseconds before the next pulse.


    Any or all the fields can be zero. It doesn't make any sense to set all the fields to zero (the pulse will be ignored).

    When a waveform is started each pulse is executed in order with the specified delay between the5 for the BCM2711). Lower frequencies will have more steps and higher frequencies will have fewer steps. PWMduty is automatically scaled to take this into account.

    uint32_t get_current_tick(int pi)

    Gets the current system tick.

    pi: >=0 (as returned by pigpio_start).


    Tick is the number of microseconds since system boot.

    As tick is an unsigned 32 bit quantity it wraps around after 2**32 microseconds, which is approximately 1 hour 12 minutes.

    uint32_t get_hardware_revision(int pi)

    Get the Pi's hardware revision number.

    pi: >=0 (as returned by pigpio_start).


    The hardware revision is the last few characters on the Revision line of /proc/cpuinfo.

    If the hardware revision can not be found or is not a valid hexadecimal number the function returns 0.

    The revision number can be used to determine the assignment of GPIO to pins (see gpio).

    There are at least three types of board.

    Type 1 boards have hardware revision numbers of 2 and 3.

    Type 2 boards have hardware revision numbers of 4, 5, 6, and 15.

    Type 3 boards have hardware revision numbers of 16 or greater.

    uint32_t get_pigpio_version(int pi)

    Returns the pigpio version.

    pi: >=0 (as returned by pigpio_start).

    int wave_clear(int pi)

    This function clears all waveforms and any data added by calls to the wave_add_* functions.

    pi: >=0 (as returned by pigpio_start).


    Returns 0 if OK.

    int wave_add_new(int pi)

    This function starts a new empty waveform. You wouldn't normally need to call this function as it is automatically called after a waveform is created with the wave_create function.

    pi: >=0 (as returned by pigpio_start).


    Returns 0 if OK.

    int wave_add_generic(int pi, unsigned numPulses, gpioPulse_t *pulses)

    This function adds a number of pulses to the current waveform.

           pi: >=0 (as returned by pigpio_start).
    numPulses: the number of pulses.
       pulses: an array of pulses.


    Returns the new total number of pulses in the current waveform if OK, otherwise PI_TOO_MANY_PULSES.

    The pulses are interleaved in time order within the existing waveform (if any).

    Merging allows the waveform to be built in parts, that is the settings for GPIO#1 can be added, and then GPIO#2 etc.

    If the added waveform is intended to start after or within the existing waveform then the first pulse should consist solely of a delay.

    int wave_add_serial(int pi, unsigned

    Returns 0 if OK, otherwise PI_NOT_PERMITTED, PI_BAD_GPIO, PI_NOT_HCLK_GPIO, PI_BAD_HCLK_FREQ,or PI_BAD_HCLK_PASS.

    The same clock is available on multiple GPIO. The latest frequency setting will be used by all GPIO which share a clock.

    The GPIO must be one of the following.

    4   clock 0  All models
    5   clock 1  All models but A and B (reserved for system use)
    6   clock 2  All models but A and B
    20  clock 0  All models but A and B
    21  clock 1  All models but A and Rev.2 B (reserved for system use)

    32  clock 0  Compute module only
    34  clock 0  Compute module only
    42  clock 1  Compute module only (reserved for system use)
    43  clock 2  Compute module only
    44  clock 1  Compute module only (reserved for system use)


    Access to clock 1 is protected by a password as its use will likely crash the Pi. The password is given by or'ing 0x5A000000 with the GPIO number.

    int hardware_PWM(int pi, unsigned gpio, unsigned PWMfreq, uint32_t PWMduty)

    Starts hardware PWM on a GPIO at the specified frequency and dutycycle. Frequencies above 30MHz are unlikely to work.

    NOTE: Any waveform started by wave_send_* or wave_chain will be cancelled.

    This function is only valid if the pigpio main clock is PCM. The main clock defaults to PCM but may be overridden when the pigpio daemon is started (option -t).

         pi: >=0 (as returned by pigpio_start).
       gpio: see descripton
    PWMfreq: 0 (off) or 1-125M (1-187.5M for the BCM2711)
    PWMduty: 0 (off) to 1000000 (1M)(fully on)


    Returns 0 if OK, otherwise PI_NOT_PERMITTED, PI_BAD_GPIO, PI_NOT_HPWM_GPIO, PI_BAD_HPWM_DUTY, PI_BAD_HPWM_FREQ, or PI_HPWM_ILLEGAL.

    The same PWM channel is available on multiple GPIO. The latest frequency and dutycycle setting will be used by all GPIO which share a PWM channel.

    The GPIO must be one of the following.

    12  PWM channel 0  All models but A and B
    13  PWM channel 1  All models but A and B
    18  PWM channel 0  All models
    19  PWM channel 1  All models but A and B

    40  PWM channel 0  Compute module only
    41  PWM channel 1  Compute module only
    45  PWM channel 1  Compute module only
    52  PWM channel 0  Compute module only
    53  PWM channel 1  Compute module only


    The actual number of steps beween off and fully on is the integral part of 250M/PWMfreq (375M/PWMfreq for the BCM2711).

    The actual frequency set is 250M/steps (375M/steps for the BCM2711).

    There will only be a million steps for a PWMfreq of 250 (37logic 1. GPIO n has bit value (1<<n).

    uint32_t read_bank_2(int pi)

    Read the levels of the bank 2 GPIO (GPIO 32-53).

    pi: >=0 (as returned by pigpio_start).


    The returned 32 bit integer has a bit set if the corresponding GPIO is logic 1. GPIO n has bit value (1<<(n-32)).

    int clear_bank_1(int pi, uint32_t bits)

    Clears GPIO 0-31 if the corresponding bit in bits is set.

      pi: >=0 (as returned by pigpio_start).
    bits: a bit mask with 1 set if the corresponding GPIO is
          to be cleared.


    Returns 0 if OK, otherwise PI_SOME_PERMITTED.

    A status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO.

    int clear_bank_2(int pi, uint32_t bits)

    Clears GPIO 32-53 if the corresponding bit (0-21) in bits is set.

      pi: >=0 (as returned by pigpio_start).
    bits: a bit mask with 1 set if the corresponding GPIO is
          to be cleared.


    Returns 0 if OK, otherwise PI_SOME_PERMITTED.

    A status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO.

    int set_bank_1(int pi, uint32_t bits)

    Sets GPIO 0-31 if the corresponding bit in bits is set.

      pi: >=0 (as returned by pigpio_start).
    bits: a bit mask with 1 set if the corresponding GPIO is
          to be set.


    Returns 0 if OK, otherwise PI_SOME_PERMITTED.

    A status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO.

    int set_bank_2(int pi, uint32_t bits)

    Sets GPIO 32-53 if the corresponding bit (0-21) in bits is set.

      pi: >=0 (as returned by pigpio_start).
    bits: a bit mask with 1 set if the corresponding GPIO is
          to be set.


    Returns 0 if OK, otherwise PI_SOME_PERMITTED.

    A status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO.

    int hardware_clock(int pi, unsigned gpio, unsigned clkfreq)

    Starts a hardware clock on a GPIO at the specified frequency. Frequencies above 30MHz are unlikely to work.

           pi: >=0 (as returned by pigpio_start).
         gpio: see description
    frequency: 0 (off)&="#pi">pi, unsigned user_gpio, unsigned timeout)

    Sets a watchdog for a GPIO.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31.
      timeout: 0-60000.


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_BAD_WDOG_TIMEOUT.

    The watchdog is nominally in milliseconds.

    Only one watchdog may be registered per GPIO.

    The watchdog may be cancelled by setting timeout to 0.

    Once a watchdog has been started callbacks for the GPIO will be triggered every timeout interval after the last GPIO activity.

    The callback will receive the special level PI_TIMEOUT.

    int set_glitch_filter(int pi, unsigned user_gpio, unsigned steady)

    Sets a glitch filter on a GPIO.

    Level changes on the GPIO are not reported unless the level has been stable for at least steady microseconds. The level is then reported. Level changes of less than steady microseconds are ignored.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31
       steady: 0-300000


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER.

    This filter affects the GPIO samples returned to callbacks set up with callback, callback_ex and wait_for_edge.

    It does not affect levels read by gpio_read, read_bank_1, or read_bank_2.

    Each (stable) edge will be timestamped steady microseconds after it was first detected.

    int set_noise_filter(int pi, unsigned user_gpio, unsigned steady, unsigned active)

    Sets a noise filter on a GPIO.

    Level changes on the GPIO are ignored until a level which has been stable for steady microseconds is detected. Level changes on the GPIO are then reported for active microseconds after which the process repeats.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31
       steady: 0-300000
       active: 0-1000000


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER.

    This filter affects the GPIO samples returned to callbacks set up with callback, callback_ex and wait_for_edge.

    It does not affect levels read by gpio_read, read_bank_1, or read_bank_2.

    Level changes before and after the active period may be reported. Your software must be designed to cope with such reports.

    uint32_t read_bank_1(int pi)

    Read the levels of the bank 1 GPIO (GPIO 0-31).

    pi: >=0 (as returned by pigpio_start).


    The returned 32 bit integer has a bit set if the corresponding GPIO is ="#u">u v - Set GPIO watchdogThis command sets a watchdog of v milliseconds on GPIO u.

    Upon success nothing is returned. On error a negative status code will be returned.

    The watchdog is nominally in milliseconds.

    One watchdog may be registered per GPIO.

    The watchdog may be cancelled by setting timeout to 0.

    Once a watchdog has been started monitors of the GPIO will be triggered every timeout interval after the last GPIO activity. The watchdog expiry will be indicated by a special TIMEOUT value.

    Example

    $ pigs wdog 23 90000
    -15
    ERROR: timeout not 0-60000

    $ pigs wdog 23 9000


    This example causes a report to be written to any notification pipes listening on GPIO 23 whenever GPIO 23 changes state or approximately every 9000 ms.

    WVAG trips - Add generic pulses to waveform

    This command adds 1 one or more triplets trips of GPIO on, GPIO off, delay to the existing waveform (if any).

    Upon success the total number of pulses in the waveform so far is returned. On error a negative status code will be returned.

    The triplets will be added at the start of the existing waveform. If they are to start offset from the start then the first triplet should consist solely of a delay i.e. 0 0 offset.

    Example

    $ pigs wvag 0x10 0x80 1000 0x80 0x10 9000
    2

    $ pigs wvag 0 0 10000 0x10 0x80 1000 0x80 0x10 9000
    4

    WVAS u b db sb o bvs - Add serial data to waveform

    This command adds a waveform representing serial data bvs to GPIO u at b baud to the existing waveform (if any). The serial data starts o microseconds from the start of the waveform.

    Upon success the total number of pulses in the waveform so far is returned. On error a negative status code will be returned.

    The serial data is formatted as one start bit, db data bits, and sb/2 stop bits.

    The baud rate may be between 50 and 1000000 bits per second.

    It is legal to add serial data streams with different baud rates to the same waveform.

    The bytes required for each character depend upon db.

    For db 1-8 there will be one byte per character.
    For db 9-16 there will be two bytes per character.
    For db 17-32 there will be four bytes per character.

    Example

    $ pigs wvas 4 9600 8 2 0 0x30 0x31 0x32 0x33
    23

    $ pigs wvas 7 38400 8 2 0 0x41 0x42
    35

    WVTAT - Returns the current transmitting waveform

    This command returns the id of the waveform currently being transmitted. Chained waves are not supported.

    Returns the waveform id or one of the following special values:

    9998 - transmitted wave not found
    9999 - no wave being transmitted

    Example

    $ pigs wvtat
    9999

    WVBSY - Check if waveform is being transmitted

    This command checks to see if a waveform is currently being transmitted.

    Returns 1 if a waveform is currently being transmitted, otherwise 0.

    Example

    $ pigs wvbsy
    0

    WVCHA bvs - Transmits a chain of waveforms

    This command transmits a chain of waveforms.
     ) Get a free notification handle.

    pi: >=0 (as returned by pigpio_start).


    Returns a handle greater than or equal to zero if OK, otherwise PI_NO_HANDLE.

    A notification is a method for being notified of GPIO state changes via a pipe.

    Pipes are only accessible from the local machine so this function serves no purpose if you are using the library from a remote machine. The in-built (socket) notifications provided by callback should be used instead.

    Notifications for handle x will be available at the pipe named /dev/pigpiox (where x is the handle number). E.g. if the function returns 15 then the notifications must be read from /dev/pigpio15.

    int notify_begin(int pi, unsigned handle, uint32_t bits)

    Start notifications on a previously opened handle.

        pi: >=0 (as returned by pigpio_start).
    handle: 0-31 (as returned by notify_open)
      bits: a mask indicating the GPIO to be notified.


    Returns 0 if OK, otherwise PI_BAD_HANDLE.

    The notification sends state changes for each GPIO whose corresponding bit in bits is set.

    Each notification occupies 12 bytes in the fifo as follows:

    typedef struct
    {
       uint16_t seqno;
       uint16_t flags;
       uint32_t tick;
       uint32_t level;
    } gpioReport_t;


    seqno: starts at 0 each time the handle is opened and then increments by one for each report.

    flags: three flags are defined, PI_NTFY_FLAGS_WDOG, PI_NTFY_FLAGS_ALIVE, and PI_NTFY_FLAGS_EVENT.

    If bit 5 is set (PI_NTFY_FLAGS_WDOG) then bits 0-4 of the flags indicate a GPIO which has had a watchdog timeout.

    If bit 6 is set (PI_NTFY_FLAGS_ALIVE) this indicates a keep alive signal on the pipe/socket and is sent once a minute in the absence of other notification activity.

    If bit 7 is set (PI_NTFY_FLAGS_EVENT) then bits 0-4 of the flags indicate an event which has been triggered.

    tick: the number of microseconds since system boot. It wraps around after 1h12m.

    level: indicates the level of each GPIO. If bit 1<<x is set then GPIO x is high.

    int notify_pause(int pi, unsigned handle)

    Pause notifications on a previously opened handle.

        pi: >=0 (as returned by pigpio_start).
    handle: 0-31 (as returned by notify_open)


    Returns 0 if OK, otherwise PI_BAD_HANDLE.

    Notifications for the handle are suspended until notify_begin is called again.

    int notify_close(int pi, unsigned handle)

    Stop notifications on a previously opened handle and release the handle for reuse.

        pi: >=0 (as returned by pigpio_start).
    handle: 0-31 (as returned by notify_open)


    Returns 0 if OK, otherwise PI_BAD_HANDLE.

    int set_watchdog(int For bits 17-32 there will be four bytes per character.

    Multi-byte transfers are made in least significant byte first order.

    E.g. to transfer 32 11-bit words 64 bytes need to be sent.

    E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A.

    The other bits in flags should be set to zero.

    Upon success a handle (>=0) is returned. On error a negative status code will be returned.

    Example

    $ pigs spio 0 100000 3 # Open channel 0 at 100kbps in mode 3.
    0

    $ pigs spio 0 32000 256 # Open channel 0 of auxiliary spi at 32kbps.
    1

    SPIR h num - SPI read bytes from handle

    This command returns num bytes read from the SPI device associated with handle h.

    Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned.

    Example

    $ pigs spir 0 10 # Read 10 bytes from the SPI device.
    10 0 0 0 0 0 0 0 0 0 0

    SPIW h bvs - SPI write bytes to handle

    This command writes bytes bvs to the SPI device associated with handle h.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs spiw 0 0x22 0x33 0xcc 0xff

    SPIX h bvs - SPI transfer bytes to handle

    This command writes bytes bvs to the SPI device associated with handle h. It returns the same number of bytes read from the device.

    Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned.

    Example

    $ pigs spix 0 0x22 0x33 0xcc 0xff
    4 0 0 0 0

    T/TICK - Get current tick

    This command returns the current system tick.

    Tick is the number of microseconds since system boot.

    As tick is an unsigned 32 bit quantity it wraps around after 2^32 microseconds, which is approximately 1 hour 12 minutes.

    Example

    $ pigs t mils 1000 t
    3691823946
    3692833987

    TRIG u pl L - Send a trigger pulse

    This command sends a trigger pulse of pl microseconds at level L to GPIO u.

    Upon success nothing is returned. On error a negative status code will be returned.

    The GPIO is set to not level at the end of the pulse.

    Example

    $ pigs trig 4 10 1

    $ pigs trig 4 51 1
    -46
    ERROR: trigger pulse > 50 microseconds

    W/WRITE g L - Write GPIO level

    This command sets GPIO g to level L. The level may be 0 (low, off, clear) or 1 (high, on, set).

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs w 23 0
    $ pigs w 23 1

    $ pigs w 23 2
    -5
    ERROR: level not 0-1

    WDOG
    The received data is held in a cyclic buffer.

    It is the user's responsibility to read the data (with
    SLR) in a timely fashion.

    Example

    $ pigs slro 23 19200 8

    $ pigs slro 23 19200 8
    -50
    ERROR: GPIO already in use

    SPIC h - SPI close handle

    This command closes the SPI handle h returned by a prior call to SPIO.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs spic 1

    $ pigs spic 1
    -25
    ERROR: unknown handle

    SPIO c b spf - SPI open channel at baud b with flags

    This command returns a handle to a SPI device on channel c.

    Data will be transferred at b bits per second. The flags spf may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select.

    Speeds between 32kbps and 125Mbps are allowed. Speeds above 30Mbps are unlikely to work.

    The Pi has two SPI peripherals: main and auxiliary.

    The main SPI has two chip selects (channels), the auxiliary has three.

    The auxiliary SPI is available on all models but the A and B.

    The GPIO used are given in the following table.

    NameCmd & DataMeaning
    Loop Start255 0Identify start of a wave block
    Loop Repeat255 1 x yloop x + y*256 times
    Delay255 2 x ydelay x + y*256 microseconds
    MISOMOSISCLKCE0CE1CE2
    Main SPI9101187-
    Aux SPI192021181716


    The flags consists of the least significant 22 bits.

    21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
     b  b  b  b  b  b  R  T  n  n  n  n  W  A u2 u1 u0 p2 p1 p0  m  m


    mm defines the SPI mode.

    Warning: modes 1 and 3 do not appear to work on the auxiliary SPI.

    Mode POL PHA
     0    0   0
     1    0   1
     2    1   0
     3    1   1


    px is 0 if CEx is active low (default) and 1 for active high.

    ux is 0 if the CEx GPIO is reserved for SPI (default) and 1 otherwise.

    A is 0 for the main SPI, 1 for the auxiliary SPI.

    W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Main SPI only.

    nnnn defines the number of bytes (0-15) to write before switching the MOSI line to MISO to read data. This field is ignored if W is not set. Main SPI only.

    T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. Auxiliary SPI only.

    R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. Auxiliary SPI only.

    bbbbbb defines the word size in bits (0-32). The default (0) sets 8 bits per word. Auxiliary SPI only.

    The SPIR, SPIW, and SPIX commands transfer data packed into 1, 2, or 4 bytes according to the word size in bits.

    For bits 1-8 there will be one byte per character.
    For bits 9-16 there will be two mand uses the system call to execute a shell script name with the given string str as its parameter.

    The exit status of the system call is returned if OK, otherwise PI_BAD_SHELL_STATUS.

    name must exist in /opt/pigpio/cgi and must be executable.

    The returned exit status is normally 256 times that set by the shell script exit function. If the script can't be found 32512 will be returned.

    The following table gives some example returned statuses.

    Script exit statusReturned system call status
    1256
    51280
    102560
    20051200
    script not found32512


    Example

    # pass two parameters, hello and world
    $ pigs shell scr1 hello world
    256

    # pass three parameters, hello, string with spaces, and world
    $ pigs shell scr1 "hello 'string with spaces' world"
    256

    # pass one parameter, hello string with spaces world
    $ pigs shell scr1 "\"hello string with spaces world\""
    256

    # non-existent script
    $ pigs shell scr78 par1
    32512

    SLR u num - Read bit bang serial data from GPIO

    This command returns up to num bytes of bit bang serial data read from GPIO u.

    Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned.

    The GPIO u should have been initialised with the SLRO command.

    The bytes returned for each character depend upon the number of data bits db specified in the SLRO command.

    For db 1-8 there will be one byte per character.
    For db 9-16 there will be two bytes per character.
    For db 17-32 there will be four bytes per character.

    Example

    $ pigs slr 15 20
    6 1 0 23 45 89 0

    SLRC u - Close GPIO for bit bang serial data

    This command closes GPIO u for reading bit bang serial data.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs slrc 23

    $ pigs slrc 23
    -38
    ERROR: no serial read in progress on GPIO

    SLRI u v - Sets bit bang serial data logic levels

    This command sets the logic level for reading bit bang serial data on GPIO u.

    Upon success nothing is returned. On error a negative status code will be returned.

    The invert parameter v is 1 for inverted signal, 0 for normal.

    Example

    $ pigs slri 17 1 # invert logic on GPIO 17

    $ pigs slri 23 0 # use normal logic on GPIO 23

    SLRO u b db - Open GPIO for bit bang serial data

    This command opens GPIO u for reading bit bang serial data at b baud and db data bits.

    Upon success nothing is returned. On error a negative status code will be returned.

    The baud a rate of 50 times per second.

    This will command a servo connected to GPIO 17 to rotate to its mid-point.

    Example

    pigs s 17 0 # Switch servo pulses off.

    SERC h - Close serial handle

    This command closes a serial handle h previously opened with SERO.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs serc 0 # First close okay.

    $ pigs serc 0 # Second close gives error.
    -25
    ERROR: unknown handle

    SERDA h - Check for serial data ready to read

    This command returns the number of bytes of data available to be read from the serial device associated with handle h.

    Upon success the count of bytes available to be read is returned (which may be 0). On error a negative status code will be returned.

    Example

    $ pigs serda 0
    0

    SERO dev b sef - Open serial device dev at baud b with flags

    This command opens the serial dev at b bits per second.

    No flags are currently defined. sef should be set to zero.

    Upon success a handle (>=0) is returned. On error a negative status code will be returned.

    The device name must start with /dev/tty or /dev/serial.

    The baud rate must be one of 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, or 230400.

    Example

    $ pigs sero /dev/ttyAMA0 9600 0
    0

    $ pigs sero /dev/tty1 38400 0
    1

    SERR h num - Read bytes from serial handle

    This command returns up to num bytes of data read from the serial device associated with handle h.

    Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned.

    Example

    $ pigs serr 0 10
    5 48 49 128 144 255

    $ pigs serr 0 10
    0

    SERRB - Read byte from serial handle

    This command returns a byte of data read from the serial device associated with handle h.

    Upon success a number between 0 and 255 is returned. On error a negative status code will be returned.

    Example

    $ pigs serrb 0
    23
    $ pigs serrb 0
    45

    SERW h bvs - Write bytes to serial handle

    This command writes bytes bvs to the serial device associated with handle h.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs serw 0 23 45 67 89

    SERWB h bv - Write byte to serial handle

    This command writes a single byte bv to the serial device associated with handle h.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs serwb 0 23
    $ pigs serwb 0 0xf0

    SHELL name str - Execute a shell command

    This com PWM is active on the GPIO the reported real range will be approximately 250M divided by the set PWM frequency.

    On error a negative status code will be returned.

    See PRS.

    Example

    $ pigs prrg 17
    250

    $ pigs pfs 17 0
    10
    $ pigs prrg 17
    20000

    $ pigs pfs 17 100000
    8000
    $ pigs prrg 17
    25

    PRS u v - Set GPIO PWM range

    This command sets the dutycycle range v to be used for GPIO u. Subsequent uses of command P/PWM will use a dutycycle between 0 (off) and v (fully on).

    Upon success the real underlying range used by the GPIO is returned. On error a negative status code will be returned.

    If PWM is currently active on the GPIO its dutycycle will be scaled to reflect the new range.

    The real range, the number of steps between fully off and fully on for each frequency, is given in the following table.

    #1#2#3#4#5#6#7#8#9
    2550100125200250400500625
    #10#11#12#13#14#15#16#17#18
    8001000125020002500400050001000020000


    The real value set by PRS is (dutycycle * real range) / range.

    See PRRG

    Example

    $ pigs prs 18 1000
    250

    PUD g p - Set GPIO pull up/down

    This command sets the internal pull/up down for GPIO g to mode p.

    Upon success nothing is returned. On error a negative status code will be returned.

    The mode may be pull-down (D), pull-up (U), or off (O).

    Example

    $ pigs pud 4 d # Set pull-down on GPIO 4.
    $ pigs pud 4 u # Set pull-up on GPIO 4.
    $ pigs pud 4 o # No pull-up/down on GPIO 4.

    R/READ g - Read GPIO level

    This reads the current level of GPIO g.

    Upon success the current level is returned. On error a negative status code will be returned.

    Example

    $ pigs r 17 # Get level of GPIO 17.
    0

    $ pigs r 4 # Get level of GPIO 4.
    1

    S/SERVO u v - Set GPIO servo pulsewidth

    This command starts servo pulses of v microseconds on GPIO u.

    Upon success nothing is returned. On error a negative status code will be returned.

    The servo pulsewidth may be 0 (off), 500 (most anti-clockwise) to 2500 (most clockwise).

    The range supported by servos varies and should probably be determined by experiment. Generally values between 1000-2000 should be safe. A value of 1500 should always be safe and represents the mid-point of rotation.

    You can DAMAGE a servo if you command it to move beyond its limits.

    Example

    $ pigs SERVO 17 1500


    This example causes an on pulse of 1500 microseconds duration to be transmitted on GPIO 17 at ;250  200  160
                125   100    80   50   40   25   20   10    5

    int get_PWM_frequency(int pi, unsigned user_gpio)

    Get the frequency of PWM being used on the GPIO.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31.


    For normal PWM the frequency will be that defined for the GPIO by set_PWM_frequency.

    If a hardware clock is active on the GPIO the reported frequency will be that set by hardware_clock.

    If hardware PWM is active on the GPIO the reported frequency will be that set by hardware_PWM.

    Returns the frequency (in hertz) used for the GPIO if OK, otherwise PI_BAD_USER_GPIO.

    int set_servo_pulsewidth(int pi, unsigned user_gpio, unsigned pulsewidth)

    Start (500-2500) or stop (0) servo pulses on the GPIO.

            pi: >=0 (as returned by pigpio_start).
     user_gpio: 0-31.
    pulsewidth: 0 (off), 500 (anti-clockwise) - 2500 (clockwise).


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_PULSEWIDTH or PI_NOT_PERMITTED.

    The selected pulsewidth will continue to be transmitted until changed by a subsequent call to set_servo_pulsewidth.

    The pulsewidths supported by servos varies and should probably be determined by experiment. A value of 1500 should always be safe and represents the mid-point of rotation.

    You can DAMAGE a servo if you command it to move beyond its limits.

    OTHER UPDATE RATES:

    This function updates servos at 50Hz. If you wish to use a different update frequency you will have to use the PWM functions.

    Update Rate (Hz)     50   100  200  400  500
    1E6/Hz            20000 10000 5000 2500 2000


    Firstly set the desired PWM frequency using set_PWM_frequency.

    Then set the PWM range using set_PWM_range to 1E6/Hz. Doing this allows you to use units of microseconds when setting the servo pulsewidth.

    E.g. If you want to update a servo connected to GPIO 25 at 400Hz

    set_PWM_frequency(25, 400);
    set_PWM_range(25, 2500);


    Thereafter use the set_PWM_dutycycle function to move the servo, e.g. set_PWM_dutycycle(25, 1500) will set a 1500 us pulse.

    int get_servo_pulsewidth(int pi, unsigned user_gpio)

    Return the servo pulsewidth in use on a GPIO.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31.


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERVO_GPIO.

    int notify_open(int pi(int pi, unsigned user_gpio)

    Get the real underlying range of PWM values being used on the GPIO.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31.


    Returns the real range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO.

    If a hardware clock is active on the GPIO the reported real range will be 1000000 (1M).

    If hardware PWM is active on the GPIO the reported real range will be approximately 250M divided by the set PWM frequency.

    int set_PWM_frequency(int pi, unsigned user_gpio, unsigned frequency)

    Set the frequency (in Hz) of the PWM to be used on the GPIO.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31.
    frequency: >=0 (Hz).


    Returns the numerically closest frequency if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_PERMITTED.

    If PWM is currently active on the GPIO it will be switched off and then back on at the new frequency.

    Each GPIO can be independently set to one of 18 different PWM frequencies.

    The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5, 8, or 10 microseconds (default 5). The sample rate is set when the pigpio daemon is started.

    The frequencies for each sample rate are:

                           Hertz

           1: 40000 20000 10000 8000 5000 4000 2500 2000 1600
               1250  1000   800  500  400  250  200  100   50

           2: 20000 10000  5000 4000 2500 2000 1250 1000  800
                625   500   400  250  200  125  100   50   25

           4: 10000  5000  2500 2000 1250 1000  625  500  400
                313   250   200  125  100   63   50   25   13
    sample
     rate
     (us)  5:  8000  4000  2000 1600 1000  800  500  400  320
                250   200   160  100   80   50   40   20   10

           8:  5000  2500  1250 1000  625  500  313  250  200
                156   125   100   63   50   31   25   13    6

          10:  4000  2000  1000  800  500  400  nbsp;    if (micros > MIN_MESSAGE_GAP)
             {
                decode->state = INSIDE_CODE;
                decode->count = 0;
             }
          }
       }
       else
       {
          if (micros > MAX_MESSAGE_END)
          {
             /* end of message */

             /* ignore if last code not consumed */

             if (!ir_hash) ir_hash = getHash(decode);

             decode->state = OUTSIDE_CODE;
          }
          else
          {
             if (decode->count < (MAX_TRANSITIONS-1))
             {
                if (level != PI_TIMEOUT)
                   decode->micros[decode->count++] = micros;
             }
          }
       }
    }

    int compare(unsigned int oldval, unsigned int newval)
    {
       if      (newval < (oldval * 0.75)) {return 1;}
       else if (oldval < (newval * 0.75)) {return 2;}
       else                               {return 4;}
    }

    uint32_t getHash(decode_t * decode)
    {
       /* use FNV-1a */

       uint32_t hash;
       int i, value;

       if (decode->count < 6) {return 0;}

       hash = FNV_BASIS_32;

       for (i=0; i<(decode->count-2); i++)
       {
          value = compare(decode->micros[i], decode->micros[i+2]);

          hash = hash ^ value;
          hash = (hash * FNV_PRIME_32);
       }

       return hash;
    }

    BUILD

    cc -o ir_remote ir_remote.c -lpigpio -lrt -lpthread

    RUN

    sudo ./ir_remote

    A hash code is formed from the level transitions detected during a remote key press.  This is likely to be unique over multiple remotes and keys.

    While the program is running you can capture the waveform using the notification feature built in to pigpio.  Issue the following commands on the Pi.

    pigs no
    pig2vcd  </dev/pigpio0 >ir.vcd &
    pigs nb 0 0x80 # set bits for gpios 7 (0x80)

    Press a few different remotes and keys.  Then enter

    pigs nc 0

    The file ir.vcd will contain the captured waveform, which can be viewed using GTKWave.

    Overview

    ir remote waveform 1

    Remote A typical waveform

    ir remote waveform 2

    Remote B typical waveform

    ir remote waveform 3  connected to any spare gpio.  Here it's connected via a 4K7 current limiting resistor.  This isn't really needed as the device has an internal 23K resistor in-line.  It does no harm though.

    Pin 2 should be connected to a Pi ground pin.

    Pin 3 should be connected to a Pi 5V pin.

    Here pin 1 to gpio7 (P1-26) via a 4K7 resistor, pin 2 to ground (P1-14), and pin 3 to 5V (P1-2).

    photo of set-up

    CODE

    #include <stdio.h>

    #include <pigpio.h>

    #define IR_PIN 7

    #define OUTSIDE_CODE 0
    #define INSIDE_CODE  1

    #define MIN_MESSAGE_GAP 3000
    #define MAX_MESSAGE_END 3000

    #define MAX_TRANSITIONS 500

    /*
       using the FNV-1a hash                
       from http://isthe.com/chongo/tech/comp/fnv/#FNV-param
    */

    #define FNV_PRIME_32 16777619
    #define FNV_BASIS_32 2166136261U

    static volatile uint32_t ir_hash = 0;

    typedef struct
    {
       int state;
       int count;
       int level;
       uint16_t micros[MAX_TRANSITIONS];
    } decode_t;

    /* forward declarations */

    void     alert(int gpio, int level, uint32_t tick);
    uint32_t getHash(decode_t * decode);
    void     updateState(decode_t * decode, int level, uint32_t micros);

    int main(int argc, char * argv[])
    {
       if (gpioInitialise()<0)
       {
          return 1 ;
       }

       /* IR pin as input */

       gpioSetMode(IR_PIN, PI_INPUT);

       /* 5ms max gap after last pulse */

       gpioSetWatchdog(IR_PIN, 5);

       /* monitor IR level changes */

       gpioSetAlertFunc(IR_PIN, alert);

       while (1)
       {
          if (ir_hash)
          {
             /* non-zero means new decode */
             printf("ir code is %u\ ", ir_hash);
             ir_hash = 0;
          }

          gpioDelay(100000); /* check remote 10 times per second */
       }

       gpioTerminate();
    }

    void alert(int gpio, int level, uint32_t tick)
    {
       static int inited = 0;

       static decode_t activeHigh, activeLow;

       static uint32_t lastTick;

       uint32_t diffTick;

       if (!inited)
       {
          inited = 1;

          activeHigh.state = OUTSIDE_CODE; activeHigh.level = PI_LOW;
          activeLow.state  = OUTSIDE_CODE; activeLow.level  = PI_HIGH;

          lastTick = tick;
          return;
       }

       diffTick = tick - lastTick;

       if (level != PI_TIMEOUT) lastTick = tick;

       updateState(&activeHigh, level, diffTick);
       updateState(&activeLow, level, diffTick);
    }

    void updateState(decode_t * decode, int level, uint32_t micros)
    {
       /*
          We are dealing with active high as well as active low
          remotes.  Abstract the common functionality.
       */

       if (decode->state == OUTSIDE_CODE)
       {
          if (level == decode->level)
          {
        &).
     gpio: 0-53.
    level: 0, 1.


    Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_LEVEL, or PI_NOT_PERMITTED.

    Notes

    If PWM or servo pulses are active on the GPIO they are switched off.

    int set_PWM_dutycycle(int pi, unsigned user_gpio, unsigned dutycycle)

    Start (non-zero dutycycle) or stop (0) PWM pulses on the GPIO.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31.
    dutycycle: 0-range (range defaults to 255).


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_DUTYCYCLE, or PI_NOT_PERMITTED. Notes

    The set_PWM_range function may be used to change the default range of 255.

    int get_PWM_dutycycle(int pi, unsigned user_gpio)

    Return the PWM dutycycle in use on a GPIO.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31.


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_PWM_GPIO.

    For normal PWM the dutycycle will be out of the defined range for the GPIO (see get_PWM_range).

    If a hardware clock is active on the GPIO the reported dutycycle will be 500000 (500k) out of 1000000 (1M).

    If hardware PWM is active on the GPIO the reported dutycycle will be out of a 1000000 (1M).

    int set_PWM_range(int pi, unsigned user_gpio, unsigned range)

    Set the range of PWM values to be used on the GPIO.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31.
        range: 25-40000.


    Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_DUTYRANGE, or PI_NOT_PERMITTED.

    Notes

    If PWM is currently active on the GPIO its dutycycle will be scaled to reflect the new range.

    The real range, the number of steps between fully off and fully on for each of the 18 available GPIO frequencies is

      25(#1),    50(#2),   100(#3),   125(#4),    200(#5),    250(#6),
     400(#7),   500(#8),   625(#9),   800(#10),  1000(#11),  1250(#12),
    2000(#13), 2500(#14), 4000(#15), 5000(#16), 10000(#17), 20000(#18)


    The real value set by set_PWM_range is (dutycycle * real range) / range.

    int get_PWM_range(int pi, unsigned user_gpio)

    Get the range of PWM values being used on the GPIO.

           pi: >=0 (as returned by pigpio_start).
    user_gpio: 0-31.


    Returns the dutycycle range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO.

    If a hardware clock or hardware PWM is active on the GPIO the reported range will be 1000000 (1M).

    int get_PWM_real_rangetification streams.

    addrStr: specifies the host or IP address of the Pi running the
             pigpio daemon.  It may be NULL in which case localhost
             is used unless overridden by the PIGPIO_ADDR environment
             variable.

    portStr: specifies the port address used by the Pi running the
             pigpio daemon.  It may be NULL in which case "8888"
             is used unless overridden by the PIGPIO_PORT environment
             variable.


    Returns an integer value greater than or equal to zero if OK.

    This value is passed to the GPIO routines to specify the Pi to be operated on.

    void pigpio_stop(int pi)

    Terminates the connection to a pigpio daemon and releases resources used by the library.

    pi: >=0 (as returned by pigpio_start).

    int set_mode(int pi, unsigned gpio, unsigned mode)

    Set the GPIO mode.

      pi: >=0 (as returned by pigpio_start).
    gpio: 0-53.
    mode: PI_INPUT, PI_OUTPUT, PI_ALT0, PI_ALT1,
          PI_ALT2, PI_ALT3, PI_ALT4, PI_ALT5.


    Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_MODE, or PI_NOT_PERMITTED.

    int get_mode(int pi, unsigned gpio)

    Get the GPIO mode.

      pi: >=0 (as returned by pigpio_start).
    gpio: 0-53.


    Returns the GPIO mode if OK, otherwise PI_BAD_GPIO.

    int set_pull_up_down(int pi, unsigned gpio, unsigned pud)

    Set or clear the GPIO pull-up/down resistor.

      pi: >=0 (as returned by pigpio_start).
    gpio: 0-53.
     pud: PI_PUD_UP, PI_PUD_DOWN, PI_PUD_OFF.


    Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_PUD, or PI_NOT_PERMITTED.

    int gpio_read(int pi, unsigned gpio)

    Read the GPIO level.

      pi: >=0 (as returned by pigpio_start).
    gpio:0-53.


    Returns the GPIO level if OK, otherwise PI_BAD_GPIO.

    int gpio_write(int pi, unsigned gpio, unsigned level)

    Write the GPIO level.

       pi: >=0 (as returned by pigpio_startmicros of the current waveform wave_get_high_micros Length of longest waveform so far wave_get_max_micros Absolute maximum allowed micros wave_get_pulses Length in pulses of the current waveform wave_get_high_pulses Length of longest waveform so far wave_get_max_pulses Absolute maximum allowed pulses UTILITIES get_current_tick Get current tick (microseconds) get_hardware_revision Get hardware revision get_pigpio_version Get the pigpio version pigpiod_if_version Get the pigpiod_if2 version pigpio_error Get a text description of an error code. time_sleep Sleeps for a float number of seconds time_time Float number of seconds since the epoch

    FUNCTIONS

    double time_time(void)

    Return the current time in seconds since the Epoch.

    void time_sleep(double seconds)

    Delay execution for a given number of seconds.

    seconds: the number of seconds to delay.

    char *pigpio_error(int errnum)

    Return a text description for an error code.

    errnum: the error code.

    unsigned pigpiod_if_version(void)

    Return the pigpiod_if2 version.

    pthread_t *start_thread(gpioThreadFunc_t thread_func, void *userdata)

    Starts a new thread of execution with thread_func as the main routine.

    thread_func: the main function for the new thread.
       userdata: a pointer to an arbitrary argument.


    Returns a pointer to pthread_t if OK, otherwise NULL.

    The function is passed the single argument userdata.

    The thread can be cancelled by passing the pointer to pthread_t to stop_thread.

    void stop_thread(pthread_t *pth)

    Cancels the thread pointed at by pth.

    pth: the thread to be stopped.


    No value is returned.

    The thread to be stopped should have been started with start_thread.

    int pigpio_start(char *addrStr, char *portStr)

    Connect to the pigpio daemon. Reserving command and no B|b ' 3#!/pdif2pigpiod C I/F pigpiod C Interfacerf-rx.jpgstepper.jpgkeypad.jpg

    pigpiod_if2 is a C library for the Raspberry which allows control of the GPIO via the socket interface to the pigpio daemon.

    Features

    o hardware timed PWM on any of GPIO 0-31

    o hardware timed servo pulses on any of GPIO 0-31

    o callbacks when any of GPIO 0-31 change state

    o callbacks at timed intervals

    o reading/writing all of the GPIO in a bank as one operation

    o individually setting GPIO modes, reading and writing

    o notifications when any of GPIO 0-31 change state

    o the construction of output waveforms with microsecond timing

    o rudimentary permission control over GPIO

    o a simple interface to start and stop new threads

    o I2C, SPI, and serial link wrappers

    o creating and running scripts on the pigpio daemon

    GPIO

    ALL GPIO are identified by their Broadcom number.

    Notes

    The PWM and servo pulses are timed using the DMA and PWM/PCM peripherals.

    Usage

    Include <pigpiod_if2.h> in your source files.

    Assuming your source is in prog.c use the following command to build

    gcc -Wall -pthread -o prog prog.c -lpigpiod_if2 -lrt


    to run make sure the pigpio daemon is running

    sudo pigpiod

     ./prog # sudo is not required to run programs linked to pigpiod_if2


    For examples see x_pigpiod_if2.c within the pigpio archive file.

    Notes

    All the functions which return an int return < 0 on error

    OVERVIEW

    ESSENTIAL href="#spi_close">spi_close Closes a SPI device
    spi_read Reads bytes from a SPI device
    spi_write Writes bytes to a SPI device
    spi_xfer Transfers bytes with a SPI device
    SPI BIT BANG
    bb_spi_open Opens GPIO for bit banging SPI
    bb_spi_close Closes GPIO for bit banging SPI
    bb_spi_xfer Transfers bytes with bit banging SPI
    FILES
    file_open Opens a file
    file_close Closes a file
    file_read Reads bytes from a file
    file_write Writes bytes to a file
    file_seek Seeks to a position within a file
    file_list List files which match a pattern
    WAVES
    wave_clear Deletes all waveforms
    wave_add_new Starts a new waveform
    wave_add_generic Adds a series of pulses to the waveform
    wave_add_serial Adds serial data to the waveform
    wave_create Creates a waveform from added data
    wave_create_and_pad Creates a waveform of fixed size from added data
    wave_delete Deletes one or more waveforms
    wave_send_once Transmits a waveform once
    wave_send_repeat Transmits a waveform repeatedly
    wave_send_using_mode Transmits a waveform in the chosen mode
    wave_chain Transmits a chain of waveforms
    wave_tx_at Returns the current transmitting waveform
    wave_tx_busy Checks to see if the waveform has ended
    wave_tx_stop Aborts the current waveform
    wave_get_cbs Length in cbs of the current waveform
    wave_get_high_cbs Length of longest waveform so far
    wave_get_max_cbs Absolute maximum allowed cbs
    wave_get_micros Length in te_data">i2c_write_byte_data smbus write byte data
    i2c_read_word_data smbus read word data
    i2c_write_word_data smbus write word data
    i2c_read_block_data smbus read block data
    i2c_write_block_data smbus write block data
    i2c_read_i2c_block_data smbus read I2C block data
    i2c_write_i2c_block_data smbus write I2C block data
    i2c_read_device Reads the raw I2C device
    i2c_write_device Writes the raw I2C device
    i2c_process_call smbus process call
    i2c_block_process_call smbus block process call
    i2c_zip Performs multiple I2C transactions
    I2C BIT BANG
    bb_i2c_open Opens GPIO for bit banging I2C
    bb_i2c_close Closes GPIO for bit banging I2C
    bb_i2c_zip Performs bit banged I2C transactions
    I2C/SPI SLAVE
    bsc_xfer I2C/SPI as slave transfer
    bsc_i2c I2C as slave transfer
    SERIAL
    serial_open Opens a serial device
    serial_close Closes a serial device
    serial_read_byte Reads a byte from a serial device
    serial_write_byte Writes a byte to a serial device
    serial_read Reads bytes from a serial device
    serial_write Writes bytes to a serial device
    serial_data_available Returns number of bytes ready to be read
    SERIAL BIT BANG (read only)
    bb_serial_read_open Opens a GPIO for bit bang serial reads
    bb_serial_read_close Closes a GPIO for bit bang serial reads
    bb_serial_invert Invert serial logic (1 invert, 0 normal)
    bb_serial_read Reads bit bang serial data from a GPIO
    SPI
    spi_open Opens a SPI device
    stop_thread Stop a previously started thread
    ADVANCED
    notify_open Request a notification handle
    notify_begin Start notifications for selected GPIO
    notify_pause Pause notifications
    notify_close Close a notification
    hardware_clock Start hardware clock on supported GPIO
    hardware_PWM Start hardware PWM on supported GPIO
    set_glitch_filter Set a glitch filter on a GPIO
    set_noise_filter Set a noise filter on a GPIO
    set_pad_strength Sets a pads drive strength
    get_pad_strength Gets a pads drive strength
    shell_ Executes a shell command
    Custom
    custom_1 User custom function 1
    custom_2 User custom function 2
    Events
    event_callback Sets a callback for an event
    event_callback_ex Sets a callback for an event, extended
    event_callback_cancel Cancel an event callback
    event_trigger Triggers an event
    wait_for_event Wait for an event
    Scripts
    store_script Store a script
    run_script Run a stored script
    update_script Set a scripts parameters
    script_status Get script status and parameters
    stop_script Stop a running script
    delete_script Delete a stored script
    I2C
    i2c_open Opens an I2C device
    i2c_close Closes an I2C device
    i2c_write_quick smbus write quick
    i2c_read_byte smbus read byte
    i2c_write_byte smbus write byte
    i2c_read_byte_data smbus read byte data
    pigpio_start Connects to a pigpio daemon
    pigpio_stop Disconnects from a pigpio daemon
    BASIC
    set_mode Set a GPIO mode
    get_mode Get a GPIO mode
    set_pull_up_down Set/clear GPIO pull up/down resistor
    gpio_read Read a GPIO
    gpio_write Write a GPIO
    PWM (overrides servo commands on same GPIO)
    set_PWM_dutycycle Start/stop PWM pulses on a GPIO
    set_PWM_frequency Configure PWM frequency for a GPIO
    set_PWM_range Configure PWM range for a GPIO
    get_PWM_dutycycle Get the PWM dutycycle in use on a GPIO
    get_PWM_frequency Get configured PWM frequency for a GPIO
    get_PWM_range Get configured PWM range for a GPIO
    get_PWM_real_range Get underlying PWM range for a GPIO
    Servo (overrides PWM commands on same GPIO)
    set_servo_pulsewidth Start/stop servo pulses on a GPIO
    get_servo_pulsewidth Get the servo pulsewidth in use on a GPIO
    INTERMEDIATE
    gpio_trigger Send a trigger pulse to a GPIO.
    set_watchdog Set a watchdog on a GPIO.
    read_bank_1 Read all GPIO in bank 1
    read_bank_2 Read all GPIO in bank 2
    clear_bank_1 Clear selected GPIO in bank 1
    clear_bank_2 Clear selected GPIO in bank 2
    set_bank_1 Set selected GPIO in bank 1
    set_bank_2 Set selected GPIO in bank 2
    callback Create GPIO level change callback
    callback_ex Create GPIO level change callback, extended
    callback_cancel Cancel a callback
    wait_for_edge Wait for GPIO level change
    start_thread Start a new thread
    Are my GPIO broken?

    Audio is broken

    Can´t initialise pigpio library

    Can´t lock var/run/pigpio.pid

    Hello World!

    Clock skew, make fails

    Have I fried my GPIO?

    How do I debounce inputs?

    How fast is SPI?

    Library update didn't work

    make fails with clock skew

    Porting pigpio to another CPU/SoC

    Sound isn't working

    Symbol not found

    What is I2C?

    What is Serial?

    What is SPI?

    Which library should I use?

    Are my GPIO broken?

    See Have I fried my GPIO?

    Audio is broken

    See Sound isn't working

    Can´t lock /var/run/pigpio.pid

    See Can´t_initialise_pigpio_library

    Can´t initialise pigpio library

    This message means the pigpio daemon is already running.

    The default daemon is called pigpiod and may be removed as follows.

    Check that it is running with the command

    ps aux | grep pigpiod

    Kill the daemon with

    sudo killall pigpiod

    If your own program is acting as the daemon it may be removed as follows.

    Find its process id (pid).

    cat /var/run/pigpio.pid

    Kill the program with

    sudo kill -9 pid

    If the above doesn't work do the following and try starting the daemon again

    sudo rm /var/run/pigpio.pid

    To start the daemon do

    sudo pigpiod

    Have I fried my GPIO?

    If you think you have damaged one or more GPIO you can carry out a diagnostic test.

    The test is a command line script called gpiotest

    For the duration of the test nothing must be connected to the GPIO (no LEDs, wires, ribbon cables etc.).

    The test checks that each GPIO may be read and written and that the internal resistor pull-ups and pull-downs are functional.

    A video showing what happens to the GPIO during a test.

    A test with all GPIO okay.

    This program checks the Pi's (user) gpios.
    
    The program reads and writes all the gpios.  Make sure NOTHING
    is connected to the gpios during this test.
    
    The program uses the pigpio daemon which must be running.
    
    To start the daemon use the command sudo pigpiod.
    
    Press the ENTER key to continue or ctrl-C to abort...
    
    Testing...
    Skipped non-user gpios: 0 1 28 29 30 31 
    Tested user gpios: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
    19 20 21 22 23 24 25 26 27 Failed user gpios: None

    A test showing failed GPIO rjaXOE=1% sitemap sif python piscopepigs pigpiod pig2vcdpif pdif2pdifmisc indexfaq examples+ex_sonar_ranger /ex_rotary_encoder+ex_motor_shield%ex_ir_remote ex_LDR download cifH 1 FGHIJKLMNO n>&rns 1 if the edge occurred, otherwise 0.

    int bsc_xfer(int pi, bsc_xfer_t *bscxfer)

    This function provides a low-level interface to the SPI/I2C Slave peripheral on the BCM chip.

    This peripheral allows the Pi to act as a hardware slave device on an I2C or SPI bus.

    This is not a bit bang version and as such is OS timing independent. The bus timing is handled directly by the chip.

    The output process is simple. You simply append data to the FIFO buffer on the chip. This works like a queue, you add data to the queue and the master removes it.

    I can't get SPI to work properly. I tried with a control word of 0x303 and swapped MISO and MOSI.

    The function sets the BSC mode, writes any data in the transmit buffer to the BSC transmit FIFO, and copies any data in the BSC receive FIFO to the receive buffer.

         pi: >=0 (as returned by pigpio_start).
    bscxfer: a structure defining the transfer.

    typedef struct
    {
       uint32_t control;          // Write
       int rxCnt;                 // Read only
       char rxBuf[BSC_FIFO_SIZE]; // Read only
       int txCnt;                 // Write
       char txBuf[BSC_FIFO_SIZE]; // Write
    } bsc_xfer_t;


    To start a transfer set control (see below), copy the bytes to be added to the transmit FIFO (if any) to txBuf and set txCnt to the number of copied bytes.

    Upon return rxCnt will be set to the number of received bytes placed in rxBuf.

    The returned function value is the status of the transfer (see below).

    If there was an error the status will be less than zero (and will contain the error code).

    The most significant word of the returned status contains the number of bytes actually copied from txBuf to the BSC transmit FIFO (may be less than requested if the FIFO already contained untransmitted data).

    Note that the control word sets the BSC mode. The BSC will stay in that mode until a different control word is sent.

    GPIO used for models other than those based on the BCM2711.

    SDASCLMOSISCLKMISOCE
    I2C1819----
    SPI--18192021


    GPIO used for models based on the BCM2711 (e.g. the Pi4B).

    SDASCLMOSISCLKMISOCE
    I2C1011----
    SPI--101198


    When a zero control word is received the used GPIO will be reset to INPUT mode.

    control consists of the following bits.

    22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
     a  a  a  a  a  a  a  -  - IT HC TF IR RE TE BK EC ES PL PH I2 SP EN


    Bits 0-1Ground
    - 25 26 7 CE1
    ID_SD 0 27 28 1 ID_SC

    5 29 30 - Ground

    6 31 32 12

    13 33 34 - Ground
    miso 19 35 36 16 ce2

    26 37 38 20 mosi
    Ground - 39 40 21 sclk

    Compute Module

    All 54 GPIO may be physically accessed.  Some are reserved for system use - refer to the Compute Module documentation.

    Only GPIO 0-31 are supported for hardware timed sampling, PWM, servo pulses, alert callbacks, waves, and software serial links.

    Other Languages

    There are several third party projects which provide wrappers for pigpio.

    Some are listed here:

    • Erlang (skvamme)
    • Java JNI wrapper around the pigpio C library (mattlewis)
    • Java via diozero, a high level wrapper around pigpio, Pi4J, wiringPi etc (mattlewis)
    • Java (nkolban)
    • .NET/mono (unosquare)
    • Node.js A wrapper for the pigpio C library (fivdi)
    • Node.js A client for pigpio socket interface (guymcswain)
    • Perl (Gligan Calin Horea)
    • Ruby (Nak)
    • Smalltalk(Instantiations)
    • Xojo(UBogun)
    • Xojo(Eugene Dakin)

    The PWM and servo pulses are timed using the DMA and PWM/PCM peripherals.  This use was inspired by Richard Hirst's servoblaster kernel module.

    !text-align: center;">7 8 -
    Ground

    Type 3 - Model A+, B+, Pi Zero, Pi Zero W, Pi2B, Pi3B, Pi4B

    • 40 pin expansion header (J8).
    • Hardware revision numbers of 16 or greater.
    • User GPIO 2-27 (0 and 1 are reserved).

    GPIO pin pin GPIO
    3V3 - 1 2 - 5V
    SDA 2 3 4 - 5V
    SCL 3 5 6 - Ground

    4 7 8 14 TXD
    Ground - 9 10 15 RXD
    ce1 17 11 12 18 ce0

    27 13 14 - Ground

    22 15 16 23
    3V3 -
    17 18 24
    MOSI 10 19 20 - Ground
    MISO 9 21 22 25
    SCLK 11 23 24 8 CE0
    ": center;">6 - Ground

    4 7 8 14 TXD
    Ground - 9 10 15 RXD
    ce1 17 11 12 18 ce0

    27 13 14 - Ground

    22 15 16 23
    3V3 -
    17 18 24
    MOSI 10 19 20 - Ground
    MISO 9 21 22 25
    SCLK 11 23 24 8 CE0
    Ground - 25 26 7 CE1


    GPIO pin pin GPIO
    5V
    - 1 2 - 3V3
    SDA
    28 3 4 29 SCL

    30 5 6 31
    Ground
    -
    Ground

    4 7 8 14 TXD
    Ground - 9 10 15 RXD
    ce1 17 11 12 18 ce0

    21 13 14 - Ground

    22 15 16 23
    3V3 -
    17 18 24
    MOSI 10 19 20 - Ground
    MISO 9 21 22 25
    SCLK 11 23 24 8 CE0
    Ground - 25 26 7 CE1

    Type 2 - Model A, B (revision 2)

    26 pin header (P1) and an additional 8 pin header (P5).
    • Hardware revision numbers of 4, 5, 6 (B), 7, 8, 9 (A), and 13, 14, 15 (B).
    • User GPIO 2-4, 7-11, 14-15, 17-18, 22-25, 27-31.

    GPIO pin pin GPIO
    3V3 - 1 2 - 5V
    SDA 2 3 4 - 5V
    SCL 3 5    }
       else
       {
          inited = 1;
          firstTick = tick;
          lastTick = firstTick;
       }
    }

    BUILD

    cc -o LDR LDR.c -lpigpio -lrt -lpthread

    RUN

    sudo ./LDR >LDR.dat &

    While the program is running you can capture the waveform using the notification feature built in to pigpio.  Issue the following commands on the Pi.

    pigs no
    pig2vcd  </dev/pigpio0 >LDR.vcd &
    pigs nb 0 0x40000 # set bit for gpio 18

    Change the light falling on the LDR for a few seconds (e.g. shine a torch on it or shade it with your hands).

    pigs nc 0

    The file LDR.vcd will contain the captured waveform, which can be viewed using GTKWave.

    Overview

    LDR waveform 1

    Reading circa every 10ms

    LDR waveform 2

    One reading, circa 400us

    LDR waveform 3

    The file LDR.dat will contain pairs of timestamps and recharge time (in us).  The following  script will convert the timestamps into seconds.

    awk '{print $1/1000000, $2}' LDR.dat >LDR-secs.dat

    Gnuplot is a useful tool to graph data.

    plot [14:24] 'LDR-secs.dat' with lines title 'LDR'

    Gnuplot readings 14-24 seconds

    gnuplot 1

    plot [18:21] 'LDR-secs.dat' with lines title 'LDR'

    Gnuplot readings 18-21 seconds

    Gnuplot 2

    '3 are copied unchanged to the BSC CR register. See pages 163-165 of the Broadcom peripherals document for full details.

    aaaaaaadefines the I2C slave address (only relevant in I2C mode)
    ITinvert transmit status flags
    HCenable host control
    TFenable test FIFO
    IRinvert receive status flags
    REenable receive
    TEenable transmit
    BKabort operation and clear FIFOs
    ECsend control register as first I2C byte
    ESsend status register as first I2C byte
    PLset SPI polarity high
    PHset SPI phase high
    I2enable I2C mode
    SPenable SPI mode
    ENenable BSC peripheral


    The returned status has the following format

    20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
     S  S  S  S  S  R  R  R  R  R  T  T  T  T  T RB TE RF TF RE TB


    Bits 0-15 are copied unchanged from the BSC FR register. See pages 165-166 of the Broadcom peripherals document for full details.

    SSSSSnumber of bytes successfully copied to transmit FIFO
    RRRRRnumber of bytes in receieve FIFO
    TTTTTnumber of bytes in transmit FIFO
    RBreceive busy
    TEtransmit FIFO empty
    RFreceive FIFO full
    TFtransmit FIFO full
    REreceive FIFO empty
    TBtransmit busy


    The following example shows how to configure the BSC peripheral as an I2C slave with address 0x13 and send four bytes.

    Example

    bsc_xfer_t xfer;

    xfer.control = (0x13<<16) | 0x305;

    memcpy(xfer.txBuf, "ABCD", 4);
    xfer.txCnt = 4;

    status = bsc_xfer(pi, &xfer);

    if (status >= 0)
    {
       // process transfer
    }

    int bsc_i2c(int pi, int i2c_addr, bsc_xfer_t *bscxfer)

    This function allows the Pi to act as a slave I2C device.

    This function is not available on the BCM2711 (e.g.as used in the Pi4B).

    The data bytes (if any) are written to the BSC transmit FIFO and the bytes in the BSC receive FIFO are returned.

          pi: >=0 (as returned by pigpio_start).
    i2c_addr: 0-0x7F.
     bscxfer: a structure defining the transfer.

    typedef struct
    {
       uint32_t control;          // N/A
       int rxCnt;                 // Read only
       char rxBuf[BSC_FIFO_SIZE]; // Read only
       int txCnt;                 // Write
      &n(bsp;char txBuf[BSC_FIFO_SIZE]; // Write
    } bsc_xfer_t;


    txCnt is set to the number of bytes to be transmitted, possibly zero. The data itself should be copied to txBuf.

    Any received data will be written to rxBuf with rxCnt set.

    See bsc_xfer for details of the returned status value.

    If there was an error the status will be less than zero (and will contain the error code).

    Note that an i2c_address of 0 may be used to close the BSC device and reassign the used GPIO as inputs.

    int event_callback(int pi, unsigned event, evtCBFunc_t f)

    This function initialises an event callback.

       pi: >=0 (as returned by pigpio_start).
    event: 0-31.
        f: the callback function.


    The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback.

    The callback is called with the event id, and tick, whenever the event occurs.

    int event_callback_ex(int pi, unsigned event, evtCBFuncEx_t f, void *userdata)

    This function initialises an event callback.

          pi: >=0 (as returned by pigpio_start).
       event: 0-31.
           f: the callback function.
    userdata: a pointer to arbitrary user data.


    The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback.

    The callback is called with the event id, the tick, and the userdata pointer whenever the event occurs.

    int event_callback_cancel(unsigned callback_id)

    This function cancels an event callback identified by its id.

    callback_id: >=0, as returned by a call to event_callback or
    event_callback_ex.


    The function returns 0 if OK, otherwise pigif_callback_not_found.

    int wait_for_event(int pi, unsigned event, double timeout)

    This function waits for an event for up to timeout seconds.

         pi: >=0 (as returned by pigpio_start).
      event: 0-31.
    timeout: >=0.


    The function returns when the event occurs or after the timeout.

    The function returns 1 if the event occurred, otherwise 0.

    int event_trigger(int pi, unsigned event)

    This function signals the occurrence of an event.

       pi: >=0 (as returned by pigpio_start).
    event: 0-31.


    Returns 0 if OK, otherwise PI_BAD_EVENT_ID.

    An event is a signal used to inform one or more consumers to start an actio)n. Each consumer which has registered an interest in the event (e.g. by calling event_callback) will be informed by a callback.

    One event, PI_EVENT_BSC (31) is predefined. This event is auto generated on BSC slave activity.

    The meaning of other events is arbitrary.

    Note that other than its id and its tick there is no data associated with an event.

    PARAMETERS

    active: 0-1000000

    The number of microseconds level changes are reported for once a noise filter has been triggered (by steady microseconds of a stable level).

    *addrStr

    A string specifying the host or IP address of the Pi running the pigpio daemon. It may be NULL in which case localhost is used unless overridden by the PIGPIO_ADDR environment variable.

    arg1

    An unsigned argument passed to a user customised function. Its meaning is defined by the customiser.

    arg2

    An unsigned argument passed to a user customised function. Its meaning is defined by the customiser.

    argc

    The count of bytes passed to a user customised function.

    *argx

    A pointer to an array of bytes passed to a user customised function. Its meaning and content is defined by the customiser.

    baud

    The speed of serial communication (I2C, SPI, serial link, waves) in bits per second.

    bit

    A value of 0 or 1.

    bits

    A value used to select GPIO. If bit n of bits is set then GPIO n is selected.

    A convenient way to set bit n is to or in (1<<n).

    e.g. to select bits 5, 9, 23 you could use (1<<5) | (1<<9) | (1<<23).

    bsc_xfer_t

    typedef struct
    {
       uint32_t control;          // Write
       int rxCnt;                 // Read only
       char rxBuf[BSC_FIFO_SIZE]; // Read only
       int txCnt;                 // Write
       char txBuf[BSC_FIFO_SIZE]; // Write
    } bsc_xfer_t;

    *bscxfer

    A pointer to a bsc_xfer_t object used to control a BSC transfer.

    *buf

    A buffer to hold data being sent or being received.

    bufSize

    The size in bytes of a buffer.

    bVal: 0-255 (Hex 0x0-0xFF, Octal 0-0377)

    An 8-bit byte value.

    callback_id

    A value >=0, as returned by a call to a callback function, one of

    callback
    callback_ex
    event_callback
    event_callback_ex

    The id is passed to callback_cancel or event_callback_cancel to cancel the callback.

    CBFunc_t

    typedef void (*CBFunc_t)
       (int pi, unsigned user_gpio, unsigned level, uint32_t tick);

    CBFuncEx_t

    typedef void (*CBFuncEx_t)
       (int pi, unsigned user_gpio, unsigned level, uint32_t tick, void * userdata);

    char

    A single character, an 8 bit quantity able to store 0-255.

    clkfreq: 4689-250M (13184-375M for the BCM2711)

    The hardware clock frequency.

    count

    The number of bytes to be transferred in a fi*le, I2C, SPI, or serial command.

    CS

    The GPIO used for the slave select signal when bit banging SPI.

    data_bits: 1-32

    The number of data bits in each character of serial data.

    #define PI_MIN_WAVE_DATABITS 1
    #define PI_MAX_WAVE_DATABITS 32

    double

    A floating point number.

    dutycycle: 0-range

    A number representing the ratio of on time to off time for PWM.

    The number may vary between 0 and range (default 255) where 0 is off and range is fully on.

    edge

    Used to identify a GPIO level transition of interest. A rising edge is a level change from 0 to 1. A falling edge is a level change from 1 to 0.

    RISING_EDGE  0
    FALLING_EDGE 1
    EITHER_EDGE. 2

    errnum

    A negative number indicating a function call failed and the nature of the error.

    event: 0-31

    An event is a signal used to inform one or more consumers to start an action.

    evtCBFunc_t

    typedef void (*evtCBFunc_t)
       (int pi, unsigned event, uint32_t tick);

    evtCBFuncEx_t

    typedef void (*evtCBFuncEx_t)
       (int pi, unsigned event, uint32_t tick, void *userdata);

    f

    A function.

    *file

    A full file path. To be accessible the path must match an entry in /opt/pigpio/access.

    *fpat

    A file path which may contain wildcards. To be accessible the path must match an entry in /opt/pigpio/access.

    frequency: >=0

    The number of times a GPIO is swiched on and off per second. This can be set per GPIO and may be as little as 5Hz or as much as 40KHz. The GPIO will be on for a proportion of the time as defined by its dutycycle.

    gpio

    A Broadcom numbered GPIO, in the range 0-53.

    There are 54 General Purpose Input Outputs (GPIO) named GPIO0 through GPIO53.

    They are split into two banks. Bank 1 consists of GPIO0 through GPIO31. Bank 2 consists of GPIO32 through GPIO53.

    All the GPIO which are safe for the user to read and write are in bank 1. Not all GPIO in bank 1 are safe though. Type 1 boards have 17 safe GPIO. Type 2 boards have 21. Type 3 boards have 26.

    See get_hardware_revision.

    The user GPIO are marked with an X in the following table.

              0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
    Type 1    X  X  -  -  X  -  -  X  X  X  X  X  -  -  X  X
    Type 2    -  -  X  X  X  -  -  X  X  X  X  X  -  -  X  X
    Type 3          X  X  X  X  X  X  X  X  X  X  X  X  X  X

             16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
    Type 1    -  X  X  -  -  X  X  X  X  X  -  -  -&+nbsp; -  -  -
    Type 2    -  X  X  -  -  -  X  X  X  X  -  X  X  X  X  X
    Type 3    X  X  X  X  X  X  X  X  X  X  X  X  -  -  -  -

    gpioPulse_t

    typedef struct
    {
       uint32_t gpioOn;
       uint32_t gpioOff;
       uint32_t usDelay;
    } gpioPulse_t;

    gpioThreadFunc_t

    typedef void *(gpioThreadFunc_t) (void *);

    handle: >=0

    A number referencing an object opened by one of

    file_open
    i2c_open
    notify_open
    serial_open
    spi_open

    i2c_addr: 0-0x7F

    The address of a device on the I2C bus.

    i2c_bus: >=0

    An I2C bus number.

    i2c_flags: 0

    Flags which modify an I2C open command. None are currently defined.

    i2c_reg: 0-255

    A register of an I2C device.

    *inBuf

    A buffer used to pass data to a function.

    inLen

    The number of bytes of data in a buffer.

    int

    A whole number, negative or positive.

    int32_t

    A 32-bit signed value.

    invert

    A flag used to set normal or inverted bit bang serial data level logic.

    level

    The level of a GPIO. Low or High.

    PI_OFF 0
    PI_ON 1

    PI_CLEAR 0
    PI_SET 1

    PI_LOW 0
    PI_HIGH 1


    There is one exception. If a watchdog expires on a GPIO the level will be reported as PI_TIMEOUT. See set_watchdog.

    PI_TIMEOUT 2

    MISO

    The GPIO used for the MISO signal when bit banging SPI.

    mode

    1. The operational mode of a GPIO, normally INPUT or OUTPUT.

    PI_INPUT 0
    PI_OUTPUT 1
    PI_ALT0 4
    PI_ALT1 5
    PI_ALT2 6
    PI_ALT3 7
    PI_ALT4 3
    PI_ALT5 2


    2. The mode of waveform transmission.

    PI_WAVE_MODE_ONE_SHOT      0
    PI_WAVE_MODE_REPEAT        1
    PI_WAVE_MODE_ONE_SHOT_SYNC 2
    PI_WAVE_MODE_REPEAT_SYNC   3


    3. A file open mode.

    PI_FILE_READ  1
    PI_FILE_WRITE 2
    PI_FILE_RW    3


    The following values can be or'd into the mode.

    PI_FILE_APPEND 4
    PI_FILE_CREATE 8
    PI_FILE_TRUNC  16

    MOSI

    The GPIO used for the MOSI signal when bit banging SPI.

    numBytes

    The number of bytes used to store characters in a string. Depending on the number of bits per character there may be 1, 2, or 4 bytes per character.

    numPar: 0-10

    The number of parameters passed to a script.

    numPulses

    The number of pulses to be added to a waveform.

    offset

    The associated data starts this number of microseconds from the start of the waveform.

    *outBuf

    A buffer used to return data from a function.

    outLen

    The size in bytes of an output buffer.

    pad: 0-2

    A set of GPIO which share common drivers.
    PadGPIO
    00-27
    128-45
    246-53

    padStrength: 1-16

    The mA which may be drawn from each GPIO whilst still guaranteeing the high and low levels.

    *param

    An array of script parameters.

    percent: 0-100

    The size of waveform as percentage of maximum available.

    pi

    An integer defining a connected Pi. The value is returned by pigpio_start upon success.

    *portStr

    A string specifying the port address used by the Pi running the pigpio daemon. It may be NULL in which case "8888" is used unless overridden by the PIGPIO_PORT environment variable.

    *pth

    A thread identifier, returned by start_thread.

    pthread_t

    A thread identifier.

    pud: 0-2

    The setting of the pull up/down resistor for a GPIO, which may be off, pull-up, or pull-down. PI_PUD_OFF 0
    PI_PUD_DOWN 1
    PI_PUD_UP 2

    pulseLen

    1-100, the length of a trigger pulse in microseconds.

    *pulses

    An array of pulses to be added to a waveform.

    pulsewidth: 0, 500-2500

    PI_SERVO_OFF 0
    PI_MIN_SERVO_PULSEWIDTH 500
    PI_MAX_SERVO_PULSEWIDTH 2500

    PWMduty: 0-1000000 (1M)

    The hardware PWM dutycycle.

    #define PI_HW_PWM_RANGE 1000000

    PWMfreq: 1-125M (1-187.5M for the BCM2711)

    The hardware PWM frequency.

    #define PI_HW_PWM_MIN_FREQ 1
    #define PI_HW_PWM_MAX_FREQ 125000000
    #define PI_HW_PWM_MAX_FREQ_2711 187500000

    range: 25-40000

    The permissible dutycycle values are 0-range.

    PI_MIN_DUTYCYCLE_RANGE 25
    PI_MAX_DUTYCYCLE_RANGE 40000

    *retBuf

    A buffer to hold a number of bytes returned to a used customised function,

    retMax

    The maximum number of bytes a user customised function should return.

    *rxBuf

    A pointer to a buffer to receive data.

    SCL

    The user GPIO to use for the clock when bit banging I2C.

    SCLK

    The GPIO used for the SCLK signal when bit banging SPI.

    *script

    A pointer to the text of a script.

    script_id

    An id of a stored script as returned by store_script.

    *scriptName

    The name of a shell_ script to be executed. The script must be present in /opt/pigpio/cgi and must have execute permission.

    *scriptString

    The string to be passed to a shell_ script to be executed.

    SDA

    The user GPIO to use for data when bit banging I2C.

    seconds

    The number of seconds.

    seekFrom

    PI_FROM_START   0
    PI_FROM_CURRENT 1
    PI_FROM_END     2

    seekOffset

    The number of bytes to move forward (positive) or backwards (negative) from the seek position (start, current, or end of file).

    ser_flags

    Flags which modify a serial open command. None are currently defined.

    *ser_tty

    The name of a serial tty device, e.g. /dev/ttyAMA0, /dev/ttyUSB0, /dev/tty1.

    size_t

    A standard type used to indicate the size of an object in bytes.

    spi_channel

    A SPI channel, 0-2.

    spi_flags

    See spi_open and bb_spi_open.

    steady: 0-300000

    The number of microseconds level changes must be stable for before reporting the level changed (set_glitch_filter) or triggering the active part of a noise filter (set_noise_filter).

    stop_bits: 2-8

    The number of (half) stop bits to be used when adding serial data to a waveform.

    #define PI_MIN_WAVE_HALFSTOPBITS 2
    #define PI_MAX_WAVE_HALFSTOPBITS 8

    *str

    An array of characters.

    thread_func

    A function of type gpioThreadFunc_t used as the main function of a thread.

    timeout

    A GPIO watchdog timeout in milliseconds.

    PI_MIN_WDOG_TIMEOUT 0
    PI_MAX_WDOG_TIMEOUT 60000

    *txBuf

    An array of bytes to transmit.

    uint32_t: 0-0-4,294,967,295 (Hex 0x0-0xFFFFFFFF)

    A 32-bit unsigned value.

    unsigned

    A whole number >= 0.

    user_gpio

    0-31, a Broadcom numbered GPIO.

    See gpio.

    *userdata

    A pointer to arbitrary user data. This may be used to identify the instance.

    You must ensure that the pointer is in scope at the time it is processed. If it is a pointer to a global this is automatic. Do not pass the address of a local variable. If you want to pass a transient object then use the following technique.

    In the calling function:

    user_type *userdata;

    user_type my_userdata;

    userdata = malloc(sizeof(user_type));

    *userdata = my_userdata;


    In the receiving function:

    user_type my_userdata = *(user_type*)userdata;

    free(userdata);

    void

    Denoting no parameter is required

    wave_add_*

    One of

    wave_add_new
    wave_add_generic
    wave_add_serial

    wave_id

    A number representing a waveform created by wave_create.

    wave_send_*

    One of

    wave_send_once
    wave_send_repeat

    wVal: 0-65535 (Hex 0x0-0xFFFF, Octal 0-0177777)

    A 16-bit word value.

    pigpiod_if2 Error Codes


    typedef enum
    {
       pigif_bad_send           = -2000,
       pigif_bad_recv           = -2001,
       pigif_bad_getaddrinfo    = -2002,
       pigif_bad_connect        = -2003,
       pigif_bad_socket         = -2004,
       pigif_bad_noib           = -2005,
       pigif_duplicate_callback = -2006,
       pigif_bad_malloc         = -2007,
       pigif_bad_callback       = -2008,
       pigif_notify_failed      = -2009,
       pigif_callback_not_found = -2010,
       pigif_unconnected_pi     = -2011,
       pigif_too_many_pis       = -2012,
    } pigifError_t;

    >

    PROCD sid - Delete script

    This command deletes script sid.

    Upon success nothing is returned. On error a negative status code will be returned.

    See Scripts.

    Example

    $ pigs procd 1

    $ pigs procd 1
    ERROR: unknown script id
    -48

    PROCP sid - Get script status and parameters

    This command returns the status of script sid as well as the current value of its 10 parameters.

    Upon success the script status and parameters are returned. On error a negative status code will be returned.

    The script status may be one of

    0being initialised
    1halted
    2running
    3waiting
    4failed


    See Scripts.

    Example

    $ pigs procp 0
    1 0 0 0 0 0 0 0 0 0 0

    PROCR sid pars - Run script

    This command runs stored script sid passing it up to 10 optional parameters.

    Upon success nothing is returned. On error a negative status code will be returned.

    See Scripts.

    Example

    $ pigs proc tag 123 w 4 0 mils 200 w 4 1 mils 300 dcr p0 jp 123
    0

    $ pigs procr 0 50 # Run script 0 with parameter 0 of 50.

    $ pigs procp 0
    2 44 0 0 0 0 0 0 0 0 0
    $ pigs procp 0
    2 37 0 0 0 0 0 0 0 0 0
    $ pigs procp 0
    2 10 0 0 0 0 0 0 0 0 0
    $ pigs procp 0
    2 5 0 0 0 0 0 0 0 0 0
    $ pigs procp 0
    2 2 0 0 0 0 0 0 0 0 0
    $ pigs procp 0
    1 -1 0 0 0 0 0 0 0 0 0

    PROCS sid - Stop script

    This command stops a running script sid.

    Upon success nothing is returned. On error a negative status code will be returned.

    See Scripts.

    Example

    $ pigs procs 0

    $ pigs procs 1
    -48
    ERROR: unknown script id

    PROCU sid pars - Set script parameters

    This command sets the parameters of a stored script sid passing it up to 10 parameters.

    Upon success nothing is returned. On error a negative status code will be returned.

    See Scripts.

    Example

    $ pigs proc tag 0 hp 18 p0 p1 mils 1000 jmp 0
    0
    $ pigs procu 0 50 500000
    $ pigs procr 0
    $ pigs procu 0 100
    $ pigs procu 0 200
    $ pigs procu 0 200 100000

    PRRG u - Get GPIO PWM real range

    This command returns the real underlying range used by GPIO u.

    If a hardware clock is active on the GPIO the reported real range will be 1000000 (1M).

    If hardware-2500 2000 1600
               1250  1000   800  500  400  250  200  100   50

           2: 20000 10000  5000 4000 2500 2000 1250 1000  800
                625   500   400  250  200  125  100   50   25

           4: 10000  5000  2500 2000 1250 1000  625  500  400
                313   250   200  125  100   63   50   25   13
    sample
     rate
     (us)  5:  8000  4000  2000 1600 1000  800  500  400  320
                250   200   160  100   80   50   40   20   10

           8:  5000  2500  1250 1000  625  500  313  250  200
                156   125   100   63   50   31   25   13    6

          10:  4000  2000  1000  800  500  400  250  200  160
                125   100    80   50   40   25   20   10    5


    Example

    pigs pfs 4 0 # 0 selects the lowest frequency.
    10

    $ pigs pfs 4 1000 # Set 1000Hz PWM.
    1000

    $ pigs pfs 4 100000 # Very big number selects the highest frequency.
    8000

    PIGPV - Get pigpio library version

    This command returns the pigpio library version.

    Example

    $ pigs pigpv
    17

    PRG u - Get GPIO PWM range

    This command returns the dutycycle range for GPIO u.

    Upon success the range is returned. On error a negative status code will be returned.

    If a hardware clock or hardware PWM is active on the GPIO the reported range will be 1000000 (1M).

    Example

    $ pigs prg 4
    255

    PROC t - Store script

    This command stores a script t for later execution.

    If the script is valid a script id (>=0) is returned which is passed to the other script commands. On error a negative status code will be returned.

    See Scripts.

    Example

    $ pigs proc tag 123 w 4 0 mils 200 w 4 1 mils 300 dcr p0 jp 123
    0

    $ pigs proc tag 123 w 4 0 mils 5 w 4 1 mils 5 jmp 12
    ERROR: script has unresolved tag
    -63This command gets the pad drive strength padma in mA.

    Returns the pad drive strength if OK. On error a negative status code will be returned.

    PadGPIO
    00-27
    128-45
    246-53


    Example

    $ pigs padg 0
    8
    $ pigs pads 0 16
    $ pigs padg 0
    16
    pigs padg 3
    -126
    ERROR: bad pad number

    PADS pad padma - Set pad drive strength

    This command sets the pad drive strength padma in mA.

    Upon success nothing is returned. On error a negative status code will be returned.

    PadGPIO
    00-27
    128-45
    246-53


    Example

    $ pigs pads 0 16
    $ pigs padg 0
    16
    $ pigs pads 0 17
    -127
    ERROR: bad pad drive strength

    PARSE t - Validate script

    Validates the text t of a script without storing the script.

    Upon success nothing is returned. On error a list of detected script errors will be given.

    See Scripts.

    This command may be used to find script syntax faults.

    Example

    $ pigs parse tag 100 w 22 1 mils 200 w 22 0 mils 800 jmp 100

    $ pigs parse tag 0 w 22 1 mills 50 w 22 0 dcr p10 jp 99
    Unknown command: mills
    Unknown command: 50
    Bad parameter to dcr
    Can't resolve tag 99

    PFG u - Get GPIO PWM frequency

    This command returns the PWM frequency in Hz used for GPIO u.

    Upon success the PWM frequency is returned. On error a negative status code will be returned.

    For normal PWM the frequency will be that defined for the GPIO by PFS.

    If a hardware clock is active on the GPIO the reported frequency will be that set by HC.

    If hardware PWM is active on the GPIO the reported frequency will be that set by HP.

    Example

    $ pigs pfg 4
    800

    $ pigs pfg 34
    ERROR: GPIO not 0-31
    -2

    PFS u v - Set GPIO PWM frequency

    This command sets the PWM frequency v to be used for GPIO u.

    The numerically closest frequency to v will be selected.

    Upon success the new frequency is returned. On error a negative status code will be returned.

    If PWM is currently active on the GPIO it will be switched off and then back on at the new frequency.

    Each GPIO can be independently set to one of 18 different PWM frequencies.

    The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5, 8, or 10 microseconds (default 5). The sample rate is set when the pigpio daemon is started.

    The frequencies for each sample rate are:

                           Hertz

           1: 40000 20000 10000 8000 5000 4000 /y 20 microseconds.
    $ pigs mics 1000000 # Delay 1 second.

    $ pigs mics 2000000
    -64
    ERROR: bad MICS delay (too large)

    MILS v - Milliseconds delay

    This command delays execution for v milliseconds.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs mils 2000 # Delay 2 seconds.

    $ pigs mils 61000
    -65
    ERROR: bad MILS delay (too large)

    NB h bits - Start notification

    This command starts notifications on handle h returned by a prior call to NO.

    Upon success nothing is returned. On error a negative status code will be returned.

    The notification gets state changes for each GPIO specified by bits.

    Example

    $ pigs nb 0 -1 # Shorthand for GPIO 0-31.
    $ pigs nb 0 0xf0 # Get notifications for GPIO 4-7.

    $ pigs nb 1 0xf
    -25
    ERROR: unknown handle

    NC h - Close notification

    This command stops notifications on handle h returned by a prior call to NO and releases the handle for reuse.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs nc 0 # First call succeeds.

    $ pigs nc 1 # Second call fails.
    -25
    ERROR: unknown handle

    NO - Request a notification

    This command requests a free notification handle.

    A notification is a method for being notified of GPIO state changes via a pipe.

    Upon success the command returns a handle greater than or equal to zero. On error a negative status code will be returned.

    Notifications for handle x will be available at the pipe named /dev/pigpiox (where x is the handle number).

    E.g. if the command returns 15 then the notifications must be read from /dev/pigpio15.

    Example

    $ pigs no
    0

    NP h - Pause notification

    This command pauses notifications on handle h returned by a prior call to NO.

    Upon success nothing is returned. On error a negative status code will be returned.

    Notifications for the handle are suspended until a new NB command is given for the handle.

    Example

    $ pigs np 0

    P/PWM u v - Set GPIO PWM value

    This command starts PWM on GPIO u with dutycycle v. The dutycycle varies from 0 (off) to range (fully on). The range defaults to 255.

    Upon success nothing is returned. On error a negative status code will be returned.

    This and the servo functionality use the DMA and PWM or PCM peripherals to control and schedule the pulsewidths and dutycycles.

    The PRS command may be used to change the default range of 255.

    Example

    $ pigs p 4 64  # Start PWM on GPIO 4 with 25% dutycycle
    $ pigs p 4 128 # 50%
    $ pigs p 4 192 # 75%
    $ pigs p 4 255 # 100%

    PADG pad - Get pad drive 0cutes a sequence of I2C operations. The operations to be performed are specified by the contents of bvs which contains the concatenated command codes and associated data.

    The following command codes are supported:

    NameCmd & DataMeaning
    End0No more commands
    Escape1Next P is two bytes
    On2Switch combined flag on
    Off3Switch combined flag off
    Address4 PSet I2C address to P
    Flags5 lsb msbSet I2C flags to lsb + (msb << 8)
    Read6 PRead P bytes of data
    Write7 P ...Write P bytes of data


    The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first).

    The address defaults to that associated with the handle h. The flags default to 0. The address and flags maintain their previous value until updated.

    Example

    Set address 0x53, write 0x32, read 6 bytes
    Set address 0x1E, write 0x03, read 6 bytes
    Set address 0x68, write 0x1B, read 8 bytes
    End

    0x04 0x53   0x07 0x01 0x32   0x06 0x06
    0x04 0x1E   0x07 0x01 0x03   0x06 0x06
    0x04 0x68   0x07 0x01 0x1B   0x06 0x08
    0x00

    M/MODES g m - Set GPIO mode

    This command sets GPIO g to mode m, typically input (read) or output (write).

    Upon success nothing is returned. On error a negative status code will be returned.

    Each GPIO can be configured to be in one of 8 different modes. The modes are named Input, Output, ALT0, ALT1, ALT2, ALT3, ALT4, and ALT5.

    To set the mode use the code for the mode.

    ModeInputOutputALT0ALT1ALT2ALT3ALT4ALT5
    CodeRW012345


    Example

    $ pigs m 4 r # Input (read)
    $ pigs m 4 w # Output (write)
    $ pigs m 4 0 # ALT 0
    $ pigs m 4 5 # ALT 5

    MG/MODEG g - Get GPIO mode

    This command returns the current mode of GPIO g.

    Upon success the value of the GPIO mode is returned. On error a negative status code will be returned.

    Value01234567
    ModeInputOutputALT5ALT4ALT0ALT1ALT2ALT3


    Example

    $ pigs mg 4
    1

    MICS v - Microseconds delay

    This command delays execution for v microseconds.

    Upon success nothing is returned. On error a negative status code will be returned.

    The main use of this command is expected to be within Scripts.

    Example

    $ pigs mics 20 # Dela1rom registerThis command returns a single 16 bit word read from register r of the I2C device associated with handle h.

    Upon success a value between 0 and 65535 will be returned. On error a negative status code will be returned.

    Example

    $ pigs i2crw 0 0
    6150

    I2CWB h r bv - smb Write Byte Data: write byte to register

    This command writes a single byte bv to register r of the I2C device associated with handle h.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs i2cwb 0 10 0x54

    I2CWD h bvs - i2c Write device

    This command writes a block of bytes bvs to the I2C device associated with handle h.

    Upon success nothing is returned. On error a negative status code will be returned.

    The number of bytes which may be written in one transaction is dependent on the I2C drivers and the device itself. pigs imposes a limit of about 500 bytes.

    This command operates on the raw I2C device.

    Example

    $ pigs i2cwd 0 0x01 0x02 0x03 0x04

    I2CWI h r bvs - smb Write I2C Block Data

    This command writes between 1 and 32 bytes bvs to register r of the I2C device associated with handle h.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs i2cwi 0 4 0x01 0x04 0xc0

    I2CWK h r bvs - smb Write Block Data: write data to register

    This command writes between 1 and 32 bytes bvs to register r of the I2C device associated with handle h.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    pigs i2cwk 0 4 0x01 0x04 0xc0

    I2CWQ h bit - smb Write Quick: write bit

    This command writes a single bit to the I2C device associated with handle h.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs i2cwq 0 1

    I2CWS h bv - smb Write Byte: write byte

    This command writes a single byte bv to the I2C device associated with handle h.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs i2cws 0 0x12

    $ pigs i2cws 0 0xff
    -82
    ERROR: I2C write failed

    I2CWW h r wv - smb Write Word Data: write word to register

    This command writes a single 16 bit word wv to register r of the I2C device associated with handle h.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs i2cww 0 0 0xffff

    I2CZ h bvs - Performs multiple I2C transactions

    This command exe2sp;i2c/spi/ser parameter
    -81

    I2CPK h r bvs - smb Block Process Call: exchange data bytes with register

    This command writes the data bytes bvs to register r of the I2C device associated with handle h and returns a device specific number of bytes.

    Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned.

    Example

    $ pigs i2cpk 0 0 0x11 0x12
    6 0 0 0 0 0 0

    I2CRB h r - smb Read Byte Data: read byte from register

    This command returns a single byte read from register r of the I2C device associated with handle h.

    Upon success a value between 0 and 255 will be returned. On error a negative status code will be returned.

    Example

    $ pigs i2crb 0 0
    6

    I2CRD h num - i2c Read device

    This command returns num bytes read from the I2C device associated with handle h.

    Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned.

    This command operates on the raw I2C device. The maximum value of the parameter num is dependent on the I2C drivers and the device itself. pigs imposes a limit of about 8000 bytes.

    Example

    $ pigs i2crd 0 16
    16 6 24 0 0 0 0 0 0 0 0 0 0 0 0 32 78

    I2CRI h r num - smb Read I2C Block Data: read bytes from register

    This command returns num bytes from register r of the I2C device associated with handle h.

    Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned.

    The parameter num may be 1-32.

    Example

    $ pigs i2cri 0 0 16
    16 237 155 155 155 155 155 155 155 155 155 155 155 155 155 155 155

    I2CRK h r - smb Read Block Data: read data from register

    This command returns between 1 and 32 bytes read from register r of the I2C device associated with handle h.

    Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned.

    The number of bytes of returned data is specific to the device and register.

    Example

    $ pigs i2crk 0 0
    6 0 0 0 0 0 0

    $ pigs i2crk 0 1
    24 0 0 0 0 0 0 0 0 0 0 0 0 120 222 105 215 128 87 195 217 0 0 0 0

    I2CRS h - smb Read Byte: read byte

    This command returns a single byte read from the I2C device associated with handle h.

    Upon success a value between 0 and 255 will be returned. On error a negative status code will be returned.

    Example

    $ pigs i2crs 0
    0

    I2CRW h r - smb Read Word Data: read word f3td>

    PWM channel 1Compute module only
    45PWM channel 1Compute module only
    52PWM channel 0Compute module only
    53PWM channel 1Compute module only


    The actual number of steps beween off and fully on is the integral part of 250M/pf (375M/pf for the BCM2711).

    The actual frequency set is 250M/steps (375M/steps for the BCM2711).

    There will only be a million steps for a pf of 250 (375 for the BCM2711). Lower frequencies will have more steps and higher frequencies will have fewer steps. pdc is automatically scaled to take this into account.

    HWVER - Get hardware version

    This command returns the hardware revision of the Pi.

    The hardware revision is found in the last 4 characters on the revision line of /proc/cpuinfo.

    If the hardware revision can not be found or is not a valid hexadecimal number the command returns 0.

    The revision number can be used to determine the assignment of GPIO to pins (see g).

    There are currently three types of board.

    Type 1 boards have hardware revision numbers of 2 and 3.

    Type 2 boards have hardware revision numbers of 4, 5, 6, and 15.

    Type 3 boards have hardware revision numbers of 16 or greater.

    for "Revision : 0002" the command returns 2.

    for "Revision : 000f" the command returns 15.

    for "Revision : 000g" the command returns 0.

    Example

    $ pigs hwver # On a B+
    16

    I2CC h - Close I2C handle

    This command closes an I2C handle h previously opened with I2CO.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs i2cc 0 # First close okay.

    $ pigs i2cc 0 # Second fails.
    -25
    ERROR: unknown handle

    I2CO ib id if - Open I2C bus and device with flags

    This command returns a handle to access device id on I2C bus ib. The device is opened with flags if.

    Physically buses 0 and 1 are available on the Pi. Higher numbered buses will be available if a kernel supported bus multiplexor is being used.

    The GPIO used are given in the following table.

    SDASCL
    I2C 001
    I2C 123


    No flags are currently defined. The parameter if should be 0.

    Upon success the next free handle (>=0) is returned. On error a negative status code will be returned.

    Example

    $ pigs i2co 1 0x70 0 # Bus 1, device 0x70, flags 0.
    0

    $ pigs i2co 1 0x53 0 # Bus 1, device 0x53, flags 0.
    1

    I2CPC h r wv - smb Process Call: exchange register with word

    This command writes wv to register r of the I2C device associated with handle h and returns a 16-bit word read from the device.

    Upon success a value between 0 and 65535 will be returned. On error a negative status code will be returned.

    Example

    $ pigs i2cpc 0 37 43210
    39933

    $ pigs i2cpc 0 256 43210
    ERROR: bad&nb4 in use for servo pulses

    H/HELP - Display command help

    This command displays a brief list of the commands and their parameters.

    Example

    $ pigs h

    $ pigs help

    HC g cf - Set hardware clock frequency

    This command sets the hardware clock associated with GPIO g to frequency cf. Frequencies above 30MHz are unlikely to work.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs hc 4 5000 # start a 5 KHz clock on GPIO 4 (clock 0)

    $ pigs hc 5 5000000 # start a 5 MHz clcok on GPIO 5 (clock 1)
    -99
    ERROR: need password to use hardware clock 1


    The same clock is available on multiple GPIO. The latest frequency setting will be used by all GPIO which share a clock.

    The GPIO must be one of the following.

    4clock 0All models
    5clock 1All models but A and B (reserved for system use)
    6clock 2All models but A and B
    20clock 0All models but A and B
    21clock 1All models but A and B Rev.2 (reserved for system use)


    32clock 0Compute module only
    34clock 0Compute module only
    42clock 1Compute module only (reserved for system use)
    43clock 2Compute module only
    44clock 1Compute module only (reserved for system use)


    Access to clock 1 is protected by a password as its use will likely crash the Pi. The password is given by or'ing 0x5A000000 with the GPIO number.

    HP g pf pdc - Set hardware PWM frequency and dutycycle

    This command sets the hardware PWM associated with GPIO g to frequency pf with dutycycle pdc. Frequencies above 30MHz are unlikely to work.

    NOTE: Any waveform started by WVTX, WVTXR, or WVCHA will be cancelled.

    This function is only valid if the pigpio main clock is PCM. The main clock defaults to PCM but may be overridden when the pigpio daemon is started (option -t).

    Upon success nothing is returned. On error a negative status code will be returned.

    $ pigs hp 18 100 800000 # 80% dutycycle

    $ pigs hp 19 100 200000 # 20% dutycycle

    $ pigs hp 19 400000000 100000
    -96
    ERROR: invalid hardware PWM frequency


    The same PWM channel is available on multiple GPIO. The latest frequency and dutycycle setting will be used by all GPIO which share a PWM channel.

    The GPIO must be one of the following.

    12PWM channel 0All models but A and B
    13PWM channel 1All models but A and B
    18PWM channel 0All models
    19PWM channel 1All models but A and B


    40PWM channel 0Compute module only
    41-rw-r--r-- 1 joan joan   7990 Jul 10 11:22 /ram/pigs.c
    -rw-r--r-- 1 joan joan  19970 Jul 10 11:22 /ram/x_pigpio.c
    -rw-r--r-- 1 joan joan  20804 Jul 10 11:22 /ram/x_pigpiod_if2.c
    -rw-r--r-- 1 joan joan  19844 Jul 10 11:22 /ram/x_pigpiod_if.c
    -rw-r--r-- 1 joan joan  19907 Jul 10 11:22 /ram/x_repeat.c

    FR h num - Read bytes from file handle

    This command returns up to num bytes of data read from the file associated with handle h.

    Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned.

    Example

    $ pigs fr 0 10
    5 48 49 128 144 255

    $ pigs fr 0 10
    0

    FS h num from - Seek to file handle position

    This command seeks to a position within the file associated with handle h.

    The number of bytes to move is num. Positive offsets move forward, negative offsets backwards. The move start position is determined by from as follows.

    From
    0start
    1current position
    2end


    Upon success the new byte position within the file (>=0) is returned. On error a negative status code will be returned.

    Example

    $ pigs fs 0 200 0 # Seek to start of file plus 200
    200

    $ pigs fs 0 0 1 # Return current position
    200

    $ pigs fs 0 0 2 # Seek to end of file, return size
    296235

    FW h bvs - Write bytes to file handle

    This command writes bytes bvs to the file associated with handle h.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs fw 0 23 45 67 89

    GDC u - Get GPIO PWM dutycycle

    This command returns the PWM dutycycle in use on GPIO u.

    Upon success the dutycycle is returned. On error a negative status code will be returned.

    For normal PWM the dutycycle will be out of the defined range for the GPIO (see PRG).

    If a hardware clock is active on the GPIO the reported dutycycle will be 500000 (500k) out of 1000000 (1M).

    If hardware PWM is active on the GPIO the reported dutycycle will be out of a 1000000 (1M).

    Example

    $ pigs p 4 129
    $ pigs gdc 4
    129

    pigs gdc 5
    -92
    ERROR: GPIO is not in use for PWM

    GPW u - Get GPIO servo pulsewidth

    This command returns the servo pulsewidth in use on GPIO u.

    Upon success the servo pulsewidth is returned. On error a negative status code will be returned.

    Example

    $ pigs s 4 1235
    $ pigs gpw 4
    1235

    $ pigs gpw 9
    -93
    ERROR: GPIO is not6nbsp;parameter

    FO file mode - Open a file in mode

    This function returns a handle to a file file opened in a specified mode mode.

    Upon success a handle (>=0) is returned. On error a negative status code will be returned.

    File

    A file may only be opened if permission is granted by an entry in /opt/pigpio/access. This is intended to allow remote access to files in a more or less controlled manner.

    Each entry in /opt/pigpio/access takes the form of a file path which may contain wildcards followed by a single letter permission. The permission may be R for read, W for write, U for read/write, and N for no access.

    Where more than one entry matches a file the most specific rule applies. If no entry matches a file then access is denied.

    Suppose /opt/pigpio/access contains the following entries

    /home/* n
    /home/pi/shared/dir_1/* w
    /home/pi/shared/dir_2/* r
    /home/pi/shared/dir_3/* u
    /home/pi/shared/dir_1/file.txt n


    Files may be written in directory dir_1 with the exception of file.txt.

    Files may be read in directory dir_2.

    Files may be read and written in directory dir_3.

    If a directory allows read, write, or read/write access then files may be created in that directory.

    In an attempt to prevent risky permissions the following paths are ignored in /opt/pigpio/access.

    a path containing ..
    a path containing only wildcards (*?)
    a path containing less than two non-wildcard parts


    Mode

    The mode may have the following values.

    ValueMeaning
    READ1open file for reading
    WRITE2open file for writing
    RW3open file for reading and writing


    The following values may be or'd into the mode.

    ValueMeaning
    APPEND4All writes append data to the end of the file
    CREATE8The file is created if it doesn't exist
    TRUNC16The file is truncated


    Newly created files are owned by root with permissions owner read and write.

    Example

    $ ls /ram/*.c
    /ram/command.c      /ram/pigpiod.c  /ram/pigs.c
    /ram/x_pigpiod_if.c /ram/pig2vcd.c  /ram/pigpiod_if2.c
    /ram/x_pigpio.c     /ram/x_repeat.c /ram/pigpio.c
    /ram/pigpiod_if.c   /ram/x_pigpiod_if2.c

    # assumes /opt/pigpio/access contains the following line
    # /ram/*.c r

    $ pigs fo /ram/pigpio.c 1
    0

    $ pigs fo /ram/new.c 1
    -128
    ERROR: file open failed

    $ pigs fo /ram/new.c 9
    1

    $ ls /ram/*.c -l
    -rw-r--r-- 1 joan joan  42923 Jul 10 11:22 /ram/command.c
    -rw------- 1 root root      0 Jul 10 16:54 /ram/new.c
    -rw-r--r-- 1 joan joan   2971 Jul 10 11:22 /ram/pig2vcd.c
    -rw------- 1 joan joan 296235 Jul 10 11:22 /ram/pigpio.c
    -rw-r--r-- 1 joan joan   9266 Jul 10 11:22 /ram/pigpiod.c
    -rw-r--r-- 1 joan joan  37331 Jul 10 11:22 /ram/pigpiod_if2.c
    -rw-r--r-- 1 j7 specified by bits.

    Example

    $ pigs evm 0 -1 # Shorthand for events 0-31.
    $ pigs evm 0 0xf0 # Get notifications for events 4-7.

    $ pigs evm 1 0xf
    -25
    ERROR: unknown handle

    EVT event - Trigger event

    This command triggers event event.

    One event, number 31, is predefined. This event is auto generated on BSC slave activity.

    Example

    $ pigs evt 12
    $ pigs evt 5

    $ pigs evt 32
    -143
    ERROR: bad event id

    FC h - Close file handle

    This command closes a file handle h previously opened with FO.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs fc 0 # First close okay.

    $ pigs fc 0 # Second fails.
    -25
    ERROR: unknown handle

    FG u stdy - Set a glitch filter on a GPIO

    Level changes on the GPIO u are not reported unless the level has been stable for at least stdy microseconds. The level is then reported. Level changes of less than stdy microseconds are ignored.

    The filter only affects callbacks (including pipe notifications).

    The R/READ, BR1, and BR2 commands are not affected.

    Note, each (stable) edge will be timestamped stdy microseconds after it was first detected.

    Example

    $ pigs fg 4 250

    $ pigs fg 4 1000000
    -125
    ERROR: bad filter parameter

    FL pat num - List files which match pattern

    This command returns a list of the files matching pat. Up to num bytes may be returned.

    Upon success the count of returned bytes followed by the matching files is returned. On error a negative status code will be returned.

    A newline (0x0a) character separates each file name.

    Only files which have a matching entry in /opt/pigpio/access may be listed.

    Suppose /opt/pigpio/access contains

    /sys/bus/w1/devices/28*/w1_slave r

    Example

    $ pigs -a fl "/sys/bus/w1/devices/28*/w1_slave" 5000
    90 /sys/bus/w1/devices/28-000005d34cd2/w1_slave
    /sys/bus/w1/devices/28-001414abbeff/w1_slave

    $ pigs -a fl "/sys/bus/*" 5000
    ERROR: no permission to access file
    -137

    FN u stdy actv - Set a noise filter on a GPIO

    Level changes on the GPIO u are ignored until a level which has been stable for stdy microseconds is detected. Level changes on the GPIO are then reported for actv microseconds after which the process repeats.

    The filter only affects callbacks (including pipe notifications).

    The R/READ, BR1, and BR2 commands are not affected.

    Note, level changes before and after the active period may be reported. Your software must be designed to cope with such reports.

    Example

    $ pigs fn 7 250 1000

    $ pigs fn 7 2500000 1000
    -125
    ERROR: bad filter&8/b>

    $ pigs bspio 5 13 19 12 10000 0 # MCP4251 DAC
    $ pigs bspio 6 13 19 12 20000 3 # MCP3008 ADC

    $ pigs bspix 5 0 16             # set DAC to 16
    2 255 255

    $ pigs bspix 5 12 0             # read back DAC
    2 254 16

    $ pigs bspix 6 1 128 0          # read ADC input 0
    3 0 3 184                       # 952

    $ pigs bspix 5 0 240            # set DAC to 240
    2 255 255

    $ pigs bspix 5 12 0             # read back DAC
    2 254 240

    $ pigs bspix 6 1 128 0          # read ADC input 0
    3 0 0 63                        # 63

    $ pigs bspix 5 0 128            # set DAC to 128
    2 255 255

    $ pigs bspix 5 12 0             # read back DAC
    2 254 128

    $ pigs bspix 6 1 128 0          # read ADC input 0
    3 0 1 255                       # 511

    $ pigs bspic 5                  # close SPI CS 5
    $ pigs bspic 6                  # close SPI CS 6

    $ pigs bspic 5                  # try to close SPI CS 5 again
    -142
    ERROR: no bit bang SPI in progress on GPIO

    CF1 uvs - Custom function 1

    This command calls a user customised function. The meaning of any paramaters and the returned value is defined by the customiser.

    CF2 uvs - Custom function 2

    This command calls a user customised function. The meaning of any paramaters and the returned value is defined by the customiser.

    CGI - Configuration get internals

    This command returns the value of the internal library configuration settings.

    CSI v - Configuration set internals

    This command sets the value of the internal library configuration settings to v.

    EVM h bits - Set events to monitor

    This command starts event reporting on handle h (returned by a prior call to NO).

    Upon success nothing is returned. On error a negative status code will be returned.

    The notification gets reports for each event9;9 23 # write 5 bytes
    $ pigs bscx 0x130305 11 13 15 17 # check for data and send 4 bytes
    6 262338 90 87 51 9 23

    $ pigs i2crd 0 4
    4 11 13 15 17

    $ pigs bscx 0x130305 22 33 44 55 66
    1 327938
    $ pigs i2crd 0 5
    5 22 33 44 55 66

    BSPIC cs - Close bit bang SPI

    This command stops bit banging SPI on a set of GPIO opened with BSPIO.

    The set of GPIO is specifed by cs.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs bspic 10

    $ pigs bspic 10
    -142
    ERROR: no bit bang SPI in progress on GPIO

    BSPIO cs miso mosi sclk b spf - Open bit bang SPI

    This command starts bit banging SPI on a group of GPIO with slave select cs, MISO miso, MOSI mosi, and clock sclk.

    Data will be transferred at baud b bits per second (which may be set in the range 50-250000).

    The flags spf may be used to modify the default behaviour of mode 0, active low chip select.

    The flags consists of the least significant 22 bits.

    21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
     0  0  0  0  0  0  R  T  0  0  0  0  0  0  0  0  0  0  0  p  m  m


    mm defines the SPI mode.

    Mode POL PHA
     0    0   0
     1    0   1
     2    1   0
     3    1   1


    p is 0 if CS is active low (default) and 1 for active high.

    T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first.

    R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first.

    The other bits in flags should be set to zero.

    Upon success 0 is returned. On error a negative status code will be returned.

    If more than one device is connected to the SPI bus (defined by SCLK, MOSI, and MISO) each must have its own CS.

    Example

    $ pigs bspio  9 11 12 13 50000 0

    $ pigs bspio 10 11 12 13 50000 0

    $ pigs bspio 29 19 20 21 50000 0 # GPIO 29 not avaialble on this Pi
    -41
    ERROR: no permission to update GPIO

    BSPIX cs bvs - SPI bit bang transfer

    This command writes bytes bvs to the bit bang SPI device associated with slave select cs. It returns the same number of bytes read from the device.

    Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned.

    Example<:ags
    REenable receive
    TEenable transmit
    BKabort operation and clear FIFOs
    ECsend control register as first I2C byte
    ESsend status register as first I2C byte
    PLset SPI polarity high
    PHset SPI phase high
    I2enable I2C mode
    SPenable SPI mode
    ENenable BSC peripheral


    The returned status has the following format

    20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
     S  S  S  S  S  R  R  R  R  R  T  T  T  T  T RB TE RF TF RE TB


    Bits 0-15 are copied unchanged from the BSC FR register. See pages 165-166 of the Broadcom peripherals document for full details.

    SSSSSnumber of bytes successfully copied to transmit FIFO
    RRRRRnumber of bytes in receieve FIFO
    TTTTTnumber of bytes in transmit FIFO
    RBreceive busy
    TEtransmit FIFO empty
    RFreceive FIFO full
    TFtransmit FIFO full
    REreceive FIFO empty
    TBtransmit busy


    This example assumes that GPIO 2/3 are connected to GPIO 18/19 (GPIO 10/11 on the BCM2711).

    Example

    $ pigs bscx 0x130305 # start BSC as I2C slave 0x13
    1 18

    $ i2cdetect -y 1
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00:          -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- 13 -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --

    $ pigs i2co 1 0x13 0 # get handle for device 0x13 on bus 1
    0

    $ pigs i2cwd 0 90 87 51 9 23 # write 5 bytes

    $ pigs bscx 0x130305 # check for data
    6 18 90 87 51 9 23

    $ pigs bscx 0x130305 11 13 15 17 # check for data and send 4 bytes
    1 262338

    $ pigs i2crd 0 4 # read 4 bytes
    4 11 13 15 17

    $ pigs i2cwd 0 90 87 51 ;nbsp;1 (1<<0)
    -42
    ERROR: no permission to update one or more GPIO

    BS2 bits - Set specified GPIO in bank 2

    This command sets (sets high) the GPIO specified by bits in bank 2. Bank 2 consists of GPIO 32-53.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs bs2 0x40 # set GPIO 38 (enable high current mode A+/B+/Pi2/Pi3)

    $ pigs bs2 1 # set GPIO 32 (first in bank 2)
    -42
    ERROR: no permission to update one or more GPIO

    BSCX bctl bvs - BSC I2C/SPI transfer

    This command performs a BSC I2C/SPI slave transfer as defined by bctl with data bvs.

    This function provides a low-level interface to the SPI/I2C Slave peripheral on the BCM chip.

    This peripheral allows the Pi to act as a hardware slave device on an I2C or SPI bus.

    This is not a bit bang version and as such is OS timing independent. The bus timing is handled directly by the chip.

    The output process is simple. You simply append data to the FIFO buffer on the chip. This works like a queue, you add data to the queue and the master removes it.

    I can't get SPI to work properly. I tried with a control word of 0x303 and swapped MISO and MOSI.

    The command sets the BSC mode and writes any data bvs to the BSC transmit FIFO. It returns the data count (at least 1 for the status word), the status word, followed by any data bytes read from the BSC receive FIFO.

    Note that the control word sets the BSC mode. The BSC will stay in that mode until a different control word is sent.

    For I2C use a control word of (I2C address << 16) + 0x305.

    E.g. to talk as I2C slave with address 0x13 use 0x130305.

    GPIO used for models other than those based on the BCM2711.

    SDASCLMOSISCLKMISOCE
    I2C1819----
    SPI--18192021


    GPIO used for models based on the BCM2711 (e.g. the Pi4B).

    SDASCLMOSISCLKMISOCE
    I2C1011----
    SPI--101198


    When a zero control word is received the used GPIO will be reset to INPUT mode.

    The control word consists of the following bits.

    22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
     a  a  a  a  a  a  a  -  - IT HC TF IR RE TE BK EC ES PL PH I2 SP EN


    Bits 0-13 are copied unchanged to the BSC CR register. See pages 163-165 of the Broadcom peripherals document for full details.

    aaaaaaadefines the I2C slave address (only relevant in I2C mode)
    ITinvert transmit status flags
    HCenable host control
    TFenable test FIFO
    IRinvert receive status fl sda - Close bit bang I2CThis command signals that bit banging I2C on sda (and scl) is no longer required.

    Example

    $ pigs bi2cc 5

    BI2CO sda scl b - Open bit bang I2C

    This command signals that GPIO sda and scl are to be used for bit banging I2C at b baud.

    Bit banging I2C allows for certain operations which are not possible with the standard I2C driver.

    o baud rates as low as 50
    o repeated starts
    o clock stretching
    o I2C on any pair of spare GPIO

    The baud rate may be between 50 and 500000 bits per second.

    The GPIO used for SDA and SCL must have pull-ups to 3V3 connected. As a guide the hardware pull-ups on pins 3 and 5 are 1k8 in value.

    BI2CZ sda bvs - I2C bit bang multiple transactions

    This function executes a sequence of bit banged I2C operations. The operations to be performed are specified by the contents of bvs which contains the concatenated command codes and associated data.

    The following command codes are supported:

    NameCmd & DataMeaning
    End0No more commands
    Escape1Next P is two bytes
    Start2Start condition
    Stop3Stop condition
    Address4 PSet I2C address to P
    Flags5 lsb msbSet I2C flags to lsb + (msb << 8)
    Read6 PRead P bytes of data
    Write7 P ...Write P bytes of data


    The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first).

    The address and flags default to 0. The address and flags maintain their previous value until updated.

    No flags are currently defined.

    Example

    Set address 0x53
    start, write 0x32, (re)start, read 6 bytes, stop
    Set address 0x1E
    start, write 0x03, (re)start, read 6 bytes, stop
    Set address 0x68
    start, write 0x1B, (re)start, read 8 bytes, stop
    End

    0x04 0x53
    0x02 0x07 0x01 0x32   0x02 0x06 0x06 0x03

    0x04 0x1E
    0x02 0x07 0x01 0x03   0x02 0x06 0x06 0x03

    0x04 0x68
    0x02 0x07 0x01 0x1B   0x02 0x06 0x08 0x03

    0x00

    BR1 - Read bank 1 GPIO

    This command read GPIO 0-31 (bank 1) and returns the levels as a 32-bit hexadecimal value.

    Example

    $ pigs br1
    1001C1CF

    BR2 - Read bank 2 GPIO

    This command read GPIO 32-53 (bank 2) and returns the levels as a 32-bit hexadecimal value.

    Example

    $ pigs br2
    003F0000

    BS1 bits - Set specified GPIO in bank 1

    This command sets (sets high) the GPIO specified by bits in bank 1. Bank 1 consists of GPIO 0-31.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs bs1 16 # set GPIO 4 (1<<4)

    $ pigs bs1 1 # set GPIO&=T
    Returns the current transmitting waveform gpioWaveTxAt
    WVBSYCheck if waveform is being transmitted gpioWaveTxBusy
    WVHLTStop waveform gpioWaveTxStop
    WVSC wsGet waveform DMA CB stats gpioWaveGetCbs
    WVSM wsGet waveform time stats gpioWaveGetMicros
    WVSP wsGet waveform pulse stats gpioWaveGetPulses
    UTILITIES
    H/HELPDisplay command help
    HWVERGet hardware version gpioHardwareRevision
    MICS vMicroseconds delay gpioDelay
    MILS vMilliseconds delay gpioDelay
    PIGPVGet pigpio library version gpioVersion
    T/TICKGet current tick gpioTick
    CONFIGURATION
    CGIConfiguration get internals gpioCfgGetInternals
    CSI vConfiguration set internals gpioCfgSetInternals

    Commands

    BC1 bits - Clear specified GPIO in bank 1

    This command clears (sets low) the GPIO specified by bits in bank 1. Bank 1 consists of GPIO 0-31.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs bc1 0x400010 # clear GPIO 4 (1<<4) and 22 (1<<22)

    $ pigs bc1 32 # clear GPIO 5 (1<<5)
    -42
    ERROR: no permission to update one or more GPIO

    BC2 bits - Clear specified GPIO in bank 2

    This command clears (sets low) the GPIO specified by bits in bank 2. Bank 2 consists of GPIO 32-53.

    Upon success nothing is returned. On error a negative status code will be returned.

    Example

    $ pigs bc2 0x8000 # clear GPIO 47 (activity LED on A+/B+/Pi2/Pi3)

    $ pigs bc2 1 # clear GPIO 32 (first in bank 2)
    -42
    ERROR: no permission to update one or more GPIO

    BI2C>BSPIC">BSPIC csClose bit bang SPI bbSPICloseBSPIX cs bvsSPI bit bang transfer bbSPIXferFILES FO file modeOpen a file in mode fileOpenFC hClose file handle fileCloseFR h numRead bytes from file handle fileReadFW h bvsWrite bytes to file handle fileWriteFS h num fromSeek to file handle position fileSeekFL pat numList files which match pattern fileListWAVES WVCLRClear all waveforms gpioWaveClearWVNEWInitialise a new waveform gpioWaveAddNewWVAG tripsAdd generic pulses to waveform gpioWaveAddGenericWVAS u b db sb o bvsAdd serial data to waveform gpioWaveAddSerialWVCRECreate a waveform gpioWaveCreateWVCAP percentCreate a waveform of fixed size gpioWaveCreatePadWVDEL widDelete selected waveform gpioWaveDeleteWVTX widTransmits waveform once gpioWaveTxSendWVTXM wid wmdeTransmits waveform using mode gpioWaveTxSendWVTXR widTransmits waveform repeatedly gpioWaveTxSendWVCHA bvsTransmits a chain of waveforms gpioWaveChainWVTA?>SERIAL SERO dev b sefOpen serial device dev at baud b with flags serOpenSERC hClose serial handle serCloseSERRBRead byte from serial handle serReadByteSERWB h bvWrite byte to serial handle serWriteByteSERR h numRead bytes from serial handle serReadSERW h bvsWrite bytes to serial handle serWriteSERDA hCheck for serial data ready to read serDataAvailableSERIAL BIT BANG (read only) SLRO u b dbOpen GPIO for bit bang serial data gpioSerialReadOpenSLRC uClose GPIO for bit bang serial data gpioSerialReadCloseSLRI u vSets bit bang serial data logic levels gpioSerialReadInvertSLR u numRead bit bang serial data from GPIO gpioSerialReadSPI SPIO c b spfSPI open channel at baud b with flags spiOpenSPIC hSPI close handle spiCloseSPIR h numSPI read bytes from handle spiReadSPIW h bvsSPI write bytes to handle spiWriteSPIX h bvsSPI transfer bytes to handle spiXferSPI BIT BANG BSPIO cs miso mosi sclk b spfOpen bit bang SPI bbSPIOpeni2cReadByteDataI2CWB h r bvsmb Write Byte Data: write byte to register i2cWriteByteDataI2CRW h rsmb Read Word Data: read word from register i2cReadWordDataI2CWW h r wvsmb Write Word Data: write word to register i2cWriteWordDataI2CRK h rsmb Read Block Data: read data from register i2cReadBlockDataI2CWK h r bvssmb Write Block Data: write data to register i2cWriteBlockDataI2CWI h r bvssmb Write I2C Block Data i2cWriteI2CBlockDataI2CRI h r numsmb Read I2C Block Data: read bytes from register i2cReadI2CBlockDataI2CRD h numi2c Read device i2cReadDeviceI2CWD h bvsi2c Write device i2cWriteDeviceI2CPC h r wvsmb Process Call: exchange register with word i2cProcessCallI2CPK h r bvssmb Block Process Call: exchange data bytes with register i2cBlockProcessCallI2CZ h bvsPerforms multiple I2C transactions i2cZipI2C BIT BANG BI2CO sda scl bOpen bit bang I2C bbI2COpenBI2CC sdaClose bit bang I2C bbI2CCloseBI2CZ sda bvsI2C bit bang multiple transactions bbI2CZipI2C/SPI SLAVE BSCX bctl bvsBSC I2C/SPI transfer bscXfergpioSetPadPADG padGet pad drive strength gpioGetPadSHELL name strExecute a shell command shellCustom CF1 uvsCustom function 1 gpioCustom1CF2 uvsCustom function 2 gpioCustom1Events EVM h bitsSet events to monitor eventMonitorEVT eventTrigger event eventTriggerScripts PROC tStore script gpioStoreScriptPROCR sid parsRun script gpioRunScriptPROCU sid parsSet script parameters gpioUpdateScriptPROCP sidGet script status and parameters gpioScriptStatusPROCS sidStop script gpioStopScriptPROCD sidDelete script gpioDeleteScriptPARSE tValidate script gpioParseScriptI2C I2CO ib id ifOpen I2C bus and device with flags i2cOpenI2CC hClose I2C handle i2cCloseI2CWQ h bitsmb Write Quick: write bit i2cWriteQuickI2CRS hsmb Read Byte: read byte i2cReadByteI2CWS h bvsmb Write Byte: write byte i2cWriteByteI2CRB h rsmb Read Bytthe secondary channel -fDisable fifo interfaceDefault enabled -gRun in foreground (do not fork)Default disabled -kDisable local and remote socket interfaceDefault enabled -lDisable remote socket interfaceDefault enabled -mDisable alerts (sampling)Default enabled -n IP addressAllow IP address to use the socket interfaceName (e.g. paul) or dotted quad (e.g. 192.168.1.66)If the -n option is not used all addresses are allowed (unless overridden by the -k or -l options). Multiple -n options are allowed. If -k has been used -n has no effect. If -l has been used only -n localhost has any effect -p valueSocket port1024-32000Default 8888 -s valueSample rate1, 2, 4, 5, 8, or 10 microsecondsDefault 5 -t valueClock peripheral0=PWM 1=PCMDefault PCM. pigpio uses one or both of PCM and PWM. If PCM is used then PWM is available for audio. If PWM is used then PCM is available for audio. If waves or hardware PWM are used neither PWM nor PCM will be available for audio. -v -VDisplay pigpio version and exit -x maskGPIO which may be updatedA 54 bit mask with (1<<n) set if the user may update GPIO #nDefault is the set of user GPIO for the board revision. Use -x -1 to allow all GPIO

    Example

    sudo pigpiod -s 2 -b 200 -f


    Launch the pigpio library with a sample rate of 2 microseconds and a 200 millisecond buffer. Disable the fifo interface.

    Permissions

    pigpio provides a rudimentary permissions system for commands issued via the socket and pipe interfaces.

    All GPIO may be read.

    Only the user GPIO for the board type or those specified by the -x option may be updated.

    Type 1 boards 0x03E6CF93 (26 pin header)
    Type 2 boards 0xFBC6CF9C (26 pin + 8 pin header)
    Type 3 boards 0x0FFFFFFC (40 pin header)


    In this context an update includes the following:

    GPIO mode set
    GPIO pull/up down
    GPIO write
    GPIO set PWM (including range and frequency)
    GPIO set servo

    In addition the bank clear and set commands, and the wave commands will only affect updateable GPIO.

    Exceptions

    The following exceptions are made for particular models.

    Models A and B

    The green activity LED (GPIO 16) may be written.

    Models A+ and B+

    The green activity LED (GPIO 47) may be written.
    The red power LED (GPIO 35) may be written.
    The high USB power mode (GPIO 38) may be written.

    Pi Zero

    The green activity LED (GPIO 47) may be written.

    Pi2B

    The green activity LED (GPIO 47) may be written.
    The red power LED (GPIO 35) may be written.
    The high USB power mode (GPIO 38) may be written.

    Pi3B

    The green activity LED and the red power LED are not writable.
    The USB power mode is fixed at 1.2 amps (high power).

    DMA Channels

    The secondary channel is only used for the transmission of waves.

    If possible use one of channels 0 to 6 for the secondary channel (a full channel).

    A full channel only requires one DMA control block regardless of the length of a pulse delay. Channels 7 to 14 (lite channels) require one DMA control block for each 16383 microseconds of delay. I.e. a 10 second pulse delay requires one control block on a full channel and 611 control blocks on a lite channel.

    B u vSet GPIO servo pulsewidth gpioServoGPW uGet GPIO servo pulsewidth gpioGetServoPulsewidthINTERMEDIATE TRIG u pl LSend a trigger pulse gpioTriggerWDOG u vSet GPIO watchdog gpioSetWatchdogBR1Read bank 1 GPIO gpioRead_Bits_0_31BR2Read bank 2 GPIO gpioRead_Bits_32_53BC1 bitsClear specified GPIO in bank 1 gpioWrite_Bits_0_31_ClearBC2 bitsClear specified GPIO in bank 2 gpioWrite_Bits_32_53_ClearBS1 bitsSet specified GPIO in bank 1 gpioWrite_Bits_0_31_SetBS2 bitsSet specified GPIO in bank 2 gpioWrite_Bits_32_53_SetADVANCED NORequest a notification gpioNotifyOpenNC hClose notification gpioNotifyCloseNB h bitsStart notification gpioNotifyBeginNP hPause notification gpioNotifyPauseHC g cfSet hardware clock frequency gpioHardwareClockHP g pf pdcSet hardware PWM frequency and dutycycle gpioHardwarePWMFG u stdySet a glitch filter on a GPIO gpioGlitchFilterFN u stdy actvSet a noise filter on a GPIO gpioNoiseFilterPADS pad padmaSet pad drive strength Overview
    BASIC
    M/MODES g mSet GPIO mode gpioSetMode
    MG/MODEG gGet GPIO mode gpioGetMode
    PUD g pSet GPIO pull up/down gpioSetPullUpDown
    R/READ gRead GPIO level gpioRead
    W/WRITE g LWrite GPIO level gpioWrite
    PWM (overrides servo commands on same GPIO)
    P/PWM u vSet GPIO PWM value gpioPWM
    PFS u vSet GPIO PWM frequency gpioSetPWMfrequency
    PRS u vSet GPIO PWM range gpioSetPWMrange
    GDC uGet GPIO PWM dutycycle gpioGetPWMdutycycle
    PFG uGet GPIO PWM frequency gpioGetPWMfrequency
    PRG uGet GPIO PWM range gpioGetPWMrange
    PRRG uGet GPIO PWM real range gpioGetPWMrealRange
    Servo (overrides PWM commands on same GPIO)
    S/SERVOon_playback_py">Python
    Pot + Capacitor Recharge Timing C Python
    PPM (Pulse Position Modulation) generation Python
    PPM (Pulse Position Modulation) to servo pulses Python
    Pulse Per Second generator C
    PWM Monitor Python
    Rotary Encoder Hardware C C++ pdif2 Python
    RPM Monitor Python
    Servo Pulse Generator C pdif2 Python
    Si7021 I2C Temperature and Humidity Sensor Python
    Sonar Ranger Hardware pdif2 Python
    SPI bit bang MCP3008 C
    SPI bit bang MCP3008 and MCP3202 C
    SPI bit bang MCP3202 C
    SPI Linux driver speed test Misc
    SPI Monitor Python
    SPI pigpio driver speed test C
    Stepper Motor External
    TCS3200 Colour Sensor Python
    Tiny GPIO Access Misc
    Transmit Rotary Encoder Test Signals pdif2
    Transmit Wiegand Test Signals pdif2
    Virtual Wire Python
    Wave create Python
    Wave PWM 1 Python
    Wave PWM 2 Python
    Wiegand Reader C C++ pdif2 Python
    Pus_py">Python GPIO test Shell Hall Effect Sensor C Python HX711 24-bit ADC Python I2C ADXL345 Accelerometer Python I2C HMC5883L Magnetometer Python I2C ITG3205 Gyroscope Python I2C LCD Display Python I2C slave device Python I2C Sniffer C Python I2C Sonar Python IR Receiver Hardware C C++ Python IR Record and Playback Python Kivy GPIO control Python Light Dependent Resistor Hardware MAX6675 SPI Temperature Sensor Python Minimal Clock Access Misc Minimal GPIO Access Misc Monitor GPIO Python Morse Code Python Motor Shield Hardware Nanosecond Pulse Generation Misc NRF24 External External NRF24 radio transceiver Python Parallax ActivityBot 360 External PCA9685 16 Channel PWM Python PCF8591 YL-40 C Python Misc pigpio Benchmark Python pigpio CGI Python Playback piscope recordings External links Related code.

    NRF24
    2020-04-20
    Python Package Index (Pypi) NRF24 module.
    pip install nrf24

    NRF24
    2020-04-20
    Code and example usage of the Pypi NRF24 module. Cleaned up and added support for reading from multiple pipes using open_reading_pipe(pipe, address) and open_writing_pipe(address) in order to be more "compatible" with the way NRF24 is used on Arduinos.

    Stepper Motor
    2016-08-12
    Stepper motor code.

    Parallax ActivityBot 360
    2018-11-03
    Python 3 implementation for programming a Parallax ActivityBot 360 Robot Kit with a Raspberry Pi.

    Index

    433MHz Keyfob RX/TX pdif2 Python
    7-Segment LED Display Multiplexing Python
    ADXL345 Misc
    APA102 LED strip driver Python
    BME280 Sensor Python
    DHT11/21/22/33/44 Sensor pdif2 Python
    DHT22 AM2302 Sensor Python
    DS18B20 Temperature Sensor Python Misc
    Dust Sensor Python
    Easy as Pi Server Misc
    Frequency Counter 1 C
    Frequency Counter 2 C
    GPIO Status ADXL345
    2014-03-12
    This C program reads x, y, and z accelerations from the ADXL345 via I2C address 0x53.

    DS18B20 Temperature Sensor
    2016-04-25
    This Python script reads the temperature from any DS18B20 sensors connected to the 1-wire bus.

    To enable the 1-wire bus add the following line to /boot/config.txt and reboot.

    dtoverlay=w1-gpio

    By default you should connect the DS18B20 data line to GPIO 4 (pin 7).

    Connect 3V3 or 5V for power, ground to ground, 4k7 pull-up on data line to 3V3, and data line to GPIO 4.

    Easy as Pi Server
    2014-09-15
    This Python class implements a simple server which allows broswer commands to be executed on the Pi.

    Minimal Clock Access
    2015-05-20
    This C code sets GPIO 4 to a specified clock frequency. The frequency can be set between 4.6875 kHz and 500 MHz (untested). The clock can be preferentially set from one of the sources OSC (19.2MHz), HDMI (216MHz), PLLD (500MHz), or PLLC (1000MHz). MASH can be set between 0 and 3. MASH may not work properly for clock dividers less than 5.

    Minimal GPIO Access
    2019-07-03
    This C code has a minimal set of functions needed to control the GPIO and other Broadcom peripherals. The program requires root privileges to run. See Tiny GPIO access for an alternative which controls the GPIO (but not the other peripherals) and does not require root access.

    The code has been updated for the BCM2711 (Pi4B).

    The following functions are provided.

    gpioInitialise
    gpioSetMode
    gpioGetMode
    gpioSetPullUpDown
    gpioRead
    gpioWrite
    gpioTrigger
    gpioReadBank1
    gpioReadBank2
    gpioClearBank1
    gpioClearBank2
    gpioSetBank1
    gpioSetBank2
    gpioHardwareRevision
    gpioTick

    Nanosecond Pulse Generation
    2014-01-29
    This C program uses the PWM peripheral to generate precisely timed pulses of very short duration. Pulses as short as 4 nano seconds can be generated.

    PCF8591 YL-40
    2014-08-26
    C and Python code to read the (I2C) PCF8591.

    SPI Linux driver speed test
    2016-11-06
    This C code is used to benchmark the Linux SPI driver on the Pi. The code executes a given number of loops at a given baud rate and bytes per transfer.

    Tiny GPIO Access
    2016-04-30
    This C code has a minimal set of functions needed to control the GPIO without needing root privileges (it uses /dev/gpiomem to access the GPIO).

    You may need to change the permissions and ownership of /dev/gpiomem if they have not been
    Live
    The latest GPIO samples are displayed.

    The mode will automatically change to Pause if a sampling trigger is detected.

    There are four triggers.  Each trigger is made up of a combination of GPIO states (one of don't care, low, high, edge, falling, or rising per GPIO).  Triggers are always counted.  In addition a trigger may be sample to, sample around, or sample from, a so called sampling trigger.
    New samples are added to the sample buffer.

    Once the sample buffer is full the oldest samples are discarded.
    Play
    Recorded GPIO samples are displayed.

    The play speed may be varied between 64 times real-time to 1/32768 of real-time.

    The page up key increases the play speed by a factor of 2.  The page down key decreases the play speed by a factor of 2.  The home key sets the play speed to 1X.
    New samples are added to the sample buffer.

    Once the sample buffer is full new samples are discarded.
    Pause
    Recorded GPIO samples are displayed.

    The left and right cursor keys move the blue marker to the previous or next edge.  By default all GPIO edges are considered.  Clicking on a GPIO name will limit edge searches to the highlighted GPIO only.

    The left and right square bracket keys move the blue marker to the previous or next trigger.

    The time between the blue and gold markers is displayed.  The gold marker is set to the blue marker by a press of the 'g' key.
    New samples are added to the sample buffer.

    Once the sample buffer is full new samples are discarded.

    In all modes the down and up cursor keys zoom the time scale in and out.

    Samples can be saved with File Save All Samples or File Save Selected Samples.

    To select samples enter pause mode. Press 1 to specify the start of the samples (green marker) and 2 to specify the end of the samples (red marker).

    The samples may be saved in the native piscope format or in VCD format.

    Data saved in VCD format may be viewed and further processed with GTKWave.

    Data saved in the native piscope format may be restored later with File Restore Saved Data.

    Installation

    To download and install piscope.

    Pi (pre-built image)

    wget abyz.me.uk/rpi/pigpio/piscope.tar
    tar xvf piscope.tar
    cd PISCOPE
    make hf
    make install

    Linux 64 bit X86/AMD (pre-built image)

    wget abyz.me.uk/rpi/pigpio/piscope.tar
    tar xvf piscope.tar
    cd PISCOPE
    make x86_64
    make install

    All machines (building from source)

    You only need to perform this step if you want to build the executable from the source files.  This is not needed if you use a pre-built image.

    WARNING
    : Installing gtk+-3.0 uses a lot of SD card space.

    Most of the space used by gtk+-3.0 is taken up by unneeded *-dbg packages.

    With *-dbg packages an additional 3753MB SD space is required.

    If you edit the list of packages to be downloaded and remove the *-dbg packages only 134MB of additional SD space is needed (as at the time of writing).

    #
    # *** This may take a lot of time and use a lot of SD card space ***
    #
    sudo apt-get install gtk+-3.0
    #
    wget abyz.me.uk/rpi/pigpio/piscope.tar
    tar xvf piscope.tar
    cd PISCOPE
    make
    make install

    So passively sniff SPI transactions and display the results. The SPI rate should be limited to about 70kbps if using the default pigpio 5µs sampling rate.

    Servo Pulse Generator
    2016-10-07This script generates servo pulses on one or more GPIO. Each connected servo is swept between 1000µs and 2000µs at a different speed.

    ./servo_demo.py # Generate pulses on GPIO 4.

    ./servo_demo.py 5 9 20 # Generate pulses on GPIO 5, 9, and 20.

    Sonar Ranger
    2014-06-12
    Class to read sonar rangers with separate trigger and echo pins.

    TCS3200 Colour Sensor
    2015-07-03
    Class to read the TCS3200 colour sensor

    Virtual Wire
    2015-10-31
    Class to send and receive radio messages compatible with the Virtual Wire library for Arduinos. This library is commonly used with 313MHz and 434MHz radio tranceivers.

    Wave create
    2019-11-18
    Script to generate waves from a template defined in a text file.

    You can also specify one of py, c, or pdif - the script output will then be a complete program to generate the wave (py for Python script, c for a C program, pdif for a C program using the pigpio daemon I/F).

    If none of py, c, or pdif are chosen the waveform will be generated for 30 seconds.

    Example text file

    # GPIO levels
    23 11000001
    11 01110000
    12 00011100
    4 00000111

    To generate a pdif program with a bit time of 100 microseconds
    ./create_wave.py wave_file 100 pdif >wave_pdif.c

    To just transmit the wave with a bit time of 50 microseconds
    ./create_wave.py wave_file 50

    Wave PWM 1
    2016-03-19
    Script to show how waves may be used to generate PWM at (one) arbitrary frequency on multiple GPIO. For instance PWM at 10kHz may be generated with 100 steps between off and fully on.

    Wave PWM 2
    2016-10-06
    Class to generate PWM on multiple GPIO. It is more flexible than the Wave PWM 1 example in that the start of the pulse within each cycle may be specified as well as the duty cycle. The start and length of each pulse may be specified on a GPIO by GPIO basis in microseconds or as a fraction of the cycle time. The class includes a __main__ to demostrate its ability to send servo pulses.

    Wiegand Reader
    2014-06-12
    Class to read a Wiegand reader.

    Miscellaneous related code

    The following code examples do not use pigpio.

    PCA9685 16 Channel PWM
    2016-01-31
    Class to control the 16 PWM channels of the I2C PCA9685. All channels use the same frequency. The duty cycle or pulse width may be set independently for each channel.

    PCF8591 YL-40
    2014-08-26
    Script to display readings from the (I2C) PCF8591.

    PPM (Pulse Position Modulation) generation
    2016-02-19
    Script to generate PPM signals on a chosen GPIO.

    PPM (Pulse Position Modulation) to servo pulses
    2019-10-09
    Script to read a PPM signal on a GPIO and generate the corresponding servo signals on chosen GPIO.

    pigpio Benchmark
    2014-06-12
    Script to benchmark the pigpio Python module's performance.

    pigpio CGI
    2015-05-04
    Script demonstrating how to access the pigpio daemon using CGI from a browser. Instructions on how to use with Apache2 on the Pi are given in the comments.

    Playback piscope recordings
    2016-12-23
    Script to playback GPIO data recorded in piscope format.

    To playback GPIO 4 to GPIO 4 from file data.piscope
    ./playback.py data.piscope 4

    To playback GPIO 4 to GPIO 7 from file rec.txt
    ./playback.py rec.txt 7=4

    Pot + Capacitor Recharge Timing
    2016-09-26
    Class to time capacitor charging (through a resistance). The time can be used to estimate the resistance.

    PWM Monitor
    2015-12-08
    Class to monitor a PWM signal and calculate the frequency, pulse width, and duty cycle.

    Rotary Encoder
    2014-06-12
    Class to decode a mechanical rotary encoder.

    RPM Monitor
    2016-01-20
    Class to monitor speedometer pulses and calculate the RPM (Revolutions Per Minute).

    Si7021 I2C Temperature and Humidity Sensor
    2016-05-07
    Class to read the temperature and relative humidity from a Si7021.

    SPI Monitor
    2016-09-21
    A program tVa>
    2016-04-20
    Class to display text on a LCD character display. The class supports the PCF8574T 8-bit I2C port expander connected to a HD44780 based LCD display. These displays are commonly available in 16x2 and 20x4 character formats.

    I2C slave device
    2016-10-31
    This script demonstrates how to transfer messages from an Arduino acting as the I2C bus master to the Pi acting as an I2C slave device.

    I2C Sniffer
    2015-06-15
    A program to passively sniff I2C transactions (100kHz bus maximum) and display the results.

    I2C Sonar
    2016-03-24
    A class to read up to 8 HC-SR04 sonar rangers connected to an MCP23017 port expander.

    IR Receiver
    2014-06-12
    Class to hash a code from an IR receiver (reading an IR remote control).

    IR Record and Playback
    2015-12-21
    This script may be used to record and play back arbitrary IR codes.

    To record the GPIO connected to the IR receiver, a file for the recorded codes, and the codes to be recorded are given.

    E.g. ./irrp.py -r -g4 -fir-codes vol+ vol- 1 2 3 4 5 6 7 8 9 0

    To playback the GPIO connected to the IR transmitter, the file containing the recorded codes, and the codes to be played back are given.

    E.g. ./irrp.py -p -g18 -fir-codes 2 3 4

    ./irrp.py -h # for options

    Kivy GPIO control
    2016-12-11
    This example shows how to use Kivy to control a Pi's GPIO. The GPIO may be configured as inputs, outputs, or to generate Servo or PWM pulses. Kivy is an Open source Python library for rapid development of applications.

    MAX6675 SPI Temperature Sensor
    2016-05-02
    A script to read the temperature from a MAX6675 connected to a K-type thermocouple. The MAX6675 supports readings in the range 0 - 1023.75 C. Up to 4 readings may be made per second.

    Monitor GPIO
    2016-09-17
    Script to monitor GPIO for level changes. By default all GPIO are monitored. At a level change the GPIO, new level, and microseconds since the last change is printed.

    Morse Code
    2015-06-17
    Script to transmit the morse code corresponding to a text string.

    NRF24 radio transceiver
    2018-01-06
    Script to transmit and receive messages using the nRF24L01 radio transceiver.

    DHT11/21/22/33/44 Sensor
    2019-11-07
    Class to read the relative humidity and temperature from a DHT sensor. It can automatically recognize the sensor type.

    The default script prints the reading from the specified DHT every 2 seconds. E.g. ./DHT.py 22 27 displays the data for DHT connected to GPIO 22 and 27.

    The following data is printed for each DHT: timestamp, GPIO, status, temperature, and humidity.

    The timestamp is the number of seconds since the epoch (start of 1970).

    The status will be one of: 0 - a good reading, 1 - checksum failure, 2 - data had one or more invalid values, 3 - no response from sensor.

    DHT22 AM2302 Sensor
    2014-07-11
    Class to read the relative humidity and temperature from a DHT22/AM2302 sensor.

    DS18B20 Temperature Sensor
    2016-06-29
    Script to read the temperature from any DS18B20 sensors connected to the 1-wire bus.

    To enable the 1-wire bus add the following line to /boot/config.txt and reboot.

    dtoverlay=w1-gpio

    By default you should connect the DS18B20 data line to GPIO 4 (pin 7).

    Connect 3V3 or 5V for power, ground to ground, 4k7 pull-up on data line to 3V3, and data line to GPIO 4.

    This script uses the file features of pigpio to access the remote file system.

    The following entry must be in /opt/pigpio/access.

    /sys/bus/w1/devices/28*/w1_slave r

    Dust Sensor
    2015-11-22
    Class to read a Shinyei PPD42NS Dust Sensor, e.g. as used in the Grove dust sensor.

    GPIO Status
    2014-06-12
    Script to display the status of GPIO 0-31.

    Hall Effect Sensor
    2014-06-13
    Program to show status changes for a Hall effect sensor.

    HX711 24-bit ADC
    2018-03-05
    Class to read the channels of a HX711 24-bit ADC.

    I2C ADXL345 Accelerometer
    2015-04-01
    Script to display the X, Y, and Z values read from an ADXL345 accelerometer.

    I2C HMC5883L Magnetometer
    2015-04-01
    Script to display the X, Y, and Z values read from a HMC5883L Magnetometer (compass).

    I2C ITG3205 Gyroscope
    2015-04-01
    Script to display the X, Y, Z, and temperature values read from an ITG3205 gyroscope.

    I2C LCD Display
    For a one-off reading only the trigger and echo GPIO need to be specified.

    ./SRTED -t5 -e6 # Read a sonar ranger connected to GPIO 5/6.

    ./SRTED -t11 -e5 -i0.1 # Read a sonar ranger connected to GPIO 11/5 every 0.1 seconds.

    ./SRTED -? # for options.

    Transmit Rotary Encoder Test Signals
    2015-11-25
    Code to transmit quadrature signals to test rotary encoder software.

    tx_RED -aGPIO -bGPIO [options]

    tx_RED -? for options

    E.g.

    tx_RED -a5 -b6 -s20 -r-100

    Transmit Wiegand Test Signals
    2015-11-25
    Code to transmit Wiegand codes to test Wiegand decoder software.

    tx_WD -gGPIO -wGPIO [options] {code}+

    tx_WD -? for options

    E.g.

    tx_WD -g5 -w6 -s37 12345 67890 123 899999

    Wiegand Reader
    2015-11-25
    Code to read a Wiegand Reader.

    ./WD -g7 -w8 -s30 # Read Wiegand codes from GPIO 7/8 for 30 seconds.

    ./WD -g5 -w6 # Read Wiegand codes from GPIO 5/6 forever.

    ./WD -? # for options.

    Python code

    The Python code may be run on any Python machine and allows control of the GPIO on one or more networked Pis.

    The Python machine need not be a Pi, it may run Windows, Mac, Linux, anything as long as it supports Python.

    Each Pi needs the pigpio daemon to be running. The pigpio daemon may be started with the command sudo pigpiod.

    433MHz Keyfob RX/TX
    2015-10-30
    Classes to send and receive 433MHz wireless keyfob codes. These keyfobs are widely used for remote control of devices.

    7-Segment LED Display Multiplexing
    2016-12-12
    Script to multiplex several 7-segment LED displays. Each display has the segments a-g and the decimal point connected in parallel but has an individual enable GPIO (connected to the common anode or cathode).

    APA102 LED strip driver
    2017-03-28
    Script to drive an APA102 LED strip. Three different methods are demonstrated - using spidev SPI (only works on the local Pi), pigpio SPI, and pigpio waves. The SPI solutions only work with the dedicated SPI GPIO. Waves may use any spare GPIO. Four different examples are given including a LED strip clock.

    BME280 Sensor
    2016-08-05
    Class to read the relative humidity, temperature, and pressure from a BME280 sensor. The sensor has both an I2C and a SPI interface which are both
    supported by the class.

    IR Receiver
    2015-02-22
    Class to hash a code from an IR receiver (reading an IR remote control).

    Rotary Encoder
    2013-12-30
    Class to decode a mechanical rotary encoder.

    Wiegand Reader
    2013-12-30
    Class to read a Wiegand Reader.

    pigpiod_if2 code

    The pigpiod_if2 code examples are linked with libpigpiod_if2 and are written in C.

    The pigpiod_if2 library may be compiled and run on any Linux machine and allows control of the GPIO on one or more networked Pis.

    It should be possible to adapt the library to run on Macs and PCs.

    Each Pi needs the pigpio daemon to be running. The pigpio daemon may be started with the command sudo pigpiod.

    433MHz Keyfob RX/TX
    2015-11-17
    Code to read and transmit 313 and 434 MHz key fob codes. The codes to be read must use Manchester encoding. The transmitted codes use Manchester encoding.

    ./_433D -r10 # Print fob keycodes received on GPIO 10.

    ./_433D -t5 8246184 # Transmit code on GPIO 5.

    ./_433D -r10 -t5 8246184 # Transmit code on GPIO 5 then listen for codes

    ./_433D -? for options.

    DHT11/21/22/33/44 Sensor
    2016-02-16
    Code to read the DHT temperature and humidity sensors. The sensor may be auto detected. A DHT11 sensor may be read once per second. The other sensors should not be read more often than once every three seconds.

    The code auto detects the DHT model and generally only the GPIO needs to be specified.

    ./DHTXXD -g17 # Read a DHT connected to GPIO 17.

    ./DHTXXD -g5 -i3 # Read a DHT connected to GPIO 5 every three seconds.

    ./DHTXXD -? # for options.

    Rotary Encoder
    2015-11-18
    Code to monitor a rotary encoder and show the position changes. By default the detent changes are shown. There is an option to show the four steps per detent instead.

    ./RED -a7 -b8 -s30 # Show encoder on 7/8 detent changes for 30 seconds.

    ./RED -a5 -b6 -m1 # Show encoder on 5/6 step changes forever.

    ./RED -? # for options.

    Servo Pulse Generator
    2016-10-08
    This program generates servo pulses on one or more GPIO. Each connected servo is swept between 1000µs and 2000µs at a different speed.

    ./servo_demo_D # Generate pulses on GPIO 4.

    ./servo_demo_D 5 9 20 # Generate pulses on GPIO 5, 9, and 20.

    Sonar Ranger
    2015-11-16
    Code to read the SRF-04 and SRF-05 type of sonar rangers which use$GPIO 0-31

  • callbacks on GPIO 0-31 level change (time accurate to a few us)

  • notifications via pipe on GPIO 0-31 level change

  • callbacks at timed intervals

  • reading/writing all of the GPIO in a bank (0-31, 32-53) as a single operation

  • GPIO reading, writing, modes, and internal pulls

  • socket and pipe interfaces for the bulk of the functionality

  • waveforms to generate GPIO level changes (time accurate to a few us)

  • software serial links using any user GPIO

  • rudimentary permission control through the socket and pipe interfaces

  • creating and running scripts on the pigpio daemon
  • General

    The pigpio library is written in the C programming language.

    The pigpio daemon offers a socket and pipe interface to the underlying C library.

    A C library and a Python module allow control of the GPIO via the pigpio daemon.

    There is third party support for a number of other languages

    piscope

    piscope is a logic analyser (digital waveform viewer).

    piscope is a GTK+3 application and uses pigpio to provide raw GPIO level data.  piscope may be run on a Pi or on any machine capable of compiling a GTK+3 application.

    GPIO

    ALL GPIO are identified by their Broadcom number.  See elinux.org

    There are 54 GPIO in total, arranged in two banks.

    Bank 1 contains GPIO 0-31.  Bank 2 contains GPIO 32-53.

    For all types of Pi it is safe to read all the GPIO. If you try to write a system GPIO or change its mode you can crash the Pi or corrupt the data on the SD card.

    There are several types of board, each with different expansion headers, giving physical access to different GPIO. 

    Type 1 - Model B (original model)

    • 26 pin header (P1).
    • Hardware revision numbers of 2 and 3.
    • User GPIO 0-1, 4, 7-11, 14-15, 17-18, 21-25.

    GPIO pin pin GPIO
    3V3 - 1 2 - 5V
    SDA 0
    3 4 - 5V
    SCL 1
    5 6 - IR Receiver
    2015-02-25
    Function to hash a code from an IR receiver (reading an IR remote control).

    PCF8591 YL-40
    2014-08-26
    A program to display readings from the (I2C) PCF8591.

    Pot + Capacitor Recharge Timing
    2014-03-14
    Function to time capacitor charging (through a resistance). The time can be used to estimate the resistance.

    Pulse Per Second generator
    2020-07-28
    A program to generate a pulse on a GPIO every x seconds (1<=x<=60). The pulse is synced with the wall time second boundary.

    Rotary Encoder
    2015-10-03
    Function to decode a mechanical rotary encoder.

    SPI bit bang MCP3008
    2016-03-20
    This program shows how to read multiple MCP3008 ADC simultaneously with accurately timed intervals. One 10-bit channel of each ADC may be sampled at up to 25k samples per second.

    SPI bit bang MCP3202
    2016-03-20
    This program shows how to read multiple MCP3202 ADC simultaneously with accurately timed intervals. One 12-bit channel of each ADC may be sampled at up to 25k samples per second.

    SPI bit bang MCP3008 and MCP3202
    2016-03-20
    This program shows how to read multiple MCP3008 and MCP3202 ADC simultaneously with accurately timed intervals. One channel of each ADC may be sampled at up to 25k samples per second. The 10-bit MCP3008 readings are multiplied by 4 so they have the same range (0-4095) as the 12-bit MCP3202.

    Servo Pulse Generator
    2016-10-08
    This program generates servo pulses on one or more GPIO. Each connected servo is swept between 1000µs and 2000µs at a different speed.

    sudo ./servo_demo # Generate pulses on GPIO 4.

    sudo ./servo_demo 5 9 20 # Generate pulses on GPIO 5, 9, and 20.

    SPI pigpio driver speed test
    2016-11-06
    This C code is used to benchmark the pigpio SPI driver on the Pi. The code executes a given number of loops at a given baud rate and bytes per transfer.

    Wiegand Reader
    2013-12-30
    Function to read a Wiegand Reader.

    C++ code

    Examples of C++ pigpio programs.

    If your program is called foobar.cpp then build with

    g++ -Wall -pthread -o foobar foobar.cpp -lpigpio -lrt
    IR Receiver
    2013-06-09
    Reading an infrared remote receiver.

    Light Dependent Resistor
    2013-06-09
    Measuring brightness with a light dependent resistor (LDR). Improved methods of timing the start of the capacitor recharge are given for C and Python.

    Motor Shield
    2013-12-15
    Using an Arduino motor shield.

    Rotary Encoder
    2013-06-09
    Reading a rotary encoder.

    Sonar Ranger
    2013-06-10
    Measuring range with a sonar ranger.

    Shell code

    Examples of using pigpio with shell code.

    GPIO test
    2014-08-11
    This bash script tests the user GPIO. Video

    C code

    Examples of C pigpio programs.

    If your program is called foobar.c then build with

    gcc -Wall -o foobar foobar.c -lpigpio

    Frequency Counter 1
    2014-08-20
    A program showing how to use the gpioSetAlertFunc function to set a callback for GPIO state changes. A frequency count is generated for each monitored GPIO (frequencies up to 500kHz with a sample rate of 1μs).

    Frequency Counter 2
    2014-08-20
    A program showing how to use the gpioSetGetSamplesFunc function to set a callback for accumulated GPIO state changes over the last millisecond. A frequency count is generated for each monitored GPIO (frequencies up to 500kHz with a sample rate of 1μs). Generally the method used is more complicated but more efficient than frequency counter 1.

    Hall Effect Sensor
    2014-06-13
    Program to show status changes for a Hall effect sensor.

    I2C Sniffer
    2014-06-15
    A program to passively sniff I2C transactions (100kHz bus maximum) and display the results. This C program uses pigpio notifications.

    int gpioWaveAddSerial(unsigned user_gpio, unsigned baud, unsigned data_bits, unsigned stop_bits, unsigned offset, unsigned numBytes, char *str) This function adds a waveform representing serial data to the existing waveform (if any). The serial data starts offset microseconds from the start of the waveform.

    user_gpio: 0-31
         baud: 50-1000000
    data_bits: 1-32
    stop_bits: 2-8
       offset: >=0
     numBytes: >=1
          str: an array of chars (which may contain nulls)


    Returns the new total number of pulses in the current waveform if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_WAVE_BAUD, PI_BAD_DATABITS, PI_BAD_STOPBITS, PI_TOO_MANY_CHARS, PI_BAD_SER_OFFSET, or PI_TOO_MANY_PULSES.

    NOTES:

    The serial data is formatted as one start bit, data_bits data bits, and stop_bits/2 stop bits.

    It is legal to add serial data streams with different baud rates to the same waveform.

    numBytes is the number of bytes of data in str.

    The bytes required for each character depend upon data_bits.

    For data_bits 1-8 there will be one byte per character.
    For data_bits 9-16 there will be two bytes per character.
    For data_bits 17-32 there will be four bytes per character.

    Example

    #define MSG_LEN 8

    int i;
    char *str;
    char data[MSG_LEN];

    str = "Hello world!";

    gpioWaveAddSerial(4, 9600, 8, 2, 0, strlen(str), str);

    for (i=0; i<MSG_LEN; i++) data[i] = i;

    // Data added is offset 1 second from the waveform start.
    gpioWaveAddSerial(4, 9600, 8, 2, 1000000, MSG_LEN, data);

    int gpioWaveCreate(void)

    This function creates a waveform from the data provided by the prior calls to the gpioWaveAdd* functions. Upon success a wave id greater than or equal to 0 is returned, otherwise PI_EMPTY_WAVEFORM, PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID.

    The data provided by the gpioWaveAdd* functions is consumed by this function.

    As many waveforms may be created as there is space available. The wave id is passed to gpioWaveTxSend to specify the waveform to transmit.

    Normal usage would be

    Step 1. gpioWaveClear to clear all pigpio-78/DOC/makedoc000077500000000000000000000031121373465704200145470ustar00rootroot00000000000000#!/bin/bash mkdir -p tmp/pydoc mkdir -p tmp/body echo "*** making man pages ***" echo "pigs" bin/smakdoc.py src/defs/pigs.def man >MAN/pigs.1 echo "pigpiod" bin/cmakdoc.py pigpiod src/defs/pigpiod.def man >MAN/pigpiod.1 echo "pig2vcd" bin/cmakdoc.py pig2vcd src/defs/pig2vcd.def man >MAN/pig2vcd.1 echo "pigpio.h" bin/cmakdoc.py pigpio ../pigpio.h man >MAN/pigpio.3 echo "pigpiod_if.h" bin/cmakdoc.py pigpiod_if ../pigpiod_if.h man >MAN/pigpiod_if.3 echo "pigpiod_if2.h" bin/cmakdoc.py pigpiod_if2 ../pigpiod_if2.h man >MAN/pigpiod_if2.3 # *** preparing HTML bodies *** bin/smakdoc.py src/defs/pigs.def >tmp/body/pigs.body bin/cmakdoc.py pigpiod src/defs/pigpiod.def >tmp/body/pigpiod.body bin/cmakdoc.py pig2vcd src/defs/pig2vcd.def >tmp/body/pig2vcd.body bin/cmakdoc.py pigpio ../pigpio.h >tmp/body/cif.body bin/cmakdoc.py pigpiod_if ../pigpiod_if.h >tmp/body/pdif.body bin/cmakdoc.py pigpiod_if2 ../pigpiod_if2.h >tmp/body/pdif2.body pydoc ../pigpio.py >tmp/pydoc/pigpio.pydoc bin/pymakdoc.py tmp/pydoc/pigpio.pydoc >tmp/body/python.body bin/examples.py src/defs/examples.def >tmp/body/examples.body bin/body.py # get bodies of manually generated pages bin/tidy.py # tidy the bodies bin/backup.sh # backup database bin/updatesql.py # update the database with the new bodies bin/purge.sh # remove redundant datatbase copies echo "*** making web pages ***" bin/build_site.py # construct the web site pigpio-78/DOC/src/000077500000000000000000000000001373465704200140105ustar00rootroot00000000000000pigpio-78/DOC/src/defs/000077500000000000000000000000001373465704200147315ustar00rootroot00000000000000pigpio-78/DOC/src/defs/examples.def000066400000000000000000000524711373465704200172400ustar00rootroot00000000000000The following examples show various ways pigpio may be used to communicate with sensors via the GPIO. Although many are complete programs they are intended to be a starting point in producing your own code, not an end point. ?0|Index ?0|Hardware ?0|Shell code ?0|C code ?0|C++ code ?0|pigpiod_if2 code ?0|Python code ?0|Miscellaneous related code ?0|External links ?1|Hardware|Hardware A few practical examples of using pigpio with hardware. ?2|ex_ir_remote|2013-06-09|IR Receiver Reading an infrared remote receiver. ?2|ex_LDR|2013-06-09|Light Dependent Resistor Measuring brightness with a light dependent resistor (LDR). Improved methods of timing the start of the capacitor recharge are given for C and Python. ?2|ex_motor_shield|2013-12-15|Motor Shield Using an Arduino motor shield. ?2|ex_rotary_encoder|2013-06-09|Rotary Encoder Reading a rotary encoder. ?2|ex_sonar_ranger|2013-06-10|Sonar Ranger Measuring range with a sonar ranger. ?1|Shell|Shell code Examples of using pigpio with shell code. ?3|gpiotest|2014-08-11|GPIO test This bash script tests the user GPIO. Video ?1|C|C code Examples of C pigpio programs. If your program is called foobar.c then build with gcc -Wall -o foobar foobar.c -lpigpio ?3|freq_count_1|2014-08-20|Frequency Counter 1 A program showing how to use the gpioSetAlertFunc function to set a callback for GPIO state changes. A frequency count is generated for each monitored GPIO (frequencies up to 500kHz with a sample rate of 1μs). ?3|freq_count_2|2014-08-20|Frequency Counter 2 A program showing how to use the gpioSetGetSamplesFunc function to set a callback for accumulated GPIO state changes over the last millisecond. A frequency count is generated for each monitored GPIO (frequencies up to 500kHz with a sample rate of 1μs). Generally the method used is more complicated but more efficient than frequency counter 1. ?3|hall|2014-06-13|Hall Effect Sensor Program to show status changes for a Hall effect sensor. ?3|I2C_sniffer|2014-06-15|I2C Sniffer A program to passively sniff I2C transactions (100kHz bus maximum) and display the results. This C program uses pigpio notifications. ?3|ir_hasher_c|2015-02-25|IR Receiver Function to hash a code from an IR receiver (reading an IR remote control). ?3|PCF8591|2014-08-26|PCF8591 YL-40 A program to display readings from the (I2C) PCF8591. ?3|pot_cap_charge_c|2014-03-14|Pot + Capacitor Recharge Timing Function to time capacitor charging (through a resistance). The time can be used to estimate the resistance. ?3|pps_c|2020-07-28|Pulse Per Second generator A program to generate a pulse on a GPIO every x seconds (1<=x<=60). The pulse is synced with the wall time second boundary. ?3|rotary_encoder_c|2015-10-03|Rotary Encoder Function to decode a mechanical rotary encoder. ?3|rawMCP3008_c|2016-03-20|SPI bit bang MCP3008 This program shows how to read multiple MCP3008 ADC simultaneously with accurately timed intervals. One 10-bit channel of each ADC may be sampled at up to 25k samples per second. ?3|rawMCP3202_c|2016-03-20|SPI bit bang MCP3202 This program shows how to read multiple MCP3202 ADC simultaneously with accurately timed intervals. One 12-bit channel of each ADC may be sampled at up to 25k samples per second. ?3|rawMCP3XXX_c|2016-03-20|SPI bit bang MCP3008 and MCP3202 This program shows how to read multiple MCP3008 and MCP3202 ADC simultaneously with accurately timed intervals. One channel of each ADC may be sampled at up to 25k samples per second. The 10-bit MCP3008 readings are multiplied by 4 so they have the same range (0-4095) as the 12-bit MCP3202. ?3|servo_demo|2016-10-08|Servo Pulse Generator This program generates servo pulses on one or more GPIO. Each connected servo is swept between 1000µs and 2000µs at a different speed. sudo ./servo_demo # Generate pulses on GPIO 4. sudo ./servo_demo 5 9 20 # Generate pulses on GPIO 5, 9, and 20. ?4|code/spi-pigpio-speed.c|2016-11-06|SPI pigpio driver speed test This C code is used to benchmark the pigpio SPI driver on the Pi. The code executes a given number of loops at a given baud rate and bytes per transfer. ?3|wiegand_c|2013-12-30|Wiegand Reader Function to read a Wiegand Reader. ?1|C++|C++ code Examples of C++ pigpio programs. If your program is called foobar.cpp then build with g++ -Wall -pthread -o foobar foobar.cpp -lpigpio -lrt ?3|ir_hasher_cpp|2015-02-22|IR Receiver Class to hash a code from an IR receiver (reading an IR remote control). ?3|rotary_encoder_cpp|2013-12-30|Rotary Encoder Class to decode a mechanical rotary encoder. ?3|wiegand_cpp|2013-12-30|Wiegand Reader Class to read a Wiegand Reader. ?1|pdif2|pigpiod_if2 code The pigpiod_if2 code examples are linked with libpigpiod_if2 and are written in C. The pigpiod_if2 library may be compiled and run on any Linux machine and allows control of the GPIO on one or more networked Pis. It should be possible to adapt the library to run on Macs and PCs. Each Pi needs the pigpio daemon to be running. The pigpio daemon may be started with the command sudo pigpiod. ?3|_433D|2015-11-17|433MHz Keyfob RX/TX Code to read and transmit 313 and 434 MHz key fob codes. The codes to be read must use Manchester encoding. The transmitted codes use Manchester encoding. ./_433D -r10 # Print fob keycodes received on GPIO 10. ./_433D -t5 8246184 # Transmit code on GPIO 5. ./_433D -r10 -t5 8246184 # Transmit code on GPIO 5 then listen for codes ./_433D -? for options. ?3|DHTXXD|2016-02-16|DHT11/21/22/33/44 Sensor Code to read the DHT temperature and humidity sensors. The sensor may be auto detected. A DHT11 sensor may be read once per second. The other sensors should not be read more often than once every three seconds. The code auto detects the DHT model and generally only the GPIO needs to be specified. ./DHTXXD -g17 # Read a DHT connected to GPIO 17. ./DHTXXD -g5 -i3 # Read a DHT connected to GPIO 5 every three seconds. ./DHTXXD -? # for options. ?3|RED|2015-11-18|Rotary Encoder Code to monitor a rotary encoder and show the position changes. By default the detent changes are shown. There is an option to show the four steps per detent instead. ./RED -a7 -b8 -s30 # Show encoder on 7/8 detent changes for 30 seconds. ./RED -a5 -b6 -m1 # Show encoder on 5/6 step changes forever. ./RED -? # for options. ?3|servo_demo_D|2016-10-08|Servo Pulse Generator This program generates servo pulses on one or more GPIO. Each connected servo is swept between 1000µs and 2000µs at a different speed. ./servo_demo_D # Generate pulses on GPIO 4. ./servo_demo_D 5 9 20 # Generate pulses on GPIO 5, 9, and 20. ?3|SRTED|2015-11-16|Sonar Ranger Code to read the SRF-04 and SRF-05 type of sonar rangers which use the trigger echo method of operation. A 10 μs trigger pulse initiates a series of high frequency sonar chirps. The echo line then goes high and stays high until an echo from an object is received. The echo high time is used to calculate the distance of the object. For a one-off reading only the trigger and echo GPIO need to be specified. ./SRTED -t5 -e6 # Read a sonar ranger connected to GPIO 5/6. ./SRTED -t11 -e5 -i0.1 # Read a sonar ranger connected to GPIO 11/5 every 0.1 seconds. ./SRTED -? # for options. ?3|tx_RED|2015-11-25|Transmit Rotary Encoder Test Signals Code to transmit quadrature signals to test rotary encoder software. tx_RED -aGPIO -bGPIO [options] tx_RED -? for options E.g. tx_RED -a5 -b6 -s20 -r-100 ?3|tx_WD|2015-11-25|Transmit Wiegand Test Signals Code to transmit Wiegand codes to test Wiegand decoder software. tx_WD -gGPIO -wGPIO [options] {code}+ tx_WD -? for options E.g. tx_WD -g5 -w6 -s37 12345 67890 123 899999 ?3|WD|2015-11-25|Wiegand Reader Code to read a Wiegand Reader. ./WD -g7 -w8 -s30 # Read Wiegand codes from GPIO 7/8 for 30 seconds. ./WD -g5 -w6 # Read Wiegand codes from GPIO 5/6 forever. ./WD -? # for options. ?1|Python|Python code The Python code may be run on any Python machine and allows control of the GPIO on one or more networked Pis. The Python machine need not be a Pi, it may run Windows, Mac, Linux, anything as long as it supports Python. Each Pi needs the pigpio daemon to be running. The pigpio daemon may be started with the command sudo pigpiod. ?3|_433_py|2015-10-30|433MHz Keyfob RX/TX Classes to send and receive 433MHz wireless keyfob codes. These keyfobs are widely used for remote control of devices. ?3|_7_segment|2016-12-12|7-Segment LED Display Multiplexing Script to multiplex several 7-segment LED displays. Each display has the segments a-g and the decimal point connected in parallel but has an individual enable GPIO (connected to the common anode or cathode). ?3|test-APA102_py|2017-03-28|APA102 LED strip driver Script to drive an APA102 LED strip. Three different methods are demonstrated - using spidev SPI (only works on the local Pi), pigpio SPI, and pigpio waves. The SPI solutions only work with the dedicated SPI GPIO. Waves may use any spare GPIO. Four different examples are given including a LED strip clock. ?3|BME280_py|2016-08-05|BME280 Sensor Class to read the relative humidity, temperature, and pressure from a BME280 sensor. The sensor has both an I2C and a SPI interface which are both supported by the class. ?4|code/DHT.py|2019-11-07|DHT11/21/22/33/44 Sensor Class to read the relative humidity and temperature from a DHT sensor. It can automatically recognize the sensor type. The default script prints the reading from the specified DHT every 2 seconds. E.g. ./DHT.py 22 27 displays the data for DHT connected to GPIO 22 and 27. The following data is printed for each DHT: timestamp, GPIO, status, temperature, and humidity. The timestamp is the number of seconds since the epoch (start of 1970). The status will be one of: 0 - a good reading, 1 - checksum failure, 2 - data had one or more invalid values, 3 - no response from sensor. ?3|DHT22_py|2014-07-11|DHT22 AM2302 Sensor Class to read the relative humidity and temperature from a DHT22/AM2302 sensor. ?3|DS18B20-1_py|2016-06-29|DS18B20 Temperature Sensor Script to read the temperature from any DS18B20 sensors connected to the 1-wire bus. To enable the 1-wire bus add the following line to /boot/config.txt and reboot. dtoverlay=w1-gpio By default you should connect the DS18B20 data line to GPIO 4 (pin 7). Connect 3V3 or 5V for power, ground to ground, 4k7 pull-up on data line to 3V3, and data line to GPIO 4. This script uses the file features of pigpio to access the remote file system. The following entry must be in /opt/pigpio/access. /sys/bus/w1/devices/28*/w1_slave r ?3|PPD42NS_py|2015-11-22|Dust Sensor Class to read a Shinyei PPD42NS Dust Sensor, e.g. as used in the Grove dust sensor. ?3|gpio_status_py|2014-06-12|GPIO Status Script to display the status of GPIO 0-31. ?3|hall|2014-06-13|Hall Effect Sensor Program to show status changes for a Hall effect sensor. ?3|HX711_py|2018-03-05|HX711 24-bit ADC Class to read the channels of a HX711 24-bit ADC. ?3|i2c_ADXL345_py|2015-04-01|I2C ADXL345 Accelerometer Script to display the X, Y, and Z values read from an ADXL345 accelerometer. ?3|i2c_HMC5883L_py|2015-04-01|I2C HMC5883L Magnetometer Script to display the X, Y, and Z values read from a HMC5883L Magnetometer (compass). ?3|i2c_ITG3205_py|2015-04-01|I2C ITG3205 Gyroscope Script to display the X, Y, Z, and temperature values read from an ITG3205 gyroscope. ?3|i2c_lcd_py|2016-04-20|I2C LCD Display Class to display text on a LCD character display. The class supports the PCF8574T 8-bit I2C port expander connected to a HD44780 based LCD display. These displays are commonly available in 16x2 and 20x4 character formats. ?3|bsc_arduino_py|2016-10-31|I2C slave device This script demonstrates how to transfer messages from an Arduino acting as the I2C bus master to the Pi acting as an I2C slave device. ?3|I2C_sniffer|2015-06-15|I2C Sniffer A program to passively sniff I2C transactions (100kHz bus maximum) and display the results. ?3|i2c_sonar_py|2016-03-24|I2C Sonar A class to read up to 8 HC-SR04 sonar rangers connected to an MCP23017 port expander. ?3|ir_hasher_py|2014-06-12|IR Receiver Class to hash a code from an IR receiver (reading an IR remote control). ?3|irrp_py|2015-12-21|IR Record and Playback This script may be used to record and play back arbitrary IR codes. To record the GPIO connected to the IR receiver, a file for the recorded codes, and the codes to be recorded are given. E.g. ./irrp.py -r -g4 -fir-codes vol+ vol- 1 2 3 4 5 6 7 8 9 0 To playback the GPIO connected to the IR transmitter, the file containing the recorded codes, and the codes to be played back are given. E.g. ./irrp.py -p -g18 -fir-codes 2 3 4 ./irrp.py -h # for options ?3|kivy_GPIO_py|2016-12-11|Kivy GPIO control This example shows how to use Kivy to control a Pi's GPIO. The GPIO may be configured as inputs, outputs, or to generate Servo or PWM pulses. Kivy is an Open source Python library for rapid development of applications. ?3|MAX6675_py|2016-05-02|MAX6675 SPI Temperature Sensor A script to read the temperature from a MAX6675 connected to a K-type thermocouple. The MAX6675 supports readings in the range 0 - 1023.75 C. Up to 4 readings may be made per second. ?3|monitor_py|2016-09-17|Monitor GPIO Script to monitor GPIO for level changes. By default all GPIO are monitored. At a level change the GPIO, new level, and microseconds since the last change is printed. ?3|morse_code_py|2015-06-17|Morse Code Script to transmit the morse code corresponding to a text string. ?4|code/NRF24.py|2018-01-06|NRF24 radio transceiver Script to transmit and receive messages using the nRF24L01 radio transceiver. ?3|PCA9685_py|2016-01-31|PCA9685 16 Channel PWM Class to control the 16 PWM channels of the I2C PCA9685. All channels use the same frequency. The duty cycle or pulse width may be set independently for each channel. ?3|PCF8591|2014-08-26|PCF8591 YL-40 Script to display readings from the (I2C) PCF8591. ?4|code/PPM.py|2016-02-19|PPM (Pulse Position Modulation) generation Script to generate PPM signals on a chosen GPIO. ?4|code/PPM_to_servo.py|2019-10-09|PPM (Pulse Position Modulation) to servo pulses Script to read a PPM signal on a GPIO and generate the corresponding servo signals on chosen GPIO. ?3|bench_1_py|2014-06-12|pigpio Benchmark Script to benchmark the pigpio Python module's performance. ?3|pigpio_cgi_py|2015-05-04|pigpio CGI Script demonstrating how to access the pigpio daemon using CGI from a browser. Instructions on how to use with Apache2 on the Pi are given in the comments. ?3|playback_py|2016-12-23|Playback piscope recordings Script to playback GPIO data recorded in piscope format. To playback GPIO 4 to GPIO 4 from file data.piscope ./playback.py data.piscope 4 To playback GPIO 4 to GPIO 7 from file rec.txt ./playback.py rec.txt 7=4 ?3|pot_cap_py|2016-09-26|Pot + Capacitor Recharge Timing Class to time capacitor charging (through a resistance). The time can be used to estimate the resistance. ?3|read_PWM_py|2015-12-08|PWM Monitor Class to monitor a PWM signal and calculate the frequency, pulse width, and duty cycle. ?3|rotary_encoder_py|2014-06-12|Rotary Encoder Class to decode a mechanical rotary encoder. ?3|read_RPM_py|2016-01-20|RPM Monitor Class to monitor speedometer pulses and calculate the RPM (Revolutions Per Minute). ?3|Si7021_py|2016-05-07|Si7021 I2C Temperature and Humidity Sensor Class to read the temperature and relative humidity from a Si7021. ?3|SPI_mon_py|2016-09-21|SPI Monitor A program to passively sniff SPI transactions and display the results. The SPI rate should be limited to about 70kbps if using the default pigpio 5µs sampling rate. ?3|servo_demo_py|2016-10-07|Servo Pulse Generator This script generates servo pulses on one or more GPIO. Each connected servo is swept between 1000µs and 2000µs at a different speed. ./servo_demo.py # Generate pulses on GPIO 4. ./servo_demo.py 5 9 20 # Generate pulses on GPIO 5, 9, and 20. ?3|sonar_trigger_echo_py|2014-06-12|Sonar Ranger Class to read sonar rangers with separate trigger and echo pins. ?3|TCS3200_py|2015-07-03|TCS3200 Colour Sensor Class to read the TCS3200 colour sensor ?3|vw|2015-10-31|Virtual Wire Class to send and receive radio messages compatible with the Virtual Wire library for Arduinos. This library is commonly used with 313MHz and 434MHz radio tranceivers. ?4|code/create_wave.py|2019-11-18|Wave create Script to generate waves from a template defined in a text file. You can also specify one of py, c, or pdif - the script output will then be a complete program to generate the wave (py for Python script, c for a C program, pdif for a C program using the pigpio daemon I/F). If none of py, c, or pdif are chosen the waveform will be generated for 30 seconds. Example text file # GPIO levels 23 11000001 11 01110000 12 00011100 4 00000111 To generate a pdif program with a bit time of 100 microseconds ./create_wave.py wave_file 100 pdif >wave_pdif.c To just transmit the wave with a bit time of 50 microseconds ./create_wave.py wave_file 50 ?3|wave_PWM_py|2016-03-19|Wave PWM 1 Script to show how waves may be used to generate PWM at (one) arbitrary frequency on multiple GPIO. For instance PWM at 10kHz may be generated with 100 steps between off and fully on. ?3|wavePWM_py|2016-10-06|Wave PWM 2 Class to generate PWM on multiple GPIO. It is more flexible than the Wave PWM 1 example in that the start of the pulse within each cycle may be specified as well as the duty cycle. The start and length of each pulse may be specified on a GPIO by GPIO basis in microseconds or as a fraction of the cycle time. The class includes a __main__ to demostrate its ability to send servo pulses. ?3|wiegand_py|2014-06-12|Wiegand Reader Class to read a Wiegand reader. ?1|Misc|Miscellaneous related code The following code examples do not use pigpio. ?3|adxl345_c|2014-03-12|ADXL345 This C program reads x, y, and z accelerations from the ADXL345 via I2C address 0x53. ?3|DS18B20_py|2016-04-25|DS18B20 Temperature Sensor This Python script reads the temperature from any DS18B20 sensors connected to the 1-wire bus. To enable the 1-wire bus add the following line to /boot/config.txt and reboot. dtoverlay=w1-gpio By default you should connect the DS18B20 data line to GPIO 4 (pin 7). Connect 3V3 or 5V for power, ground to ground, 4k7 pull-up on data line to 3V3, and data line to GPIO 4. ?3|EasyAsPiServer|2014-09-15|Easy as Pi Server This Python class implements a simple server which allows broswer commands to be executed on the Pi. ?3|minimal_clk|2015-05-20|Minimal Clock Access This C code sets GPIO 4 to a specified clock frequency. The frequency can be set between 4.6875 kHz and 500 MHz (untested). The clock can be preferentially set from one of the sources OSC (19.2MHz), HDMI (216MHz), PLLD (500MHz), or PLLC (1000MHz). MASH can be set between 0 and 3. MASH may not work properly for clock dividers less than 5. ?3|minimal_gpio|2019-07-03|Minimal GPIO Access This C code has a minimal set of functions needed to control the GPIO and other Broadcom peripherals. The program requires root privileges to run. See Tiny GPIO access for an alternative which controls the GPIO (but not the other peripherals) and does not require root access. The code has been updated for the BCM2711 (Pi4B). The following functions are provided. gpioInitialise gpioSetMode gpioGetMode gpioSetPullUpDown gpioRead gpioWrite gpioTrigger gpioReadBank1 gpioReadBank2 gpioClearBank1 gpioClearBank2 gpioSetBank1 gpioSetBank2 gpioHardwareRevision gpioTick ?3|nanopulse_c|2014-01-29|Nanosecond Pulse Generation This C program uses the PWM peripheral to generate precisely timed pulses of very short duration. Pulses as short as 4 nano seconds can be generated. ?3|PCF8591-x|2014-08-26|PCF8591 YL-40 C and Python code to read the (I2C) PCF8591. ?4|code/spi-driver-speed.c|2016-11-06|SPI Linux driver speed test This C code is used to benchmark the Linux SPI driver on the Pi. The code executes a given number of loops at a given baud rate and bytes per transfer. ?3|tiny_gpio|2016-04-30|Tiny GPIO Access This C code has a minimal set of functions needed to control the GPIO without needing root privileges (it uses /dev/gpiomem to access the GPIO). You may need to change the permissions and ownership of /dev/gpiomem if they have not been correctly set up. sudo chown root:gpio /dev/gpiomem sudo chmod g+rw /dev/gpiomem The user (default pi) needs to be in the gpio group. sudo adduser pi gpio The following functions are provided. gpioInitialise gpioSetMode gpioGetMode gpioSetPullUpDown gpioRead gpioWrite gpioTrigger gpioReadBank1 gpioReadBank2 gpioClearBank1 gpioClearBank2 gpioSetBank1 gpioSetBank2 gpioHardwareRevision ?1|External|External links Related code. ?4|https://pypi.org/project/nrf24/|2020-04-20|NRF24 Python Package Index (Pypi) NRF24 module. pip install nrf24 ?4|https://github.com/bjarne-hansen/py-nrf24|2020-04-20|NRF24 Code and example usage of the Pypi NRF24 module. Cleaned up and added support for reading from multiple pipes using open_reading_pipe(pipe, address) and open_writing_pipe(address) in order to be more "compatible" with the way NRF24 is used on Arduinos. ?4|https://github.com/stripcode/pigpio-stepper-motor|2016-08-12|Stepper Motor Stepper motor code. ?4|https://github.com/choeffer/360pibot|2018-11-03|Parallax ActivityBot 360 Python 3 implementation for programming a Parallax ActivityBot 360 Robot Kit with a Raspberry Pi. ?1|Index|Index pigpio-78/DOC/src/defs/pig2vcd.def000066400000000000000000000052501373465704200167510ustar00rootroot00000000000000 /*TEXT pig2vcd is a utility which reads notifications on stdin and writes the output as a Value Change Dump (VCD) file on stdout. The VCD file can be viewed using GTKWave. *Notifications* Notifications consist of 12 bytes with the following binary format. . . typedef struct { uint16_t seqno; uint16_t flags; uint32_t tick; uint32_t level; } gpioReport_t; . . seqno: starts at 0 each time the handle is opened and then increments by one for each report. flags: two flags are defined, PI_NTFY_FLAGS_WDOG and PI_NTFY_FLAGS_ALIVE. If bit 5 is set (PI_NTFY_FLAGS_WDOG) then bits 0-4 of the flags indicate a gpio which has had a watchdog timeout; if bit 6 is set (PI_NTFY_FLAGS_ALIVE) this indicates a keep alive signal on the pipe/socket and is sent once a minute in the absence of other notification activity. tick: the number of microseconds since system boot. It wraps around after 1h12m. level: indicates the level of each gpio. If bit 1</dev/pigpio pigs will show the result of the command on screen. The pigs process returns an exit status (which can be displayed with the command echo $?). ... PIGS_OK 0 PIGS_CONNECT_ERR 255 PIGS_OPTION_ERR 254 PIGS_SCRIPT_ERR 253 ... The results of /dev/pigpio commands need to be read from /dev/pigout, e.g. cat /dev/pigout (try cat /dev/pigout& so that all subsequent results are shown on screen). In both cases if an error was detected a message will have been written to /dev/pigerr (try cat /dev/pigerr&). This is likely to be more informative than the message returned by pigs or the error code returned by the pipe interface. Several commands may be entered on a line. If present PROC and PARSE must be the last command on a line. E.g. ... pigs w 22 1 mils 1000 w 22 0 ... is equivalent to ... pigs w 22 1 pigs mils 1000 pigs w 22 0 ... and ... echo "m 4 w w 4 0 mils 250 m 4 r r 4" >/dev/pigpio ... is equivalent to ... echo "m 4 w" >/dev/pigpio echo "w 4 0" >/dev/pigpio echo "mils 250" >/dev/pigpio echo "m 4 r" >/dev/pigpio echo "r 4" >/dev/pigpio ... *Notes* The examples from now on will show the pigs interface but the same commands will also work on the pipe interface. pigs does not show the status of successful commands unless the command itself returns data. The status (0) will be returned to pigs but will be discarded. The status/data of each command sent to the pipe interface should be read from /dev/pigout. When a command takes a number as a parameter it may be entered as hex (precede by 0x), octal (precede by 0), or decimal. E.g. 23 is 23 decimal, 0x100 is 256 decimal, 070 is 56 decimal. Some commands can return a variable number of data bytes. By default this data is displayed as decimal. The pigs -a option can be used to force the display as ASCII and the pigs -x option can be used to force the display as hex. E.g. assuming the transmitted serial data is the letters ABCDEONM ... $ pigs slr 4 100 8 65 66 67 68 69 79 78 77 $ pigs -a slr 4 100 8 ABCDEONM $ pigs -x slr 4 100 8 41 42 43 44 45 4f 4e 4d ... OVERVIEW BASIC M/MODES g m :: Set GPIO mode :: gpioSetMode MG/MODEG g :: Get GPIO mode :: gpioGetMode PUD g p :: Set GPIO pull up/down :: gpioSetPullUpDown R/READ g :: Read GPIO level :: gpioRead W/WRITE g L :: Write GPIO level :: gpioWrite PWM (overrides servo commands on same GPIO) P/PWM u v :: Set GPIO PWM value :: gpioPWM PFS u v :: Set GPIO PWM frequency :: gpioSetPWMfrequency PRS u v :: Set GPIO PWM range :: gpioSetPWMrange GDC u :: Get GPIO PWM dutycycle :: gpioGetPWMdutycycle PFG u :: Get GPIO PWM frequency :: gpioGetPWMfrequency PRG u :: Get GPIO PWM range :: gpioGetPWMrange PRRG u :: Get GPIO PWM real range :: gpioGetPWMrealRange Servo (overrides PWM commands on same GPIO) S/SERVO u v :: Set GPIO servo pulsewidth :: gpioServo GPW u :: Get GPIO servo pulsewidth :: gpioGetServoPulsewidth INTERMEDIATE TRIG u pl L :: Send a trigger pulse :: gpioTrigger WDOG u v :: Set GPIO watchdog :: gpioSetWatchdog BR1 :: Read bank 1 GPIO :: gpioRead_Bits_0_31 BR2 :: Read bank 2 GPIO :: gpioRead_Bits_32_53 BC1 bits :: Clear specified GPIO in bank 1 :: gpioWrite_Bits_0_31_Clear BC2 bits :: Clear specified GPIO in bank 2 :: gpioWrite_Bits_32_53_Clear BS1 bits :: Set specified GPIO in bank 1 :: gpioWrite_Bits_0_31_Set BS2 bits :: Set specified GPIO in bank 2 :: gpioWrite_Bits_32_53_Set ADVANCED NO :: Request a notification :: gpioNotifyOpen NC h :: Close notification :: gpioNotifyClose NB h bits :: Start notification :: gpioNotifyBegin NP h :: Pause notification :: gpioNotifyPause HC g cf :: Set hardware clock frequency :: gpioHardwareClock HP g pf pdc :: Set hardware PWM frequency and dutycycle :: gpioHardwarePWM FG u stdy :: Set a glitch filter on a GPIO :: gpioGlitchFilter FN u stdy actv :: Set a noise filter on a GPIO :: gpioNoiseFilter PADS pad padma :: Set pad drive strength :: gpioSetPad PADG pad :: Get pad drive strength :: gpioGetPad SHELL name str :: Execute a shell command :: shell Custom CF1 uvs :: Custom function 1 :: gpioCustom1 CF2 uvs :: Custom function 2 :: gpioCustom1 Events EVM h bits :: Set events to monitor :: eventMonitor EVT event :: Trigger event :: eventTrigger Scripts PROC t :: Store script :: gpioStoreScript PROCR sid pars :: Run script :: gpioRunScript PROCU sid pars :: Set script parameters :: gpioUpdateScript PROCP sid :: Get script status and parameters :: gpioScriptStatus PROCS sid :: Stop script :: gpioStopScript PROCD sid :: Delete script :: gpioDeleteScript PARSE t :: Validate script :: gpioParseScript I2C I2CO ib id if :: Open I2C bus and device with flags :: i2cOpen I2CC h :: Close I2C handle :: i2cClose I2CWQ h bit :: smb Write Quick: write bit :: i2cWriteQuick I2CRS h :: smb Read Byte: read byte :: i2cReadByte I2CWS h bv :: smb Write Byte: write byte :: i2cWriteByte I2CRB h r :: smb Read Byte Data: read byte from register :: i2cReadByteData I2CWB h r bv :: smb Write Byte Data: write byte to register :: i2cWriteByteData I2CRW h r :: smb Read Word Data: read word from register :: i2cReadWordData I2CWW h r wv :: smb Write Word Data: write word to register :: i2cWriteWordData I2CRK h r :: smb Read Block Data: read data from register :: i2cReadBlockData I2CWK h r bvs :: smb Write Block Data: write data to register :: i2cWriteBlockData I2CWI h r bvs :: smb Write I2C Block Data :: i2cWriteI2CBlockData I2CRI h r num :: smb Read I2C Block Data: read bytes from register :: i2cReadI2CBlockData I2CRD h num :: i2c Read device :: i2cReadDevice I2CWD h bvs :: i2c Write device :: i2cWriteDevice I2CPC h r wv :: smb Process Call: exchange register with word :: i2cProcessCall I2CPK h r bvs :: smb Block Process Call: exchange data bytes with register :: i2cBlockProcessCall I2CZ h bvs :: Performs multiple I2C transactions :: i2cZip I2C BIT BANG BI2CO sda scl b :: Open bit bang I2C :: bbI2COpen BI2CC sda :: Close bit bang I2C :: bbI2CClose BI2CZ sda bvs :: I2C bit bang multiple transactions :: bbI2CZip I2C/SPI SLAVE BSCX bctl bvs :: BSC I2C/SPI transfer :: bscXfer SERIAL SERO dev b sef :: Open serial device dev at baud b with flags :: serOpen SERC h :: Close serial handle :: serClose SERRB :: Read byte from serial handle :: serReadByte SERWB h bv :: Write byte to serial handle :: serWriteByte SERR h num :: Read bytes from serial handle :: serRead SERW h bvs :: Write bytes to serial handle :: serWrite SERDA h :: Check for serial data ready to read :: serDataAvailable SERIAL BIT BANG (read only) SLRO u b db :: Open GPIO for bit bang serial data :: gpioSerialReadOpen SLRC u :: Close GPIO for bit bang serial data :: gpioSerialReadClose SLRI u v :: Sets bit bang serial data logic levels :: gpioSerialReadInvert SLR u num :: Read bit bang serial data from GPIO :: gpioSerialRead SPI SPIO c b spf :: SPI open channel at baud b with flags :: spiOpen SPIC h :: SPI close handle :: spiClose SPIR h num :: SPI read bytes from handle :: spiRead SPIW h bvs :: SPI write bytes to handle :: spiWrite SPIX h bvs :: SPI transfer bytes to handle :: spiXfer SPI BIT BANG BSPIO cs miso mosi sclk b spf :: Open bit bang SPI :: bbSPIOpen BSPIC cs :: Close bit bang SPI :: bbSPIClose BSPIX cs bvs :: SPI bit bang transfer :: bbSPIXfer FILES FO file mode :: Open a file in mode :: fileOpen FC h :: Close file handle :: fileClose FR h num :: Read bytes from file handle :: fileRead FW h bvs :: Write bytes to file handle :: fileWrite FS h num from :: Seek to file handle position :: fileSeek FL pat num :: List files which match pattern :: fileList WAVES WVCLR :: Clear all waveforms :: gpioWaveClear WVNEW :: Initialise a new waveform :: gpioWaveAddNew WVAG trips :: Add generic pulses to waveform :: gpioWaveAddGeneric WVAS u b db sb o bvs :: Add serial data to waveform :: gpioWaveAddSerial WVCRE :: Create a waveform :: gpioWaveCreate WVCAP percent :: Create a waveform of fixed size :: gpioWaveCreatePad WVDEL wid :: Delete selected waveform :: gpioWaveDelete WVTX wid :: Transmits waveform once :: gpioWaveTxSend WVTXM wid wmde :: Transmits waveform using mode :: gpioWaveTxSend WVTXR wid :: Transmits waveform repeatedly :: gpioWaveTxSend WVCHA bvs :: Transmits a chain of waveforms :: gpioWaveChain WVTAT :: Returns the current transmitting waveform :: gpioWaveTxAt WVBSY :: Check if waveform is being transmitted :: gpioWaveTxBusy WVHLT :: Stop waveform :: gpioWaveTxStop WVSC ws :: Get waveform DMA CB stats :: gpioWaveGetCbs WVSM ws :: Get waveform time stats :: gpioWaveGetMicros WVSP ws :: Get waveform pulse stats :: gpioWaveGetPulses UTILITIES H/HELP :: Display command help :: HWVER :: Get hardware version :: gpioHardwareRevision MICS v :: Microseconds delay :: gpioDelay MILS v :: Milliseconds delay :: gpioDelay PIGPV :: Get pigpio library version :: gpioVersion T/TICK :: Get current tick :: gpioTick CONFIGURATION CGI :: Configuration get internals :: gpioCfgGetInternals CSI v :: Configuration set internals :: gpioCfgSetInternals COMMANDS BC1 :: This command clears (sets low) the GPIO specified by [*bits*] in bank 1. Bank 1 consists of GPIO 0-31. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs bc1 0x400010 # clear GPIO 4 (1<<4) and 22 (1<<22) $ pigs bc1 32 # clear GPIO 5 (1<<5) -42 ERROR: no permission to update one or more GPIO ... BC2 :: This command clears (sets low) the GPIO specified by [*bits*] in bank 2. Bank 2 consists of GPIO 32-53. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs bc2 0x8000 # clear GPIO 47 (activity LED on A+/B+/Pi2/Pi3) $ pigs bc2 1 # clear GPIO 32 (first in bank 2) -42 ERROR: no permission to update one or more GPIO ... BI2CC :: This command signals that bit banging I2C on [*sda*] (and [*scl*]) is no longer required. ... $ pigs bi2cc 5 ... BI2CO :: This command signals that GPIO [*sda*] and [*scl*] are to be used for bit banging I2C at [*b*] baud. Bit banging I2C allows for certain operations which are not possible with the standard I2C driver. o baud rates as low as 50 o repeated starts o clock stretching o I2C on any pair of spare GPIO The baud rate may be between 50 and 500000 bits per second. The GPIO used for SDA and SCL must have pull-ups to 3V3 connected. As a guide the hardware pull-ups on pins 3 and 5 are 1k8 in value. BI2CZ :: This function executes a sequence of bit banged I2C operations. The operations to be performed are specified by the contents of [*bvs*] which contains the concatenated command codes and associated data. The following command codes are supported: Name @ Cmd & Data @ Meaning End @ 0 @ No more commands Escape @ 1 @ Next P is two bytes Start @ 2 @ Start condition Stop @ 3 @ Stop condition Address @ 4 P @ Set I2C address to P Flags @ 5 lsb msb @ Set I2C flags to lsb + (msb << 8) Read @ 6 P @ Read P bytes of data Write @ 7 P ... @ Write P bytes of data The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). The address and flags default to 0. The address and flags maintain their previous value until updated. No flags are currently defined. ... Set address 0x53 start, write 0x32, (re)start, read 6 bytes, stop Set address 0x1E start, write 0x03, (re)start, read 6 bytes, stop Set address 0x68 start, write 0x1B, (re)start, read 8 bytes, stop End 0x04 0x53 0x02 0x07 0x01 0x32 0x02 0x06 0x06 0x03 0x04 0x1E 0x02 0x07 0x01 0x03 0x02 0x06 0x06 0x03 0x04 0x68 0x02 0x07 0x01 0x1B 0x02 0x06 0x08 0x03 0x00 ... BR1 :: This command read GPIO 0-31 (bank 1) and returns the levels as a 32-bit hexadecimal value. ... $ pigs br1 1001C1CF ... BR2 :: This command read GPIO 32-53 (bank 2) and returns the levels as a 32-bit hexadecimal value. ... $ pigs br2 003F0000 ... BS1 :: This command sets (sets high) the GPIO specified by [*bits*] in bank 1. Bank 1 consists of GPIO 0-31. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs bs1 16 # set GPIO 4 (1<<4) $ pigs bs1 1 # set GPIO 1 (1<<0) -42 ERROR: no permission to update one or more GPIO ... BS2 :: This command sets (sets high) the GPIO specified by [*bits*] in bank 2. Bank 2 consists of GPIO 32-53. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs bs2 0x40 # set GPIO 38 (enable high current mode A+/B+/Pi2/Pi3) $ pigs bs2 1 # set GPIO 32 (first in bank 2) -42 ERROR: no permission to update one or more GPIO ... BSCX :: This command performs a BSC I2C/SPI slave transfer as defined by [*bctl*] with data [*bvs*]. This function provides a low-level interface to the SPI/I2C Slave peripheral on the BCM chip. This peripheral allows the Pi to act as a hardware slave device on an I2C or SPI bus. This is not a bit bang version and as such is OS timing independent. The bus timing is handled directly by the chip. The output process is simple. You simply append data to the FIFO buffer on the chip. This works like a queue, you add data to the queue and the master removes it. I can't get SPI to work properly. I tried with a control word of 0x303 and swapped MISO and MOSI. The command sets the BSC mode and writes any data [*bvs*] to the BSC transmit FIFO. It returns the data count (at least 1 for the status word), the status word, followed by any data bytes read from the BSC receive FIFO. Note that the control word sets the BSC mode. The BSC will stay in that mode until a different control word is sent. For I2C use a control word of (I2C address << 16) + 0x305. E.g. to talk as I2C slave with address 0x13 use 0x130305. GPIO used for models other than those based on the BCM2711. @ SDA @ SCL @ MOSI @ SCLK @ MISO @ CE I2C @ 18 @ 19 @ - @ - @ - @ - SPI @ - @ - @ 18 @ 19 @ 20 @ 21 GPIO used for models based on the BCM2711 (e.g. the Pi4B). @ SDA @ SCL @ MOSI @ SCLK @ MISO @ CE I2C @ 10 @ 11 @ - @ - @ - @ - SPI @ - @ - @ 10 @ 11 @ 9 @ 8 When a zero control word is received the used GPIO will be reset to INPUT mode. The control word consists of the following bits. . . 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 a a a a a a a - - IT HC TF IR RE TE BK EC ES PL PH I2 SP EN . . Bits 0-13 are copied unchanged to the BSC CR register. See pages 163-165 of the Broadcom peripherals document for full details. aaaaaaa @ defines the I2C slave address (only relevant in I2C mode) IT @ invert transmit status flags HC @ enable host control TF @ enable test FIFO IR @ invert receive status flags RE @ enable receive TE @ enable transmit BK @ abort operation and clear FIFOs EC @ send control register as first I2C byte ES @ send status register as first I2C byte PL @ set SPI polarity high PH @ set SPI phase high I2 @ enable I2C mode SP @ enable SPI mode EN @ enable BSC peripheral The returned status has the following format . . 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 S S S S S R R R R R T T T T T RB TE RF TF RE TB . . Bits 0-15 are copied unchanged from the BSC FR register. See pages 165-166 of the Broadcom peripherals document for full details. SSSSS @ number of bytes successfully copied to transmit FIFO RRRRR @ number of bytes in receieve FIFO TTTTT @ number of bytes in transmit FIFO RB @ receive busy TE @ transmit FIFO empty RF @ receive FIFO full TF @ transmit FIFO full RE @ receive FIFO empty TB @ transmit busy This example assumes that GPIO 2/3 are connected to GPIO 18/19 (GPIO 10/11 on the BCM2711). ... $ pigs bscx 0x130305 # start BSC as I2C slave 0x13 1 18 $ i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- 13 -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- $ pigs i2co 1 0x13 0 # get handle for device 0x13 on bus 1 0 $ pigs i2cwd 0 90 87 51 9 23 # write 5 bytes $ pigs bscx 0x130305 # check for data 6 18 90 87 51 9 23 $ pigs bscx 0x130305 11 13 15 17 # check for data and send 4 bytes 1 262338 $ pigs i2crd 0 4 # read 4 bytes 4 11 13 15 17 $ pigs i2cwd 0 90 87 51 9 23 # write 5 bytes $ pigs bscx 0x130305 11 13 15 17 # check for data and send 4 bytes 6 262338 90 87 51 9 23 $ pigs i2crd 0 4 4 11 13 15 17 $ pigs bscx 0x130305 22 33 44 55 66 1 327938 $ pigs i2crd 0 5 5 22 33 44 55 66 ... BSPIC :: This command stops bit banging SPI on a set of GPIO opened with [*BSPIO*]. The set of GPIO is specifed by [*cs*]. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs bspic 10 $ pigs bspic 10 -142 ERROR: no bit bang SPI in progress on GPIO ... BSPIO :: This command starts bit banging SPI on a group of GPIO with slave select [*cs*], MISO [*miso*], MOSI [*mosi*], and clock [*sclk*]. Data will be transferred at baud [*b*] bits per second (which may be set in the range 50-250000). The flags [*spf*] may be used to modify the default behaviour of mode 0, active low chip select. The flags consists of the least significant 22 bits. . . 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 R T 0 0 0 0 0 0 0 0 0 0 0 p m m . . mm defines the SPI mode. . . Mode POL PHA 0 0 0 1 0 1 2 1 0 3 1 1 . . p is 0 if CS is active low (default) and 1 for active high. T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. The other bits in flags should be set to zero. Upon success 0 is returned. On error a negative status code will be returned. If more than one device is connected to the SPI bus (defined by SCLK, MOSI, and MISO) each must have its own CS. ... $ pigs bspio 9 11 12 13 50000 0 $ pigs bspio 10 11 12 13 50000 0 $ pigs bspio 29 19 20 21 50000 0 # GPIO 29 not avaialble on this Pi -41 ERROR: no permission to update GPIO ... BSPIX:: This command writes bytes [*bvs*] to the bit bang SPI device associated with slave select [*cs*]. It returns the same number of bytes read from the device. Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. ... $ pigs bspio 5 13 19 12 10000 0 # MCP4251 DAC $ pigs bspio 6 13 19 12 20000 3 # MCP3008 ADC $ pigs bspix 5 0 16 # set DAC to 16 2 255 255 $ pigs bspix 5 12 0 # read back DAC 2 254 16 $ pigs bspix 6 1 128 0 # read ADC input 0 3 0 3 184 # 952 $ pigs bspix 5 0 240 # set DAC to 240 2 255 255 $ pigs bspix 5 12 0 # read back DAC 2 254 240 $ pigs bspix 6 1 128 0 # read ADC input 0 3 0 0 63 # 63 $ pigs bspix 5 0 128 # set DAC to 128 2 255 255 $ pigs bspix 5 12 0 # read back DAC 2 254 128 $ pigs bspix 6 1 128 0 # read ADC input 0 3 0 1 255 # 511 $ pigs bspic 5 # close SPI CS 5 $ pigs bspic 6 # close SPI CS 6 $ pigs bspic 5 # try to close SPI CS 5 again -142 ERROR: no bit bang SPI in progress on GPIO ... CF1:: This command calls a user customised function. The meaning of any paramaters and the returned value is defined by the customiser. CF2:: This command calls a user customised function. The meaning of any paramaters and the returned value is defined by the customiser. CGI:: This command returns the value of the internal library configuration settings. CSI:: This command sets the value of the internal library configuration settings to [*v*]. EVM :: This command starts event reporting on handle [*h*] (returned by a prior call to [*NO*]). Upon success nothing is returned. On error a negative status code will be returned. The notification gets reports for each event specified by [*bits*]. ... $ pigs evm 0 -1 # Shorthand for events 0-31. $ pigs evm 0 0xf0 # Get notifications for events 4-7. $ pigs evm 1 0xf -25 ERROR: unknown handle ... EVT :: This command triggers event [*event*]. One event, number 31, is predefined. This event is auto generated on BSC slave activity. ... $ pigs evt 12 $ pigs evt 5 $ pigs evt 32 -143 ERROR: bad event id ... FC:: This command closes a file handle [*h*] previously opened with [*FO*]. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs fc 0 # First close okay. $ pigs fc 0 # Second fails. -25 ERROR: unknown handle ... FG :: Level changes on the GPIO [*u*] are not reported unless the level has been stable for at least [*stdy*] microseconds. The level is then reported. Level changes of less than [*stdy*] microseconds are ignored. The filter only affects callbacks (including pipe notifications). The [*R/READ*], [*BR1*], and [*BR2*] commands are not affected. Note, each (stable) edge will be timestamped [*stdy*] microseconds after it was first detected. ... $ pigs fg 4 250 $ pigs fg 4 1000000 -125 ERROR: bad filter parameter ... FL :: This command returns a list of the files matching [*pat*]. Up to [*num*] bytes may be returned. Upon success the count of returned bytes followed by the matching files is returned. On error a negative status code will be returned. A newline (0x0a) character separates each file name. Only files which have a matching entry in /opt/pigpio/access may be listed. Suppose /opt/pigpio/access contains /sys/bus/w1/devices/28*/w1_slave r ... $ pigs -a fl "/sys/bus/w1/devices/28*/w1_slave" 5000 90 /sys/bus/w1/devices/28-000005d34cd2/w1_slave /sys/bus/w1/devices/28-001414abbeff/w1_slave $ pigs -a fl "/sys/bus/*" 5000 ERROR: no permission to access file -137 ... FN :: Level changes on the GPIO [*u*] are ignored until a level which has been stable for [*stdy*] microseconds is detected. Level changes on the GPIO are then reported for [*actv*] microseconds after which the process repeats. The filter only affects callbacks (including pipe notifications). The [*R/READ*], [*BR1*], and [*BR2*] commands are not affected. Note, level changes before and after the active period may be reported. Your software must be designed to cope with such reports. ... $ pigs fn 7 250 1000 $ pigs fn 7 2500000 1000 -125 ERROR: bad filter parameter ... FO :: This function returns a handle to a file [*file*] opened in a specified mode [*mode*]. Upon success a handle (>=0) is returned. On error a negative status code will be returned. File A file may only be opened if permission is granted by an entry in /opt/pigpio/access. This is intended to allow remote access to files in a more or less controlled manner. Each entry in /opt/pigpio/access takes the form of a file path which may contain wildcards followed by a single letter permission. The permission may be R for read, W for write, U for read/write, and N for no access. Where more than one entry matches a file the most specific rule applies. If no entry matches a file then access is denied. Suppose /opt/pigpio/access contains the following entries . . /home/* n /home/pi/shared/dir_1/* w /home/pi/shared/dir_2/* r /home/pi/shared/dir_3/* u /home/pi/shared/dir_1/file.txt n . . Files may be written in directory dir_1 with the exception of file.txt. Files may be read in directory dir_2. Files may be read and written in directory dir_3. If a directory allows read, write, or read/write access then files may be created in that directory. In an attempt to prevent risky permissions the following paths are ignored in /opt/pigpio/access. . . a path containing .. a path containing only wildcards (*?) a path containing less than two non-wildcard parts . . Mode The mode may have the following values. @ Value @ Meaning READ @ 1 @ open file for reading WRITE @ 2 @ open file for writing RW @ 3 @ open file for reading and writing The following values may be or'd into the mode. @ Value @ Meaning APPEND @ 4 @ All writes append data to the end of the file CREATE @ 8 @ The file is created if it doesn't exist TRUNC @ 16 @ The file is truncated Newly created files are owned by root with permissions owner read and write. ... $ ls /ram/*.c /ram/command.c /ram/pigpiod.c /ram/pigs.c /ram/x_pigpiod_if.c /ram/pig2vcd.c /ram/pigpiod_if2.c /ram/x_pigpio.c /ram/x_repeat.c /ram/pigpio.c /ram/pigpiod_if.c /ram/x_pigpiod_if2.c # assumes /opt/pigpio/access contains the following line # /ram/*.c r $ pigs fo /ram/pigpio.c 1 0 $ pigs fo /ram/new.c 1 -128 ERROR: file open failed $ pigs fo /ram/new.c 9 1 $ ls /ram/*.c -l -rw-r--r-- 1 joan joan 42923 Jul 10 11:22 /ram/command.c -rw------- 1 root root 0 Jul 10 16:54 /ram/new.c -rw-r--r-- 1 joan joan 2971 Jul 10 11:22 /ram/pig2vcd.c -rw------- 1 joan joan 296235 Jul 10 11:22 /ram/pigpio.c -rw-r--r-- 1 joan joan 9266 Jul 10 11:22 /ram/pigpiod.c -rw-r--r-- 1 joan joan 37331 Jul 10 11:22 /ram/pigpiod_if2.c -rw-r--r-- 1 joan joan 33088 Jul 10 11:22 /ram/pigpiod_if.c -rw-r--r-- 1 joan joan 7990 Jul 10 11:22 /ram/pigs.c -rw-r--r-- 1 joan joan 19970 Jul 10 11:22 /ram/x_pigpio.c -rw-r--r-- 1 joan joan 20804 Jul 10 11:22 /ram/x_pigpiod_if2.c -rw-r--r-- 1 joan joan 19844 Jul 10 11:22 /ram/x_pigpiod_if.c -rw-r--r-- 1 joan joan 19907 Jul 10 11:22 /ram/x_repeat.c ... FR:: This command returns up to [*num*] bytes of data read from the file associated with handle [*h*]. Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. ... $ pigs fr 0 10 5 48 49 128 144 255 $ pigs fr 0 10 0 ... FS :: This command seeks to a position within the file associated with handle [*h*]. The number of bytes to move is [*num*]. Positive offsets move forward, negative offsets backwards. The move start position is determined by [*from*] as follows. @ From 0 @ start 1 @ current position 2 @ end Upon success the new byte position within the file (>=0) is returned. On error a negative status code will be returned. ... $ pigs fs 0 200 0 # Seek to start of file plus 200 200 $ pigs fs 0 0 1 # Return current position 200 $ pigs fs 0 0 2 # Seek to end of file, return size 296235 ... FW:: This command writes bytes [*bvs*] to the file associated with handle [*h*]. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs fw 0 23 45 67 89 ... GDC :: This command returns the PWM dutycycle in use on GPIO [*u*]. Upon success the dutycycle is returned. On error a negative status code will be returned. For normal PWM the dutycycle will be out of the defined range for the GPIO (see [*PRG*]). If a hardware clock is active on the GPIO the reported dutycycle will be 500000 (500k) out of 1000000 (1M). If hardware PWM is active on the GPIO the reported dutycycle will be out of a 1000000 (1M). ... $ pigs p 4 129 $ pigs gdc 4 129 pigs gdc 5 -92 ERROR: GPIO is not in use for PWM ... GPW :: This command returns the servo pulsewidth in use on GPIO [*u*]. Upon success the servo pulsewidth is returned. On error a negative status code will be returned. ... $ pigs s 4 1235 $ pigs gpw 4 1235 $ pigs gpw 9 -93 ERROR: GPIO is not in use for servo pulses ... H/HELP :: This command displays a brief list of the commands and their parameters. ... $ pigs h $ pigs help ... HC :: This command sets the hardware clock associated with GPIO [*g*] to frequency [*cf*]. Frequencies above 30MHz are unlikely to work. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs hc 4 5000 # start a 5 KHz clock on GPIO 4 (clock 0) $ pigs hc 5 5000000 # start a 5 MHz clcok on GPIO 5 (clock 1) -99 ERROR: need password to use hardware clock 1 ... The same clock is available on multiple GPIO. The latest frequency setting will be used by all GPIO which share a clock. The GPIO must be one of the following. 4 @clock 0 @All models 5 @clock 1 @All models but A and B (reserved for system use) 6 @clock 2 @All models but A and B 20 @clock 0 @All models but A and B 21 @clock 1 @All models but A and B Rev.2 (reserved for system use) 32 @clock 0 @Compute module only 34 @clock 0 @Compute module only 42 @clock 1 @Compute module only (reserved for system use) 43 @clock 2 @Compute module only 44 @clock 1 @Compute module only (reserved for system use) Access to clock 1 is protected by a password as its use will likely crash the Pi. The password is given by or'ing 0x5A000000 with the GPIO number. HP :: This command sets the hardware PWM associated with GPIO [*g*] to frequency [*pf*] with dutycycle [*pdc*]. Frequencies above 30MHz are unlikely to work. NOTE: Any waveform started by [*WVTX*], [*WVTXR*], or [*WVCHA*] will be cancelled. This function is only valid if the pigpio main clock is PCM. The main clock defaults to PCM but may be overridden when the pigpio daemon is started (option -t). Upon success nothing is returned. On error a negative status code will be returned. . . $ pigs hp 18 100 800000 # 80% dutycycle $ pigs hp 19 100 200000 # 20% dutycycle $ pigs hp 19 400000000 100000 -96 ERROR: invalid hardware PWM frequency . . The same PWM channel is available on multiple GPIO. The latest frequency and dutycycle setting will be used by all GPIO which share a PWM channel. The GPIO must be one of the following. 12 @PWM channel 0 @All models but A and B 13 @PWM channel 1 @All models but A and B 18 @PWM channel 0 @All models 19 @PWM channel 1 @All models but A and B 40 @PWM channel 0 @Compute module only 41 @PWM channel 1 @Compute module only 45 @PWM channel 1 @Compute module only 52 @PWM channel 0 @Compute module only 53 @PWM channel 1 @Compute module only The actual number of steps beween off and fully on is the integral part of 250M/[*pf*] (375M/[*pf*] for the BCM2711). The actual frequency set is 250M/steps (375M/steps for the BCM2711). There will only be a million steps for a [*pf*] of 250 (375 for the BCM2711). Lower frequencies will have more steps and higher frequencies will have fewer steps. [*pdc*] is automatically scaled to take this into account. HWVER :: This command returns the hardware revision of the Pi. The hardware revision is found in the last 4 characters on the revision line of /proc/cpuinfo. If the hardware revision can not be found or is not a valid hexadecimal number the command returns 0. The revision number can be used to determine the assignment of GPIO to pins (see [*g*]). There are currently three types of board. Type 1 boards have hardware revision numbers of 2 and 3. Type 2 boards have hardware revision numbers of 4, 5, 6, and 15. Type 3 boards have hardware revision numbers of 16 or greater. for "Revision : 0002" the command returns 2. for "Revision : 000f" the command returns 15. for "Revision : 000g" the command returns 0. ... $ pigs hwver # On a B+ 16 ... I2CC :: This command closes an I2C handle [*h*] previously opened with [*I2CO*]. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs i2cc 0 # First close okay. $ pigs i2cc 0 # Second fails. -25 ERROR: unknown handle ... I2CO :: This command returns a handle to access device [*id*] on I2C bus [*ib*]. The device is opened with flags [*if*]. Physically buses 0 and 1 are available on the Pi. Higher numbered buses will be available if a kernel supported bus multiplexor is being used. The GPIO used are given in the following table. @ SDA @ SCL I2C 0 @ 0 @ 1 I2C 1 @ 2 @ 3 No flags are currently defined. The parameter [*if*] should be 0. Upon success the next free handle (>=0) is returned. On error a negative status code will be returned. ... $ pigs i2co 1 0x70 0 # Bus 1, device 0x70, flags 0. 0 $ pigs i2co 1 0x53 0 # Bus 1, device 0x53, flags 0. 1 ... I2CPC :: This command writes [*wv*] to register [*r*] of the I2C device associated with handle [*h*] and returns a 16-bit word read from the device. Upon success a value between 0 and 65535 will be returned. On error a negative status code will be returned. ... $ pigs i2cpc 0 37 43210 39933 $ pigs i2cpc 0 256 43210 ERROR: bad i2c/spi/ser parameter -81 ... I2CPK :: This command writes the data bytes [*bvs*] to register [*r*] of the I2C device associated with handle [*h*] and returns a device specific number of bytes. Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. ... $ pigs i2cpk 0 0 0x11 0x12 6 0 0 0 0 0 0 ... I2CRB :: This command returns a single byte read from register [*r*] of the I2C device associated with handle [*h*]. Upon success a value between 0 and 255 will be returned. On error a negative status code will be returned. ... $ pigs i2crb 0 0 6 ... I2CRD :: This command returns [*num*] bytes read from the I2C device associated with handle [*h*]. Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. This command operates on the raw I2C device. The maximum value of the parameter [*num*] is dependent on the I2C drivers and the device itself. pigs imposes a limit of about 8000 bytes. ... $ pigs i2crd 0 16 16 6 24 0 0 0 0 0 0 0 0 0 0 0 0 32 78 ... I2CRI :: This command returns [*num*] bytes from register [*r*] of the I2C device associated with handle [*h*]. Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. The parameter [*num*] may be 1-32. ... $ pigs i2cri 0 0 16 16 237 155 155 155 155 155 155 155 155 155 155 155 155 155 155 155 ... I2CRK :: This command returns between 1 and 32 bytes read from register [*r*] of the I2C device associated with handle [*h*]. Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. The number of bytes of returned data is specific to the device and register. ... $ pigs i2crk 0 0 6 0 0 0 0 0 0 $ pigs i2crk 0 1 24 0 0 0 0 0 0 0 0 0 0 0 0 120 222 105 215 128 87 195 217 0 0 0 0 ... I2CRS :: This command returns a single byte read from the I2C device associated with handle [*h*]. Upon success a value between 0 and 255 will be returned. On error a negative status code will be returned. ... $ pigs i2crs 0 0 ... I2CRW :: This command returns a single 16 bit word read from register [*r*] of the I2C device associated with handle [*h*]. Upon success a value between 0 and 65535 will be returned. On error a negative status code will be returned. ... $ pigs i2crw 0 0 6150 ... I2CWB :: This command writes a single byte [*bv*] to register [*r*] of the I2C device associated with handle [*h*]. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs i2cwb 0 10 0x54 ... I2CWD :: This command writes a block of bytes [*bvs*] to the I2C device associated with handle [*h*]. Upon success nothing is returned. On error a negative status code will be returned. The number of bytes which may be written in one transaction is dependent on the I2C drivers and the device itself. pigs imposes a limit of about 500 bytes. This command operates on the raw I2C device. ... $ pigs i2cwd 0 0x01 0x02 0x03 0x04 ... I2CWI :: This command writes between 1 and 32 bytes [*bvs*] to register [*r*] of the I2C device associated with handle [*h*]. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs i2cwi 0 4 0x01 0x04 0xc0 ... I2CWK :: This command writes between 1 and 32 bytes [*bvs*] to register [*r*] of the I2C device associated with handle [*h*]. Upon success nothing is returned. On error a negative status code will be returned. ... pigs i2cwk 0 4 0x01 0x04 0xc0 ... I2CWQ :: This command writes a single [*bit*] to the I2C device associated with handle [*h*]. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs i2cwq 0 1 ... I2CWS :: This command writes a single byte [*bv*] to the I2C device associated with handle [*h*]. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs i2cws 0 0x12 $ pigs i2cws 0 0xff -82 ERROR: I2C write failed ... I2CWW :: This command writes a single 16 bit word [*wv*] to register [*r*] of the I2C device associated with handle [*h*]. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs i2cww 0 0 0xffff ... I2CZ :: This command executes a sequence of I2C operations. The operations to be performed are specified by the contents of [*bvs*] which contains the concatenated command codes and associated data. The following command codes are supported: Name @ Cmd & Data @ Meaning End @ 0 @ No more commands Escape @ 1 @ Next P is two bytes On @ 2 @ Switch combined flag on Off @ 3 @ Switch combined flag off Address @ 4 P @ Set I2C address to P Flags @ 5 lsb msb @ Set I2C flags to lsb + (msb << 8) Read @ 6 P @ Read P bytes of data Write @ 7 P ... @ Write P bytes of data The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). The address defaults to that associated with the handle [*h*]. The flags default to 0. The address and flags maintain their previous value until updated. ... Set address 0x53, write 0x32, read 6 bytes Set address 0x1E, write 0x03, read 6 bytes Set address 0x68, write 0x1B, read 8 bytes End 0x04 0x53 0x07 0x01 0x32 0x06 0x06 0x04 0x1E 0x07 0x01 0x03 0x06 0x06 0x04 0x68 0x07 0x01 0x1B 0x06 0x08 0x00 ... M/MODES :: This command sets GPIO [*g*] to mode [*m*], typically input (read) or output (write). Upon success nothing is returned. On error a negative status code will be returned. Each GPIO can be configured to be in one of 8 different modes. The modes are named Input, Output, ALT0, ALT1, ALT2, ALT3, ALT4, and ALT5. To set the mode use the code for the mode. Mode @Input@Output@ALT0@ALT1@ALT2@ALT3@ALT4@ALT5 Code @ R@ W@ 0@ 1@ 2@ 3@ 4@ 5 ... $ pigs m 4 r # Input (read) $ pigs m 4 w # Output (write) $ pigs m 4 0 # ALT 0 $ pigs m 4 5 # ALT 5 ... MG/MODEG :: This command returns the current mode of GPIO [*g*]. Upon success the value of the GPIO mode is returned. On error a negative status code will be returned. Value @ 0@ 1@ 2@ 3@ 4@ 5@ 6@ 7 Mode @Input@Output@ALT5@ALT4@ALT0@ALT1@ALT2@ALT3 ... $ pigs mg 4 1 ... MICS :: This command delays execution for [*v*] microseconds. Upon success nothing is returned. On error a negative status code will be returned. The main use of this command is expected to be within [*Scripts*]. ... $ pigs mics 20 # Delay 20 microseconds. $ pigs mics 1000000 # Delay 1 second. $ pigs mics 2000000 -64 ERROR: bad MICS delay (too large) ... MILS :: This command delays execution for [*v*] milliseconds. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs mils 2000 # Delay 2 seconds. $ pigs mils 61000 -65 ERROR: bad MILS delay (too large) ... NB :: This command starts notifications on handle [*h*] returned by a prior call to [*NO*]. Upon success nothing is returned. On error a negative status code will be returned. The notification gets state changes for each GPIO specified by [*bits*]. ... $ pigs nb 0 -1 # Shorthand for GPIO 0-31. $ pigs nb 0 0xf0 # Get notifications for GPIO 4-7. $ pigs nb 1 0xf -25 ERROR: unknown handle ... NC :: This command stops notifications on handle [*h*] returned by a prior call to [*NO*] and releases the handle for reuse. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs nc 0 # First call succeeds. $ pigs nc 1 # Second call fails. -25 ERROR: unknown handle ... NO :: This command requests a free notification handle. A notification is a method for being notified of GPIO state changes via a pipe. Upon success the command returns a handle greater than or equal to zero. On error a negative status code will be returned. Notifications for handle x will be available at the pipe named /dev/pigpiox (where x is the handle number). E.g. if the command returns 15 then the notifications must be read from /dev/pigpio15. ... $ pigs no 0 ... NP :: This command pauses notifications on handle [*h*] returned by a prior call to [*NO*]. Upon success nothing is returned. On error a negative status code will be returned. Notifications for the handle are suspended until a new [*NB*] command is given for the handle. ... $ pigs np 0 ... P/PWM :: This command starts PWM on GPIO [*u*] with dutycycle [*v*]. The dutycycle varies from 0 (off) to range (fully on). The range defaults to 255. Upon success nothing is returned. On error a negative status code will be returned. This and the servo functionality use the DMA and PWM or PCM peripherals to control and schedule the pulsewidths and dutycycles. The [*PRS*] command may be used to change the default range of 255. ... $ pigs p 4 64 # Start PWM on GPIO 4 with 25% dutycycle $ pigs p 4 128 # 50% $ pigs p 4 192 # 75% $ pigs p 4 255 # 100% ... PADG :: This command gets the [*pad*] drive strength [*padma*] in mA. Returns the pad drive strength if OK. On error a negative status code will be returned. Pad @ GPIO 0 @ 0-27 1 @ 28-45 2 @ 46-53 ... $ pigs padg 0 8 $ pigs pads 0 16 $ pigs padg 0 16 pigs padg 3 -126 ERROR: bad pad number ... PADS:: This command sets the [*pad*] drive strength [*padma*] in mA. Upon success nothing is returned. On error a negative status code will be returned. Pad @ GPIO 0 @ 0-27 1 @ 28-45 2 @ 46-53 ... $ pigs pads 0 16 $ pigs padg 0 16 $ pigs pads 0 17 -127 ERROR: bad pad drive strength ... PARSE :: Validates the text [*t*] of a script without storing the script. Upon success nothing is returned. On error a list of detected script errors will be given. See [*Scripts*]. This command may be used to find script syntax faults. ... $ pigs parse tag 100 w 22 1 mils 200 w 22 0 mils 800 jmp 100 $ pigs parse tag 0 w 22 1 mills 50 w 22 0 dcr p10 jp 99 Unknown command: mills Unknown command: 50 Bad parameter to dcr Can't resolve tag 99 ... PFG :: This command returns the PWM frequency in Hz used for GPIO [*u*]. Upon success the PWM frequency is returned. On error a negative status code will be returned. For normal PWM the frequency will be that defined for the GPIO by [*PFS*]. If a hardware clock is active on the GPIO the reported frequency will be that set by [*HC*]. If hardware PWM is active on the GPIO the reported frequency will be that set by [*HP*]. ... $ pigs pfg 4 800 $ pigs pfg 34 ERROR: GPIO not 0-31 -2 ... PFS :: This command sets the PWM frequency [*v*] to be used for GPIO [*u*]. The numerically closest frequency to [*v*] will be selected. Upon success the new frequency is returned. On error a negative status code will be returned. If PWM is currently active on the GPIO it will be switched off and then back on at the new frequency. Each GPIO can be independently set to one of 18 different PWM frequencies. The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5, 8, or 10 microseconds (default 5). The sample rate is set when the pigpio daemon is started. The frequencies for each sample rate are: . . Hertz 1: 40000 20000 10000 8000 5000 4000 2500 2000 1600 1250 1000 800 500 400 250 200 100 50 2: 20000 10000 5000 4000 2500 2000 1250 1000 800 625 500 400 250 200 125 100 50 25 4: 10000 5000 2500 2000 1250 1000 625 500 400 313 250 200 125 100 63 50 25 13 sample rate (us) 5: 8000 4000 2000 1600 1000 800 500 400 320 250 200 160 100 80 50 40 20 10 8: 5000 2500 1250 1000 625 500 313 250 200 156 125 100 63 50 31 25 13 6 10: 4000 2000 1000 800 500 400 250 200 160 125 100 80 50 40 25 20 10 5 . . ... pigs pfs 4 0 # 0 selects the lowest frequency. 10 $ pigs pfs 4 1000 # Set 1000Hz PWM. 1000 $ pigs pfs 4 100000 # Very big number selects the highest frequency. 8000 ... PIGPV :: This command returns the pigpio library version. ... $ pigs pigpv 17 ... PRG :: This command returns the dutycycle range for GPIO [*u*]. Upon success the range is returned. On error a negative status code will be returned. If a hardware clock or hardware PWM is active on the GPIO the reported range will be 1000000 (1M). ... $ pigs prg 4 255 ... PROC :: This command stores a script [*t*] for later execution. If the script is valid a script id (>=0) is returned which is passed to the other script commands. On error a negative status code will be returned. See [*Scripts*]. ... $ pigs proc tag 123 w 4 0 mils 200 w 4 1 mils 300 dcr p0 jp 123 0 $ pigs proc tag 123 w 4 0 mils 5 w 4 1 mils 5 jmp 12 ERROR: script has unresolved tag -63 ... PROCD :: This command deletes script [*sid*]. Upon success nothing is returned. On error a negative status code will be returned. See [*Scripts*]. ... $ pigs procd 1 $ pigs procd 1 ERROR: unknown script id -48 ... PROCP :: This command returns the status of script [*sid*] as well as the current value of its 10 parameters. Upon success the script status and parameters are returned. On error a negative status code will be returned. The script status may be one of 0 @ being initialised 1 @ halted 2 @ running 3 @ waiting 4 @ failed See [*Scripts*]. ... $ pigs procp 0 1 0 0 0 0 0 0 0 0 0 0 ... PROCR :: This command runs stored script [*sid*] passing it up to 10 optional parameters. Upon success nothing is returned. On error a negative status code will be returned. See [*Scripts*]. ... $ pigs proc tag 123 w 4 0 mils 200 w 4 1 mils 300 dcr p0 jp 123 0 $ pigs procr 0 50 # Run script 0 with parameter 0 of 50. $ pigs procp 0 2 44 0 0 0 0 0 0 0 0 0 $ pigs procp 0 2 37 0 0 0 0 0 0 0 0 0 $ pigs procp 0 2 10 0 0 0 0 0 0 0 0 0 $ pigs procp 0 2 5 0 0 0 0 0 0 0 0 0 $ pigs procp 0 2 2 0 0 0 0 0 0 0 0 0 $ pigs procp 0 1 -1 0 0 0 0 0 0 0 0 0 ... PROCS :: This command stops a running script [*sid*]. Upon success nothing is returned. On error a negative status code will be returned. See [*Scripts*]. ... $ pigs procs 0 $ pigs procs 1 -48 ERROR: unknown script id ... PROCU :: This command sets the parameters of a stored script [*sid*] passing it up to 10 parameters. Upon success nothing is returned. On error a negative status code will be returned. See [*Scripts*]. ... $ pigs proc tag 0 hp 18 p0 p1 mils 1000 jmp 0 0 $ pigs procu 0 50 500000 $ pigs procr 0 $ pigs procu 0 100 $ pigs procu 0 200 $ pigs procu 0 200 100000 ... PRRG :: This command returns the real underlying range used by GPIO [*u*]. If a hardware clock is active on the GPIO the reported real range will be 1000000 (1M). If hardware PWM is active on the GPIO the reported real range will be approximately 250M divided by the set PWM frequency. On error a negative status code will be returned. See [*PRS*]. ... $ pigs prrg 17 250 $ pigs pfs 17 0 10 $ pigs prrg 17 20000 $ pigs pfs 17 100000 8000 $ pigs prrg 17 25 ... PRS :: This command sets the dutycycle range [*v*] to be used for GPIO [*u*]. Subsequent uses of command [*P/PWM*] will use a dutycycle between 0 (off) and [*v*] (fully on). Upon success the real underlying range used by the GPIO is returned. On error a negative status code will be returned. If PWM is currently active on the GPIO its dutycycle will be scaled to reflect the new range. The real range, the number of steps between fully off and fully on for each frequency, is given in the following table. #1@ #2@ #3@ #4@ #5@ #6@ #7@ #8@ #9 25@ 50@ 100@ 125@ 200@ 250@ 400@ 500@ 625 @ @ @ @ @ @ @ @ #10@ #11@ #12@ #13@ #14@ #15@ #16@ #17@ #18 800@1000@1250@2000@2500@4000@5000@10000@20000 The real value set by [*PRS*] is (dutycycle * real range) / range. See [*PRRG*] ... $ pigs prs 18 1000 250 ... PUD :: This command sets the internal pull/up down for GPIO [*g*] to mode [*p*]. Upon success nothing is returned. On error a negative status code will be returned. The mode may be pull-down (D), pull-up (U), or off (O). ... $ pigs pud 4 d # Set pull-down on GPIO 4. $ pigs pud 4 u # Set pull-up on GPIO 4. $ pigs pud 4 o # No pull-up/down on GPIO 4. ... R/READ :: This reads the current level of GPIO [*g*]. Upon success the current level is returned. On error a negative status code will be returned. ... $ pigs r 17 # Get level of GPIO 17. 0 $ pigs r 4 # Get level of GPIO 4. 1 ... S/SERVO :: This command starts servo pulses of [*v*] microseconds on GPIO [*u*]. Upon success nothing is returned. On error a negative status code will be returned. The servo pulsewidth may be 0 (off), 500 (most anti-clockwise) to 2500 (most clockwise). The range supported by servos varies and should probably be determined by experiment. Generally values between 1000-2000 should be safe. A value of 1500 should always be safe and represents the mid-point of rotation. You can DAMAGE a servo if you command it to move beyond its limits. ... $ pigs SERVO 17 1500 ... This example causes an on pulse of 1500 microseconds duration to be transmitted on GPIO 17 at a rate of 50 times per second. This will command a servo connected to GPIO 17 to rotate to its mid-point. ... pigs s 17 0 # Switch servo pulses off. ... SERC :: This command closes a serial handle [*h*] previously opened with [*SERO*]. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs serc 0 # First close okay. $ pigs serc 0 # Second close gives error. -25 ERROR: unknown handle ... SERDA :: This command returns the number of bytes of data available to be read from the serial device associated with handle [*h*]. Upon success the count of bytes available to be read is returned (which may be 0). On error a negative status code will be returned. ... $ pigs serda 0 0 ... SERO:: This command opens the serial [*dev*] at [*b*] bits per second. No flags are currently defined. [*sef*] should be set to zero. Upon success a handle (>=0) is returned. On error a negative status code will be returned. The device name must start with /dev/tty or /dev/serial. The baud rate must be one of 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, or 230400. ... $ pigs sero /dev/ttyAMA0 9600 0 0 $ pigs sero /dev/tty1 38400 0 1 ... SERR:: This command returns up to [*num*] bytes of data read from the serial device associated with handle [*h*]. Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. ... $ pigs serr 0 10 5 48 49 128 144 255 $ pigs serr 0 10 0 ... SERRB:: This command returns a byte of data read from the serial device associated with handle [*h*]. Upon success a number between 0 and 255 is returned. On error a negative status code will be returned. ... $ pigs serrb 0 23 $ pigs serrb 0 45 ... SERW:: This command writes bytes [*bvs*] to the serial device associated with handle [*h*]. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs serw 0 23 45 67 89 ... SERWB:: This command writes a single byte [*bv*] to the serial device associated with handle [*h*]. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs serwb 0 23 $ pigs serwb 0 0xf0 ... SHELL :: This command uses the system call to execute a shell script [*name*] with the given string [*str*] as its parameter. The exit status of the system call is returned if OK, otherwise PI_BAD_SHELL_STATUS. [*name*] must exist in /opt/pigpio/cgi and must be executable. The returned exit status is normally 256 times that set by the shell script exit function. If the script can't be found 32512 will be returned. The following table gives some example returned statuses. Script exit status @ Returned system call status 1 @ 256 5 @ 1280 10 @ 2560 200 @ 51200 script not found @ 32512 ... # pass two parameters, hello and world $ pigs shell scr1 hello world 256 # pass three parameters, hello, string with spaces, and world $ pigs shell scr1 "hello 'string with spaces' world" 256 # pass one parameter, hello string with spaces world $ pigs shell scr1 "\"hello string with spaces world\"" 256 # non-existent script $ pigs shell scr78 par1 32512 ... SLR :: This command returns up to [*num*] bytes of bit bang serial data read from GPIO [*u*]. Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. The GPIO [*u*] should have been initialised with the [*SLRO*] command. The bytes returned for each character depend upon the number of data bits [*db*] specified in the [*SLRO*] command. For [*db*] 1-8 there will be one byte per character. For [*db*] 9-16 there will be two bytes per character. For [*db*] 17-32 there will be four bytes per character. ... $ pigs slr 15 20 6 1 0 23 45 89 0 ... SLRC :: This command closes GPIO [*u*] for reading bit bang serial data. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs slrc 23 $ pigs slrc 23 -38 ERROR: no serial read in progress on GPIO ... SLRI :: This command sets the logic level for reading bit bang serial data on GPIO [*u*]. Upon success nothing is returned. On error a negative status code will be returned. The invert parameter [*v*] is 1 for inverted signal, 0 for normal. ... $ pigs slri 17 1 # invert logic on GPIO 17 $ pigs slri 23 0 # use normal logic on GPIO 23 ... SLRO :: This command opens GPIO [*u*] for reading bit bang serial data at [*b*] baud and [*db*] data bits. Upon success nothing is returned. On error a negative status code will be returned. The baud rate may be between 50 and 250000 bits per second. The received data is held in a cyclic buffer. It is the user's responsibility to read the data (with [*SLR*]) in a timely fashion. ... $ pigs slro 23 19200 8 $ pigs slro 23 19200 8 -50 ERROR: GPIO already in use ... SPIC :: This command closes the SPI handle [*h*] returned by a prior call to [*SPIO*]. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs spic 1 $ pigs spic 1 -25 ERROR: unknown handle ... SPIO :: This command returns a handle to a SPI device on channel [*c*]. Data will be transferred at [*b*] bits per second. The flags [*spf*] may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select. Speeds between 32kbps and 125Mbps are allowed. Speeds above 30Mbps are unlikely to work. The Pi has two SPI peripherals: main and auxiliary. The main SPI has two chip selects (channels), the auxiliary has three. The auxiliary SPI is available on all models but the A and B. The GPIO used are given in the following table. @ MISO @ MOSI @ SCLK @ CE0 @ CE1 @ CE2 Main SPI @ 9 @ 10 @ 11 @ 8 @ 7 @ - Aux SPI @ 19 @ 20 @ 21 @ 18 @ 17 @ 16 The flags consists of the least significant 22 bits. . . 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 b b b b b b R T n n n n W A u2 u1 u0 p2 p1 p0 m m . . mm defines the SPI mode. Warning: modes 1 and 3 do not appear to work on the auxiliary SPI. . . Mode POL PHA 0 0 0 1 0 1 2 1 0 3 1 1 . . px is 0 if CEx is active low (default) and 1 for active high. ux is 0 if the CEx GPIO is reserved for SPI (default) and 1 otherwise. A is 0 for the main SPI, 1 for the auxiliary SPI. W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Main SPI only. nnnn defines the number of bytes (0-15) to write before switching the MOSI line to MISO to read data. This field is ignored if W is not set. Main SPI only. T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. Auxiliary SPI only. R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. Auxiliary SPI only. bbbbbb defines the word size in bits (0-32). The default (0) sets 8 bits per word. Auxiliary SPI only. The [*SPIR*], [*SPIW*], and [*SPIX*] commands transfer data packed into 1, 2, or 4 bytes according to the word size in bits. For bits 1-8 there will be one byte per character. For bits 9-16 there will be two bytes per character. For bits 17-32 there will be four bytes per character. Multi-byte transfers are made in least significant byte first order. E.g. to transfer 32 11-bit words 64 bytes need to be sent. E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A. The other bits in flags should be set to zero. Upon success a handle (>=0) is returned. On error a negative status code will be returned. ... $ pigs spio 0 100000 3 # Open channel 0 at 100kbps in mode 3. 0 $ pigs spio 0 32000 256 # Open channel 0 of auxiliary spi at 32kbps. 1 ... SPIR :: This command returns [*num*] bytes read from the SPI device associated with handle [*h*]. Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. ... $ pigs spir 0 10 # Read 10 bytes from the SPI device. 10 0 0 0 0 0 0 0 0 0 0 ... SPIW :: This command writes bytes [*bvs*] to the SPI device associated with handle [*h*]. Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs spiw 0 0x22 0x33 0xcc 0xff ... SPIX:: This command writes bytes [*bvs*] to the SPI device associated with handle [*h*]. It returns the same number of bytes read from the device. Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. ... $ pigs spix 0 0x22 0x33 0xcc 0xff 4 0 0 0 0 ... T/TICK :: This command returns the current system tick. Tick is the number of microseconds since system boot. As tick is an unsigned 32 bit quantity it wraps around after 2^32 microseconds, which is approximately 1 hour 12 minutes. ... $ pigs t mils 1000 t 3691823946 3692833987 ... TRIG :: This command sends a trigger pulse of [*pl*] microseconds at level [*L*] to GPIO [*u*]. Upon success nothing is returned. On error a negative status code will be returned. The GPIO is set to not level at the end of the pulse. ... $ pigs trig 4 10 1 $ pigs trig 4 51 1 -46 ERROR: trigger pulse > 50 microseconds ... W/WRITE :: This command sets GPIO [*g*] to level [*L*]. The level may be 0 (low, off, clear) or 1 (high, on, set). Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs w 23 0 $ pigs w 23 1 $ pigs w 23 2 -5 ERROR: level not 0-1 ... WDOG :: This command sets a watchdog of [*v*] milliseconds on GPIO [*u*]. Upon success nothing is returned. On error a negative status code will be returned. The watchdog is nominally in milliseconds. One watchdog may be registered per GPIO. The watchdog may be cancelled by setting timeout to 0. Once a watchdog has been started monitors of the GPIO will be triggered every timeout interval after the last GPIO activity. The watchdog expiry will be indicated by a special TIMEOUT value. ... $ pigs wdog 23 90000 -15 ERROR: timeout not 0-60000 $ pigs wdog 23 9000 ... This example causes a report to be written to any notification pipes listening on GPIO 23 whenever GPIO 23 changes state or approximately every 9000 ms. WVAG :: This command adds 1 one or more triplets [*trips*] of GPIO on, GPIO off, delay to the existing waveform (if any). Upon success the total number of pulses in the waveform so far is returned. On error a negative status code will be returned. The triplets will be added at the start of the existing waveform. If they are to start offset from the start then the first triplet should consist solely of a delay i.e. 0 0 offset. ... $ pigs wvag 0x10 0x80 1000 0x80 0x10 9000 2 $ pigs wvag 0 0 10000 0x10 0x80 1000 0x80 0x10 9000 4 ... WVAS :: This command adds a waveform representing serial data [*bvs*] to GPIO [*u*] at [*b*] baud to the existing waveform (if any). The serial data starts [*o*] microseconds from the start of the waveform. Upon success the total number of pulses in the waveform so far is returned. On error a negative status code will be returned. The serial data is formatted as one start bit, [*db*] data bits, and [*sb*]/2 stop bits. The baud rate may be between 50 and 1000000 bits per second. It is legal to add serial data streams with different baud rates to the same waveform. The bytes required for each character depend upon [*db*]. For [*db*] 1-8 there will be one byte per character. For [*db*] 9-16 there will be two bytes per character. For [*db*] 17-32 there will be four bytes per character. ... $ pigs wvas 4 9600 8 2 0 0x30 0x31 0x32 0x33 23 $ pigs wvas 7 38400 8 2 0 0x41 0x42 35 ... WVTAT :: This command returns the id of the waveform currently being transmitted. Chained waves are not supported. Returns the waveform id or one of the following special values: 9998 - transmitted wave not found 9999 - no wave being transmitted ... $ pigs wvtat 9999 ... WVBSY :: This command checks to see if a waveform is currently being transmitted. Returns 1 if a waveform is currently being transmitted, otherwise 0. ... $ pigs wvbsy 0 ... WVCHA :: This command transmits a chain of waveforms. NOTE: Any hardware PWM started by [*HP*] will be cancelled. The waves to be transmitted are specified by the contents of [*bvs*] which contains an ordered list of wave_ids and optional command codes and related data. Upon success 0 is returned. On error a negative status code will be returned. Each wave is transmitted in the order specified. A wave may occur multiple times per chain. A blocks of waves may be transmitted multiple times by using the loop commands. The block is bracketed by loop start and end commands. Loops may be nested. Delays between waves may be added with the delay command. The following command codes are supported: Name @ Cmd & Data @ Meaning Loop Start @ 255 0 @ Identify start of a wave block Loop Repeat @ 255 1 x y @ loop x + y*256 times Delay @ 255 2 x y @ delay x + y*256 microseconds Loop Forever @ 255 3 @ loop forever If present Loop Forever must be the last entry in the chain. The code is currently dimensioned to support a chain with roughly 600 entries and 20 loop counters. ... #!/bin/bash GPIO=4 WAVES=5 pigs m $GPIO w for ((i=0; i<$WAVES; i++)) do pigs wvag $((1<=0) is returned. On error a negative status code will be returned. The data provided by the [*WVAG*] and [*WVAS*] commands is consumed by this command. As many waveforms may be created as there is space available. The wave id is passed to [*WVTX*] or [*WVTXR*] to specify the waveform to transmit. Normal usage would be Step 1. [*WVCLR*] to clear all waveforms and added data. Step 2. [*WVAG*]/[*WVAS*] calls to supply the waveform data. Step 3. [*WVCRE*] to create the waveform and get a unique id. Repeat steps 2 and 3 as needed. Step 4. [*WVTX*] or [*WVTXR*] with the id of the waveform to transmit. A waveform comprises of one or more pulses. A pulse specifies 1) the GPIO to be switched on at the start of the pulse. 2) the GPIO to be switched off at the start of the pulse. 3) the delay in microseconds before the next pulse. Any or all the fields can be zero. It doesn't make any sense to set all the fields to zero (the pulse will be ignored). When a waveform is started each pulse is executed in order with the specified delay between the pulse and the next. ... $ pigs wvas 4 9600 0 23 45 67 89 90 37 $ pigs wvcre 0 $ pigs wvcre -69 ERROR: attempt to create an empty waveform ... WVCAP :: Create a waveform of fixed size. Similar to [*WVCRE*], this command creates a waveform but pads the consumed resources to a fixed size, specified as a [*percent*] of the total resources. Padded waves of equal size can be re-cycled efficiently allowing newly created waves to re-use the resources of deleted waves of the same dimension. Upon success a wave id (>=0) is returned. On error a negative status code will be returned. The data provided by the [*WVAG*] and [*WVAS*] commands are consumed by this command. As many waveforms may be created as there is space available. The wave id is passed to [*WVTX*] or [*WVTXR*] to specify the waveform to transmit. Normal usage would be Step 1. [*WVCLR*] to clear all waveforms and added data. Step 2. [*WVAG*]/[*WVAS*] calls to supply the waveform data. Step 3. [*WVCAP*] to create a waveform of a uniform size. Step 4. [*WVTX*] or [*WVTXR*] with the id of the waveform to transmit. Repeat steps 2 - 4 as needed. Step 5. Any wave id can now be deleted and another wave of the same size can be created in its place. Example ... # Create a wave that consumes 50% of the total resource: $ pigs wvag 16 0 5000000 0 16 5000000 2 $ pigs wvcap 50 0 $ pigs wvtx 0 11918 ... WVDEL :: This command deletes the waveform with id [*wid*]. The wave is flagged for deletion. The resources used by the wave will only be reused when either of the following apply. - all waves with higher numbered wave ids have been deleted or have been flagged for deletion. - a new wave is created which uses exactly the same resources as the current wave (see the C source for gpioWaveCreate for details). Upon success nothing is returned. On error a negative status code will be returned. ... $ pigs wvdel 0 $ pigs wvdel 0 -66 ERROR: non existent wave id ... WVHLT :: This command aborts the transmission of the current waveform. Nothing is returned. This command is intended to stop a waveform started in the repeat mode. ... $ pigs wvhlt ... WVNEW :: This clears any existing waveform data ready for the creation of a new waveform. Nothing is returned. ... $ pigs wvnew ... WVSC :: The statistic requested by [*ws*] is returned. [*ws*] identifies the subcommand as follows. 0 Get Cbs 1 Get High Cbs 2 Get Max Cbs ... $ pigs wvas 4 9600 0 23 45 67 89 90 37 $ pigs wvsc 0 74 $ pigs wvsc 1 74 $ pigs wvsc 2 25016 ... WVSM :: The statistic requested by [*ws*] is returned. [*ws*] identifies the subcommand as follows. 0 Get Micros 1 Get High Micros 2 Get Max Micros ... $ pigs wvsm 0 5314 $ pigs wvsm 1 5314 $ pigs wvsm 2 1800000000 ... WVSP :: The statistic requested by [*ws*] is returned. [*ws*] identifies the subcommand as follows. 0 Get Pulses 1 Get High Pulses 2 Get Max Pulses ... $ pigs wvsp 0 37 $ pigs wvsp 1 37 $ pigs wvsp 2 12000 ... WVTX :: This command transmits the waveform with id [*wid*] once. NOTE: Any hardware PWM started by [*HP*] will be cancelled. Upon success the number of DMA control blocks in the waveform is returned. On error a negative status code will be returned. ... $ pigs wvtx 1 75 $ pigs wvtx 2 -66 ERROR: non existent wave id ... WVTXM :: This command transmits the waveform with id [*wid*] using mode [*wmde*]. The mode may be send once (0), send repeatedly (1), send once but first sync with previous wave (2), or send repeatedly but first sync with previous wave (3). WARNING: bad things may happen if you delete the previous waveform before it has been synced to the new waveform. NOTE: Any hardware PWM started by [*HP*] will be cancelled. Upon success the number of DMA control blocks in the waveform is returned. On error a negative status code will be returned. ... $ pigs wvtxm 1 3 75 $ pigs wvtxm 2 0 -66 ERROR: non existent wave id ... WVTXR :: This command transmits the waveform with id [*wid*] repeatedly. NOTE: Any hardware PWM started by [*HP*] will be cancelled. Upon success the number of DMA control blocks in the waveform is returned. On error a negative status code will be returned. ... $ pigs wvtxr 1 75 $ pigs wvtxr 2 -66 ERROR: non existent wave id ... PARAMETERS actv :: 0-1000000 The number of microseconds level changes are reported for once a noise filter has been triggered (by [*stdy*] microseconds of a stable level). b :: baud The command expects the baud rate in bits per second for the transmission of serial data (I2C/SPI/serial link, waves). bctl :: BSC control word The command expects a BSC control word, see [*BSCX*]. bit :: bit value (0-1) The command expects 0 or 1. bits :: a bit mask A mask is used to select one or more GPIO. A GPIO is selected if bit (1<=0) The command expects a handle. A handle is a number referencing an object opened by one of [*FO*], [*I2CO*], [*NO*], [*SERO*], [*SPIO*]. ib :: I2C bus (>=0) The command expects an I2C bus number. id :: I2C device (0-0x7F) The command expects the address of an I2C device. if :: I2C flags (0) The command expects an I2C flags value. No flags are currently defined. L :: level (0-1) The command expects a GPIO level. m :: mode (RW540123) The command expects a mode character. Each GPIO can be configured to be in one of 8 different modes. The modes are named Input, Output, ALT0, ALT1, ALT2, ALT3, ALT4, and ALT5. To set the mode use the code for the mode. The value is returned by the mode get command. Mode @ Input @ Output @ ALT0 @ ALT1 @ ALT2 @ ALT3 @ ALT4 @ ALT5 Code @ R @ W @ 0 @ 1 @ 2 @ 3 @ 4 @ 5 Value @ 0 @ 1 @ 4 @ 5 @ 6 @ 7 @ 3 @ 2 miso :: GPIO (0-31) The GPIO used for the MISO signal when bit banging SPI. mode :: file open mode One of the following values. @ Value @ Meaning READ @ 1 @ open file for reading WRITE @ 2 @ open file for writing RW @ 3 @ open file for reading and writing The following values can be or'd into the mode. @ Value @ Meaning APPEND @ 4 @ All writes append data to the end of the file CREATE @ 8 @ The file is created if it doesn't exist TRUNC @ 16 @ The file is truncated mosi :: GPIO (0-31) The GPIO used for the MOSI signal when bit banging SPI. name :: the name of a script Only alphanumeric characters, '-' and '_' are allowed in the name. num :: maximum number of bytes to return (1-) The command expects the maximum number of bytes to return. For the I2C and SPI commands the requested number of bytes will always be returned. For the serial and file commands the smaller of the number of bytes available to be read (which may be zero) and [*num*] bytes will be returned. o :: offset (>=0) Serial data is stored offset microseconds from the start of the waveform. p :: PUD (ODU) The command expects a PUD character. Each GPIO can be configured to use or not use an internal pull up or pull down resistor. This is useful to provide a default state for inputs. A pull up will default the input to 1 (high). A pull down will default the input to 0 (low). To set the pull up down state use the command character for the state. Pull Up Down @Off@Pull Down@Pull Up Command Character@ O@ D@ U There is no mechanism to read the pull up down state. pad :: 0-2 A set of GPIO which share common drivers. Pad @ GPIO 0 @ 0-27 1 @ 28-45 2 @ 46-53 padma:: 1-16 The mA which may be drawn from each GPIO whilst still guaranteeing the high and low levels. pars :: script parameters The command expects 0 to 10 numbers as parameters to be passed to the script. pat :: a file name pattern A file path which may contain wildcards. To be accessible the path must match an entry in /opt/pigpio/access. pdc :: hardware PWM dutycycle (0-1000000) The command expects a dutycycle. percent :: percent (1-100) The percent of wave resources to allocate to a wave. It can be useful to create waves of fixed sizes to prevent wave fragmentation (where there are plenty of resources but not a large enough contiguous space). pf :: hardware PWM frequency (1-125M, 1-187.5M for the BCM2711) The command expects a frequency. pl :: pulse length (1-100) The command expects a pulse length in microseconds. r :: register (0-255) The command expects an I2C register number. sb :: serial stop (half) bits (2-8) The command expects the number of stop (half) bits per serial character. scl :: user GPIO (0-31) The command expects the number of the GPIO to be used for SCL when bit banging I2C. sclk :: user GPIO (0-31) The GPIO used for the SCLK signal when bit banging SPI. sda :: user GPIO (0-31) The command expects the number of the GPIO to be used for SDA when bit banging I2C. sef :: serial flags (32 bits) The command expects a flag value. No serial flags are currently defined. sid :: script id (>= 0) The command expects a script id as returned by a call to [*PROC*]. spf :: SPI flags (32 bits) See [*SPIO*] and [*BSPIO*]. stdy :: 0-300000 The number of microseconds level changes must be stable for before reporting the level changed ([*FG*]) or triggering the active part of a noise filter ([*FN*]). str :: a string The command expects a string. t :: a string The command expects a string. trips :: triplets The command expects 1 or more triplets of GPIO on, GPIO off, delay. E.g. 0x400000 0 100000 0 0x400000 900000 defines two pulses as follows GPIO on @ GPIO off @ delay 0x400000 (GPIO 22)@ 0 (None)@100000 (1/10th s) 0 (None)@0x400000 (GPIO 22)@900000 (9/10th s) u :: user GPIO (0-31) The command expects the number of a user GPIO. A number of commands are restricted to GPIO in bank 1, in particular the PWM commands, the servo command, the watchdog command, and the notification command. It is your responsibility to ensure that the PWM and servo commands are only used on safe GPIO. See [*g*] uvs :: values The command expects an arbitrary number of >=0 values (possibly none). Any after the first two must be <= 255. v :: value The command expects a number. wid :: wave id (>=0) The command expects a wave id. When a waveform is created it is given an id (0, 1, 2, ...). wmde :: mode (0-3) The command expects a wave transmission mode. 0 = send once 1 = send repeatedly 2 = send once but first sync with previous wave 3 = send repeatedly but first sync with previous wave ws :: wave stats sucommand (0-2) The command expects a subcommand. 0 = current value. 1 = highest value so far. 2 = maximum possible value. wv :: word value (0-65535) The command expects a word value. SCRIPTS Scripts are programs to be stored and executed by the pigpio daemon. They are intended to mitigate any performance problems associated with the pigpio daemon server/client model. *Example* A trivial example might be useful. Suppose you want to toggle a GPIO on and off as fast as possible. From the command line you could write ... for ((i=0; i<1000;i++)); do pigs w 22 1 w 22 0; done ... Timing that you will see it takes about 14 seconds, or roughly 70 toggles per second. Using the pigpio Python module you could use code such as ... #!/usr/bin/env python import time import pigpio PIN=4 TOGGLE=10000 pi = pigpio.pi() # Connect to local Pi. s = time.time() for i in range(TOGGLE): pi.write(PIN, 1) pi.write(PIN, 0) e = time.time() print("pigpio did {} toggles per second".format(int(TOGGLE/(e-s)))) pi.stop() ... Timing that shows a speed improvement to roughly 800 toggles per second. Now let's use a script. ... pigs proc tag 999 w 22 1 w 22 0 dcr p0 jp 999 ... Ignore the details for now. Let's time the script running. Again, ignore the details for now. ... time (pigs procr 0 10000000; while a=$(pigs procp 0); [[ ${a::1} -eq 2 ]];\ do sleep 0.2; done) ... The script takes roughly 12 seconds to complete, or 800,000 toggles per second. That is the advantage of a stored script. Some details. ... pigs proc tag 999 w 22 1 w 22 0 dcr p0 jp 999 ... proc introduces a script. Everything after proc is part of the script. tag 999 names the current position in the script. w 22 1 writes 1 to GPIO 22. w 22 0 writes 0 to GPIO 22. dcr p0 decrements parameter 0. jp 999 jumps to tag 999 if the result is positive. ... time (pigs procr 0 10000000; while a=$(pigs procp 0); [[ ${a::1} -eq 2 ]];\ do sleep 0.2; done) ... pigs procr 0 10000000 starts script 0 with parameter 0 of 10 million. The rest is bash apart from pigs procp 0 asks for the status and parameters of script 0. The status will be 2 while the script is running and 1 when it is complete. *Virtual machine* A script runs within a virtual machine with a 32 bit accumulator A. a flags register F. a program counter PC. Each script has 10 parameters named 0 through 9. 150 variables named 0 through 149. 50 labels which are named by any unique number. *Commands* Many pigpio commands may be used within a script. However some commands do not work within the script model as designed and are not permitted. The following commands are not permitted within a script: File - FL FO FR FW I2C - BI2CZ I2CPK I2CRD I2CRI I2CRK I2CWD I2CWI I2CWK I2CZ Misc - BSCX CF1 CF2 SHELL Script control - PARSE PROC PROCD PROCP PROCR PROCS PROCU Serial - SERO SERR SERW SLR SPI - BSPIO BSPIX SPIR SPIW SPIX Waves - WVAG WVAS WVCHA WVGO WVGOR The following commands are only permitted within a script: Command@Description @Definition ADD x @Add x to accumulator @A+=x; F=A AND x @And x with accumulator @A&=x; F=A CALL L @Call subroutine at tag L @push(PC+1); PC=L CMP x @Compare x with accumulator @F=A-x DCR y @Decrement register @--*y; F=*y DCRA @Decrement accumulator @--A; F=A DIV x @Divide x into accumulator @A/=x; F=A EVTWT @Wait for an event to occur @A=wait(x); F=A HALT @Halt @Halt INR y @Increment register @++*y; F=*y INRA @Increment accumulator @++A; F=A JM L @Jump if minus to tag L @if (F<0) PC=L JMP L @Jump to tag L @PC=L JNZ L @Jump if non-zero to tag L @if (F) PC=L JP L @Jump if positive to tag L @if (F>=0) PC=L JZ L @Jump if zero to tag L @if (!F) PC=L LD y x @Load register with x @*y=x LDA x @Load accumulator with x @A=x MLT x @Multiply x with accumulator @A*=x; F=A MOD x @Modulus x with accumulator @A%=x; F=A OR x @Or x with accumulator @A|=x; F=A POP y @Pop register @y=pop() POPA @Pop accumulator @A=pop() PUSH y @Push register @push(y) PUSHA @Push accumulator @push(A) RET @Return from subroutine @PC=pop() RL y x @Rotate left register x bits @*y<<=x; F=*y RLA x @Rotate left accumulator x bits @A<<=x; F=A RR y x @Rotate right register x bits @*y>>=x; F=*y RRA x @Rotate right accumulator x bits @A>>=x; F=A STA y @Store accumulator in register @y=A SUB x @Subtract x from accumulator @A-=x; F=A SYS str@Run external script (/opt/pigpio/cgi/str) @system(str); F=A TAG L @Label the current script position @N/A WAIT x @Wait for a GPIO in x to change state @A=wait(x); F=A X y1 y2@Exchange contents of registers y1 and y2 @t=*y1;*y1=*y2;*y2=t XA y @Exchange contents of accumulator and register@t=A;A=*y;*y=t XOR x @Xor x with accumulator @A^=x; F=A x may be a constant, a parameter (p0-p9), or a variable (v0-v149). y may be a parameter (p0-p9), or a variable (v0-v149). If p or v isn't specified y is assumed to be a variable. The EVTWT command parameter is a bit-mask with 1 set for events of interest. The WAIT command parameter is a bit-mask with 1 set for GPIO of interest. The SYS script receives two unsigned parameters: the accumulator A and the current GPIO levels. pigpio-78/DOC/src/html/000077500000000000000000000000001373465704200147545ustar00rootroot00000000000000pigpio-78/DOC/src/html/download.html000066400000000000000000000046121373465704200174540ustar00rootroot00000000000000 download If the pigpio daemon is running it should be killed (sudo killall pigpiod) before make install and restarted afterwards (sudo pigpiod).

    The initial part of the make, the compilation of pigpio.c, takes 100 seconds on early model Pis.  Be patient.  The overall install takes just over 3 minutes.

    Download and install latest version

    wget https://github.com/joan2937/pigpio/archive/master.zip
    unzip master.zip
    cd pigpio-master
    make
    sudo make install

    If the Python part of the install fails it may be because you need the setup tools.

    sudo apt install python-setuptools python3-setuptools


    To check the library

    These tests make extensive use of GPIO 25 (pin 22).  Make sure nothing, or only a LED, is connected to the GPIO before running the tests.  Most tests are statistical in nature and so may on occasion fail.  Repeated failures on the same test or many failures in a group of tests indicate a problem.

    sudo ./x_pigpio # check C I/F

    sudo pigpiod    # start daemon

    ./x_pigpiod_if2 # check C      I/F to daemon
    ./x_pigpio.py   # check Python I/F to daemon
    ./x_pigs        # check pigs   I/F to daemon
    ./x_pipe        # check pipe   I/F to daemon


    To compile, link, and run a C program

    gcc -Wall -pthread -o foobar foobar.c -lpigpio -lrt
    sudo ./foobar


    To start the pigpio daemon

    sudo pigpiod

    To stop the pigpio daemon

    sudo killall pigpiod

    github

    git clone https://github.com/joan2937/pigpio

    Raspbian (raspberrypi.org image)

    This may not be the most recent version.  You can check the version with the command pigpiod -v.

    sudo apt-get update
    sudo apt-get install pigpio python-pigpio python3-pigpio


    pigpio-78/DOC/src/html/ex_LDR.html000066400000000000000000000123701373465704200167620ustar00rootroot00000000000000 LDR example

    The following code shows a method of reading analogue sensors on the digital input only Pi.  A Light Dependent Resistor (LDR) varies its resistance according to the incident light intensisty.

    SETUP

    fritzing diagramThe LDR used is a Cadmium Sulphide device with a 1MOhm dark resistance and 2-4KOhm at 100 lux.  The capacitor is a 104 ceramic.

    One end of the capacitor is connected to Pi ground.

    One end of the LDR is connected to Pi 3V3.

    The other ends of the capacitor and LDR are connected to a spare gpio.

    Here P1-1 is used for 3V3, P1-20 is used for ground, and gpio 18 (P1-12) is used for the gpio.

    photo of set-up

    CODE

    #include <stdio.h>

    #include <pigpio.h>

    /* -----------------------------------------------------------------------

       3V3 ----- Light Dependent Resistor --+-- Capacitor ----- Ground
                                            |
                                            +-- gpio


      cc -o LDR LDR.c -lpigpio -lpthread -lrt
      sudo ./LDR

    */

    #define LDR 18

    /* forward declaration */

    void alert(int pin, int level, uint32_t tick);

    int main (int argc, char *argv[])
    {
       if (gpioInitialise()<0) return 1;

       gpioSetAlertFunc(LDR, alert); /* call alert when LDR changes state */
        
       while (1)
       {
          gpioSetMode(LDR, PI_OUTPUT); /* drain capacitor */

          gpioWrite(LDR, PI_OFF);

          gpioDelay(200); /* 50 micros is enough, 200 is overkill */

          gpioSetMode(LDR, PI_INPUT); /* start capacitor recharge */

          gpioDelay(10000); /* nominal 100 readings per second */
       }

       gpioTerminate();
    }

    void alert(int pin, int level, uint32_t tick)
    {
       static uint32_t inited = 0;
       static uint32_t lastTick, firstTick;

       uint32_t diffTick;

       if (inited)
       {
          diffTick = tick - lastTick;
          lastTick = tick;

          if (level == 1) printf("%u %d\ ", tick-firstTick, diffTick);
       }
       else
       {
          inited = 1;
          firstTick = tick;
          lastTick = firstTick;
       }
    }

    BUILD

    cc -o LDR LDR.c -lpigpio -lrt -lpthread

    RUN

    sudo ./LDR >LDR.dat &

    While the program is running you can capture the waveform using the notification feature built in to pigpio.  Issue the following commands on the Pi.

    pigs no
    pig2vcd  </dev/pigpio0 >LDR.vcd &
    pigs nb 0 0x40000 # set bit for gpio 18

    Change the light falling on the LDR for a few seconds (e.g. shine a torch on it or shade it with your hands).

    pigs nc 0

    The file LDR.vcd will contain the captured waveform, which can be viewed using GTKWave.

    Overview

    LDR waveform 1

    Reading circa every 10ms

    LDR waveform 2

    One reading, circa 400us

    LDR waveform 3

    The file LDR.dat will contain pairs of timestamps and recharge time (in us).  The following  script will convert the timestamps into seconds.

    awk '{print $1/1000000, $2}' LDR.dat >LDR-secs.dat

    Gnuplot is a useful tool to graph data.

    plot [14:24] 'LDR-secs.dat' with lines title 'LDR'

    Gnuplot readings 14-24 seconds

    gnuplot 1

    plot [18:21] 'LDR-secs.dat' with lines title 'LDR'

    Gnuplot readings 18-21 seconds

    Gnuplot 2

    pigpio-78/DOC/src/html/ex_ir_remote.html000066400000000000000000000205301373465704200203230ustar00rootroot00000000000000 IR remote example

    The following code shows one way to read an infrared remote control device (the sort used in TVs and stereo systems).

    SETUP

    fritzing diagramThe device used is a SFH5110 (IR Receiver for remote control, carrier 38 kHz).

    Pin 1 (left from front) may be connected to any spare gpio.  Here it's connected via a 4K7 current limiting resistor.  This isn't really needed as the device has an internal 23K resistor in-line.  It does no harm though.

    Pin 2 should be connected to a Pi ground pin.

    Pin 3 should be connected to a Pi 5V pin.

    Here pin 1 to gpio7 (P1-26) via a 4K7 resistor, pin 2 to ground (P1-14), and pin 3 to 5V (P1-2).

    photo of set-up

    CODE

    #include <stdio.h>

    #include <pigpio.h>

    #define IR_PIN 7

    #define OUTSIDE_CODE 0
    #define INSIDE_CODE  1

    #define MIN_MESSAGE_GAP 3000
    #define MAX_MESSAGE_END 3000

    #define MAX_TRANSITIONS 500

    /*
       using the FNV-1a hash                
       from http://isthe.com/chongo/tech/comp/fnv/#FNV-param
    */

    #define FNV_PRIME_32 16777619
    #define FNV_BASIS_32 2166136261U

    static volatile uint32_t ir_hash = 0;

    typedef struct
    {
       int state;
       int count;
       int level;
       uint16_t micros[MAX_TRANSITIONS];
    } decode_t;

    /* forward declarations */

    void     alert(int gpio, int level, uint32_t tick);
    uint32_t getHash(decode_t * decode);
    void     updateState(decode_t * decode, int level, uint32_t micros);

    int main(int argc, char * argv[])
    {
       if (gpioInitialise()<0)
       {
          return 1 ;
       }

       /* IR pin as input */

       gpioSetMode(IR_PIN, PI_INPUT);

       /* 5ms max gap after last pulse */

       gpioSetWatchdog(IR_PIN, 5);

       /* monitor IR level changes */

       gpioSetAlertFunc(IR_PIN, alert);

       while (1)
       {
          if (ir_hash)
          {
             /* non-zero means new decode */
             printf("ir code is %u\ ", ir_hash);
             ir_hash = 0;
          }

          gpioDelay(100000); /* check remote 10 times per second */
       }

       gpioTerminate();
    }

    void alert(int gpio, int level, uint32_t tick)
    {
       static int inited = 0;

       static decode_t activeHigh, activeLow;

       static uint32_t lastTick;

       uint32_t diffTick;

       if (!inited)
       {
          inited = 1;

          activeHigh.state = OUTSIDE_CODE; activeHigh.level = PI_LOW;
          activeLow.state  = OUTSIDE_CODE; activeLow.level  = PI_HIGH;

          lastTick = tick;
          return;
       }

       diffTick = tick - lastTick;

       if (level != PI_TIMEOUT) lastTick = tick;

       updateState(&activeHigh, level, diffTick);
       updateState(&activeLow, level, diffTick);
    }

    void updateState(decode_t * decode, int level, uint32_t micros)
    {
       /*
          We are dealing with active high as well as active low
          remotes.  Abstract the common functionality.
       */

       if (decode->state == OUTSIDE_CODE)
       {
          if (level == decode->level)
          {
             if (micros > MIN_MESSAGE_GAP)
             {
                decode->state = INSIDE_CODE;
                decode->count = 0;
             }
          }
       }
       else
       {
          if (micros > MAX_MESSAGE_END)
          {
             /* end of message */

             /* ignore if last code not consumed */

             if (!ir_hash) ir_hash = getHash(decode);

             decode->state = OUTSIDE_CODE;
          }
          else
          {
             if (decode->count < (MAX_TRANSITIONS-1))
             {
                if (level != PI_TIMEOUT)
                   decode->micros[decode->count++] = micros;
             }
          }
       }
    }

    int compare(unsigned int oldval, unsigned int newval)
    {
       if      (newval < (oldval * 0.75)) {return 1;}
       else if (oldval < (newval * 0.75)) {return 2;}
       else                               {return 4;}
    }

    uint32_t getHash(decode_t * decode)
    {
       /* use FNV-1a */

       uint32_t hash;
       int i, value;

       if (decode->count < 6) {return 0;}

       hash = FNV_BASIS_32;

       for (i=0; i<(decode->count-2); i++)
       {
          value = compare(decode->micros[i], decode->micros[i+2]);

          hash = hash ^ value;
          hash = (hash * FNV_PRIME_32);
       }

       return hash;
    }

    BUILD

    cc -o ir_remote ir_remote.c -lpigpio -lrt -lpthread

    RUN

    sudo ./ir_remote

    A hash code is formed from the level transitions detected during a remote key press.  This is likely to be unique over multiple remotes and keys.

    While the program is running you can capture the waveform using the notification feature built in to pigpio.  Issue the following commands on the Pi.

    pigs no
    pig2vcd  </dev/pigpio0 >ir.vcd &
    pigs nb 0 0x80 # set bits for gpios 7 (0x80)

    Press a few different remotes and keys.  Then enter

    pigs nc 0

    The file ir.vcd will contain the captured waveform, which can be viewed using GTKWave.

    Overview

    ir remote waveform 1

    Remote A typical waveform

    ir remote waveform 2

    Remote B typical waveform

    ir remote waveform 3 pigpio-78/DOC/src/html/ex_motor_shield.html000066400000000000000000000171331373465704200210330ustar00rootroot00000000000000 Arduino motor shield example The following example demonstrates the use of an Arduino shield from the Rasperry Pi.

    The shield used is a clone of the Adafruit motor shield.  See shieldlist.org for details.

    For the demonstration DC motors 3 and 4 are being driven forwards and backwards with changing speeds (speeds are controlled via PWM).

    Seven connections are made between the Pi and the shield.  Four to latch the motor states (latch, enable, data, clock); Two to control motor speed (PWM 3 and 4); and ground.

    The code used was ported from the Adafruit Arduino code and converted to use the pigpio library.  Only the DC motor code was ported.

    A video of the shield in use is available at youtube.com

    #include <stdio.h>


    #include <pigpio.h>

    /*
       This code may be used to drive the Adafruit (or clones) Motor Shield.

       The code as written only supports DC motors.

       http://shieldlist.org/adafruit/motor

       The shield pinouts are

       D12 MOTORLATCH
       D11 PMW motor 1
       D10 Servo 1
       D9  Servo 2
       D8  MOTORDATA

       D7  MOTORENABLE
       D6  PWM motor 4
       D5  PWM motor 3
       D4  MOTORCLK
       D3  PWM motor 2

       The motor states (forward, backward, brake, release) are encoded using the
       MOTOR_ latch pins.  This saves four gpios.
    */

    typedef unsigned char uint8_t;

    #define BIT(bit) (1 << (bit))

    /* assign gpios to drive the shield pins */

    /*      Shield      Pi */

    #define MOTORLATCH  14
    #define MOTORCLK    24
    #define MOTORENABLE 25
    #define MOTORDATA   15

    #define MOTOR_3_PWM  7
    #define MOTOR_4_PWM  8

    /*
       The only other connection needed between the Pi and the shield
       is ground to ground. I used Pi P1-6 to shield gnd (next to D13).
    */

    /* assignment of motor states to latch */

    #define MOTOR1_A 2
    #define MOTOR1_B 3
    #define MOTOR2_A 1
    #define MOTOR2_B 4
    #define MOTOR4_A 0
    #define MOTOR4_B 6
    #define MOTOR3_A 5
    #define MOTOR3_B 7

    #define FORWARD  1
    #define BACKWARD 2
    #define BRAKE    3
    #define RELEASE  4

    static uint8_t latch_state;

    void latch_tx(void)
    {
       unsigned char i;

       gpioWrite(MOTORLATCH, PI_LOW);

       gpioWrite(MOTORDATA, PI_LOW);

       for (i=0; i<8; i++)
       {
          gpioDelay(10);  // 10 micros delay

          gpioWrite(MOTORCLK, PI_LOW);

          if (latch_state & BIT(7-i)) gpioWrite(MOTORDATA, PI_HIGH);
          else                        gpioWrite(MOTORDATA, PI_LOW);

          gpioDelay(10);  // 10 micros delay

          gpioWrite(MOTORCLK, PI_HIGH);
       }

       gpioWrite(MOTORLATCH, PI_HIGH);
    }

    void init(void)
    {
       latch_state = 0;

       latch_tx();

       gpioWrite(MOTORENABLE, PI_LOW);
    }

    void DCMotorInit(uint8_t num)
    {
       switch (num)
       {
          case 1: latch_state &= ~BIT(MOTOR1_A) & ~BIT(MOTOR1_B); break;
          case 2: latch_state &= ~BIT(MOTOR2_A) & ~BIT(MOTOR2_B); break;
          case 3: latch_state &= ~BIT(MOTOR3_A) & ~BIT(MOTOR3_B); break;
          case 4: latch_state &= ~BIT(MOTOR4_A) & ~BIT(MOTOR4_B); break;
          default: return;
       }

       latch_tx();

       printf("Latch=%08X\ ", latch_state);
    }

    void DCMotorRun(uint8_t motornum, uint8_t cmd)
    {
       uint8_t a, b;

       switch (motornum)
       {
          case 1: a = MOTOR1_A; b = MOTOR1_B; break;
          case 2: a = MOTOR2_A; b = MOTOR2_B; break;
          case 3: a = MOTOR3_A; b = MOTOR3_B; break;
          case 4: a = MOTOR4_A; b = MOTOR4_B; break;
          default: return;
       }
     
       switch (cmd)
       {
          case FORWARD:  latch_state |=  BIT(a); latch_state &= ~BIT(b); break;
          case BACKWARD: latch_state &= ~BIT(a); latch_state |=  BIT(b); break;
          case RELEASE:  latch_state &= ~BIT(a); latch_state &= ~BIT(b); break;
          default: return;
       }

       latch_tx();

       printf("Latch=%08X\ ", latch_state);
    }

    int main (int argc, char *argv[])
    {
       int i;

       if (gpioInitialise()<0) return 1;

       gpioSetMode(MOTORLATCH,  PI_OUTPUT);
       gpioSetMode(MOTORENABLE, PI_OUTPUT);
       gpioSetMode(MOTORDATA,   PI_OUTPUT);
       gpioSetMode(MOTORCLK,    PI_OUTPUT);

       gpioSetMode(MOTOR_3_PWM, PI_OUTPUT);
       gpioSetMode(MOTOR_4_PWM, PI_OUTPUT);

       gpioPWM(MOTOR_3_PWM, 0);
       gpioPWM(MOTOR_4_PWM, 0);

       init();

       for (i=60; i<160; i+=20)
       {
          gpioPWM(MOTOR_3_PWM, i);
          gpioPWM(MOTOR_4_PWM, 220-i);

          DCMotorRun(3, FORWARD);
          DCMotorRun(4, BACKWARD);

          sleep(2);

          DCMotorRun(3, RELEASE);
          DCMotorRun(4, RELEASE);

          sleep(2);

          gpioPWM(MOTOR_4_PWM, i);
          gpioPWM(MOTOR_3_PWM, 220-i);

          DCMotorRun(3, BACKWARD);
          DCMotorRun(4, FORWARD);

          sleep(2);

          DCMotorRun(3, RELEASE);
          DCMotorRun(4, RELEASE);

          sleep(2);
       }

       gpioPWM(MOTOR_4_PWM, 0);
       gpioPWM(MOTOR_3_PWM, 0);

       DCMotorRun(3, RELEASE);
       DCMotorRun(4, RELEASE);

       gpioTerminate();
    }
    pigpio-78/DOC/src/html/ex_rotary_encoder.html000066400000000000000000000146731373465704200213700ustar00rootroot00000000000000 Rotary encoder sample

    The following code shows one way to read an incremental mechanical rotary enoder (the sort used for volume control in audio systems).  These rotary encoders have two switches A and B which return a quadrature output, i.e. they are 90 degrees out of phase.

    SETUP

    fritzing diagramThe common (centre) terminal should be connected to a Pi ground.

    The A and B terminals may be connected to any spare gpios.

    Here A to gpio18 (P1-12), common to ground (P1-20), B to gpio7 (P1-26).

    photo of set-up

    CODE

    #include <stdio.h>

    #include <pigpio.h>

    /*
       Rotary encoder connections:

       Encoder A      - gpio 18   (pin P1-12)
       Encoder B      - gpio 7    (pin P1-26)
       Encoder Common - Pi ground (pin P1-20)
    */

    #define ENCODER_A 18
    #define ENCODER_B  7

    static volatile int encoderPos;

    /* forward declaration */

    void encoderPulse(int gpio, int lev, uint32_t tick);

    int main(int argc, char * argv[])
    {
       int pos=0;

       if (gpioInitialise()<0) return 1;

       gpioSetMode(ENCODER_A, PI_INPUT);
       gpioSetMode(ENCODER_B, PI_INPUT);

       /* pull up is needed as encoder common is grounded */

       gpioSetPullUpDown(ENCODER_A, PI_PUD_UP);
       gpioSetPullUpDown(ENCODER_B, PI_PUD_UP);

       encoderPos = pos;

       /* monitor encoder level changes */

       gpioSetAlertFunc(ENCODER_A, encoderPulse);
       gpioSetAlertFunc(ENCODER_B, encoderPulse);

       while (1)
       {
          if (pos != encoderPos)
          {
             pos = encoderPos;
             printf("pos=%d\ ", pos);
          }
          gpioDelay(20000); /* check pos 50 times per second */
       }

       gpioTerminate();
    }

    void encoderPulse(int gpio, int level, uint32_t tick)
    {
       /*

                 +---------+         +---------+      0
                 |         |         |         |
       A         |         |         |         |
                 |         |         |         |
       +---------+         +---------+         +----- 1

           +---------+         +---------+            0
           |         |         |         |
       B   |         |         |         |
           |         |         |         |
       ----+         +---------+         +---------+  1

       */

       static int levA=0, levB=0, lastGpio = -1;

       if (gpio == ENCODER_A) levA = level; else levB = level;

       if (gpio != lastGpio) /* debounce */
       {
          lastGpio = gpio;

          if ((gpio == ENCODER_A) && (level == 0))
          {
             if (!levB) ++encoderPos;
          }
          else if ((gpio == ENCODER_B) && (level == 1))
          {
             if (levA) --encoderPos;
          }
       }
    }

    BUILD

    cc -o rotary_encoder rotary_encoder.c -lpigpio -lrt -lpthread

    RUN

    sudo ./rotary_encoder

    While the program is running you can capture the waveform using the notification feature built in to pigpio.  Issue the following commands on the Pi.

    pigs no
    pig2vcd  </dev/pigpio0 >re.vcd &
    pigs nb 0 0x40080 # set bits for gpios 7 (0x80) and 18 (0x40000)

    Twiddle the rotary encoder forwards and backwards for a few seconds.  Then enter

    pigs nc 0

    The file re.vcd will contain the captured waveform, which can be viewed using GTKWave.


    Overview

    rotary encoder waveform overview

    Detail of switch bounce.  Contact A bounces for circa 700 us before completing the level transition

    rotary encoder waveform detail
    pigpio-78/DOC/src/html/ex_sonar_ranger.html000066400000000000000000000117231373465704200210220ustar00rootroot00000000000000 Sonar ranger example

    The following code shows a method of reading a class of sonar rangers.  These rangers requires a trigger pulse.  Shortly after receiving a trigger they transmit a noise pulse and set the echo line high.  When the echo is received the echo line is set low.

    SETUP

    fritzing diagram




    The ranger used is a SRF05 (check the pinouts, there are many variants).

    The fritzing diagram shows the back of the ranger, i.e. pin 1 is the rightmost.

    Pin 1 is 5V.
    Pin 2 is the trigger line.
    Pin 3 is the echo line.
    Pin 4 is out (unused).
    Pin 5 is ground.

    photo of set-up

    CODE

    #include <stdio.h>

    #include <pigpio.h>

    /*

    P1  Name  gpio    used for

     2  5V    ---     5V
     6  GND   ---     Ground
    24  CE0   8       Sonar echo
    26  CE1   7       Sonar trigger

    */

    #define SONAR_TRIGGER 7
    #define SONAR_ECHO    8

    /* forward prototypes */

    void sonarTrigger(void);

    void sonarEcho(int gpio, int level, uint32_t tick);

    int main(int argc, char *argv[])
    {
       if (gpioInitialise()<0) return 1;

       gpioSetMode(SONAR_TRIGGER, PI_OUTPUT);
       gpioWrite  (SONAR_TRIGGER, PI_OFF);

       gpioSetMode(SONAR_ECHO,    PI_INPUT);

       /* update sonar 20 times a second, timer #0 */

       gpioSetTimerFunc(0, 50, sonarTrigger); /* every 50ms */

       /* monitor sonar echos */

       gpioSetAlertFunc(SONAR_ECHO, sonarEcho);

       while (1) sleep(1);

       gpioTerminate();

       return 0;
    }

    void sonarTrigger(void)
    {
       /* trigger a sonar reading */

       gpioWrite(SONAR_TRIGGER, PI_ON);

       gpioDelay(10); /* 10us trigger pulse */

       gpioWrite(SONAR_TRIGGER, PI_OFF);
    }

    void sonarEcho(int gpio, int level, uint32_t tick)
    {
       static uint32_t startTick, firstTick=0;

       int diffTick;

       if (!firstTick) firstTick = tick;

       if (level == PI_ON)
       {
          startTick = tick;
       }
       else if (level == PI_OFF)
       {
          diffTick = tick - startTick;

          printf("%u %u\ ", tick-firstTick, diffTick);
       }
    }

    BUILD

    cc -o sonar sonar.c -lpigpio -lrt -lpthread

    RUN

    sudo ./sonar >sonar.dat &

    While the program is running you can capture the waveform using the notification feature built in to pigpio.  Issue the following commands on the Pi.

    pigs no
    pig2vcd  </dev/pigpio0 >sonar.vcd &
    pigs nb 0 0x180 # set bits for gpios 7 and 8

    Move an object in front of the sonar ranger for a few seconds.

    pigs nc 0

    The file sonar.vcd will contain the captured waveform, which can be viewed using GTKWave.

    Overview

    LDR waveform 1

    Reading circa every 10ms

    Sonar waveform 2

    One reading, circa 400us

    Sonar waveform 3

    another

    Sonar waveform 4

    The file sonar.dat will contain pairs of timestamps and echo length (in us).  The following  script will convert the timestamps into seconds.

    awk '{print $1/1000000, $2}' sonar.dat >sonar-secs.dat

    Gnuplot is a useful tool to graph data.

    plot 'sonar-secs.dat' title 'Sonar'

    gnuplot 1
     plot [10:25] 'sonar-secs.dat' title 'Sonar'

    gnuplot 1

    pigpio-78/DOC/src/html/faq.html000066400000000000000000000401351373465704200164140ustar00rootroot00000000000000 faq Are my GPIO broken?

    Audio is broken

    Can´t initialise pigpio library

    Can´t lock var/run/pigpio.pid

    Hello World!

    Clock skew, make fails

    Have I fried my GPIO?

    How do I debounce inputs?

    How fast is SPI?

    Library update didn't work

    make fails with clock skew

    Porting pigpio to another CPU/SoC

    Sound isn't working

    Symbol not found

    What is I2C?

    What is Serial?

    What is SPI?

    Which library should I use?

    Are my GPIO broken?

    See Have I fried my GPIO?

    Audio is broken

    See Sound isn't working

    Can´t lock /var/run/pigpio.pid

    See Can´t_initialise_pigpio_library

    Can´t initialise pigpio library

    This message means the pigpio daemon is already running.

    The default daemon is called pigpiod and may be removed as follows.

    Check that it is running with the command

    ps aux | grep pigpiod

    Kill the daemon with

    sudo killall pigpiod

    If your own program is acting as the daemon it may be removed as follows.

    Find its process id (pid).

    cat /var/run/pigpio.pid

    Kill the program with

    sudo kill -9 pid

    If the above doesn't work do the following and try starting the daemon again

    sudo rm /var/run/pigpio.pid

    To start the daemon do

    sudo pigpiod

    Have I fried my GPIO?

    If you think you have damaged one or more GPIO you can carry out a diagnostic test.

    The test is a command line script called gpiotest

    For the duration of the test nothing must be connected to the GPIO (no LEDs, wires, ribbon cables etc.).

    The test checks that each GPIO may be read and written and that the internal resistor pull-ups and pull-downs are functional.

    A video showing what happens to the GPIO during a test.

    A test with all GPIO okay.

    This program checks the Pi's (user) gpios.
    
    The program reads and writes all the gpios.  Make sure NOTHING
    is connected to the gpios during this test.
    
    The program uses the pigpio daemon which must be running.
    
    To start the daemon use the command sudo pigpiod.
    
    Press the ENTER key to continue or ctrl-C to abort...
    
    Testing...
    Skipped non-user gpios: 0 1 28 29 30 31 
    Tested user gpios: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
    19 20 21 22 23 24 25 26 27 Failed user gpios: None

    A test showing failed GPIO.

    This program checks the Pi's (user) gpios.
    
    The program reads and writes all the gpios. Make sure NOTHING
    is connected to the gpios during this test.
    
    The program uses the pigpio daemon which must be running.
    
    To start the daemon use the command sudo pigpiod.
    
    Press the ENTER key to continue or ctrl-C to abort...
    
    Testing...
    Write 1 to gpio 17 failed.
    Pull up on gpio 17 failed.
    Write 1 to gpio 18 failed.
    Pull up on gpio 18 failed.
    Write 0 to gpio 23 failed.
    Pull down on gpio 23 failed.
    Write 0 to gpio 24 failed.
    Pull down on gpio 24 failed.
    Write 1 to gpio 27 failed.
    Pull up on gpio 27 failed.
    Skipped non-user gpios: 0 1 28 29 30 31
    Tested user gpios: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
    19 20 21 22 23 24 25 26 27 Failed user gpios: 17 18 23 24 27

    How do I debounce inputs?

    Some devices like mechanical switches can generate multiple interrupts as they bounce between on and off.  It is possible to debounce the inputs in hardware by the correct use of resistors and capacitors.

    In software use the glitch filter which ignores all events shorter than a set number of microseconds.  C gpioGlitchFilter, Python set_glitch_filter.

    How fast is SPI?

    The SPI throughput in samples per second depends on a number of factors.

    • The SPI bit rate (transfer rate in bits per second)
    • The number of bytes transferred per sample (a 12 bit ADC sample may require 3 bytes to transfer)
    • The driver used

    Two of those factors are fixed, the variable is the driver used.

    The pigpio driver is considerably faster than the Linux SPI driver as is demonstrated by the following graphs.

    Each graph shows the SPI bit rate in bits per second along the horizontal axis.  The samples per second achieved is shown on the vertical axis.  Each graph contains plots assuming 1 to 5 bytes per transfer.

    The source code used for the tests is spi-driver-speed.c and spi-pigpio-speed.c

    spi-lnx-pibr1.png


    spi-pig-pibr1.png


    spi-lnx-pi3b.png


    spi-pig-pi3b.png

    Library update didn't work

    pigpio places files in the following locations

    /usr/local/include (pigpio.h, pigpiod_if.h, pigpiod_if2.h)
    /usr/local/lib (libpigpio.so, libpigpiod_if.so, libpigpiod_if2.so)
    /usr/local/bin (pig2vcd, pigpiod, pigs)
    /usr/local/man (man pages)

    The raspberrypi.org image containing pigpio uses different locations.

    /usr/include (pigpio.h, pigpiod_if.h, pigpiod_if2.h)
    /usr/lib (libpigpio.so, libpigpiod_if.so, libpigpiod_if2.so)
    /usr/bin (pig2vcd, pigpiod, pigs)
    /usr/man (man pages)

    Mostly this doesn't matter as the /usr/local directories will generally be earlier in the search path.  The pigpio built includes, binaries, and manuals are normally found first.

    However the wrong libraries may be linked during the compilation.  If this is the case remove the /usr/lib entries for libpigpio.so , libpigpiod_if.so, and libpigpiod_if2.so

    Hello World!

    The following examples show how to use the various components of the pigpio library.

    Each example shows how to read the level of a GPIO.

    C

    read_cif.c
    #include <stdio.h>
    #include <pigpio.h>
    
    int main(int argc, char *argv[])
    {
       int GPIO=4;
       int level;
    
       if (gpioInitialise() < 0) return 1;
    
       level = gpioRead(GPIO);
    
       printf("GPIO %d is %d\n", GPIO, level);
    
       gpioTerminate();
    }
        

    Build

    gcc -pthread -o read_cif read_cif.c -lpigpio

    Run

    sudo ./read_cif

    C via pigpio daemon

    read_pdif.c
    #include <stdio.h>
    #include <pigpiod_if2.h>
    
    int main(int argc, char *argv[])
    {
       int pi;
       int GPIO=4;
       int level;
    
       pi = pigpio_start(0, 0); /* Connect to local Pi. */
    
       if (pi < 0)
       {
          printf("Can't connect to pigpio daemon\n");
          return 1;
       }
    
       level = gpio_read(pi, GPIO);
    
       printf("GPIO %d is %d\n", GPIO, level);
    
       pigpio_stop(pi); /* Disconnect from local Pi. */
       
       return 0;
    }
    

    Build

    gcc -pthread -o read_pdif read_pdif.c -lpigpiod_if2

    Run

    ./read_pdif

    Python

    read_gpio.py
    #!/usr/bin/env python
    
    import pigpio
    
    GPIO=4
    
    pi = pigpio.pi()
    if not pi.connected:
       exit()
    
    level = pi.read(GPIO)
    
    print("GPIO {} is {}".format(GPIO, level))
    
    pi.stop()
        

    Run

    python read_gpio.py

    pigs

    pigs r 4
        

    pipe I/F

    echo "r 4" >/dev/pigpio
    cat /dev/pigout
        

    make fails with clock skew

    If make fails with one of the following messages it is probably because the Pi's clock is wrong.

    make: Warning: File 'xxx' has modification time x s in the future
    make: warning: Clock skew detected. Your build may be incomplete.

    make uses the current time to work out which files need to be rebuilt (a file is rebuilt if it depends on other files which have a later time-stamp).

    The solution is to make sure the system clock is correct.  If the Pi is networked this will not normally be a problem.

    To set the date and time use the date command as in the following example.

    sudo date -d "2017-03-01 18:47:00"

    Porting pigpio to another CPU/SoC

    Sound isn't working

    The Pi contains two pieces of hardware, a PWM peripheral and a PCM peripheral, to generate sound.  The PWM peripheral is normally used and generates medium quality audio out of the headphone jack.  The PCM peripheral may be used by add-ons such as HATs and generates high quality audio.

    pigpio uses at least one of these peripherals during normal operation (for timing DMA transfers).  pigpio will use both peripherals if waves or the hardware PWM function is used.

    By default pigpio uses the PCM peripheral leaving the PWM peripheral free for medium quality audio.

    You can change the default with a configuration option.  For C use gpioCfgClock, for the pigpio daemon use the -t option.

    What is I2C?

    I2C is a data link between the Pi (master) and one or more slaves.

    Data may be sent and received but the Pi initiates all transfers.

    I2C is a medium speed link.  On the Pi the default speed is 100 kbps, but 400 kbps also works.

    I2C is implemented as a bus with two lines called

    • SDA - for data
    • SCL - for a clock
    On the Pi bus 1 is used which uses GPIO 2 (pin 3) for SDA and GPIO 3 (pin 5) for SCL.

    Only one slave device may be communicated with at a time.  Each message from the Pi includes the slave to be addressed and whether a read or write is to be performed.

    When the Pi (master) wishes to talk to a slave it begins by issuing a start sequence on the I2C bus. A start sequence is one of two special sequences defined for the I2C bus, the other being the stop sequence. The start sequence and stop sequence are special in that these are the only places where the SDA (data line) is allowed to change while the SCL (clock line) is high. When data is being transferred, SDA must remain stable and not change whilst SCL is high. The start and stop sequences mark the beginning and end of a transaction with the slave device.

    I2C start and stop sequences

    Data is transferred in 8-bit bytes. The bytes are placed on the SDA line starting with the most significant bit. The SCL line is then pulsed high, then low. For every byte transferred, the device receiving the data sends back an acknowledge bit, so there are actually 9 SCL clock pulses to transfer each 8-bit byte of data. If the receiving device sends back a low ACK bit, then it has received the data and is ready to accept another byte. If it sends back a high then it is indicating it cannot accept any further data and the master should terminate the transfer by sending a stop sequence.

    I2C waveform

    What is Serial?

    Serial is a data link between the Pi and one other device.

    Data may be sent and received.  Either the Pi or the device can initiate a transfer.

    Serial is a low to medium speed link.  On the Pi speeds of 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, and 230400 bps may be used.

    Serial is implemented with one line for transmit called TXD and one line for receive called RXD.

    If only receive or transmit are required the other line need not be connected.

    The Pi uses GPIO 14 (pin 8) for TXD and GPIO 15 (pin 10) for RXD.

    Data is normally transmitted in 8-bit bytes with a start bit, eight data bits, no parity, and one stop bit.  This is represented as 8N1.  The number of transmitted bits per second (bps) is called the baud rate.   The time for each bit, 1 / baud rate seconds, is referred to as the bit period.

    The lines are in the high state when no data is being transmitted.  The start of a byte is signalled by the line going low for one bit period (the start bit).  The data bits are then sent least significant bit firsts (low if the bit is 0, high if the bit is 1).  The data bits are followed by the optional parity bit.  Finally the line is set high for at least the number of stop bit periods.  The line will stay high if there are no more bytes to be transmitted.

    Serial waveform

    What is SPI?

    SPI is a data link between the Pi (master) and one or more slaves.

    Data may be sent and received but the Pi initiates all transfers.

    SPI is a medium to high speed link.  On the Pi speeds of 32 kbps to 8 Mbps may be used.

    SPI is implemented as a bus with three lines called

    • MOSI - for data from the Pi to the slave
    • MISO - for data from the slave to the Pi
    • SCLK - for a clock
    Only one slave device may be communicated with at a time.  An additional line per slave called slave select is used to identify the slave to be addressed.

    The Pi has two SPI buses

    1. the main SPI bus
      • MOSI GPIO 10 (pin 19)
      • MISO GPIO 9 (pin 21)
      • SCLK GPIO 11 (pin 23)
      • Slave selects
        • CE0 GPIO 8 (pin 24)
        • CE1 GPIO 7 (pin 26)
    2. the auxiliary SPI bus
      • MOSI GPIO 20 (pin 38)
      • MISO GPIO 19 (pin 35)
      • SCLK GPIO 21 (pin 40)
      • Slave selects
        • CE0 GPIO 18 (pin 12)
        • CE1 GPIO 17 (pin 11)
        • CE2 GPIO 16 (pin 36)

    SPI waveform


    Which library should I use?


    pigpio-78/DOC/src/html/index.html000066400000000000000000000511221373465704200167520ustar00rootroot00000000000000 pigpio pigpio is a library for the Raspberry which allows control of the General Purpose Input Outputs (GPIO).  pigpio works on all versions of the Pi.

    Download

    Features

    • hardware timed sampling and time-stamping of GPIO 0-31 every 5 us

    • hardware timed PWM on all of GPIO 0-31

    • hardware timed servo pulses on all of GPIO 0-31

    • callbacks on GPIO 0-31 level change (time accurate to a few us)

    • notifications via pipe on GPIO 0-31 level change

    • callbacks at timed intervals

    • reading/writing all of the GPIO in a bank (0-31, 32-53) as a single operation

    • GPIO reading, writing, modes, and internal pulls

    • socket and pipe interfaces for the bulk of the functionality

    • waveforms to generate GPIO level changes (time accurate to a few us)

    • software serial links using any user GPIO

    • rudimentary permission control through the socket and pipe interfaces

    • creating and running scripts on the pigpio daemon

    General

    The pigpio library is written in the C programming language.

    The pigpio daemon offers a socket and pipe interface to the underlying C library.

    A C library and a Python module allow control of the GPIO via the pigpio daemon.

    There is third party support for a number of other languages

    piscope

    piscope is a logic analyser (digital waveform viewer).

    piscope is a GTK+3 application and uses pigpio to provide raw GPIO level data.  piscope may be run on a Pi or on any machine capable of compiling a GTK+3 application.

    GPIO

    ALL GPIO are identified by their Broadcom number.  See elinux.org

    There are 54 GPIO in total, arranged in two banks.

    Bank 1 contains GPIO 0-31.  Bank 2 contains GPIO 32-53.

    For all types of Pi it is safe to read all the GPIO. If you try to write a system GPIO or change its mode you can crash the Pi or corrupt the data on the SD card.

    There are several types of board, each with different expansion headers, giving physical access to different GPIO. 

    Type 1 - Model B (original model)

    • 26 pin header (P1).
    • Hardware revision numbers of 2 and 3.
    • User GPIO 0-1, 4, 7-11, 14-15, 17-18, 21-25.

    GPIO pin pin GPIO
    3V3 - 1 2 - 5V
    SDA 0
    3 4 - 5V
    SCL 1
    5 6 - Ground

    4 7 8 14 TXD
    Ground - 9 10 15 RXD
    ce1 17 11 12 18 ce0

    21 13 14 - Ground

    22 15 16 23
    3V3 -
    17 18 24
    MOSI 10 19 20 - Ground
    MISO 9 21 22 25
    SCLK 11 23 24 8 CE0
    Ground - 25 26 7 CE1

    Type 2 - Model A, B (revision 2)

    26 pin header (P1) and an additional 8 pin header (P5).
    • Hardware revision numbers of 4, 5, 6 (B), 7, 8, 9 (A), and 13, 14, 15 (B).
    • User GPIO 2-4, 7-11, 14-15, 17-18, 22-25, 27-31.

    GPIO pin pin GPIO
    3V3 - 1 2 - 5V
    SDA 2 3 4 - 5V
    SCL 3 5 6 - Ground

    4 7 8 14 TXD
    Ground - 9 10 15 RXD
    ce1 17 11 12 18 ce0

    27 13 14 - Ground

    22 15 16 23
    3V3 -
    17 18 24
    MOSI 10 19 20 - Ground
    MISO 9 21 22 25
    SCLK 11 23 24 8 CE0
    Ground - 25 26 7 CE1


    GPIO pin pin GPIO
    5V
    - 1 2 - 3V3
    SDA
    28 3 4 29 SCL

    30 5 6 31
    Ground
    -
    7 8 -
    Ground

    Type 3 - Model A+, B+, Pi Zero, Pi Zero W, Pi2B, Pi3B, Pi4B

    • 40 pin expansion header (J8).
    • Hardware revision numbers of 16 or greater.
    • User GPIO 2-27 (0 and 1 are reserved).

    GPIO pin pin GPIO
    3V3 - 1 2 - 5V
    SDA 2 3 4 - 5V
    SCL 3 5 6 - Ground

    4 7 8 14 TXD
    Ground - 9 10 15 RXD
    ce1 17 11 12 18 ce0

    27 13 14 - Ground

    22 15 16 23
    3V3 -
    17 18 24
    MOSI 10 19 20 - Ground
    MISO 9 21 22 25
    SCLK 11 23 24 8 CE0
    Ground - 25 26 7 CE1
    ID_SD 0 27 28 1 ID_SC

    5 29 30 - Ground

    6 31 32 12

    13 33 34 - Ground
    miso 19 35 36 16 ce2

    26 37 38 20 mosi
    Ground - 39 40 21 sclk

    Compute Module

    All 54 GPIO may be physically accessed.  Some are reserved for system use - refer to the Compute Module documentation.

    Only GPIO 0-31 are supported for hardware timed sampling, PWM, servo pulses, alert callbacks, waves, and software serial links.

    Other Languages

    There are several third party projects which provide wrappers for pigpio.

    Some are listed here:

    • Erlang (skvamme)
    • Java JNI wrapper around the pigpio C library (mattlewis)
    • Java via diozero, a high level wrapper around pigpio, Pi4J, wiringPi etc (mattlewis)
    • Java (nkolban)
    • .NET/mono (unosquare)
    • Node.js A wrapper for the pigpio C library (fivdi)
    • Node.js A client for pigpio socket interface (guymcswain)
    • Perl (Gligan Calin Horea)
    • Ruby (Nak)
    • Smalltalk(Instantiations)
    • Xojo(UBogun)
    • Xojo(Eugene Dakin)

    The PWM and servo pulses are timed using the DMA and PWM/PCM peripherals.  This use was inspired by Richard Hirst's servoblaster kernel module.

    pigpio-78/DOC/src/html/misc.html000066400000000000000000000022441373465704200165770ustar00rootroot00000000000000 Miscellaneous There are two C libraries which provide a socket interface to the pigpio daemon.  They provide an interface very similar to the pigpio Python module.
    • The original pigpiod_if library is now deprecated and will no longer be updated.  This library is limited to controlling one Pi at a time.
    • The new pigpiod_if2 library which should be used for new code.  This library allows multiple Pis to be controlled at one time.
    Additional details of the pigpio socket interface.

    Additional details of the pigpio pipe interface.

    pig2vcd is a utility which converts pigpio notifications into the VCD (Value Change Dump) format.  VCD can be read by many programs, in particular GTKWave. pigpio-78/DOC/src/html/pif.html000066400000000000000000000023021373465704200164150ustar00rootroot00000000000000 Pipe interface pigpio provides a pipe interface to many of its functions.

    The pipe interface is available whenever pigpio is running, either because it has been started as a daemon, or it has been linked in to a running user program.  The pipe interface can be disabled by the program which initialises the library.  pigpiod offers the -f option to disable the pipe interface.  User programs should call gpioCfgInterfaces if they wish to disable the pipe interface.

    pigpio listens for commands on pipe /dev/pigpio.  The commands consist of a command identifier with, depending on the command, zero, one, or two parameters.  The result, if any, may be read from pipe /dev/pigout.  If any errors are detected a message will be written to pipe /dev/pigerr.


    The format of the commands is identical to those used by pigs. pigpio-78/DOC/src/html/piscope.html000066400000000000000000000164751373465704200173210ustar00rootroot00000000000000 piscope

    Introduction

    piscope is a logic analyser (digital waveform viewer) for the Raspberry.  It shows the state (high or low) of selected GPIO in real-time.

    See video.

    piscope uses the services of the pigpio library.  pigpio needs to be running on the Pi whose GPIO are to be monitored.

    The pigpio library may be started as a daemon (background process) by the following command.

    sudo pigpiod

    piscope may be invoked in several different ways

    Pi
    pi_host ~ $ piscope &
    Pi captures data
    Pi processes data
    Pi displays data
    Pi plus Linux PC

    (with the
    display on a remote
      Linux PC)
    remote_host ~ $ ssh -X pi_host
    pi_host ~ $ piscope &
    Pi captures data
    Pi processes data
    Remote Linux PC displays data
    Pi plus Windows PC

    (with the
    display on a remote
      Windows PC)
    You need to install an SSH client (putty suggested) and a X11 server (xming suggested).

    Run Program Files -> Xming -> XLaunch and accept the defaults.

    Run putty and enter the Pi's host name or IP address.  Click on SSH X11 and tick Enable X11 forwarding and then select Open.


    pi_host ~ $ piscope &
    Pi captures data
    Pi processes data
    Remote Windows PC displays data
    Pi plus Linux PC

    (with the display and processing on a remote Linux PC)
    remote_host ~ $ export PIGPIO_ADDR=pi_host
    remote_host ~ $ piscope &
    Pi captures data
    Remote processes data
    Remote displays data

    piscope operates in one of three modes

    Live
    The latest GPIO samples are displayed.

    The mode will automatically change to Pause if a sampling trigger is detected.

    There are four triggers.  Each trigger is made up of a combination of GPIO states (one of don't care, low, high, edge, falling, or rising per GPIO).  Triggers are always counted.  In addition a trigger may be sample to, sample around, or sample from, a so called sampling trigger.
    New samples are added to the sample buffer.

    Once the sample buffer is full the oldest samples are discarded.
    Play
    Recorded GPIO samples are displayed.

    The play speed may be varied between 64 times real-time to 1/32768 of real-time.

    The page up key increases the play speed by a factor of 2.  The page down key decreases the play speed by a factor of 2.  The home key sets the play speed to 1X.
    New samples are added to the sample buffer.

    Once the sample buffer is full new samples are discarded.
    Pause
    Recorded GPIO samples are displayed.

    The left and right cursor keys move the blue marker to the previous or next edge.  By default all GPIO edges are considered.  Clicking on a GPIO name will limit edge searches to the highlighted GPIO only.

    The left and right square bracket keys move the blue marker to the previous or next trigger.

    The time between the blue and gold markers is displayed.  The gold marker is set to the blue marker by a press of the 'g' key.
    New samples are added to the sample buffer.

    Once the sample buffer is full new samples are discarded.

    In all modes the down and up cursor keys zoom the time scale in and out.

    Samples can be saved with File Save All Samples or File Save Selected Samples.

    To select samples enter pause mode. Press 1 to specify the start of the samples (green marker) and 2 to specify the end of the samples (red marker).

    The samples may be saved in the native piscope format or in VCD format.

    Data saved in VCD format may be viewed and further processed with GTKWave.

    Data saved in the native piscope format may be restored later with File Restore Saved Data.

    Installation

    To download and install piscope.

    Pi (pre-built image)

    wget abyz.me.uk/rpi/pigpio/piscope.tar
    tar xvf piscope.tar
    cd PISCOPE
    make hf
    make install

    Linux 64 bit X86/AMD (pre-built image)

    wget abyz.me.uk/rpi/pigpio/piscope.tar
    tar xvf piscope.tar
    cd PISCOPE
    make x86_64
    make install

    All machines (building from source)

    You only need to perform this step if you want to build the executable from the source files.  This is not needed if you use a pre-built image.

    WARNING
    : Installing gtk+-3.0 uses a lot of SD card space.

    Most of the space used by gtk+-3.0 is taken up by unneeded *-dbg packages.

    With *-dbg packages an additional 3753MB SD space is required.

    If you edit the list of packages to be downloaded and remove the *-dbg packages only 134MB of additional SD space is needed (as at the time of writing).

    #
    # *** This may take a lot of time and use a lot of SD card space ***
    #
    sudo apt-get install gtk+-3.0
    #
    wget abyz.me.uk/rpi/pigpio/piscope.tar
    tar xvf piscope.tar
    cd PISCOPE
    make
    make install

    pigpio-78/DOC/src/html/sif.html000066400000000000000000001273731373465704200164400ustar00rootroot00000000000000 Socket interface pigpio provides a socket interface to many of its functions.

    The socket interface is available whenever pigpio is running, either because it has been started as a daemon, or it has been linked in to a running user program.

    The socket interface can be disabled by the program which initialises the library.  pigpiod offers the -k option to disable the socket interface.  User programs should call gpioCfgInterfaces if they wish to disable the socket interface.

    pigpio listens for connections on port 8888 by default.  This default may be overridden when pigpio starts by the gpioCfgSocketPort function call.  The pigpio daemon uses this function to provide an option to change the port number.

    The pigs utility is an example of using the socket interface from C.

    Request

    pigpio expects messages of type cmdCmd_t immediately followed with an extension for a few commands.

    The caller should fill in cmd, p1, p2, p3/res, and any extension as needed.  p3 will always be zero unless the command requires an extension in which case p3 will be the length in bytes of the extension.

    The cmdCmd_t is echoed back with the result, if any, in p3/res, and an extension immediately afterwards for a few commands.

    COMMAND cmd
    p1 p2 p3 Extension
    MODES 0 gpio mode 0 -
    MODEG 1 gpio 0 0 -
    PUD 2 gpio pud 0 -
    READ 3 gpio 0 0 -
    WRITE 4 gpio level 0 -
    PWM 5 gpio dutycycle 0 -
    PRS 6 gpio range 0 -
    PFS 7 gpio frequency 0 -
    SERVO 8 gpio pulsewidth 0 -
    WDOG 9 gpio timeout 0 -
    BR1 10 0 0 0 -
    BR2 11 0 0 0 -
    BC1 12 bits 0 0 -
    BC2 13 bits 0 0 -
    BS1 14 bits 0 0 -
    BS2 15 bits 0 0 -
    TICK 16 0 0 0 -
    HWVER 17 0 0 0 -
    NO 18 0 0 0 -
    NB 19 handle bits 0 -
    NP 20 handle 0 0 -
    NC 21 handle 0 0 -
    PRG 22 gpio 0 0 -
    PFG 23 gpio 0 0 -
    PRRG 24 gpio 0 0 -
    HELP
    25 N/A
    N/A
    N/A
    N/A
    PIGPV 26 0 0 0 -
    WVCLR 27 0 0 0 -
    WVAG 28 0 0 12*X gpioPulse_t pulse[X]
    WVAS 29 gpio baud 12+X uint32_t databits
    uint32_t stophalfbits
    uint32_t offset
    uint8_t data[X]
    N/A
    30 0 0 0 -
    N/A
    31 0 0 0 -
    WVBSY 32 0 0 0 -
    WVHLT 33 0 0 0 -
    WVSM 34 subcmd 0 0 -
    WVSP 35 subcmd 0 0 -
    WVSC 36 subcmd 0 0 -
    TRIG 37 gpio pulselen 4 uint32_t level
    PROC 38 0 0 X uint8_t text[X]
    PROCD 39 script_id 0 0 -
    PROCR 40 script_id 0 4*X
    uint32_t pars[X]
    PROCS 41 script_id 0 0 -
    SLRO 42 gpio baud 4 uint32_t databits
    SLR 43 gpio count 0 -
    SLRC 44 gpio 0 0 -
    PROCP 45 script_id 0 0 -
    MICS 46 micros 0 0 -
    MILS 47 millis 0 0 -
    PARSE 48 N/A N/A
    N/A
    N/A
    WVCRE 49 0 0 0 -
    WVDEL 50 wave_id 0 0 -
    WVTX 51 wave_id 0 0 -
    WVTXR 52 wave_id 0 0 -
    WVNEW 53 0 0 0 -
    I2CO 54 bus device 4 uint32_t flags
    I2CC 55 handle 0 0 -
    I2CRD 56 handle count 0 -
    I2CWD 57 handle 0 X uint8_t data[X]
    I2CWQ 58 handle bit 0 -
    I2CRS 59 handle 0 0 -
    I2CWS 60 handle byte 0 -
    I2CRB 61 handle register 0 -
    I2CWB 62 handle register 4 uint32_t byte
    I2CRW 63 handle register 0 -
    I2CWW 64 handle register 4 uint32_t word
    I2CRK 65 handle register
    0 -
    I2CWK 66 handle register
    X uint8_t bvs[X]
    I2CRI 67 handle register
    4 uint32_t num
    I2CWI 68 handle register
    X
    uint8_t bvs[X]
    I2CPC 69 handle register
    4 uint32_t word
    I2CPK 70 handle register
    X
    uint8_t data[X]
    SPIO
    71 channel baud 4 uint32_t flags
    SPIC 72 handle 0 0 -
    SPIR 73 handle count 0 -
    SPIW 74 handle 0 X uint8_t data[X]
    SPIX 75 handle 0 X uint8_t data[X]
    SERO 76 baud flags X uint8_t device[X]
    SERC 77 handle 0 0 -
    SERRB 78 handle 0 0 -
    SERWB 79 handle byte 0 -
    SERR 80 handle count 0 -
    SERW 81 handle 0 X uint8_t data[X]
    SERDA 82 handle 0 0 -
    GDC
    83
    gpio
    0
    0
    -
    GPW
    84
    gpio
    0
    0
    -
    HC
    85
    gpio
    frequency
    0
    -
    HP
    86
    gpio
    frequency
    4
    uint32_t dutycycle
    CF1
    87
    arg1
    arg2
    X
    uint8_t argx[X]
    CF2
    88
    arg1
    retMax
    X
    uint8_t argx[X]
    BI2CC
    89
    sda
    0
    0
    -
    BI2CO
    90
    sda
    scl
    4
    uint32_t baud
    BI2CZ
    91
    sda
    0
    X
    uint8_t data[X]
    I2CZ
    92
    handle
    0
    X
    uint8_t data[X]
    WVCHA
    93
    0
    0
    X
    uint8_t data[X]
    SLRI
    94
    gpio
    invert
    0
    -
    CGI
    95
    0
    0
    0
    -
    CSI
    96
    config
    0
    0
    -
    FG
    97
    gpio
    steady
    0
    -
    FN
    98
    gpio
    steady
    4
    uint32_t active
    NOIB 99 0 0 0 -
    WVTXM
    100
    wave_id
    mode
    0
    -
    WVTAT
    101
    0
    0
    0
    -
    PADS
    102
    pad
    strength
    0
    -
    PADG
    103
    pad
    0
    0
    -
    FO
    104
    mode
    0
    X
    uint8_t file[X]
    FC
    105
    handle
    0
    0
    -
    FR
    106
    handle
    count
    0
    -
    FW
    107
    handle
    0
    X
    uint8_t data[X]
    FS
    108
    handle
    offset
    4
    uint32_t from
    FL
    109
    count
    0
    X
    uint8_t pattern[X]
    SHELL
    110
    len(name)
    0
    len(name)+
    1+
    len(string)
    uint8_t name[len(name)]
    uint8_t null (0)
    uint8_t string[len(string)]
    BSPIC
    111
    CS
    0
    0
    -
    BSPIO
    112
    CS
    0
    20
    uint32_t MISO
    uint32_t MOSI
    uint32_t SCLK
    uint32_t baud
    uint32_t spi_flags
    BSPIX
    113
    CS
    0
    X
    uint8_t data[X]
    BSCX
    114
    control
    0
    X
    uint8_t data[X]
    EVM
    115
    handle
    bits
    0
    -
    EVT
    116
    event
    0
    0
    -
    PROCU
    117
    script_id
    0
    4*X
    uint32_t pars[X]

    Response

    The response has cmd/p1/p2 as in the request.  p3/res holds the return value.  If the command returns additional values they will be in the immediately following extension.

    Normally res should be treated as a 32 bit signed value and will be greater than or equal to zero.  Upon failure res will be less than 0 and contains an error code.

    There are a few commands where the returned value should be treated as a 32 bit unsigned value.  These commands can not fail.  They are indicated with a * after the command name.

    Commands with an extension have the size of the extension in bytes returned in res (or <0 on error as above).

    COMMAND cmd
    p1
    p2
    res
    Extension
    MODES 0 -
    -
    0 -
    MODEG 1 -
    -
    mode
    -
    PUD 2 -
    -
    0 -
    READ 3 -
    -
    level
    -
    WRITE 4 -
    -
    0 -
    PWM 5 -
    -
    0 -
    PRS 6 -
    -
    0 -
    PFS 7 -
    -
    0 -
    SERVO 8 -
    -
    0 -
    WDOG 9 -
    -
    0 -
    BR1 * 10 -
    -
    bits
    -
    BR2 * 11 -
    -
    bits
    -
    BC1 12 -
    -
    0 -
    BC2 13 -
    -
    0 -
    BS1 14 -
    -
    0 -
    BS2 15 -
    -
    0 -
    TICK *
    16 -
    -
    tick
    -
    HWVER *
    17 -
    -
    version
    -
    NO 18 -
    -
    handle
    -
    NB 19 -
    -
    0 -
    NP 20 -
    -
    0 -
    NC 21 -
    -
    0 -
    PRG 22 -
    -
    range
    -
    PFG 23 -
    -
    frequency
    -
    PRRG 24 -
    -
    real range
    -
    HELP 25 -
    -
    N/A
    N/A
    PIGPV *
    26 -
    -
    version
    -
    WVCLR 27 -
    -
    0 -
    WVAG 28 -
    -
    wave pulses
    -
    WVAS 29 -
    -
    wave pulses
    -
    N/A
    30 -
    -
    -
    -
    N/A
    31 -
    -
    -
    -
    WVBSY 32 -
    -
    busy (1) or not busy (0)
    -
    WVHLT 33 -
    -
    0 -
    WVSM 34 -
    -
    wave micros
    wave micros - high
    wave micros - max
    -
    WVSP 35 -
    -
    wave pulses
    wave pulses - high
    wave pulses - max
    -
    WVSC 36 -
    -
    wave DMA CBs
    wave DMA CBs - high
    wave DMA CBs - max
    -
    TRIG 37 -
    -
    0
    -
    PROC 38 -
    -
    script id
    -
    PROCD 39 -
    -
    0 -
    PROCR 40 -
    -
    script status
    -
    PROCS 41 -
    -
    0 -
    SLRO 42 -
    -
    0
    -
    SLR 43 -
    -
    X
    uint8_t data[X]
    SLRC 44 -
    -
    0 -
    PROCP 45 -
    -
    44 uint32_t script_status
    uint32_t pars[10]
    MICS 46 -
    -
    0 -
    MILS 47 -
    -
    0 -
    PARSE 48 -
    -
    N/A
    -
    WVCRE 49 -
    -
    wave id
    -
    WVDEL 50 -
    -
    0 -
    WVTX 51 -
    -
    wave DMA CBs
    -
    WVTXR 52 -
    -
    wave DMA CBs
    -
    WVNEW 53 -
    -
    0 -
    I2CO 54 -
    -
    handle -
    I2CC 55 -
    -
    0 -
    I2CRD 56 -
    -
    X
    uint8_t data[X]
    I2CWD 57 -
    -
    0
    -
    I2CWQ 58 -
    -
    0 -
    I2CRS 59 -
    -
    byte value
    -
    I2CWS 60 -
    -
    0 -
    I2CRB 61 -
    -
    byte value
    -
    I2CWB 62 -
    -
    0
    -
    I2CRW 63 -
    -
    word value
    -
    I2CWW 64 -
    -
    0
    -
    I2CRK 65 -
    -
    0 -
    I2CWK 66 -
    -
    0
    -
    I2CRI 67 -
    -
    X
    uint8_t data[X]
    I2CWI 68 -
    -
    0
    -
    I2CPC 69 -
    -
    word value
    -
    I2CPK 70 -
    -
    X
    uint8_t data[X]
    SPIO
    71 -
    -
    handle
    -
    SPIC 72 -
    -
    0 -
    SPIR 73 -
    -
    X
    uint8_t data[X]
    SPIW 74 -
    -
    0
    -
    SPIX 75 -
    -
    X uint8_t data[X]
    SERO 76 -
    -
    handle
    -
    SERC 77 -
    -
    0 -
    SERRB 78 -
    -
    byte value
    -
    SERWB 79 -
    -
    0 -
    SERR 80 -
    -
    X
    uint8_t data[X]
    SERW 81 -
    -
    0
    -
    SERDA 82 -
    -
    data ready count
    -
    GDC
    83
    -
    -
    dutycycle
    -
    GPW
    84
    -
    -
    pulsewidth
    -
    HC
    85
    -
    -
    0
    -
    HP
    86
    -
    -
    0
    -
    CF1
    87
    -
    -
    value
    -
    CF2
    88
    -
    -
    X
    uint8_t retBuf[X]
    BI2CC
    89
    -
    -
    0
    -
    BI2CO
    90
    -
    -
    handle
    -
    BI2CZ
    91
    -
    -
    X
    uint8_t data[X]
    I2CZ
    92
    -
    -
    X
    uint8_t data[X]
    WVCHA
    93
    -
    -
    0
    -
    SLRI
    94
    -
    -
    0
    -
    CGI
    95
    -
    -
    config
    -
    CSI
    96
    -
    -
    0
    -
    FG
    97
    -
    -
    0
    -
    FN
    98
    -
    -
    0
    -
    NOIB 99 -
    -
    0 -
    WVTXM
    100
    -
    -
    wave DMA CBs
    -
    WVTAT
    101
    -
    -
    wave id
    -
    PADS
    102
    -
    -
    0
    -
    PADG
    103
    -
    -
    strength
    -
    FO
    104
    -
    -
    handle
    -
    FC
    105
    -
    -
    0
    -
    FR
    106
    -
    -
    X
    uint8_t data[X]
    FW
    107
    -
    -
    0
    -
    FS
    108
    -
    -
    position
    -
    FL
    109
    -
    -
    X
    uint8_t filenames[X]
    SHELL
    110
    -
    -
    exit status
    -
    BSPIC
    111
    -
    -
    0
    -
    BSPIO
    112
    -
    -
    0
    -
    BSPIX
    113
    -
    -
    X
    uint8_t data[X]
    BSCX
    114
    -
    -
    X+4
    uint32_t status
    uint8_t data[X]
    EVM
    115
    -
    -
    0
    -
    EVT
    116
    -
    -
    0
    -
    PROCU
    117
    -
    -
    0
    -

    cmdCmd_t

    typedef struct
    {
       uint32_t cmd;
       uint32_t p1;
       uint32_t p2;
       union
       {
          uint32_t p3;
          uint32_t ext_len;
          uint32_t res;
       };
    } cmdCmd_t;

    pigpio-78/EXAMPLES/000077500000000000000000000000001373465704200140325ustar00rootroot00000000000000pigpio-78/EXAMPLES/C/000077500000000000000000000000001373465704200142145ustar00rootroot00000000000000pigpio-78/EXAMPLES/C/COUNTER_1/000077500000000000000000000000001373465704200155535ustar00rootroot00000000000000pigpio-78/EXAMPLES/C/COUNTER_1/README000066400000000000000000000003041373465704200164300ustar00rootroot00000000000000A program showing how to use the gpioSetAlertFunc function to set a callback for gpio state changes. A frequency count is generated for each monitored gpio (frequencies up to 500KHz and beyond). pigpio-78/EXAMPLES/C/COUNTER_1/freq_count_1.c000066400000000000000000000120241373465704200203030ustar00rootroot00000000000000#include #include #include #include #include /* 2014-08-20 gcc -o freq_count_1 freq_count_1.c -lpigpio -lpthread $ sudo ./freq_count_1 4 7 8 This program uses the gpioSetAlertFunc function to request a callback (the same one) for each gpio to be monitored. EXAMPLES Monitor gpio 4 (default settings) sudo ./freq_count_1 4 Monitor gpios 4 and 8 (default settings) sudo ./freq_count_1 4 8 Monitor gpios 4 and 8, sample rate 2 microseconds sudo ./freq_count_1 4 8 -s2 Monitor gpios 7 and 8, sample rate 4 microseconds, report every second sudo ./freq_count_1 7 8 -s4 -r10 Monitor gpios 4,7, 8, 9, 10, 23 24, report five times a second sudo ./freq_count_1 4 7 8 9 10 23 24 -r2 Monitor gpios 4, 7, 8, and 9, report once a second, sample rate 1us, generate 2us edges (4us square wave, 250000 highs per second). sudo ./freq_count_1 4 7 8 9 -r 10 -s 1 -p 2 */ #define MAX_GPIOS 32 #define OPT_P_MIN 1 #define OPT_P_MAX 1000 #define OPT_P_DEF 20 #define OPT_R_MIN 1 #define OPT_R_MAX 10 #define OPT_R_DEF 5 #define OPT_S_MIN 1 #define OPT_S_MAX 10 #define OPT_S_DEF 5 static volatile int g_pulse_count[MAX_GPIOS]; static volatile int g_reset_counts; static uint32_t g_mask; static int g_num_gpios; static int g_gpio[MAX_GPIOS]; static int g_opt_p = OPT_P_DEF; static int g_opt_r = OPT_R_DEF; static int g_opt_s = OPT_S_DEF; static int g_opt_t = 0; void usage() { fprintf (stderr, "\n" \ "Usage: sudo ./freq_count_1 gpio ... [OPTION] ...\n" \ " -p value, sets pulses every p micros, %d-%d, TESTING only\n" \ " -r value, sets refresh period in deciseconds, %d-%d, default %d\n" \ " -s value, sets sampling rate in micros, %d-%d, default %d\n" \ "\nEXAMPLE\n" \ "sudo ./freq_count_1 4 7 -r2 -s2\n" \ "Monitor gpios 4 and 7. Refresh every 0.2 seconds. Sample rate 2 micros.\n" \ "\n", OPT_P_MIN, OPT_P_MAX, OPT_R_MIN, OPT_R_MAX, OPT_R_DEF, OPT_S_MIN, OPT_S_MAX, OPT_S_DEF ); } void fatal(int show_usage, char *fmt, ...) { char buf[128]; va_list ap; va_start(ap, fmt); vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); fprintf(stderr, "%s\n", buf); if (show_usage) usage(); fflush(stderr); exit(EXIT_FAILURE); } static int initOpts(int argc, char *argv[]) { int i, opt; while ((opt = getopt(argc, argv, "p:r:s:")) != -1) { i = -1; switch (opt) { case 'p': i = atoi(optarg); if ((i >= OPT_P_MIN) && (i <= OPT_P_MAX)) g_opt_p = i; else fatal(1, "invalid -p option (%d)", i); g_opt_t = 1; break; case 'r': i = atoi(optarg); if ((i >= OPT_R_MIN) && (i <= OPT_R_MAX)) g_opt_r = i; else fatal(1, "invalid -r option (%d)", i); break; case 's': i = atoi(optarg); if ((i >= OPT_S_MIN) && (i <= OPT_S_MAX)) g_opt_s = i; else fatal(1, "invalid -s option (%d)", i); break; default: /* '?' */ usage(); exit(-1); } } return optind; } void edges(int gpio, int level, uint32_t tick) { int g; if (g_reset_counts) { g_reset_counts = 0; for (g=0; g=0) && (g<32)) { g_gpio[g_num_gpios++] = g; g_mask |= (1< #include #include #include #include /* 2014-08-20 gcc -o freq_count_2 freq_count_2.c -lpigpio -lpthread $ sudo ./freq_count_2 4 7 8 This program uses the gpioSetGetSamplesFunc function to request a callback once a millisecond for all accumulated gpio changes in that millisecond. This tends to be more efficient then calling a callback for each gpio change during the millisecond. EXAMPLES Monitor gpio 4 (default settings) sudo ./freq_count_2 4 Monitor gpios 4 and 8 (default settings) sudo ./freq_count_2 4 8 Monitor gpios 4 and 8, sample rate 2 microseconds sudo ./freq_count_2 4 8 -s2 Monitor gpios 7 and 8, sample rate 4 microseconds, report every second sudo ./freq_count_2 7 8 -s4 -r10 Monitor gpios 4,7, 8, 9, 10, 23 24, report five times a second sudo ./freq_count_2 4 7 8 9 10 23 24 -r2 Monitor gpios 4, 7, 8, and 9, report once a second, sample rate 1us, generate 2us edges (4us square wave, 250000 highs per second). sudo ./freq_count_2 4 7 8 9 -r 10 -s 1 -p 2 */ #define MAX_GPIOS 32 #define OPT_P_MIN 1 #define OPT_P_MAX 1000 #define OPT_P_DEF 20 #define OPT_R_MIN 1 #define OPT_R_MAX 10 #define OPT_R_DEF 5 #define OPT_S_MIN 1 #define OPT_S_MAX 10 #define OPT_S_DEF 5 static volatile int g_pulse_count[MAX_GPIOS]; static volatile int g_reset_counts; static uint32_t g_mask; static int g_num_gpios; static int g_gpio[MAX_GPIOS]; static int g_opt_p = OPT_P_DEF; static int g_opt_r = OPT_R_DEF; static int g_opt_s = OPT_S_DEF; static int g_opt_t = 0; void usage() { fprintf (stderr, "\n" \ "Usage: sudo ./freq_count_2 gpio ... [OPTION] ...\n" \ " -p value, sets pulses every p micros, %d-%d, TESTING only\n" \ " -r value, sets refresh period in deciseconds, %d-%d, default %d\n" \ " -s value, sets sampling rate in micros, %d-%d, default %d\n" \ "\nEXAMPLE\n" \ "sudo ./freq_count_2 4 7 -r2 -s2\n" \ "Monitor gpios 4 and 7. Refresh every 0.2 seconds. Sample rate 2 micros.\n" \ "\n", OPT_P_MIN, OPT_P_MAX, OPT_R_MIN, OPT_R_MAX, OPT_R_DEF, OPT_S_MIN, OPT_S_MAX, OPT_S_DEF ); } void fatal(int show_usage, char *fmt, ...) { char buf[128]; va_list ap; va_start(ap, fmt); vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); fprintf(stderr, "%s\n", buf); if (show_usage) usage(); fflush(stderr); exit(EXIT_FAILURE); } static int initOpts(int argc, char *argv[]) { int i, opt; while ((opt = getopt(argc, argv, "p:r:s:")) != -1) { i = -1; switch (opt) { case 'p': i = atoi(optarg); if ((i >= OPT_P_MIN) && (i <= OPT_P_MAX)) g_opt_p = i; else fatal(1, "invalid -p option (%d)", i); g_opt_t = 1; break; case 'r': i = atoi(optarg); if ((i >= OPT_R_MIN) && (i <= OPT_R_MAX)) g_opt_r = i; else fatal(1, "invalid -r option (%d)", i); break; case 's': i = atoi(optarg); if ((i >= OPT_S_MIN) && (i <= OPT_S_MAX)) g_opt_s = i; else fatal(1, "invalid -s option (%d)", i); break; default: /* '?' */ usage(); exit(-1); } } return optind; } void samples(const gpioSample_t *samples, int numSamples) { static uint32_t state = 0; uint32_t high, level; int g, s; if (g_reset_counts) { g_reset_counts = 0; for (g=0; g=0) && (g<32)) { g_gpio[g_num_gpios++] = g; g_mask |= (1< #include /* OH3144E or equivalent Hall effect sensor Pin 1 - 5V Pin 2 - Ground Pin 3 - gpio (here P1-8, gpio 14, TXD is used) The internal gpio pull-up is enabled so that the sensor normally reads high. It reads low when a magnet is close. gcc -o hall hall.c -lpigpio -lrt -lpthread sudo ./hall */ #define HALL 14 void alert(int gpio, int level, uint32_t tick) { static uint32_t lastTick=0; if (lastTick) printf("%d %.2f\n", level, (float)(tick-lastTick)/1000000.0); else printf("%d 0.00\n", level); lastTick = tick; } int main(int argc, char *argv[]) { int secs=60; if (argc>1) secs = atoi(argv[1]); /* program run seconds */ if ((secs<1) || (secs>3600)) secs = 3600; if (gpioInitialise()<0) return 1; gpioSetMode(HALL, PI_INPUT); gpioSetPullUpDown(HALL, PI_PUD_UP); gpioSetAlertFunc(HALL, alert); sleep(secs); gpioTerminate(); } pigpio-78/EXAMPLES/C/I2C_SNIFFER/000077500000000000000000000000001373465704200157455ustar00rootroot00000000000000pigpio-78/EXAMPLES/C/I2C_SNIFFER/README000066400000000000000000000002101373465704200166160ustar00rootroot00000000000000A program to passively sniff I2C transactions (100kHz bus maximum) and display the results. This C program uses pigpio notifications. pigpio-78/EXAMPLES/C/I2C_SNIFFER/pig2i2c.c000066400000000000000000000074331373465704200173570ustar00rootroot00000000000000/* */ #include #include #include #include #include #include #include #include #include #include "pigpio.h" /* This software reads pigpio notification reports monitoring the I2C signals. Notifications are pipe based so this software must be run on the Pi being monitored. It should be able to handle a 100kHz bus. You are unlikely to get any usable results if the bus is running at 400kHz. gcc -o pig2i2c pig2i2c.c Do something like sudo pigpiod -s 2 # get a notification handle, assume handle 0 was returned pigs no # start notifications for SCL/SDA e.g. pigs nb 0 0x3 # Rev. 1 select gpios 0/1 e.g. pigs nb 0 0xC # Rev. 2 select gpios 2/3 e.g. pigs nb 0 0xA00 # select gpios 9/11 (1<<9|1<<11) # run the program, specifying SCL/SDA and notification pipe ./pig2i2c SCL SDA 2) { gSCL = atoi(argv[1]); gSDA = atoi(argv[2]); bSCL = 1< #include #include "ir_hasher.h" /* This code forms a hash over the IR pulses generated by an IR remote. The remote key press is not converted into a code in the manner of the lirc module. No attempt is made to decode the type of protocol used by the remote. The hash is likely to be unique for different keys and different remotes but this is not guaranteed. This hashing process works for some remotes/protocols but not for others. The only way to find out if it works for one or more of your remotes is to try it and see. */ struct _Pi_Hasher_s { int gpio; Pi_Hasher_CB_t callback; int timeout; int in_code; uint32_t hash_val; int edges; int t1; int t2; int t3; int t4; }; static uint32_t _hash(uint32_t hv, int old_val, int new_val) { int val; if (new_val < (old_val * 0.60)) val = 13; else if (old_val < (new_val * 0.60)) val = 23; else val = 2; hv ^= val; hv *= 16777619; /* FNV_PRIME_32 */ return hv; } static void _cb(int gpio, int level, uint32_t tick, void *user) { Pi_Hasher_t * hasher; hasher = user; if (level != PI_TIMEOUT) { if (hasher->in_code == 0) { hasher->in_code = 1; gpioSetWatchdog(gpio, hasher->timeout); hasher->hash_val = 2166136261U; /* FNV_BASIS_32 */ hasher->edges = 1; hasher->t1 = 0; hasher->t2 = 0; hasher->t3 = 0; hasher->t4 = tick; } else { hasher->edges++; hasher->t1 = hasher->t2; hasher->t2 = hasher->t3; hasher->t3 = hasher->t4; hasher->t4 = tick; if (hasher->edges > 3) { hasher->hash_val = _hash(hasher->hash_val, (hasher->t2)-(hasher->t1), (hasher->t4)-(hasher->t3)); } } } else { if (hasher->in_code) { hasher->in_code = 0; gpioSetWatchdog(gpio, 0); if (hasher->edges > 12) /* Anything less is probably noise. */ { (hasher->callback)(hasher->hash_val); } } } } Pi_Hasher_t *Pi_Hasher(int gpio, Pi_Hasher_CB_t callback, int timeout) { Pi_Hasher_t *hasher; hasher = malloc(sizeof(Pi_Hasher_t)); hasher->gpio = gpio; hasher->callback = callback; hasher->timeout = 5; hasher->in_code = 0; gpioSetMode(gpio, PI_INPUT); gpioSetAlertFuncEx(gpio, _cb, hasher); return hasher; } void Pi_Hasher_cancel(Pi_Hasher_t *hasher) { if (hasher) { gpioSetAlertFunc(hasher->gpio, 0); free(hasher); hasher = NULL; } } pigpio-78/EXAMPLES/C/IR_RECEIVER/ir_hasher.h000066400000000000000000000013671373465704200201360ustar00rootroot00000000000000#ifndef IR_HASHER_H #define IR_HASHER_H #include typedef void (*Pi_Hasher_CB_t)(uint32_t); struct _Pi_Hasher_s; typedef struct _Pi_Hasher_s Pi_Hasher_t; Pi_Hasher_t * Pi_Hasher(int gpio, Pi_Hasher_CB_t callback, int timeout); /* This function establishes an IR hasher on the gpio. A gap of timeout milliseconds without a new bit indicates the end of a code. When code end is detected the callback function is called with the code hash. A pointer to a private data type is returned. This should be passed to Pi_Hasher_cancel if the hasher is to be cancelled. */ void Pi_Hasher_cancel(Pi_Hasher_t *hasher); /* This function releases the resources used by the hasher. */ #endif pigpio-78/EXAMPLES/C/IR_RECEIVER/test_ir_hasher.c000066400000000000000000000011431373465704200211600ustar00rootroot00000000000000#include #include #include "ir_hasher.h" /* REQUIRES An IR receiver output pin connected to a Pi gpio. TO BUILD gcc -o ir_hash_c test_ir_hasher.c ir_hasher.c -lpigpio -lrt -lpthread TO RUN sudo ./ir_hash_c */ void callback(uint32_t hash) { printf("hash=%u\n", hash); } int main(int argc, char *argv[]) { Pi_Hasher_t *hasher; if (gpioInitialise() < 0) return 1; /* This assumes the output pin of an IR receiver is connected to gpio 7. */ hasher = Pi_Hasher(7, callback, 5); sleep(300); Pi_Hasher_cancel(hasher); gpioTerminate(); } pigpio-78/EXAMPLES/C/PCF8591_YL-40/000077500000000000000000000000001373465704200160005ustar00rootroot00000000000000pigpio-78/EXAMPLES/C/PCF8591_YL-40/PCF8591.c000066400000000000000000000045251373465704200171110ustar00rootroot00000000000000#include #include #include #include #include #include /* libncurses5-dev */ /* 2014-08-26 PCF8591.c sudo apt-get install libncurses5-dev gcc -o PCF8591 PCF8591.c -lcurses -lpigpio -lpthread sudo ./PCF8591 */ /* Connect Pi 3V3 - VCC, Ground - Ground, SDA - SDA, SCL - SCL. */ #define PCF8591_I2C_ADDR 0x48 /* P4 The thermister voltage is provided at AIN 1. P5 The photocell voltage is provided at AIN 0. P6 The single turn 10K ohm trim pot voltage is provided at AIN 3. */ /* 7 6 5 4 3 2 1 0 0 X X X 0 X X X | | | | | | A B B C D D 0 1 0 0 0 1 0 0 A 0 D/A inactive 1 D/A active B 00 single ended inputs 01 differential inputs 10 single ended and differential 11 two differential inputs C 0 no auto inc 1 auto inc D 00 select channel 0 01 select channel 1 10 select channel 2 11 select channel 3 */ int main(int argc, char *argv[]) { int i; int r; int handle; char aout; unsigned char command[2]; unsigned char value[4]; unsigned char str[8]; int j; int key; if (gpioInitialise() < 0) return 1; initscr(); noecho(); cbreak(); nodelay(stdscr, true); curs_set(0); printw("PCF8591 + or - to change aout, any other key to quit."); mvaddstr(10, 0, "Brightness"); mvaddstr(12, 0, "Temperature"); mvaddstr(14, 0, "?"); mvaddstr(16, 0, "Resistor"); refresh(); handle = i2cOpen(1, PCF8591_I2C_ADDR, 0); command[1] = 0; aout = 128; while (1) { for (i=0; i<4; i++) { command[1] = aout; command[0] = 0x40 | ((i + 1) & 0x03); // output enable | read input i i2cWriteDevice(handle, &command, 2); usleep(20000); // the read is always one step behind the selected input value[i] = i2cReadByte(handle); sprintf(str, "%3d", value[i]); mvaddstr(10+i+i, 12, str); value[i] = value[i] / 4; move(10 + i + i, 16); for(j = 0; j < 64; j++) if(j < value[i]) addch('*'); else addch(' '); } refresh(); key = getch(); if ((key == '+') || (key == '=')) aout++; else if ((key == '-') || (key == '_')) aout--; else if (key != -1) break; } endwin(); i2cClose(handle); gpioTerminate(); return (0); } pigpio-78/EXAMPLES/C/PCF8591_YL-40/README000066400000000000000000000000661373465704200166620ustar00rootroot00000000000000A program to display readings from the (I2C) PCF8591. pigpio-78/EXAMPLES/C/POT_CAP_RECHARGE/000077500000000000000000000000001373465704200166015ustar00rootroot00000000000000pigpio-78/EXAMPLES/C/POT_CAP_RECHARGE/README000066400000000000000000000001561373465704200174630ustar00rootroot00000000000000Function to time capacitor charging (through a resistance). The time can be used to estimate the resistance. pigpio-78/EXAMPLES/C/POT_CAP_RECHARGE/pot_cap_charge.c000066400000000000000000000037321373465704200217100ustar00rootroot00000000000000#include #include /* Measure how long a capacitor takes to charge through a resistance. A potentimeter is used to vary the resistance. The time taken will be proportional to the resistance. 3V3 ----- Potentiometer --+-- Capacitor ----- Ground | +-- gpio gcc -o pot_cap_charge pot_cap_charge.c -lpigpio -lpthread -lrt sudo ./pot_cap_charge */ #define GPIO 25 #define MAX_READING 1000 static uint32_t rechargeTick = 0; void callback(int gpio, int level, uint32_t tick) { static uint32_t smooth = 0; static int reading = 0; uint32_t raw; if (level == 1) /* measure recharge time */ { ++reading; if (rechargeTick) { raw = tick - rechargeTick; /* set in main */ if (raw < MAX_READING) /* ignore outliers */ { /* smooth using 0.8 * smooth + 0.2 * raw */ smooth = (raw + (4 * smooth)) / 5; printf("%d %d %d\n", reading, raw, smooth); } else { /* ignore outlier, set dot at fixed position */ printf("%d %d %d\n", reading, 40, smooth); } } else { /* ignore reschedule, set dot at fixed position */ printf("%d %d %d\n", reading, 20, smooth); } } } int main (int argc, char *argv[]) { uint32_t t1, t2; int tDiff; if (gpioInitialise()<0) return 1; gpioSetAlertFunc(GPIO, callback); /* callback when GPIO changes state */ while (1) { gpioWrite(GPIO, PI_OFF); /* drain capacitor */ gpioDelay(200); /* microseconds */ t1 = gpioTick(); gpioSetMode(GPIO, PI_INPUT); /* start capacitor recharge */ t2 = gpioTick(); /* dump reading if rechargeTick not accurate to 3 micros */ if ((t2 - t1) < 3) rechargeTick = t1; else rechargeTick = 0; gpioDelay(5000); /* microseconds, nominal 200 readings per second */ } gpioTerminate(); } pigpio-78/EXAMPLES/C/ROTARY_ENCODER/000077500000000000000000000000001373465704200163735ustar00rootroot00000000000000pigpio-78/EXAMPLES/C/ROTARY_ENCODER/README000066400000000000000000000001551373465704200172540ustar00rootroot00000000000000Function to decode a mechanical rotary encoder. Follow the instructions in the test file to build and run. pigpio-78/EXAMPLES/C/ROTARY_ENCODER/rotary_encoder.c000066400000000000000000000036161373465704200215640ustar00rootroot00000000000000#include #include #include #include "rotary_encoder.h" struct _Pi_Renc_s { int gpioA; int gpioB; Pi_Renc_CB_t callback; int levA; int levB; int lastGpio; }; /* +---------+ +---------+ 0 | | | | A | | | | | | | | +---------+ +---------+ +----- 1 +---------+ +---------+ 0 | | | | B | | | | | | | | ----+ +---------+ +---------+ 1 */ static void _cb(int gpio, int level, uint32_t tick, void *user) { Pi_Renc_t *renc; renc = user; if (gpio == renc->gpioA) renc->levA = level; else renc->levB = level; if (gpio != renc->lastGpio) /* debounce */ { renc->lastGpio = gpio; if ((gpio == renc->gpioA) && (level == 1)) { if (renc->levB) (renc->callback)(1); } else if ((gpio == renc->gpioB) && (level == 1)) { if (renc->levA) (renc->callback)(-1); } } } Pi_Renc_t * Pi_Renc(int gpioA, int gpioB, Pi_Renc_CB_t callback) { Pi_Renc_t *renc; renc = malloc(sizeof(Pi_Renc_t)); renc->gpioA = gpioA; renc->gpioB = gpioB; renc->callback = callback; renc->levA=0; renc->levB=0; renc->lastGpio = -1; gpioSetMode(gpioA, PI_INPUT); gpioSetMode(gpioB, PI_INPUT); /* pull up is needed as encoder common is grounded */ gpioSetPullUpDown(gpioA, PI_PUD_UP); gpioSetPullUpDown(gpioB, PI_PUD_UP); /* monitor encoder level changes */ gpioSetAlertFuncEx(gpioA, _cb, renc); gpioSetAlertFuncEx(gpioB, _cb, renc); } void Pi_Renc_cancel(Pi_Renc_t *renc) { if (renc) { gpioSetAlertFunc(renc->gpioA, 0); gpioSetAlertFunc(renc->gpioB, 0); free(renc); } } pigpio-78/EXAMPLES/C/ROTARY_ENCODER/rotary_encoder.h000066400000000000000000000011251373465704200215620ustar00rootroot00000000000000#ifndef ROTARY_ENCODER_H #define ROTARY_ENCODER_H typedef void (*Pi_Renc_CB_t)(int); struct _Pi_Renc_s; typedef struct _Pi_Renc_s Pi_Renc_t; Pi_Renc_t * Pi_Renc(int gpioA, int gpioB, Pi_Renc_CB_t callback); /* This function establishes a rotary encoder on gpioA and gpioB. When the encoder is turned the callback function is called. A pointer to a private data type is returned. This should be passed to Pi_Renc_cancel if the rotary encoder is to be cancelled. */ void Pi_Renc_cancel(Pi_Renc_t *renc); /* This function releases the resources used by the decoder. */ #endif pigpio-78/EXAMPLES/C/ROTARY_ENCODER/test_rotary_encoder.c000066400000000000000000000011271373465704200226160ustar00rootroot00000000000000#include #include #include "rotary_encoder.h" /* REQUIRES A rotary encoder contacts A and B connected to separate gpios and the common contact connected to Pi ground. TO BUILD gcc -o rot_enc_c test_rotary_encoder.c rotary_encoder.c -lpigpio -lrt TO RUN sudo ./rot_enc_c */ void callback(int way) { static int pos = 0; pos += way; printf("pos=%d\n", pos); } int main(int argc, char *argv[]) { Pi_Renc_t * renc; if (gpioInitialise() < 0) return 1; renc = Pi_Renc(7, 8, callback); sleep(300); Pi_Renc_cancel(renc); gpioTerminate(); } pigpio-78/EXAMPLES/C/WIEGAND_CODE/000077500000000000000000000000001373465704200160645ustar00rootroot00000000000000pigpio-78/EXAMPLES/C/WIEGAND_CODE/README000066400000000000000000000001401373465704200167370ustar00rootroot00000000000000Function to decode a Wiegand code. Follow the instructions in the test file to build and run. pigpio-78/EXAMPLES/C/WIEGAND_CODE/test_wiegand.c000066400000000000000000000010021373465704200206760ustar00rootroot00000000000000#include #include #include "wiegand.h" /* REQUIRES Wiegand contacts 0 and 1 connected to separate gpios. TO BUILD gcc -o wiegand_c test_wiegand.c wiegand.c -lpigpio -lrt TO RUN sudo ./wiegand_c */ void callback(int bits, uint32_t value) { printf("bits=%d value=%u\n", bits, value); } int main(int argc, char *argv[]) { Pi_Wieg_t * w; if (gpioInitialise() < 0) return 1; w = Pi_Wieg(14, 15, callback, 5); sleep(300); Pi_Wieg_cancel(w); gpioTerminate(); } pigpio-78/EXAMPLES/C/WIEGAND_CODE/wiegand.c000066400000000000000000000051371373465704200176540ustar00rootroot00000000000000#include #include #include "wiegand.h" struct _Pi_Wieg_s { int mygpio_0; int mygpio_1; int mytimeout; int in_code; int bits; Pi_Wieg_CB_t mycallback; uint32_t num; uint32_t code_timeout; }; void _cb(int gpio, int level, uint32_t tick, void *user) { /* Accumulate bits until both gpios 0 and 1 timeout. */ Pi_Wieg_t *wieg; wieg = user; if (level == 0) /* a falling edge indicates a new bit */ { if (!wieg->in_code) { wieg->bits = 1; wieg->num = 0; wieg->in_code = 1; wieg->code_timeout = 0; gpioSetWatchdog(wieg->mygpio_0, wieg->mytimeout); gpioSetWatchdog(wieg->mygpio_1, wieg->mytimeout); } else { wieg->bits++; wieg->num <<= 1; } if (gpio == wieg->mygpio_0) { wieg->code_timeout &= 2; /* clear gpio 0 timeout */ } else { wieg->code_timeout &= 1; /* clear gpio 1 timeout */ wieg->num |= 1; } } else if (level == PI_TIMEOUT) { if (wieg->in_code) { if (gpio == wieg->mygpio_0) { wieg->code_timeout |= 1; /* timeout gpio 0 */ } else { wieg->code_timeout |= 2; /* timeout gpio 1 */ } if (wieg->code_timeout == 3) /* both gpios timed out */ { gpioSetWatchdog(wieg->mygpio_0, 0); gpioSetWatchdog(wieg->mygpio_1, 0); wieg->in_code = 0; (wieg->mycallback)(wieg->bits, wieg->num); } } } } Pi_Wieg_t * Pi_Wieg( int gpio_0, int gpio_1, Pi_Wieg_CB_t callback, int timeout) { /* Instantiate with the gpio for 0 (green wire), the gpio for 1 (white wire), the callback function, and the timeout in milliseconds which indicates the end of a code. The callback is passed the code length in bits and the value. */ Pi_Wieg_t *wieg; wieg = malloc(sizeof(Pi_Wieg_t)); wieg->mygpio_0 = gpio_0; wieg->mygpio_1 = gpio_1; wieg->mycallback = callback; wieg->mytimeout = timeout; wieg->in_code = 0; gpioSetMode(gpio_0, PI_INPUT); gpioSetMode(gpio_1, PI_INPUT); gpioSetPullUpDown(gpio_0, PI_PUD_UP); gpioSetPullUpDown(gpio_1, PI_PUD_UP); gpioSetAlertFuncEx(gpio_0, _cb, wieg); gpioSetAlertFuncEx(gpio_1, _cb, wieg); return wieg; } void Pi_Wieg_cancel(Pi_Wieg_t *wieg) { /* Cancel the Wiegand decoder. */ if (wieg) { gpioSetAlertFunc(wieg->mygpio_0, 0); gpioSetAlertFunc(wieg->mygpio_1, 0); free(wieg); } } pigpio-78/EXAMPLES/C/WIEGAND_CODE/wiegand.h000066400000000000000000000014131373465704200176520ustar00rootroot00000000000000#ifndef WIEGAND_H #define WIEGAND_H #include typedef void (*Pi_Wieg_CB_t)(int, uint32_t); struct _Pi_Wieg_s; typedef struct _Pi_Wieg_s Pi_Wieg_t; Pi_Wieg_t *Pi_Wieg(int gpio_0, int gpio_1, Pi_Wieg_CB_t callback, int timeout); /* This function establishes a Wiegand decoder on gpio_0 and gpio_1. A gap of timeout milliseconds without a new bit indicates the end of a code. When the code is ended the callback function is called with the code bit length and value. A pointer to a private data type is returned. This should be passed to Pi_Wieg_cancel if the decoder is to be cancelled. */ void Pi_Wieg_cancel(Pi_Wieg_t *wieg); /* This function releases the resources used by the decoder. */ #endif pigpio-78/EXAMPLES/CPP/000077500000000000000000000000001373465704200144545ustar00rootroot00000000000000pigpio-78/EXAMPLES/CPP/IR_RECEIVER/000077500000000000000000000000001373465704200162525ustar00rootroot00000000000000pigpio-78/EXAMPLES/CPP/IR_RECEIVER/README000066400000000000000000000002061373465704200171300ustar00rootroot00000000000000Class to hash a code from an IR receiver (reading an IR remote control). Follow the instructions in the test file to build and run. pigpio-78/EXAMPLES/CPP/IR_RECEIVER/ir_hasher.cpp000066400000000000000000000032661373465704200207310ustar00rootroot00000000000000#include #include "ir_hasher.hpp" void Hasher::_hash(int old_val, int new_val) { int val; if (new_val < (old_val * 0.60)) val = 13; else if (old_val < (new_val * 0.60)) val = 23; else val = 2; hash_val ^= val; hash_val *= 16777619; /* FNV_PRIME_32 */ } void Hasher::_callback(int gpio, int level, uint32_t tick) { if (level != PI_TIMEOUT) { if (in_code == 0) { in_code = 1; gpioSetWatchdog(mygpio, mytimeout); hash_val = 2166136261U; /* FNV_BASIS_32 */ edges = 1; t1 = 0; t2 = 0; t3 = 0; t4 = tick; } else { edges++; t1 = t2; t2 = t3; t3 = t4; t4 = tick; if (edges > 3) _hash(t2-t1, t4-t3); } } else { if (in_code) { in_code = 0; gpioSetWatchdog(mygpio, 0); if (edges > 12) /* Anything less is probably noise. */ { (mycallback)(hash_val); } } } } void Hasher::_callbackExt(int gpio, int level, uint32_t tick, void *user) { /* Need a static callback to link with C. */ Hasher *mySelf = (Hasher *) user; mySelf->_callback(gpio, level, tick); /* Call the instance callback. */ } Hasher::Hasher(int gpio, HasherCB_t callback, int timeout) { /* Initialises an IR remote hasher on a gpio. A gap of timeout milliseconds indicates the end of the remote key press. */ mygpio = gpio; mycallback = callback; mytimeout = timeout; in_code = 0; gpioSetMode(gpio, PI_INPUT); gpioSetAlertFuncEx(gpio, _callbackExt, (void *)this); } pigpio-78/EXAMPLES/CPP/IR_RECEIVER/ir_hasher.hpp000066400000000000000000000021131373465704200207240ustar00rootroot00000000000000#ifndef IR_RX_HASHER_HPP #define IR_RX_HASHER_HPP #include typedef void (*HasherCB_t)(uint32_t); class Hasher { /* This class forms a hash over the IR pulses generated by an IR remote. The remote key press is not converted into a code in the manner of the lirc module. No attempt is made to decode the type of protocol used by the remote. The hash is likely to be unique for different keys and different remotes but this is not guaranteed. This hashing process works for some remotes/protocols but not for others. The only way to find out if it works for one or more of your remotes is to try it and see. */ int mygpio, mytimeout; HasherCB_t mycallback; int in_code; uint32_t hash_val; int edges; uint32_t t1, t2, t3, t4; void _hash(int old_val, int new_val); void _callback(int gpio, int level, uint32_t tick); /* Need a static callback to link with C. */ static void _callbackExt(int gpio, int level, uint32_t tick, void *user); public: Hasher(int gpio, HasherCB_t callback, int timeout=5); }; #endif pigpio-78/EXAMPLES/CPP/IR_RECEIVER/test_ir_hasher.cpp000066400000000000000000000011751373465704200217650ustar00rootroot00000000000000#include #include #include "ir_hasher.hpp" /* REQUIRES An IR receiver output pin connected to a Pi gpio. TO BUILD g++ -o ir_hash_cpp test_ir_hasher.cpp ir_hasher.cpp -lpigpio -lrt -lpthread TO RUN sudo ./ir_hash_cpp */ void callback(uint32_t hash) { std::cout << "hash=" << hash << std::endl; } int main(int argc, char *argv[]) { if (gpioInitialise() >= 0) { /* Can't instantiate a Hasher before pigpio is initialised. */ /* This assumes the output pin of an IR receiver is connected to gpio 7. */ Hasher ir(7, callback); sleep(300); } } pigpio-78/EXAMPLES/CPP/ROTARY_ENCODER/000077500000000000000000000000001373465704200166335ustar00rootroot00000000000000pigpio-78/EXAMPLES/CPP/ROTARY_ENCODER/README000066400000000000000000000001521373465704200175110ustar00rootroot00000000000000Class to decode a mechanical rotary encoder. Follow the instructions in the test file to build and run. pigpio-78/EXAMPLES/CPP/ROTARY_ENCODER/rotary_encoder.cpp000066400000000000000000000034561373465704200223660ustar00rootroot00000000000000#include #include #include "rotary_encoder.hpp" /* +---------+ +---------+ 0 | | | | A | | | | | | | | +---------+ +---------+ +----- 1 +---------+ +---------+ 0 | | | | B | | | | | | | | ----+ +---------+ +---------+ 1 */ void re_decoder::_pulse(int gpio, int level, uint32_t tick) { if (gpio == mygpioA) levA = level; else levB = level; if (gpio != lastGpio) /* debounce */ { lastGpio = gpio; if ((gpio == mygpioA) && (level == 1)) { if (levB) (mycallback)(1); } else if ((gpio == mygpioB) && (level == 1)) { if (levA) (mycallback)(-1); } } } void re_decoder::_pulseEx(int gpio, int level, uint32_t tick, void *user) { /* Need a static callback to link with C. */ re_decoder *mySelf = (re_decoder *) user; mySelf->_pulse(gpio, level, tick); /* Call the instance callback. */ } re_decoder::re_decoder(int gpioA, int gpioB, re_decoderCB_t callback) { mygpioA = gpioA; mygpioB = gpioB; mycallback = callback; levA=0; levB=0; lastGpio = -1; gpioSetMode(gpioA, PI_INPUT); gpioSetMode(gpioB, PI_INPUT); /* pull up is needed as encoder common is grounded */ gpioSetPullUpDown(gpioA, PI_PUD_UP); gpioSetPullUpDown(gpioB, PI_PUD_UP); /* monitor encoder level changes */ gpioSetAlertFuncEx(gpioA, _pulseEx, this); gpioSetAlertFuncEx(gpioB, _pulseEx, this); } void re_decoder::re_cancel(void) { gpioSetAlertFuncEx(mygpioA, 0, this); gpioSetAlertFuncEx(mygpioB, 0, this); } pigpio-78/EXAMPLES/CPP/ROTARY_ENCODER/rotary_encoder.hpp000066400000000000000000000013231373465704200223620ustar00rootroot00000000000000#ifndef ROTARY_ENCODER_HPP #define ROTARY_ENCODER_HPP #include typedef void (*re_decoderCB_t)(int); class re_decoder { int mygpioA, mygpioB, levA, levB, lastGpio; re_decoderCB_t mycallback; void _pulse(int gpio, int level, uint32_t tick); /* Need a static callback to link with C. */ static void _pulseEx(int gpio, int level, uint32_t tick, void *user); public: re_decoder(int gpioA, int gpioB, re_decoderCB_t callback); /* This function establishes a rotary encoder on gpioA and gpioB. When the encoder is turned the callback function is called. */ void re_cancel(void); /* This function releases the resources used by the decoder. */ }; #endif pigpio-78/EXAMPLES/CPP/ROTARY_ENCODER/test_rotary_encoder.cpp000066400000000000000000000011301373465704200234100ustar00rootroot00000000000000#include #include #include "rotary_encoder.hpp" /* REQUIRES A rotary encoder contacts A and B connected to separate gpios and the common contact connected to Pi ground. TO BUILD g++ -o rot_enc_cpp test_rotary_encoder.cpp rotary_encoder.cpp -lpigpio -lrt TO RUN sudo ./rot_enc_cpp */ void callback(int way) { static int pos = 0; pos += way; std::cout << "pos=" << pos << std::endl; } int main(int argc, char *argv[]) { if (gpioInitialise() < 0) return 1; re_decoder dec(7, 8, callback); sleep(3000); dec.re_cancel(); gpioTerminate(); } pigpio-78/EXAMPLES/CPP/WIEGAND_CODE/000077500000000000000000000000001373465704200163245ustar00rootroot00000000000000pigpio-78/EXAMPLES/CPP/WIEGAND_CODE/README000066400000000000000000000001341373465704200172020ustar00rootroot00000000000000Class to decode a Wiegand code. Follow the instructions in the test file to build and run. pigpio-78/EXAMPLES/CPP/WIEGAND_CODE/test_wiegand.cpp000066400000000000000000000010101373465704200214750ustar00rootroot00000000000000#include #include #include "wiegand.hpp" /* REQUIRES Wiegand contacts 0 and 1 connected to separate gpios. TO BUILD g++ -o wiegand_cpp test_wiegand.cpp wiegand.cpp -lpigpio -lrt TO RUN sudo ./wiegand_cpp */ void callback(int bits, uint32_t value) { std::cout << "bits=" << bits << " value=" << value << std::endl; } int main(int argc, char *argv[]) { if (gpioInitialise() < 0) return 1; Wiegand dec(14, 15, callback); sleep(300); dec.cancel(); gpioTerminate(); } pigpio-78/EXAMPLES/CPP/WIEGAND_CODE/wiegand.cpp000066400000000000000000000044371373465704200204560ustar00rootroot00000000000000#include #include "wiegand.hpp" Wiegand::Wiegand(int gpio_0, int gpio_1, WiegandCB_t callback, int timeout) { /* Instantiate with the gpio for 0 (green wire), the gpio for 1 (white wire), the callback function, and the bit timeout in milliseconds which indicates the end of a code. The callback is passed the code length in bits and the value. */ mygpio_0 = gpio_0; mygpio_1 = gpio_1; mycallback = callback; mytimeout = timeout; in_code = 0; gpioSetMode(gpio_0, PI_INPUT); gpioSetMode(gpio_1, PI_INPUT); gpioSetPullUpDown(gpio_0, PI_PUD_UP); gpioSetPullUpDown(gpio_1, PI_PUD_UP); gpioSetAlertFuncEx(gpio_0, _cbEx, this); gpioSetAlertFuncEx(gpio_1, _cbEx, this); } void Wiegand::_cb(int gpio, int level, uint32_t tick) { /* Accumulate bits until both gpios 0 and 1 timeout. */ if (level == 0) /* a falling edge indicates a new bit */ { if (!in_code) { bits = 1; num = 0; in_code = 1; code_timeout = 0; gpioSetWatchdog(mygpio_0, mytimeout); gpioSetWatchdog(mygpio_1, mytimeout); } else { bits++; num <<= 1; } if (gpio == mygpio_0) { code_timeout &= 2; /* clear gpio 0 timeout */ } else { code_timeout &= 1; /* clear gpio 1 timeout */ num |= 1; } } else if (level == PI_TIMEOUT) { if (in_code) { if (gpio == mygpio_0) { code_timeout |= 1; /* timeout gpio 0 */ } else { code_timeout |= 2; /* timeout gpio 1 */ } if (code_timeout == 3) /* both gpios timed out */ { gpioSetWatchdog(mygpio_0, 0); gpioSetWatchdog(mygpio_1, 0); in_code = 0; (mycallback)(bits, num); } } } } void Wiegand::_cbEx(int gpio, int level, uint32_t tick, void *user) { /* Need a static callback to link with C. */ Wiegand *mySelf = (Wiegand *) user; mySelf->_cb(gpio, level, tick); /* Call the instance callback. */ } void Wiegand::cancel(void) { /* Cancel the Wiegand decoder. */ gpioSetAlertFuncEx(mygpio_0, 0, this); gpioSetAlertFuncEx(mygpio_1, 0, this); } pigpio-78/EXAMPLES/CPP/WIEGAND_CODE/wiegand.hpp000066400000000000000000000015751373465704200204630ustar00rootroot00000000000000#ifndef WIEGAND_HPP #define WIEGAND_HPP #include typedef void (*WiegandCB_t)(int, uint32_t); class Wiegand { int mygpio_0, mygpio_1, mytimeout, in_code, bits; WiegandCB_t mycallback; uint32_t num; uint32_t code_timeout; void _cb(int gpio, int level, uint32_t tick); /* Need a static callback to link with C. */ static void _cbEx(int gpio, int level, uint32_t tick, void *user); public: Wiegand(int gpio_0, int gpio_1, WiegandCB_t callback, int timeout=5); /* This function establishes a Wiegand decoder on gpio_0 and gpio_1. A gap of timeout milliseconds without a new bit indicates the end of a code. When the code is ended the callback function is called with the code bit length and value. */ void cancel(void); /* This function releases the resources used by the decoder. */ }; #endif pigpio-78/EXAMPLES/Python/000077500000000000000000000000001373465704200153135ustar00rootroot00000000000000pigpio-78/EXAMPLES/Python/DHT11_SENSOR/000077500000000000000000000000001373465704200171655ustar00rootroot00000000000000pigpio-78/EXAMPLES/Python/DHT11_SENSOR/README000066400000000000000000000001651373465704200200470ustar00rootroot00000000000000Class to read the relative humidity and temperature from a DHT11 sensor. It implements the iterator python protocol. pigpio-78/EXAMPLES/Python/DHT11_SENSOR/dht11.py000066400000000000000000000111021373465704200204530ustar00rootroot00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import time import pigpio class DHT11(object): """ The DHT11 class is a stripped version of the DHT22 sensor code by joan2937. You can find the initial implementation here: - https://github.com/srounet/pigpio/tree/master/EXAMPLES/Python/DHT22_AM2302_SENSOR example code: >>> pi = pigpio.pi() >>> sensor = DHT11(pi, 4) # 4 is the data GPIO pin connected to your sensor >>> for response in sensor: .... print("Temperature: {}".format(response['temperature'])) .... print("Humidity: {}".format(response['humidity'])) """ def __init__(self, pi, gpio): """ pi (pigpio): an instance of pigpio gpio (int): gpio pin number """ self.pi = pi self.gpio = gpio self.high_tick = 0 self.bit = 40 self.temperature = 0 self.humidity = 0 self.either_edge_cb = None self.setup() def setup(self): """ Clears the internal gpio pull-up/down resistor. Kills any watchdogs. """ self.pi.set_pull_up_down(self.gpio, pigpio.PUD_OFF) self.pi.set_watchdog(self.gpio, 0) self.register_callbacks() def register_callbacks(self): """ Monitors RISING_EDGE changes using callback. """ self.either_edge_cb = self.pi.callback( self.gpio, pigpio.EITHER_EDGE, self.either_edge_callback ) def either_edge_callback(self, gpio, level, tick): """ Either Edge callbacks, called each time the gpio edge changes. Accumulate the 40 data bits from the dht11 sensor. """ level_handlers = { pigpio.FALLING_EDGE: self._edge_FALL, pigpio.RISING_EDGE: self._edge_RISE, pigpio.EITHER_EDGE: self._edge_EITHER } handler = level_handlers[level] diff = pigpio.tickDiff(self.high_tick, tick) handler(tick, diff) def _edge_RISE(self, tick, diff): """ Handle Rise signal. """ val = 0 if diff >= 50: val = 1 if diff >= 200: # Bad bit? self.checksum = 256 # Force bad checksum if self.bit >= 40: # Message complete self.bit = 40 elif self.bit >= 32: # In checksum byte self.checksum = (self.checksum << 1) + val if self.bit == 39: # 40th bit received self.pi.set_watchdog(self.gpio, 0) total = self.humidity + self.temperature # is checksum ok ? if not (total & 255) == self.checksum: raise elif 16 <= self.bit < 24: # in temperature byte self.temperature = (self.temperature << 1) + val elif 0 <= self.bit < 8: # in humidity byte self.humidity = (self.humidity << 1) + val else: # skip header bits pass self.bit += 1 def _edge_FALL(self, tick, diff): """ Handle Fall signal. """ self.high_tick = tick if diff <= 250000: return self.bit = -2 self.checksum = 0 self.temperature = 0 self.humidity = 0 def _edge_EITHER(self, tick, diff): """ Handle Either signal. """ self.pi.set_watchdog(self.gpio, 0) def read(self): """ Start reading over DHT11 sensor. """ self.pi.write(self.gpio, pigpio.LOW) time.sleep(0.017) # 17 ms self.pi.set_mode(self.gpio, pigpio.INPUT) self.pi.set_watchdog(self.gpio, 200) time.sleep(0.2) def close(self): """ Stop reading sensor, remove callbacks. """ self.pi.set_watchdog(self.gpio, 0) if self.either_edge_cb: self.either_edge_cb.cancel() self.either_edge_cb = None def __iter__(self): """ Support the iterator protocol. """ return self def next(self): """ Call the read method and return temperature and humidity informations. """ self.read() response = { 'humidity': self.humidity, 'temperature': self.temperature } return response if __name__ == '__main__': pi = pigpio.pi() sensor = DHT11(pi, 4) for d in sensor: print("temperature: {}".format(d['temperature'])) print("humidity: {}".format(d['humidity'])) time.sleep(1) sensor.close() pigpio-78/EXAMPLES/Python/DHT22_AM2302_SENSOR/000077500000000000000000000000001373465704200200535ustar00rootroot00000000000000pigpio-78/EXAMPLES/Python/DHT22_AM2302_SENSOR/DHT22.py000077500000000000000000000163211373465704200212160ustar00rootroot00000000000000#!/usr/bin/env python # 2014-07-11 DHT22.py import time import atexit import pigpio class sensor: """ A class to read relative humidity and temperature from the DHT22 sensor. The sensor is also known as the AM2302. The sensor can be powered from the Pi 3V3 or the Pi 5V rail. Powering from the 3V3 rail is simpler and safer. You may need to power from 5V if the sensor is connected via a long cable. For 3V3 operation connect pin 1 to 3V3 and pin 4 to ground. Connect pin 2 to a gpio. For 5V operation connect pin 1 to 5V and pin 4 to ground. The following pin 2 connection works for me. Use at YOUR OWN RISK. 5V--5K_resistor--+--10K_resistor--Ground | DHT22 pin 2 -----+ | gpio ------------+ """ def __init__(self, pi, gpio, LED=None, power=None): """ Instantiate with the Pi and gpio to which the DHT22 output pin is connected. Optionally a LED may be specified. This will be blinked for each successful reading. Optionally a gpio used to power the sensor may be specified. This gpio will be set high to power the sensor. If the sensor locks it will be power cycled to restart the readings. Taking readings more often than about once every two seconds will eventually cause the DHT22 to hang. A 3 second interval seems OK. """ self.pi = pi self.gpio = gpio self.LED = LED self.power = power if power is not None: pi.write(power, 1) # Switch sensor on. time.sleep(2) self.powered = True self.cb = None atexit.register(self.cancel) self.bad_CS = 0 # Bad checksum count. self.bad_SM = 0 # Short message count. self.bad_MM = 0 # Missing message count. self.bad_SR = 0 # Sensor reset count. # Power cycle if timeout > MAX_TIMEOUTS. self.no_response = 0 self.MAX_NO_RESPONSE = 2 self.rhum = -999 self.temp = -999 self.tov = None self.high_tick = 0 self.bit = 40 pi.set_pull_up_down(gpio, pigpio.PUD_OFF) pi.set_watchdog(gpio, 0) # Kill any watchdogs. self.cb = pi.callback(gpio, pigpio.EITHER_EDGE, self._cb) def _cb(self, gpio, level, tick): """ Accumulate the 40 data bits. Format into 5 bytes, humidity high, humidity low, temperature high, temperature low, checksum. """ diff = pigpio.tickDiff(self.high_tick, tick) if level == 0: # Edge length determines if bit is 1 or 0. if diff >= 50: val = 1 if diff >= 200: # Bad bit? self.CS = 256 # Force bad checksum. else: val = 0 if self.bit >= 40: # Message complete. self.bit = 40 elif self.bit >= 32: # In checksum byte. self.CS = (self.CS << 1) + val if self.bit == 39: # 40th bit received. self.pi.set_watchdog(self.gpio, 0) self.no_response = 0 total = self.hH + self.hL + self.tH + self.tL if (total & 255) == self.CS: # Is checksum ok? self.rhum = ((self.hH << 8) + self.hL) * 0.1 if self.tH & 128: # Negative temperature. mult = -0.1 self.tH = self.tH & 127 else: mult = 0.1 self.temp = ((self.tH << 8) + self.tL) * mult self.tov = time.time() if self.LED is not None: self.pi.write(self.LED, 0) else: self.bad_CS += 1 elif self.bit >= 24: # in temp low byte self.tL = (self.tL << 1) + val elif self.bit >= 16: # in temp high byte self.tH = (self.tH << 1) + val elif self.bit >= 8: # in humidity low byte self.hL = (self.hL << 1) + val elif self.bit >= 0: # in humidity high byte self.hH = (self.hH << 1) + val else: # header bits pass self.bit += 1 elif level == 1: self.high_tick = tick if diff > 250000: self.bit = -2 self.hH = 0 self.hL = 0 self.tH = 0 self.tL = 0 self.CS = 0 else: # level == pigpio.TIMEOUT: self.pi.set_watchdog(self.gpio, 0) if self.bit < 8: # Too few data bits received. self.bad_MM += 1 # Bump missing message count. self.no_response += 1 if self.no_response > self.MAX_NO_RESPONSE: self.no_response = 0 self.bad_SR += 1 # Bump sensor reset count. if self.power is not None: self.powered = False self.pi.write(self.power, 0) time.sleep(2) self.pi.write(self.power, 1) time.sleep(2) self.powered = True elif self.bit < 39: # Short message receieved. self.bad_SM += 1 # Bump short message count. self.no_response = 0 else: # Full message received. self.no_response = 0 def temperature(self): """Return current temperature.""" return self.temp def humidity(self): """Return current relative humidity.""" return self.rhum def staleness(self): """Return time since measurement made.""" if self.tov is not None: return time.time() - self.tov else: return -999 def bad_checksum(self): """Return count of messages received with bad checksums.""" return self.bad_CS def short_message(self): """Return count of short messages.""" return self.bad_SM def missing_message(self): """Return count of missing messages.""" return self.bad_MM def sensor_resets(self): """Return count of power cycles because of sensor hangs.""" return self.bad_SR def trigger(self): """Trigger a new relative humidity and temperature reading.""" if self.powered: if self.LED is not None: self.pi.write(self.LED, 1) self.pi.write(self.gpio, pigpio.LOW) time.sleep(0.017) # 17 ms self.pi.set_mode(self.gpio, pigpio.INPUT) self.pi.set_watchdog(self.gpio, 200) def cancel(self): """Cancel the DHT22 sensor.""" self.pi.set_watchdog(self.gpio, 0) if self.cb is not None: self.cb.cancel() self.cb = None if __name__ == "__main__": import time import pigpio import DHT22 # Intervals of about 2 seconds or less will eventually hang the DHT22. INTERVAL = 3 pi = pigpio.pi() s = DHT22.sensor(pi, 22, LED=16, power=8) r = 0 next_reading = time.time() while True: r += 1 s.trigger() time.sleep(0.2) print("{} {} {} {:3.2f} {} {} {} {}".format( r, s.humidity(), s.temperature(), s.staleness(), s.bad_checksum(), s.short_message(), s.missing_message(), s.sensor_resets())) next_reading += INTERVAL time.sleep(next_reading-time.time()) # Overall INTERVAL second polling. s.cancel() pi.stop() pigpio-78/EXAMPLES/Python/DHT22_AM2302_SENSOR/README000066400000000000000000000001211373465704200207250ustar00rootroot00000000000000Class to read the relative humidity and temperature from a DHT22/AM2302 sensor. pigpio-78/EXAMPLES/Python/GPIO_STATUS/000077500000000000000000000000001373465704200171545ustar00rootroot00000000000000pigpio-78/EXAMPLES/Python/GPIO_STATUS/README000066400000000000000000000000551373465704200200340ustar00rootroot00000000000000Script to display the status of gpios 0-31. pigpio-78/EXAMPLES/Python/GPIO_STATUS/gpio_status.py000077500000000000000000000020271373465704200220730ustar00rootroot00000000000000#!/usr/bin/env python import time import curses import atexit import sys import pigpio GPIOS=32 MODES=["INPUT", "OUTPUT", "ALT5", "ALT4", "ALT0", "ALT1", "ALT2", "ALT3"] def cleanup(): curses.nocbreak() curses.echo() curses.endwin() pi.stop() pi = pigpio.pi() if not pi.connected: sys.exit(1) stdscr = curses.initscr() curses.noecho() curses.cbreak() atexit.register(cleanup) cb = [] for g in range(GPIOS): cb.append(pi.callback(g, pigpio.EITHER_EDGE)) # disable gpio 28 as the PCM clock is swamping the system cb[28].cancel() stdscr.nodelay(1) stdscr.addstr(0, 23, "Status of gpios 0-31", curses.A_REVERSE) while True: for g in range(GPIOS): tally = cb[g].tally() mode = pi.get_mode(g) col = (g // 11) * 25 row = (g % 11) + 2 stdscr.addstr(row, col, "{:2}".format(g), curses.A_BOLD) stdscr.addstr( "={} {:>6}: {:<10}".format(pi.read(g), MODES[mode], tally)) stdscr.refresh() time.sleep(0.1) c = stdscr.getch() if c != curses.ERR: break pigpio-78/EXAMPLES/Python/HALL_EFFECT_SENSOR/000077500000000000000000000000001373465704200201405ustar00rootroot00000000000000pigpio-78/EXAMPLES/Python/HALL_EFFECT_SENSOR/README000066400000000000000000000000721373465704200210170ustar00rootroot00000000000000Program to show status changes for a Hall effect sensor. pigpio-78/EXAMPLES/Python/HALL_EFFECT_SENSOR/hall.py000077500000000000000000000010521373465704200214330ustar00rootroot00000000000000#!/usr/bin/env python import time import pigpio # # OH3144E or equivalent Hall effect sensor # # Pin 1 - 5V # Pin 2 - Ground # Pin 3 - gpio (here P1-8, gpio 14, TXD is used) # # The internal gpio pull-up is enabled so that the sensor # normally reads high. It reads low when a magnet is close. # HALL=14 pi = pigpio.pi() # connect to local Pi pi.set_mode(HALL, pigpio.INPUT) pi.set_pull_up_down(HALL, pigpio.PUD_UP) start = time.time() while (time.time() - start) < 60: print("Hall = {}".format(pi.read(HALL))) time.sleep(0.2) pi.stop() pigpio-78/EXAMPLES/Python/I2C_SNIFFER/000077500000000000000000000000001373465704200170445ustar00rootroot00000000000000pigpio-78/EXAMPLES/Python/I2C_SNIFFER/I2C_sniffer.py000077500000000000000000000074531373465704200215230ustar00rootroot00000000000000#!/usr/bin/env python import time import pigpio class sniffer: """ A class to passively monitor activity on an I2C bus. This should work for an I2C bus running at 100kbps or less. You are unlikely to get any usable results for a bus running any faster. """ def __init__(self, pi, SCL, SDA, set_as_inputs=True): """ Instantiate with the Pi and the gpios for the I2C clock and data lines. If you are monitoring one of the Raspberry Pi buses you must set set_as_inputs to False so that they remain in I2C mode. The pigpio daemon should have been started with a higher than default sample rate. For an I2C bus rate of 100Kbps sudo pigpiod -s 2 should work. A message is printed for each I2C transaction formatted with "[" for the START "XX" two hex characters for each data byte "+" if the data is ACKd, "-" if the data is NACKd "]" for the STOP E.g. Reading the X, Y, Z values from an ADXL345 gives: [A6+32+] [A7+01+FF+F2+FF+06+00-] """ self.pi = pi self.gSCL = SCL self.gSDA = SDA self.FALLING = 0 self.RISING = 1 self.STEADY = 2 self.in_data = False self.byte = 0 self.bit = 0 self.oldSCL = 1 self.oldSDA = 1 self.transact = "" if set_as_inputs: self.pi.set_mode(SCL, pigpio.INPUT) self.pi.set_mode(SDA, pigpio.INPUT) self.cbA = self.pi.callback(SCL, pigpio.EITHER_EDGE, self._cb) self.cbB = self.pi.callback(SDA, pigpio.EITHER_EDGE, self._cb) def _parse(self, SCL, SDA): """ Accumulate all the data between START and STOP conditions into a string and output when STOP is detected. """ if SCL != self.oldSCL: self.oldSCL = SCL if SCL: xSCL = self.RISING else: xSCL = self.FALLING else: xSCL = self.STEADY if SDA != self.oldSDA: self.oldSDA = SDA if SDA: xSDA = self.RISING else: xSDA = self.FALLING else: xSDA = self.STEADY if xSCL == self.RISING: if self.in_data: if self.bit < 8: self.byte = (self.byte << 1) | SDA self.bit += 1 else: self.transact += '{:02X}'.format(self.byte) if SDA: self.transact += '-' else: self.transact += '+' self.bit = 0 self.byte = 0 elif xSCL == self.STEADY: if xSDA == self.RISING: if SCL: self.in_data = False self.byte = 0 self.bit = 0 self.transact += ']' # STOP print (self.transact) self.transact = "" if xSDA == self.FALLING: if SCL: self.in_data = True self.byte = 0 self.bit = 0 self.transact += '[' # START def _cb(self, gpio, level, tick): """ Check which line has altered state (ignoring watchdogs) and call the parser with the new state. """ SCL = self.oldSCL SDA = self.oldSDA if gpio == self.gSCL: if level == 0: SCL = 0 elif level == 1: SCL = 1 if gpio == self.gSDA: if level == 0: SDA = 0 elif level == 1: SDA = 1 self._parse(SCL, SDA) def cancel(self): """Cancel the I2C callbacks.""" self.cbA.cancel() self.cbB.cancel() if __name__ == "__main__": import time import pigpio import I2C_sniffer pi = pigpio.pi() s = I2C_sniffer.sniffer(pi, 1, 0, False) # leave gpios 1/0 in I2C mode time.sleep(60000) s.cancel() pi.stop() pigpio-78/EXAMPLES/Python/I2C_SNIFFER/README000066400000000000000000000001351373465704200177230ustar00rootroot00000000000000A program to passively sniff I2C transactions (100kHz bus maximum) and display the results. pigpio-78/EXAMPLES/Python/IR_RECEIVER/000077500000000000000000000000001373465704200171115ustar00rootroot00000000000000pigpio-78/EXAMPLES/Python/IR_RECEIVER/README000066400000000000000000000001121373465704200177630ustar00rootroot00000000000000Class to hash a code from an IR receiver (reading an IR remote control). pigpio-78/EXAMPLES/Python/IR_RECEIVER/ir_hasher.py000077500000000000000000000106621373465704200214370ustar00rootroot00000000000000#!/usr/bin/env python import pigpio class hasher: """ This class forms a hash over the IR pulses generated by an IR remote. The remote key press is not converted into a code in the manner of the lirc module. No attempt is made to decode the type of protocol used by the remote. The hash is likely to be unique for different keys and different remotes but this is not guaranteed. This hashing process works for some remotes/protocols but not for others. The only way to find out if it works for one or more of your remotes is to try it and see. EXAMPLE CODE #!/usr/bin/env python import time import pigpio import ir_hasher def callback(hash): print("hash={}".format(hash)); pi = pigpio.pi() ir = ir_hasher.hasher(pi, 7, callback, 5) print("ctrl c to exit"); time.sleep(300) pi.stop() """ def __init__(self, pi, gpio, callback, timeout=5): """ Initialises an IR remote hasher on a pi's gpio. A gap of timeout milliseconds indicates the end of the remote key press. """ self.pi = pi self.gpio = gpio self.code_timeout = timeout self.callback = callback self.in_code = False pi.set_mode(gpio, pigpio.INPUT) self.cb = pi.callback(gpio, pigpio.EITHER_EDGE, self._cb) def _hash(self, old_val, new_val): if new_val < (old_val * 0.60): val = 13 elif old_val < (new_val * 0.60): val = 23 else: val = 2 self.hash_val = self.hash_val ^ val self.hash_val *= 16777619 # FNV_PRIME_32 self.hash_val = self.hash_val & ((1<<32)-1) def _cb(self, gpio, level, tick): if level != pigpio.TIMEOUT: if self.in_code == False: self.in_code = True self.pi.set_watchdog(self.gpio, self.code_timeout) self.hash_val = 2166136261 # FNV_BASIS_32 self.edges = 1 self.t1 = None self.t2 = None self.t3 = None self.t4 = tick else: self.edges += 1 self.t1 = self.t2 self.t2 = self.t3 self.t3 = self.t4 self.t4 = tick if self.t1 is not None: d1 = pigpio.tickDiff(self.t1,self.t2) d2 = pigpio.tickDiff(self.t3,self.t4) self._hash(d1, d2) else: if self.in_code: self.in_code = False self.pi.set_watchdog(self.gpio, 0) if self.edges > 12: self.callback(self.hash_val) if __name__ == "__main__": import time import pigpio import ir_hasher hashes = { 142650387: '2', 244341844: 'menu', 262513468: 'vol-', 272048826: '5', 345069212: '6', 363685443: 'prev.ch', 434191356: '1', 492745084: 'OK', 549497027: 'mute', 603729091: 'text', 646476378: 'chan-', 832916949: 'home', 923778138: 'power', 938165610: 'power', 953243510: 'forward', 1009731980:'1', 1018231875:'TV', 1142888517:'c-up', 1151589683:'chan+', 1344018636:'OK', 1348032067:'chan+', 1367109971:'prev.ch', 1370712102:'c-left', 1438405361:'rewind', 1452589043:'pause', 1518578730:'chan-', 1554432645:'8', 1583569525:'0', 1629745313:'rewind', 1666513749:'record', 1677653754:'c-down', 1825951717:'c-right', 1852412236:'6', 1894279468:'9', 1904895749:'vol+', 1941947509:'ff', 2076573637:'0', 2104823531:'back', 2141641957:'home', 2160787557:'record', 2398525299:'7', 2468117013:'8', 2476712746:'play', 2574308838:'forward', 2577952149:'4', 2706654902:'stop', 2829002741:'c-up', 2956097083:'back', 3112717386:'5', 3263244773:'ff', 3286088195:'pause', 3363767978:'c-down', 3468076364:'vol-', 3491068358:'stop', 3593710134:'c-left', 3708232515:'3', 3734134565:'back', 3766109107:'TV', 3798010010:'play', 3869937700:'menu', 3872715523:'7', 3885097091:'2', 3895301587:'text', 3931058739:'mute', 3983900853:'c-right', 4032250885:'4', 4041913909:'vol+', 4207017660:'9', 4227138677:'back', 4294027955:'3'} def callback(hash): if hash in hashes: print("key={} hash={}".format(hashes[hash], hash)); pi = pigpio.pi() ir = ir_hasher.hasher(pi, 7, callback, 5) print("ctrl c to exit"); time.sleep(300) pi.stop() pigpio-78/EXAMPLES/Python/MORSE_CODE/000077500000000000000000000000001373465704200167725ustar00rootroot00000000000000pigpio-78/EXAMPLES/Python/MORSE_CODE/README000066400000000000000000000001031373465704200176440ustar00rootroot00000000000000Script to transmit the morse code corresponding to a text string. pigpio-78/EXAMPLES/Python/MORSE_CODE/morse_code.py000077500000000000000000000030011373465704200214600ustar00rootroot00000000000000#!/usr/bin/env python import pigpio morse={ 'a':'.-' , 'b':'-...' , 'c':'-.-.' , 'd':'-..' , 'e':'.' , 'f':'..-.' , 'g':'--.' , 'h':'....' , 'i':'..' , 'j':'.---' , 'k':'-.-' , 'l':'.-..' , 'm':'--' , 'n':'-.' , 'o':'---' , 'p':'.--.' , 'q':'--.-' , 'r':'.-.' , 's':'...' , 't':'-' , 'u':'..-' , 'v':'...-' , 'w':'.--' , 'x':'-..-' , 'y':'-.--' , 'z':'--..' , '1':'.----', '2':'..---', '3':'...--', '4':'....-', '5':'.....', '6':'-....', '7':'--...', '8':'---..', '9':'----.', '0':'-----'} GPIO=22 MICROS=100000 NONE=0 DASH=3 DOT=1 GAP=1 LETTER_GAP=3-GAP WORD_GAP=7-LETTER_GAP def transmit_string(pi, gpio, str): pi.wave_clear() # start a new waveform wf=[] for C in str: c=C.lower() print(c) if c in morse: k = morse[c] for x in k: if x == '.': wf.append(pigpio.pulse(1<AIN2") stdscr.addstr(16, 0, "Resistor") stdscr.nodelay(1) try: while True: for a in range(0,4): aout = aout + 1 pi.i2c_write_byte_data(handle, 0x40 | ((a+1) & 0x03), aout&0xFF) v = pi.i2c_read_byte(handle) hashes = v / 4 spaces = 64 - hashes stdscr.addstr(10+a*2, 12, str(v) + ' ') stdscr.addstr(10+a*2, 16, '#' * hashes + ' ' * spaces ) stdscr.refresh() time.sleep(0.04) c = stdscr.getch() if c != curses.ERR: break except: pass curses.nocbreak() curses.echo() curses.endwin() pi.i2c_close(handle) pi.stop() pigpio-78/EXAMPLES/Python/PCF8591_YL-40/README000066400000000000000000000000641373465704200177570ustar00rootroot00000000000000Script to display readings from the (I2C) PCF8591. pigpio-78/EXAMPLES/Python/PIGPIO_BENCHMARK/000077500000000000000000000000001373465704200176545ustar00rootroot00000000000000pigpio-78/EXAMPLES/Python/PIGPIO_BENCHMARK/README000066400000000000000000000000751373465704200205360ustar00rootroot00000000000000Script to benchmark the pigpio Python module's performance. pigpio-78/EXAMPLES/Python/PIGPIO_BENCHMARK/bench_1.py000077500000000000000000000045501373465704200215340ustar00rootroot00000000000000#!/usr/bin/env python # # WARNING! # ############################################################################## # # # Unless you know what you are doing don't run this script with anything # # connected to the gpios. You will CAUSE damage. # # # ############################################################################## # # WARNING! # import time import pigpio delay = 30 class gpioTest: def __init__(self, pi, gpio, edge, freq, duty): self.pi = pi self.gpio = gpio self.edge = edge self.freq = freq self.duty = duty self.calls = 0 def cb(self, g, t, l): self.calls = self.calls + 1 # print g,t,l def num(self): return self.calls def start(self): self.pi.set_PWM_frequency(self.gpio, self.freq) self.pi.set_PWM_range(self.gpio, 25) self.pi.set_PWM_dutycycle(self.gpio, self.duty) self.n = self.pi.callback(self.gpio, self.edge, self.cb) def stop(self): self.pi.set_PWM_dutycycle(self.gpio, 0) self.n.cancel() pi = pigpio.pi() t1 = gpioTest(pi, 4, pigpio.EITHER_EDGE, 4000, 1) t2 = gpioTest(pi, 7, pigpio.RISING_EDGE, 8000, 2) t3 = gpioTest(pi, 8, pigpio.FALLING_EDGE, 8000, 3) t4 = gpioTest(pi, 9, pigpio.EITHER_EDGE, 4000, 4) t5 = gpioTest(pi,10, pigpio.RISING_EDGE, 8000, 5) t6 = gpioTest(pi,11, pigpio.FALLING_EDGE, 8000, 6) t7 = gpioTest(pi,14, pigpio.EITHER_EDGE, 4000, 7) t8 = gpioTest(pi,15, pigpio.RISING_EDGE, 8000, 8) t9 = gpioTest(pi,17, pigpio.FALLING_EDGE, 8000, 9) t10 = gpioTest(pi,18, pigpio.EITHER_EDGE, 4000, 10) t11 = gpioTest(pi,22, pigpio.RISING_EDGE, 8000, 11) t12 = gpioTest(pi,23, pigpio.FALLING_EDGE, 8000, 12) t13 = gpioTest(pi,24, pigpio.EITHER_EDGE, 4000, 13) t14 = gpioTest(pi,25, pigpio.RISING_EDGE, 8000, 14) # R1: 0 1 4 7 8 9 10 11 14 15 17 18 21 22 23 24 25 # R2: 2 3 4 7 8 9 10 11 14 15 17 18 22 23 24 25 27 28 29 30 31 tests = [t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14] for i in tests: i.start() time.sleep(delay) for i in tests: i.stop() pi.stop() tot = 0 msg = "" for i in tests: tot += i.num() msg += str(i.num()) + " " print(msg) print("eps={} ({}/{})".format(tot/delay, tot, delay)) pigpio-78/EXAMPLES/Python/ROTARY_ENCODER/000077500000000000000000000000001373465704200174725ustar00rootroot00000000000000pigpio-78/EXAMPLES/Python/ROTARY_ENCODER/README000066400000000000000000000000561373465704200203530ustar00rootroot00000000000000Class to decode a mechanical rotary encoder. pigpio-78/EXAMPLES/Python/ROTARY_ENCODER/rotary_encoder.py000077500000000000000000000054411373465704200230720ustar00rootroot00000000000000#!/usr/bin/env python import pigpio class decoder: """Class to decode mechanical rotary encoder pulses.""" def __init__(self, pi, gpioA, gpioB, callback): """ Instantiate the class with the pi and gpios connected to rotary encoder contacts A and B. The common contact should be connected to ground. The callback is called when the rotary encoder is turned. It takes one parameter which is +1 for clockwise and -1 for counterclockwise. EXAMPLE import time import pigpio import rotary_encoder pos = 0 def callback(way): global pos pos += way print("pos={}".format(pos)) pi = pigpio.pi() decoder = rotary_encoder.decoder(pi, 7, 8, callback) time.sleep(300) decoder.cancel() pi.stop() """ self.pi = pi self.gpioA = gpioA self.gpioB = gpioB self.callback = callback self.levA = 0 self.levB = 0 self.lastGpio = None self.pi.set_mode(gpioA, pigpio.INPUT) self.pi.set_mode(gpioB, pigpio.INPUT) self.pi.set_pull_up_down(gpioA, pigpio.PUD_UP) self.pi.set_pull_up_down(gpioB, pigpio.PUD_UP) self.cbA = self.pi.callback(gpioA, pigpio.EITHER_EDGE, self._pulse) self.cbB = self.pi.callback(gpioB, pigpio.EITHER_EDGE, self._pulse) def _pulse(self, gpio, level, tick): """ Decode the rotary encoder pulse. +---------+ +---------+ 0 | | | | A | | | | | | | | +---------+ +---------+ +----- 1 +---------+ +---------+ 0 | | | | B | | | | | | | | ----+ +---------+ +---------+ 1 """ if gpio == self.gpioA: self.levA = level else: self.levB = level; if gpio != self.lastGpio: # debounce self.lastGpio = gpio if gpio == self.gpioA and level == 1: if self.levB == 1: self.callback(1) elif gpio == self.gpioB and level == 1: if self.levA == 1: self.callback(-1) def cancel(self): """ Cancel the rotary encoder decoder. """ self.cbA.cancel() self.cbB.cancel() if __name__ == "__main__": import time import pigpio import rotary_encoder pos = 0 def callback(way): global pos pos += way print("pos={}".format(pos)) pi = pigpio.pi() decoder = rotary_encoder.decoder(pi, 7, 8, callback) time.sleep(300) decoder.cancel() pi.stop() pigpio-78/EXAMPLES/Python/SONAR_RANGER/000077500000000000000000000000001373465704200172335ustar00rootroot00000000000000pigpio-78/EXAMPLES/Python/SONAR_RANGER/README000066400000000000000000000001021373465704200201040ustar00rootroot00000000000000Class to read sonar rangers with separate trigger and echo pins. pigpio-78/EXAMPLES/Python/SONAR_RANGER/sonar_trigger_echo.py000077500000000000000000000054531373465704200234620ustar00rootroot00000000000000#!/usr/bin/env python import time import pigpio class ranger: """ This class encapsulates a type of acoustic ranger. In particular the type of ranger with separate trigger and echo pins. A pulse on the trigger initiates the sonar ping and shortly afterwards a sonar pulse is transmitted and the echo pin goes high. The echo pins stays high until a sonar echo is received (or the response times-out). The time between the high and low edges indicates the sonar round trip time. """ def __init__(self, pi, trigger, echo): """ The class is instantiated with the Pi to use and the gpios connected to the trigger and echo pins. """ self.pi = pi self._trig = trigger self._echo = echo self._ping = False self._high = None self._time = None self._triggered = False self._trig_mode = pi.get_mode(self._trig) self._echo_mode = pi.get_mode(self._echo) pi.set_mode(self._trig, pigpio.OUTPUT) pi.set_mode(self._echo, pigpio.INPUT) self._cb = pi.callback(self._trig, pigpio.EITHER_EDGE, self._cbf) self._cb = pi.callback(self._echo, pigpio.EITHER_EDGE, self._cbf) self._inited = True def _cbf(self, gpio, level, tick): if gpio == self._trig: if level == 0: # trigger sent self._triggered = True self._high = None else: if self._triggered: if level == 1: self._high = tick else: if self._high is not None: self._time = tick - self._high self._high = None self._ping = True def read(self): """ Triggers a reading. The returned reading is the number of microseconds for the sonar round-trip. round trip cms = round trip time / 1000000.0 * 34030 """ if self._inited: self._ping = False self.pi.gpio_trigger(self._trig) start = time.time() while not self._ping: if (time.time()-start) > 5.0: return 20000 time.sleep(0.001) return self._time else: return None def cancel(self): """ Cancels the ranger and returns the gpios to their original mode. """ if self._inited: self._inited = False self._cb.cancel() self.pi.set_mode(self._trig, self._trig_mode) self.pi.set_mode(self._echo, self._echo_mode) if __name__ == "__main__": import time import pigpio import sonar_trigger_echo pi = pigpio.pi() sonar = sonar_trigger_echo.ranger(pi, 23, 18) end = time.time() + 600.0 r = 1 while time.time() < end: print("{} {}".format(r, sonar.read())) r += 1 time.sleep(0.03) sonar.cancel() pi.stop() pigpio-78/EXAMPLES/Python/VIRTUAL_WIRE/000077500000000000000000000000001373465704200172675ustar00rootroot00000000000000pigpio-78/EXAMPLES/Python/VIRTUAL_WIRE/README000066400000000000000000000001411373465704200201430ustar00rootroot00000000000000Class to send and receive radio messages compatible with the Virtual Wire library for Arduinos. pigpio-78/EXAMPLES/Python/VIRTUAL_WIRE/vw.py000077500000000000000000000203051373465704200203000ustar00rootroot00000000000000#!/usr/bin/env python """ This module provides a 313MHz/434MHz radio interface compatible with the Virtual Wire library used on Arduinos. It has been tested between a Pi, TI Launchpad, and Arduino Pro Mini. """ # 2014-08-14 # vw.py import time import pigpio MAX_MESSAGE_BYTES=77 MIN_BPS=50 MAX_BPS=10000 _HEADER=[0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x38, 0x2c] _CTL=3 _SYMBOL=[ 0x0d, 0x0e, 0x13, 0x15, 0x16, 0x19, 0x1a, 0x1c, 0x23, 0x25, 0x26, 0x29, 0x2a, 0x2c, 0x32, 0x34] def _sym2nibble(symbol): for nibble in range(16): if symbol == _SYMBOL[nibble]: return nibble return 0 def _crc_ccitt_update(crc, data): data = data ^ (crc & 0xFF); data = (data ^ (data << 4)) & 0xFF; return ( (((data << 8) & 0xFFFF) | (crc >> 8)) ^ ((data >> 4) & 0x00FF) ^ ((data << 3) & 0xFFFF) ) class tx(): def __init__(self, pi, txgpio, bps=2000): """ Instantiate a transmitter with the Pi, the transmit gpio, and the bits per second (bps). The bps defaults to 2000. The bps is constrained to be within MIN_BPS to MAX_BPS. """ self.pi = pi self.txbit = (1< MAX_BPS: bps = MAX_BPS self.mics = int(1000000 / bps) self.wave_id = None pi.wave_add_new() pi.set_mode(txgpio, pigpio.OUTPUT) def _nibble(self, nibble): for i in range(6): if nibble & (1<>4]) self._nibble(_SYMBOL[byte&0x0F]) return _crc_ccitt_update(crc, byte) def put(self, data): """ Transmit a message. If the message is more than MAX_MESSAGE_BYTES in size it is discarded. If a message is currently being transmitted it is aborted and replaced with the new message. True is returned if message transmission has successfully started. False indicates an error. """ if len(data) > MAX_MESSAGE_BYTES: return False self.wf = [] self.cancel() for i in _HEADER: self._nibble(i) crc = self._byte(0xFFFF, len(data)+_CTL) for i in data: if type(i) == type(""): v = ord(i) else: v = i crc = self._byte(crc, v) crc = ~crc self._byte(0, crc&0xFF) self._byte(0, crc>>8) self.pi.wave_add_generic(self.wf) self.wave_id = self.pi.wave_create() if self.wave_id >= 0: self.pi.wave_send_once(self.wave_id) return True else: return False def ready(self): """ Returns True if a new message may be transmitted. """ return not self.pi.wave_tx_busy() def cancel(self): """ Cancels the wireless transmitter, aborting any message in progress. """ if self.wave_id is not None: self.pi.wave_tx_stop() self.pi.wave_delete(self.wave_id) self.pi.wave_add_new() self.wave_id = None class rx(): def __init__(self, pi, rxgpio, bps=2000): """ Instantiate a receiver with the Pi, the receive gpio, and the bits per second (bps). The bps defaults to 2000. The bps is constrained to be within MIN_BPS to MAX_BPS. """ self.pi = pi self.rxgpio = rxgpio self.messages = [] self.bad_CRC = 0 if bps < MIN_BPS: bps = MIN_BPS elif bps > MAX_BPS: bps = MAX_BPS slack = 0.20 self.mics = int(1000000 / bps) slack_mics = int(slack * self.mics) self.min_mics = self.mics - slack_mics # Shortest legal edge. self.max_mics = (self.mics + slack_mics) * 4 # Longest legal edge. self.timeout = 8 * self.mics / 1000 # 8 bits time in ms. if self.timeout < 8: self.timeout = 8 self.last_tick = None self.good = 0 self.bits = 0 self.token = 0 self.in_message = False self.message = [0]*(MAX_MESSAGE_BYTES+_CTL) self.message_len = 0 self.byte = 0 pi.set_mode(rxgpio, pigpio.INPUT) self.cb = pi.callback(rxgpio, pigpio.EITHER_EDGE, self._cb) def _calc_crc(self): crc = 0xFFFF for i in range(self.message_length): crc = _crc_ccitt_update(crc, self.message[i]) return crc def _insert(self, bits, level): for i in range(bits): self.token >>= 1 if level == 0: self.token |= 0x800 if self.in_message: self.bits += 1 if self.bits >= 12: # Complete token. byte = ( _sym2nibble(self.token & 0x3f) << 4 | _sym2nibble(self.token >> 6)) if self.byte == 0: self.message_length = byte if byte > (MAX_MESSAGE_BYTES+_CTL): self.in_message = False # Abort message. return self.message[self.byte] = byte self.byte += 1 self.bits = 0 if self.byte >= self.message_length: self.in_message = False self.pi.set_watchdog(self.rxgpio, 0) crc = self._calc_crc() if crc == 0xF0B8: # Valid CRC. self.messages.append( self.message[1:self.message_length-2]) else: self.bad_CRC += 1 else: if self.token == 0xB38: # Start message token. self.in_message = True self.pi.set_watchdog(self.rxgpio, self.timeout) self.bits = 0 self.byte = 0 def _cb(self, gpio, level, tick): if self.last_tick is not None: if level == pigpio.TIMEOUT: self.pi.set_watchdog(self.rxgpio, 0) # Switch watchdog off. if self.in_message: self._insert(4, not self.last_level) self.good = 0 self.in_message = False else: edge = pigpio.tickDiff(self.last_tick, tick) if edge < self.min_mics: self.good = 0 self.in_message = False elif edge > self.max_mics: if self.in_message: self._insert(4, level) self.good = 0 self.in_message = False else: self.good += 1 if self.good > 8: bitlen = (100 * edge) / self.mics if bitlen < 140: bits = 1 elif bitlen < 240: bits = 2 elif bitlen < 340: bits = 3 else: bits = 4 self._insert(bits, level) self.last_tick = tick self.last_level = level def get(self): """ Returns the next unread message, or None if none is avaiable. """ if len(self.messages): return self.messages.pop(0) else: return None def ready(self): """ Returns True if there is a message available to be read. """ return len(self.messages) def cancel(self): """ Cancels the wireless receiver. """ if self.cb is not None: self.cb.cancel() self.pi.set_watchdog(self.rxgpio, 0) self.cb = None if __name__ == "__main__": import time import pigpio import vw RX=11 TX=25 BPS=2000 pi = pigpio.pi() # Connect to local Pi. rx = vw.rx(pi, RX, BPS) # Specify Pi, rx gpio, and baud. tx = vw.tx(pi, TX, BPS) # Specify Pi, tx gpio, and baud. msg = 0 start = time.time() while (time.time()-start) < 300: msg += 1 while not tx.ready(): time.sleep(0.1) time.sleep(0.2) tx.put([48, 49, 65, ((msg>>6)&0x3F)+32, (msg&0x3F)+32]) while not tx.ready(): time.sleep(0.1) time.sleep(0.2) tx.put("Hello World #{}!".format(msg)) while rx.ready(): print("".join(chr (c) for c in rx.get())) rx.cancel() tx.cancel() pi.stop() pigpio-78/EXAMPLES/Python/WIEGAND_CODE/000077500000000000000000000000001373465704200171635ustar00rootroot00000000000000pigpio-78/EXAMPLES/Python/WIEGAND_CODE/README000066400000000000000000000000411373465704200200360ustar00rootroot00000000000000Class to decode a Wiegand code. pigpio-78/EXAMPLES/Python/WIEGAND_CODE/wiegand.py000077500000000000000000000056451373465704200211700ustar00rootroot00000000000000#!/usr/bin/env python import pigpio class decoder: """ A class to read Wiegand codes of an arbitrary length. The code length and value are returned. EXAMPLE #!/usr/bin/env python import time import pigpio import wiegand def callback(bits, code): print("bits={} code={}".format(bits, code)) pi = pigpio.pi() w = wiegand.decoder(pi, 14, 15, callback) time.sleep(300) w.cancel() pi.stop() """ def __init__(self, pi, gpio_0, gpio_1, callback, bit_timeout=5): """ Instantiate with the pi, gpio for 0 (green wire), the gpio for 1 (white wire), the callback function, and the bit timeout in milliseconds which indicates the end of a code. The callback is passed the code length in bits and the value. """ self.pi = pi self.gpio_0 = gpio_0 self.gpio_1 = gpio_1 self.callback = callback self.bit_timeout = bit_timeout self.in_code = False self.pi.set_mode(gpio_0, pigpio.INPUT) self.pi.set_mode(gpio_1, pigpio.INPUT) self.pi.set_pull_up_down(gpio_0, pigpio.PUD_UP) self.pi.set_pull_up_down(gpio_1, pigpio.PUD_UP) self.cb_0 = self.pi.callback(gpio_0, pigpio.FALLING_EDGE, self._cb) self.cb_1 = self.pi.callback(gpio_1, pigpio.FALLING_EDGE, self._cb) def _cb(self, gpio, level, tick): """ Accumulate bits until both gpios 0 and 1 timeout. """ if level < pigpio.TIMEOUT: if self.in_code == False: self.bits = 1 self.num = 0 self.in_code = True self.code_timeout = 0 self.pi.set_watchdog(self.gpio_0, self.bit_timeout) self.pi.set_watchdog(self.gpio_1, self.bit_timeout) else: self.bits += 1 self.num = self.num << 1 if gpio == self.gpio_0: self.code_timeout = self.code_timeout & 2 # clear gpio 0 timeout else: self.code_timeout = self.code_timeout & 1 # clear gpio 1 timeout self.num = self.num | 1 else: if self.in_code: if gpio == self.gpio_0: self.code_timeout = self.code_timeout | 1 # timeout gpio 0 else: self.code_timeout = self.code_timeout | 2 # timeout gpio 1 if self.code_timeout == 3: # both gpios timed out self.pi.set_watchdog(self.gpio_0, 0) self.pi.set_watchdog(self.gpio_1, 0) self.in_code = False self.callback(self.bits, self.num) def cancel(self): """ Cancel the Wiegand decoder. """ self.cb_0.cancel() self.cb_1.cancel() if __name__ == "__main__": import time import pigpio import wiegand def callback(bits, value): print("bits={} value={}".format(bits, value)) pi = pigpio.pi() w = wiegand.decoder(pi, 14, 15, callback) time.sleep(300) w.cancel() pi.stop() pigpio-78/EXAMPLES/Shell/000077500000000000000000000000001373465704200151015ustar00rootroot00000000000000pigpio-78/EXAMPLES/Shell/GPIOTEST/000077500000000000000000000000001373465704200163375ustar00rootroot00000000000000pigpio-78/EXAMPLES/Shell/GPIOTEST/README000066400000000000000000000002631373465704200172200ustar00rootroot00000000000000This bash script tests the user gpios. Everything should be disconnected from the gpios. The pigpio daemon must be running (sudo pigpiod). Video at http://youtu.be/sCJFLKWaxHo pigpio-78/EXAMPLES/Shell/GPIOTEST/gpiotest000077500000000000000000000045461373465704200201340ustar00rootroot00000000000000#!/bin/bash skipped="" tested="" failed="" usage() { cat </dev/null usage v=$(pigs hwver) if [[ $v < 0 ]] then echo "The pigpio daemon wasn't found. Did you sudo pigpiod?" exit fi echo "Testing..." for ((i=0; i<4; i++)) do check_gpio $i 1; done for ((i=4; i<16; i++)) do check_gpio $i 0; done if [[ $v -ge 16 ]]; then check_gpio 16 0 else skipped+="16 " fi for ((i=17; i<28; i++)) do check_gpio $i 0; done for ((i=28; i<30; i++)) do check_gpio $i 1; done for ((i=30; i<32; i++)) do check_gpio $i 0; done if [[ $failed = "" ]]; then failed="None"; fi echo "Skipped non-user gpios: $skipped" echo "Tested user gpios: $tested" echo "Failed user gpios: $failed" pigpio-78/MakeRemote000066400000000000000000000057311373465704200145760ustar00rootroot00000000000000# CC = gcc SIZE = size SHLIB = gcc -shared STRIPLIB = strip --strip-unneeded CFLAGS += -O3 -Wall -pthread ALL = libpigpiod_if.so libpigpiod_if2.so pigs x_pigpiod_if x_pigpiod_if2 prefix = /usr/local exec_prefix = $(prefix) bindir = $(exec_prefix)/bin includedir = $(prefix)/include libdir = $(prefix)/lib mandir = $(prefix)/man all: $(ALL) pigpio.py setup.py pigpiod_if.o: pigpiod_if.c pigpio.h command.h pigpiod_if.h $(CC) $(CFLAGS) -fpic -c -o pigpiod_if.o pigpiod_if.c pigpiod_if2.o: pigpiod_if2.c pigpio.h command.h pigpiod_if2.h $(CC) $(CFLAGS) -fpic -c -o pigpiod_if2.o pigpiod_if2.c command.o: command.c pigpio.h command.h $(CC) $(CFLAGS) -fpic -c -o command.o command.c pigs: command.o pigs.o $(CC) $(CFLAGS) -fpic -o pigs pigs.c command.c x_pigpiod_if: x_pigpiod_if.o $(LIB1) $(CC) -o x_pigpiod_if x_pigpiod_if.o $(LL1) x_pigpiod_if2: x_pigpiod_if2.o $(LIB2) $(CC) -o x_pigpiod_if2 x_pigpiod_if2.o $(LL2) clean: rm -f *.o *.i *.s *~ $(ALL) install: $(LIB1) $(LIB2) install -m 0755 -d $(DESTDIR)$(includedir) install -m 0644 pigpio.h $(DESTDIR)$(includedir) install -m 0644 pigpiod_if.h $(DESTDIR)$(includedir) install -m 0644 pigpiod_if2.h $(DESTDIR)$(includedir) install -m 0755 -d $(DESTDIR)$(libdir) install -m 0644 libpigpiod_if.so $(DESTDIR)$(libdir) install -m 0644 libpigpiod_if2.so $(DESTDIR)$(libdir) install -m 0755 -d $(DESTDIR)$(bindir) install -m 0755 pigs $(DESTDIR)$(bindir) python2 setup.py install python3 setup.py install install -m 0755 -d $(DESTDIR)$(mandir)/man1 install -m 0644 *.1 $(DESTDIR)$(mandir)/man1 install -m 0755 -d $(DESTDIR)$(mandir)/man3 install -m 0644 *.3 $(DESTDIR)$(mandir)/man3 uninstall: rm -f $(DESTDIR)$(includedir)/pigpio.h rm -f $(DESTDIR)$(includedir)/pigpiod_if.h rm -f $(DESTDIR)$(includedir)/pigpiod_if2.h rm -f $(DESTDIR)$(libdir)/libpigpiod_if.so rm -f $(DESTDIR)$(libdir)/libpigpiod_if2.so echo removing python2 files python2 setup.py install --record /tmp/pigpio >/dev/null xargs rm -f < /tmp/pigpio >/dev/null echo removing python3 files python3 setup.py install --record /tmp/pigpio >/dev/null xargs rm -f < /tmp/pigpio >/dev/null rm -f $(DESTDIR)$(bindir)/pigs rm -f $(DESTDIR)$(mandir)/man1/pig*.1 rm -f $(DESTDIR)$(mandir)/man3/pig*.3 LL1 = -L. -lpigpiod_if -pthread -lrt LL2 = -L. -lpigpiod_if2 -pthread -lrt LIB1 = libpigpiod_if.so OBJ1 = pigpiod_if.o command.o LIB2 = libpigpiod_if2.so OBJ2 = pigpiod_if2.o command.o $(LIB1): $(OBJ1) $(SHLIB) -o $(LIB1) $(OBJ1) $(STRIPLIB) $(LIB1) $(SIZE) $(LIB1) $(LIB2): $(OBJ2) $(SHLIB) -o $(LIB2) $(OBJ2) $(STRIPLIB) $(LIB2) $(SIZE) $(LIB2) # generated using gcc -MM *.c command.o: command.c pigpio.h command.h pigpiod.o: pigpiod.c pigpio.h pigpiod_if.o: pigpiod_if.c pigpio.h pigpiod_if.h command.h pigpiod_if2.o: pigpiod_if2.c pigpio.h pigpiod_if2.h command.h pigs.o: pigs.c pigpio.h command.h pigs.h pigpio-78/Makefile000066400000000000000000000125661373465704200142660ustar00rootroot00000000000000# # Set CROSS_PREFIX to prepend to all compiler tools at once for easier # cross-compilation. CROSS_PREFIX = CC = $(CROSS_PREFIX)gcc AR = $(CROSS_PREFIX)ar RANLIB = $(CROSS_PREFIX)ranlib SIZE = $(CROSS_PREFIX)size STRIP = $(CROSS_PREFIX)strip SHLIB = $(CC) -shared STRIPLIB = $(STRIP) --strip-unneeded SOVERSION = 1 CFLAGS += -O3 -Wall -pthread LIB1 = libpigpio.so OBJ1 = pigpio.o command.o LIB2 = libpigpiod_if.so OBJ2 = pigpiod_if.o command.o LIB3 = libpigpiod_if2.so OBJ3 = pigpiod_if2.o command.o LIB = $(LIB1) $(LIB2) $(LIB3) ALL = $(LIB) x_pigpio x_pigpiod_if x_pigpiod_if2 pig2vcd pigpiod pigs LL1 = -L. -lpigpio -pthread -lrt LL2 = -L. -lpigpiod_if -pthread -lrt LL3 = -L. -lpigpiod_if2 -pthread -lrt prefix = /usr/local exec_prefix = $(prefix) bindir = $(exec_prefix)/bin includedir = $(prefix)/include libdir = $(prefix)/lib mandir = $(prefix)/man all: $(ALL) lib: $(LIB) pigpio.o: pigpio.c pigpio.h command.h custom.cext $(CC) $(CFLAGS) -fpic -c -o pigpio.o pigpio.c pigpiod_if.o: pigpiod_if.c pigpio.h command.h pigpiod_if.h $(CC) $(CFLAGS) -fpic -c -o pigpiod_if.o pigpiod_if.c pigpiod_if2.o: pigpiod_if2.c pigpio.h command.h pigpiod_if2.h $(CC) $(CFLAGS) -fpic -c -o pigpiod_if2.o pigpiod_if2.c command.o: command.c pigpio.h command.h $(CC) $(CFLAGS) -fpic -c -o command.o command.c x_pigpio: x_pigpio.o $(LIB1) $(CC) -o x_pigpio x_pigpio.o $(LL1) x_pigpiod_if: x_pigpiod_if.o $(LIB2) $(CC) -o x_pigpiod_if x_pigpiod_if.o $(LL2) x_pigpiod_if2: x_pigpiod_if2.o $(LIB3) $(CC) -o x_pigpiod_if2 x_pigpiod_if2.o $(LL3) pigpiod: pigpiod.o $(LIB1) $(CC) -o pigpiod pigpiod.o $(LL1) $(STRIP) pigpiod pigs: pigs.o command.o $(CC) -o pigs pigs.o command.o $(STRIP) pigs pig2vcd: pig2vcd.o $(CC) -o pig2vcd pig2vcd.o $(STRIP) pig2vcd clean: rm -f *.o *.i *.s *~ $(ALL) *.so.$(SOVERSION) ifeq ($(DESTDIR),) PYINSTALLARGS = else PYINSTALLARGS = --root=$(DESTDIR) endif install: $(ALL) install -m 0755 -d $(DESTDIR)/opt/pigpio/cgi install -m 0755 -d $(DESTDIR)$(includedir) install -m 0644 pigpio.h $(DESTDIR)$(includedir) install -m 0644 pigpiod_if.h $(DESTDIR)$(includedir) install -m 0644 pigpiod_if2.h $(DESTDIR)$(includedir) install -m 0755 -d $(DESTDIR)$(libdir) install -m 0755 libpigpio.so.$(SOVERSION) $(DESTDIR)$(libdir) install -m 0755 libpigpiod_if.so.$(SOVERSION) $(DESTDIR)$(libdir) install -m 0755 libpigpiod_if2.so.$(SOVERSION) $(DESTDIR)$(libdir) cd $(DESTDIR)$(libdir) && ln -fs libpigpio.so.$(SOVERSION) libpigpio.so cd $(DESTDIR)$(libdir) && ln -fs libpigpiod_if.so.$(SOVERSION) libpigpiod_if.so cd $(DESTDIR)$(libdir) && ln -fs libpigpiod_if2.so.$(SOVERSION) libpigpiod_if2.so install -m 0755 -d $(DESTDIR)$(bindir) install -m 0755 pig2vcd $(DESTDIR)$(bindir) install -m 0755 pigpiod $(DESTDIR)$(bindir) install -m 0755 pigs $(DESTDIR)$(bindir) if which python2; then python2 setup.py install $(PYINSTALLARGS); fi if which python3; then python3 setup.py install $(PYINSTALLARGS); fi install -m 0755 -d $(DESTDIR)$(mandir)/man1 install -m 0644 p*.1 $(DESTDIR)$(mandir)/man1 install -m 0755 -d $(DESTDIR)$(mandir)/man3 install -m 0644 p*.3 $(DESTDIR)$(mandir)/man3 ifeq ($(DESTDIR),) ldconfig endif uninstall: rm -f $(DESTDIR)$(includedir)/pigpio.h rm -f $(DESTDIR)$(includedir)/pigpiod_if.h rm -f $(DESTDIR)$(includedir)/pigpiod_if2.h rm -f $(DESTDIR)$(libdir)/libpigpio.so rm -f $(DESTDIR)$(libdir)/libpigpiod_if.so rm -f $(DESTDIR)$(libdir)/libpigpiod_if2.so rm -f $(DESTDIR)$(libdir)/libpigpio.so.$(SOVERSION) rm -f $(DESTDIR)$(libdir)/libpigpiod_if.so.$(SOVERSION) rm -f $(DESTDIR)$(libdir)/libpigpiod_if2.so.$(SOVERSION) rm -f $(DESTDIR)$(bindir)/pig2vcd rm -f $(DESTDIR)$(bindir)/pigpiod rm -f $(DESTDIR)$(bindir)/pigs if which python2; then python2 setup.py install $(PYINSTALLARGS) --record /tmp/pigpio >/dev/null; sed 's!^!$(DESTDIR)!' < /tmp/pigpio | xargs rm -f >/dev/null; fi if which python3; then python3 setup.py install $(PYINSTALLARGS) --record /tmp/pigpio >/dev/null; sed 's!^!$(DESTDIR)!' < /tmp/pigpio | xargs rm -f >/dev/null; fi rm -f $(DESTDIR)$(mandir)/man1/pig*.1 rm -f $(DESTDIR)$(mandir)/man1/libpigpio*.1 rm -f $(DESTDIR)$(mandir)/man3/pig*.3 ifeq ($(DESTDIR),) ldconfig endif $(LIB1): $(OBJ1) $(SHLIB) -pthread -Wl,-soname,$(LIB1).$(SOVERSION) -o $(LIB1).$(SOVERSION) $(OBJ1) ln -fs $(LIB1).$(SOVERSION) $(LIB1) $(STRIPLIB) $(LIB1) $(SIZE) $(LIB1) $(LIB2): $(OBJ2) $(SHLIB) -pthread -Wl,-soname,$(LIB2).$(SOVERSION) -o $(LIB2).$(SOVERSION) $(OBJ2) ln -fs $(LIB2).$(SOVERSION) $(LIB2) $(STRIPLIB) $(LIB2) $(SIZE) $(LIB2) $(LIB3): $(OBJ3) $(SHLIB) -pthread -Wl,-soname,$(LIB3).$(SOVERSION) -o $(LIB3).$(SOVERSION) $(OBJ3) ln -fs $(LIB3).$(SOVERSION) $(LIB3) $(STRIPLIB) $(LIB3) $(SIZE) $(LIB3) # generated using gcc -MM *.c pig2vcd.o: pig2vcd.c pigpio.h pigpiod.o: pigpiod.c pigpio.h pigs.o: pigs.c pigpio.h command.h pigs.h x_pigpio.o: x_pigpio.c pigpio.h x_pigpiod_if.o: x_pigpiod_if.c pigpiod_if.h pigpio.h x_pigpiod_if2.o: x_pigpiod_if2.c pigpiod_if2.h pigpio.h pigpio-78/README000066400000000000000000000105241373465704200134760ustar00rootroot00000000000000NOTE The initial part of the make, the compilation of pigpio.c, takes 100 seconds on early model Pis. Be patient. The overall install takes just over 3 minutes. INSTALL Extract the archive to a directory. IN THAT DIRECTORY Enter the following two commands (in this order) make sudo make install This will install o the library (libpigpio.so) in /usr/local/lib o the library (libpigpiod_if.so) in /usr/local/lib o the library (libpigpiod_if2.so) in /usr/local/lib o the header file (pigpio.h) in /usr/local/include o the header file (pigpiod_if.h) in /usr/local/include o the header file (pigpiod_if2.h) in /usr/local/include o the header file (pigs.h) in /usr/local/include o the daemon (pigpiod) in /usr/local/bin o the socket interface (pigs) in /usr/local/bin o the utility pig2vcd in /usr/local/bin o man pages in /usr/local/man/man1 and /usr/local/man/man3 o the Python module pigpio.py for Python 2 and 3 TEST (optional) *** WARNING ************************************************ * * * All the tests make extensive use of gpio 25 (pin 22). * * Ensure that either nothing or just a LED is connected to * * gpio 25 before running any of the tests. * * * * Some tests are statistical in nature and so may on * * occasion fail. Repeated failures on the same test or * * many failures in a group of tests indicate a problem. * ************************************************************ To test the library do sudo ./x_pigpio To test the pigpio daemon do sudo pigpiod ./x_pigpiod_if # test the C I/F to the pigpio daemon ./x_pigpiod_if2 # test the C I/F to the pigpio daemon ./x_pigpio.py # test the Python I/F to the pigpio daemon ./x_pigs # test the socket I/F to the pigpio daemon ./x_pipe # test the pipe I/F to the pigpio daemon EXAMPLE CODE x_pigpio.c, pig2vcd.c, and pigpiod.c show examples of interfacing with the pigpio library. pigs.c, pigpio.py, x_pigpiod_if, x_pigpiod_if2.c, x_pigpio.py, x_pigs, and x_pipe show examples of interfacing with the pigpio daemon. x_pipe uses the pipe interface, the others use the socket interface. DAEMON To launch the daemon do sudo pigpiod (pigpiod -? for options) Once the daemon is launched the socket and pipe interfaces will be available. When the library starts it locks /var/run/pigpio.pid The file should be automatically deleted when the library terminates. SOCKET INTERFACE Use pigs for the socket interface (pigs help for help). PIPE INTERFACE The pipe interface accepts commands written to /dev/pigpio. Results are read from /dev/pigout. Errors are output on /dev/pigerr. To test the pipe interface perhaps do cat /dev/pigout & cat /dev/pigerr & echo "help" >/dev/pigpio PYTHON MODULE The Python pigpio module is installed to the default Python location for Python 2 and Python 3. You can install it for additional Python versions by pythonx.y setup.py install where x.y is the Python version. STOP DAEMON To stop the pigpiod daemon sudo killall pigpiod RUNNING ON NON Pi's You can access the pigpiod daemon running on the Pi from any machine which is connected to it over the network. This access is via the socket interface. In particular this allows you to use the following on non-Pi's. o pigs o the pigpio Python module o the C socket I/F using libpigpiod_if (header file pigpiod_if.h) o the C socket I/F using libpigpiod_if2 (header file pigpiod_if2.h) On a Linux machine make -f MakeRemote clean make -f MakeRemote make -f MakeRemote install This will install o the library (libpigpiod_if.so) in /usr/local/lib o the library (libpigpiod_if2.so) in /usr/local/lib o the header file (pigpio.h) in /usr/local/include o the header file (pigpiod_if.h) in /usr/local/include o the header file (pigpiod_if2.h) in /usr/local/include o the socket interface (pigs) in /usr/local/bin o man pages in /usr/local/man/man1 and /usr/local/man/man3 o the Python module pigpio.py On Windows machines (and possibly Macs) The Python module should install with python setup.py install pigs, pigpiod_if, and pigpiod_if2 will need minor mods to reflect the Windows/Mac socket interface. DOCUMENTATION The most up to date should be http://abyz.me.uk/rpi/pigpio/ On the Pi try man pigs man pigpiod man pig2vcd man pigpio man pigpiod_if man pigpiod_if2 pydoc pigpio pigpio-78/README.md000066400000000000000000000060551373465704200141010ustar00rootroot00000000000000# pigpio pigpio is a C library for the Raspberry which allows control of the General Purpose Input Outputs (GPIO). **At the moment pigpio on the Pi4B is experimental. I am not sure if the DMA channels being used are safe. The Pi4B defaults are primary channel 7, secondary channel 6. If these channels do not work you will have to experiment. You can set the channels used by the pigpio daemon by invoking it with the -d and -e options, e.g. sudo pigpiod -d 5 -e 8 to specify primary 5, secondary 8.** ## Features * Sampling and time-stamping of GPIO 0-31 between 100,000 and 1,000,000 times per second * Provision of PWM on any number of the user GPIO simultaneously * Provision of servo pulses on any number of the user GPIO simultaneously * Callbacks when any of GPIO 0-31 change state (callbacks receive the time of the event accurate to a few microseconds) * Notifications via pipe when any of GPIO 0-31 change state * Callbacks at timed intervals * Reading/writing all of the GPIO in a bank (0-31, 32-53) as a single operation * Individually setting GPIO modes, reading and writing * Socket and pipe interfaces for the bulk of the functionality in addition to the underlying C library calls * Construction of arbitrary waveforms to give precise timing of output GPIO level changes (accurate to a few microseconds) * Software serial links, I2C, and SPI using any user GPIO * Rudimentary permission control through the socket and pipe interfaces so users can be prevented from "updating" inappropriate GPIO * Creating and running scripts on the pigpio daemon ## Interfaces The library provides a number of control interfaces * the C function interface, * the /dev/pigpio pipe interface, * the socket interface (used by the pigs utility and the Python module). ## Utilities A number of utility programs are provided: * the pigpiod daemon, * the Python module, * the piscope digital waveform viewer, * the pigs command line utility, * the pig2vcd utility which converts notifications into the value change dump (VCD) format (useful for viewing digital waveforms with GTKWave). ## Documentation See http://abyz.me.uk/rpi/pigpio/ ## Example programs See http://abyz.me.uk/rpi/pigpio/examples.html ## GPIO ALL GPIO are identified by their Broadcom number. See http://elinux.org. There are 54 GPIO in total, arranged in two banks. Bank 1 contains GPIO 0-31. Bank 2 contains GPIO 32-54. A user should only manipulate GPIO in bank 1. There are at least three types of board: * Type 1 * 26 pin header (P1) * Hardware revision numbers of 2 and 3 * User GPIO 0-1, 4, 7-11, 14-15, 17-18, 21-25 * Type 2 * 26 pin header (P1) and an additional 8 pin header (P5) * Hardware revision numbers of 4, 5, 6, and 15 * User GPIO 2-4, 7-11, 14-15, 17-18, 22-25, 27-31 * Type 3 * 40 pin expansion header (J8) * Hardware revision numbers of 16 or greater * User GPIO 2-27 (0 and 1 are reserved) It is safe to read all the GPIO. If you try to write a system GPIO or change its mode you can crash the Pi or corrupt the data on the SD card. pigpio-78/SUPPORT.md000066400000000000000000000006431373465704200143150ustar00rootroot00000000000000Questions about the pigpio library are welcome but we ask that you check these resources first: * [pigpio library web page](http://abyz.me.uk/rpi/pigpio) Noobs should start with the FAQ. All APIs are documented extensively. * Search the repository issues with a 'question' label For example, to search for information on PWM type in search box: `label:question pwm` * Check the repository's Wiki - WIP, help wanted. pigpio-78/UNLICENCE000066400000000000000000000022741373465704200140510ustar00rootroot00000000000000This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to pigpio-78/cmake/000077500000000000000000000000001373465704200136745ustar00rootroot00000000000000pigpio-78/cmake/FindRT.cmake000066400000000000000000000015251373465704200160270ustar00rootroot00000000000000# FindRT.cmake - Try to find the RT library # Once done this will define # # RT_FOUND - System has rt # RT_INCLUDE_DIR - The rt include directory # RT_LIBRARIES - The libraries needed to use rt # RT_DEFINITIONS - Compiler switches required for using rt # # Also creates an import target called RT::RT find_path (RT_INCLUDE_DIR NAMES time.h PATHS /usr /usr/local /opt PATH_SUFFIXES ) find_library(RT_LIBRARIES NAMES rt PATHS /usr /usr/local /opt ) include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(rt DEFAULT_MSG RT_LIBRARIES RT_INCLUDE_DIR) mark_as_advanced(RT_INCLUDE_DIR RT_LIBRARIES) if (NOT TARGET RT::RT) add_library(RT::RT INTERFACE IMPORTED) set_target_properties(RT::RT PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${RT_INCLUDE_DIR} INTERFACE_LINK_LIBRARIES ${RT_LIBRARIES} ) endif()pigpio-78/cmake/pigpioConfig.cmake000066400000000000000000000000671373465704200173160ustar00rootroot00000000000000include (${CMAKE_CURRENT_LIST_DIR}/pigpioTargets.cmake)pigpio-78/cmake/setup.py.in000066400000000000000000000013661373465704200160210ustar00rootroot00000000000000#!/usr/bin/env python from distutils.core import setup setup(name='pigpio', version='1.44', author='joan', author_email='joan@abyz.me.uk', maintainer='joan', maintainer_email='joan@abyz.me.uk', url='http://abyz.me.uk/rpi/pigpio/python.html', description='Raspberry Pi GPIO module', long_description='Raspberry Pi Python module to access the pigpio daemon', download_url='http://abyz.me.uk/rpi/pigpio/pigpio.zip', license='unlicense.org', py_modules=['pigpio'], keywords=['raspberrypi', 'gpio',], classifiers=[ "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", ], package_dir={ '': '${CMAKE_CURRENT_SOURCE_DIR}'} ) pigpio-78/command.c000066400000000000000000001325261373465704200144070ustar00rootroot00000000000000/* This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to */ /* This version is for pigpio version 70+ */ #include #include #include #include #include #include #include "pigpio.h" #include "command.h" cmdInfo_t cmdInfo[]= { /* num str vfyt retv script*/ {PI_CMD_BC1, "BC1", 111, 1, 1}, // gpioWrite_Bits_0_31_Clear {PI_CMD_BC2, "BC2", 111, 1, 1}, // gpioWrite_Bits_32_53_Clear {PI_CMD_BI2CC, "BI2CC", 112, 0, 1}, // bbI2CClose {PI_CMD_BI2CO, "BI2CO", 131, 0, 1}, // bbI2COpen {PI_CMD_BI2CZ, "BI2CZ", 193, 6, 0}, // bbI2CZip {PI_CMD_BR1, "BR1", 101, 3, 1}, // gpioRead_Bits_0_31 {PI_CMD_BR2, "BR2", 101, 3, 1}, // gpioRead_Bits_32_53 {PI_CMD_BS1, "BS1", 111, 1, 1}, // gpioWrite_Bits_0_31_Set {PI_CMD_BS2, "BS2", 111, 1, 1}, // gpioWrite_Bits_32_53_Set {PI_CMD_BSCX, "BSCX", 193, 8, 0}, // bscXfer {PI_CMD_BSPIC, "BSPIC", 112, 0, 1}, // bbSPIClose {PI_CMD_BSPIO, "BSPIO", 134, 0, 0}, // bbSPIOpen {PI_CMD_BSPIX, "BSPIX", 193, 6, 0}, // bbSPIXfer {PI_CMD_CF1, "CF1", 195, 2, 0}, // gpioCustom1 {PI_CMD_CF2, "CF2", 195, 6, 0}, // gpioCustom2 {PI_CMD_CGI, "CGI", 101, 4, 1}, // gpioCfgGetInternals {PI_CMD_CSI, "CSI", 111, 1, 1}, // gpioCfgSetInternals {PI_CMD_EVM, "EVM", 122, 1, 1}, // eventMonitor {PI_CMD_EVT, "EVT", 112, 0, 1}, // eventTrigger {PI_CMD_FC, "FC", 112, 0, 1}, // fileClose {PI_CMD_FG, "FG", 121, 0, 1}, // gpioGlitchFilter {PI_CMD_FL, "FL", 127, 6, 0}, // fileList {PI_CMD_FN, "FN", 131, 0, 1}, // gpioNoiseFilter {PI_CMD_FO, "FO", 127, 2, 0}, // fileOpen {PI_CMD_FR, "FR", 121, 6, 0}, // fileRead {PI_CMD_FS, "FS", 133, 2, 1}, // fileSeek {PI_CMD_FW, "FW", 193, 0, 0}, // fileWrite {PI_CMD_GDC, "GDC", 112, 2, 1}, // gpioGetPWMdutycycle {PI_CMD_GPW, "GPW", 112, 2, 1}, // gpioGetServoPulsewidth {PI_CMD_HELP, "H", 101, 5, 0}, // cmdUsage {PI_CMD_HELP, "HELP", 101, 5, 0}, // cmdUsage {PI_CMD_HC, "HC", 121, 0, 1}, // gpioHardwareClock {PI_CMD_HP, "HP", 131, 0, 1}, // gpioHardwarePWM {PI_CMD_HWVER, "HWVER", 101, 4, 1}, // gpioHardwareRevision {PI_CMD_I2CC, "I2CC", 112, 0, 1}, // i2cClose {PI_CMD_I2CO, "I2CO", 131, 2, 1}, // i2cOpen {PI_CMD_I2CPC, "I2CPC", 131, 2, 1}, // i2cProcessCall {PI_CMD_I2CPK, "I2CPK", 194, 6, 0}, // i2cBlockProcessCall {PI_CMD_I2CRB, "I2CRB", 121, 2, 1}, // i2cReadByteData {PI_CMD_I2CRD, "I2CRD", 121, 6, 0}, // i2cReadDevice {PI_CMD_I2CRI, "I2CRI", 131, 6, 0}, // i2cReadI2CBlockData {PI_CMD_I2CRK, "I2CRK", 121, 6, 0}, // i2cReadBlockData {PI_CMD_I2CRS, "I2CRS", 112, 2, 1}, // i2cReadByte {PI_CMD_I2CRW, "I2CRW", 121, 2, 1}, // i2cReadWordData {PI_CMD_I2CWB, "I2CWB", 131, 0, 1}, // i2cWriteByteData {PI_CMD_I2CWD, "I2CWD", 193, 0, 0}, // i2cWriteDevice {PI_CMD_I2CWI, "I2CWI", 194, 0, 0}, // i2cWriteI2CBlockData {PI_CMD_I2CWK, "I2CWK", 194, 0, 0}, // i2cWriteBlockData {PI_CMD_I2CWQ, "I2CWQ", 121, 0, 1}, // i2cWriteQuick {PI_CMD_I2CWS, "I2CWS", 121, 0, 1}, // i2cWriteByte {PI_CMD_I2CWW, "I2CWW", 131, 0, 1}, // i2cWriteWordData {PI_CMD_I2CZ, "I2CZ", 193, 6, 0}, // i2cZip {PI_CMD_MICS, "MICS", 112, 0, 1}, // gpioDelay {PI_CMD_MILS, "MILS", 112, 0, 1}, // gpioDelay {PI_CMD_MODEG, "MG" , 112, 2, 1}, // gpioGetMode {PI_CMD_MODEG, "MODEG", 112, 2, 1}, // gpioGetMode {PI_CMD_MODES, "M", 125, 0, 1}, // gpioSetMode {PI_CMD_MODES, "MODES", 125, 0, 1}, // gpioSetMode {PI_CMD_NB, "NB", 122, 0, 1}, // gpioNotifyBegin {PI_CMD_NC, "NC", 112, 0, 1}, // gpioNotifyClose {PI_CMD_NO, "NO", 101, 2, 1}, // gpioNotifyOpen {PI_CMD_NP, "NP", 112, 0, 1}, // gpioNotifyPause {PI_CMD_PADG, "PADG", 112, 2, 1}, // gpioGetPad {PI_CMD_PADS, "PADS", 121, 0, 1}, // gpioSetPad {PI_CMD_PARSE, "PARSE", 115, 0, 0}, // cmdParseScript {PI_CMD_PFG, "PFG", 112, 2, 1}, // gpioGetPWMfrequency {PI_CMD_PFS, "PFS", 121, 2, 1}, // gpioSetPWMfrequency {PI_CMD_PIGPV, "PIGPV", 101, 4, 1}, // gpioVersion {PI_CMD_PRG, "PRG", 112, 2, 1}, // gpioGetPWMrange {PI_CMD_PROC, "PROC", 115, 2, 0}, // gpioStoreScript {PI_CMD_PROCD, "PROCD", 112, 0, 0}, // gpioDeleteScript {PI_CMD_PROCP, "PROCP", 112, 7, 0}, // gpioScriptStatus {PI_CMD_PROCR, "PROCR", 191, 0, 0}, // gpioRunScript {PI_CMD_PROCS, "PROCS", 112, 0, 0}, // gpioStopScript {PI_CMD_PROCU, "PROCU", 191, 0, 0}, // gpioUpdateScript {PI_CMD_PRRG, "PRRG", 112, 2, 1}, // gpioGetPWMrealRange {PI_CMD_PRS, "PRS", 121, 2, 1}, // gpioSetPWMrange {PI_CMD_PUD, "PUD", 126, 0, 1}, // gpioSetPullUpDown {PI_CMD_PWM, "P", 121, 0, 1}, // gpioPWM {PI_CMD_PWM, "PWM", 121, 0, 1}, // gpioPWM {PI_CMD_READ, "R", 112, 2, 1}, // gpioRead {PI_CMD_READ, "READ", 112, 2, 1}, // gpioRead {PI_CMD_SERC, "SERC", 112, 0, 1}, // serClose {PI_CMD_SERDA, "SERDA", 112, 2, 1}, // serDataAvailable {PI_CMD_SERO, "SERO", 132, 2, 0}, // serOpen {PI_CMD_SERR, "SERR", 121, 6, 0}, // serRead {PI_CMD_SERRB, "SERRB", 112, 2, 1}, // serReadByte {PI_CMD_SERW, "SERW", 193, 0, 0}, // serWrite {PI_CMD_SERWB, "SERWB", 121, 0, 1}, // serWriteByte {PI_CMD_SERVO, "S", 121, 0, 1}, // gpioServo {PI_CMD_SERVO, "SERVO", 121, 0, 1}, // gpioServo {PI_CMD_SHELL, "SHELL", 128, 2, 0}, // shell {PI_CMD_SLR, "SLR", 121, 6, 0}, // gpioSerialRead {PI_CMD_SLRC, "SLRC", 112, 0, 1}, // gpioSerialReadClose {PI_CMD_SLRO, "SLRO", 131, 0, 1}, // gpioSerialReadOpen {PI_CMD_SLRI, "SLRI", 121, 0, 1}, // gpioSerialReadInvert {PI_CMD_SPIC, "SPIC", 112, 0, 1}, // spiClose {PI_CMD_SPIO, "SPIO", 131, 2, 1}, // spiOpen {PI_CMD_SPIR, "SPIR", 121, 6, 0}, // spiRead {PI_CMD_SPIW, "SPIW", 193, 0, 0}, // spiWrite {PI_CMD_SPIX, "SPIX", 193, 6, 0}, // spiXfer {PI_CMD_TICK, "T", 101, 4, 1}, // gpioTick {PI_CMD_TICK, "TICK", 101, 4, 1}, // gpioTick {PI_CMD_TRIG, "TRIG", 131, 0, 1}, // gpioTrigger {PI_CMD_WDOG, "WDOG", 121, 0, 1}, // gpioSetWatchdog {PI_CMD_WRITE, "W", 121, 0, 1}, // gpioWrite {PI_CMD_WRITE, "WRITE", 121, 0, 1}, // gpioWrite {PI_CMD_WVAG, "WVAG", 192, 2, 0}, // gpioWaveAddGeneric {PI_CMD_WVAS, "WVAS", 196, 2, 0}, // gpioWaveAddSerial {PI_CMD_WVBSY, "WVBSY", 101, 2, 1}, // gpioWaveTxBusy {PI_CMD_WVCHA, "WVCHA", 197, 0, 0}, // gpioWaveChain {PI_CMD_WVCLR, "WVCLR", 101, 0, 1}, // gpioWaveClear {PI_CMD_WVCRE, "WVCRE", 101, 2, 1}, // gpioWaveCreate {PI_CMD_WVCAP, "WVCAP", 112, 2, 1}, // gpioWaveCreatePad {PI_CMD_WVDEL, "WVDEL", 112, 0, 1}, // gpioWaveDelete {PI_CMD_WVGO, "WVGO" , 101, 2, 0}, // gpioWaveTxStart {PI_CMD_WVGOR, "WVGOR", 101, 2, 0}, // gpioWaveTxStart {PI_CMD_WVHLT, "WVHLT", 101, 0, 1}, // gpioWaveTxStop {PI_CMD_WVNEW, "WVNEW", 101, 0, 1}, // gpioWaveAddNew {PI_CMD_WVSC, "WVSC", 112, 2, 1}, // gpioWaveGet*Cbs {PI_CMD_WVSM, "WVSM", 112, 2, 1}, // gpioWaveGet*Micros {PI_CMD_WVSP, "WVSP", 112, 2, 1}, // gpioWaveGet*Pulses {PI_CMD_WVTAT, "WVTAT", 101, 2, 1}, // gpioWaveTxAt {PI_CMD_WVTX, "WVTX", 112, 2, 1}, // gpioWaveTxSend {PI_CMD_WVTXM, "WVTXM", 121, 2, 1}, // gpioWaveTxSend {PI_CMD_WVTXR, "WVTXR", 112, 2, 1}, // gpioWaveTxSend {PI_CMD_ADD , "ADD" , 111, 0, 1}, {PI_CMD_AND , "AND" , 111, 0, 1}, {PI_CMD_CALL , "CALL" , 114, 0, 1}, {PI_CMD_CMDR ,"CMDR" , 111, 0, 1}, {PI_CMD_CMDW , "CMDW" , 111, 0, 1}, {PI_CMD_CMP , "CMP" , 111, 0, 1}, {PI_CMD_DCR , "DCR" , 113, 0, 1}, {PI_CMD_DCRA , "DCRA" , 101, 0, 1}, {PI_CMD_DIV , "DIV" , 111, 0, 1}, {PI_CMD_EVTWT, "EVTWT", 111, 0, 1}, {PI_CMD_HALT , "HALT" , 101, 0, 1}, {PI_CMD_INR , "INR" , 113, 0, 1}, {PI_CMD_INRA , "INRA" , 101, 0, 1}, {PI_CMD_JM , "JM" , 114, 0, 1}, {PI_CMD_JMP , "JMP" , 114, 0, 1}, {PI_CMD_JNZ , "JNZ" , 114, 0, 1}, {PI_CMD_JP , "JP" , 114, 0, 1}, {PI_CMD_JZ , "JZ" , 114, 0, 1}, {PI_CMD_LD , "LD" , 123, 0, 1}, {PI_CMD_LDA , "LDA" , 111, 0, 1}, {PI_CMD_LDAB , "LDAB" , 111, 0, 1}, {PI_CMD_MLT , "MLT" , 111, 0, 1}, {PI_CMD_MOD , "MOD" , 111, 0, 1}, {PI_CMD_NOP , "NOP" , 101, 0, 1}, {PI_CMD_OR , "OR" , 111, 0, 1}, {PI_CMD_POP , "POP" , 113, 0, 1}, {PI_CMD_POPA , "POPA" , 101, 0, 1}, {PI_CMD_PUSH , "PUSH" , 113, 0, 1}, {PI_CMD_PUSHA, "PUSHA", 101, 0, 1}, {PI_CMD_RET , "RET" , 101, 0, 1}, {PI_CMD_RL , "RL" , 123, 0, 1}, {PI_CMD_RLA , "RLA" , 111, 0, 1}, {PI_CMD_RR , "RR" , 123, 0, 1}, {PI_CMD_RRA , "RRA" , 111, 0, 1}, {PI_CMD_STA , "STA" , 113, 0, 1}, {PI_CMD_STAB , "STAB" , 111, 0, 1}, {PI_CMD_SUB , "SUB" , 111, 0, 1}, {PI_CMD_SYS , "SYS" , 116, 0, 1}, {PI_CMD_TAG , "TAG" , 114, 0, 1}, {PI_CMD_WAIT , "WAIT" , 111, 0, 1}, {PI_CMD_X , "X" , 124, 0, 1}, {PI_CMD_XA , "XA" , 113, 0, 1}, {PI_CMD_XOR , "XOR" , 111, 0, 1}, }; char * cmdUsage = "\n\ BC1 bits Clear GPIO in bank 1\n\ BC2 bits Clear GPIO in bank 2\n\ BI2CC sda Close bit bang I2C\n\ BI2CO sda scl baud | Open bit bang I2C\n\ BI2CZ sda ... I2C bit bang multiple transactions\n\ \n\ BSPIC cs Close bit bang SPI\n\ BSPIO cs miso mosi sclk baud flag | Open bit bang SPI\n\ BSPIX cs ... SPI bit bang transfer\n\ \n\ BR1 Read bank 1 GPIO\n\ BR2 Read bank 2 GPIO\n\ \n\ BS1 bits Set GPIO in bank 1\n\ BS2 bits Set GPIO in bank 2\n\ \n\ BSCX bctl bvs BSC I2C/SPI transfer\n\ \n\ CF1 ... Custom function 1\n\ CF2 ... Custom function 2\n\ \n\ CGI Configuration get internals\n\ CSI v Configuration set internals\n\ \n\ EVM h bits Set events to monitor\n\ EVT n Trigger event\n\ \n\ FC h Close file handle\n\ FG g steady Set glitch filter on GPIO\n\ FL pat n List files which match pattern\n\ FN g steady active | Set noise filter on GPIO\n\ FO file mode Open a file in mode\n\ FR h n Read bytes from file handle\n\ FS h n from Seek to file handle position\n\ FW h ... Write bytes to file handle\n\ \n\ GDC g Get PWM dutycycle for GPIO\n\ GPW g Get servo pulsewidth for GPIO\n\ \n\ H/HELP Display command help\n\ HC g f Set hardware clock frequency\n\ HP g f dc Set hardware PWM frequency and dutycycle\n\ HWVER Get hardware version\n\ \n\ I2CC h Close I2C handle\n\ I2CO bus device flags | Open I2C bus and device with flags\n\ I2CPC h r word SMBus Process Call: exchange register with word\n\ I2CPK h r ... SMBus Block Process Call: exchange data bytes with register\n\ I2CRB h r SMBus Read Byte Data: read byte from register\n\ I2CRD h n I2C Read bytes\n\ I2CRI h r n SMBus Read I2C Block Data: read bytes from register\n\ I2CRK h r SMBus Read Block Data: read data from register\n\ I2CRS h SMBus Read Byte: read byte\n\ I2CRW h r SMBus Read Word Data: read word from register\n\ I2CWB h r byte SMBus Write Byte Data: write byte to register\n\ I2CWD h ... I2C Write data\n\ I2CWI h r ... SMBus Write I2C Block Data\n\ I2CWK h r ... SMBus Write Block Data: write data to register\n\ I2CWQ h b SMBus Write Quick: write bit\n\ I2CWS h b SMBus Write Byte: write byte\n\ I2CWW h r word SMBus Write Word Data: write word to register\n\ I2CZ h ... I2C multiple transactions\n\ \n\ M/MODES g mode Set GPIO mode\n\ MG/MODEG g Get GPIO mode\n\ MICS n Delay for microseconds\n\ MILS n Delay for milliseconds\n\ \n\ NB h bits Start notification\n\ NC h Close notification\n\ NO Request a notification\n\ NP h Pause notification\n\ \n\ P/PWM g v Set GPIO PWM value\n\ PADG pad Get pad drive strength\n\ PADS pad v Set pad drive strength\n\ PARSE text Validate script\n\ PFG g Get GPIO PWM frequency\n\ PFS g v Set GPIO PWM frequency\n\ PIGPV Get pigpio library version\n\ PRG g Get GPIO PWM range\n\ PROC text Store script\n\ PROCD sid Delete script\n\ PROCP sid Get script status and parameters\n\ PROCR sid ... Run script\n\ PROCS sid Stop script\n\ PROCU sid ... Set script parameters\n\ PRRG g Get GPIO PWM real range\n\ PRS g v Set GPIO PWM range\n\ PUD g pud Set GPIO pull up/down\n\ \n\ R/READ g Read GPIO level\n\ \n\ S/SERVO g v Set GPIO servo pulsewidth\n\ SERC h Close serial handle\n\ SERDA h Check for serial data ready to read\n\ SERO text baud flags | Open serial device at baud with flags\n\ SERR h n Read bytes from serial handle\n\ SERRB h Read byte from serial handle\n\ SERW h ... Write bytes to serial handle\n\ SERWB h byte Write byte to serial handle\n\ SHELL name str Execute a shell command\n\ SLR g v Read bit bang serial data from GPIO\n\ SLRC g Close GPIO for bit bang serial data\n\ SLRO g baud bitlen | Open GPIO for bit bang serial data\n\ SLRI g invert Invert serial logic (1 invert, 0 normal)\n\ SPIC h SPI close handle\n\ SPIO channel baud flags | SPI open channel at baud with flags\n\ SPIR h v SPI read bytes from handle\n\ SPIW h ... SPI write bytes to handle\n\ SPIX h ... SPI transfer bytes to handle\n\ \n\ T/TICK Get current tick\n\ TRIG g micros l Trigger level for micros on GPIO\n\ \n\ W/WRITE g l Write level to GPIO\n\ WDOG g millis Set millisecond watchdog on GPIO\n\ WVAG triplets Wave add generic pulses\n\ WVAS g baud bitlen stopbits offset ... | Wave add serial data\n\ WVBSY Check if wave busy\n\ WVCHA Transmit a chain of waves\n\ WVCLR Wave clear\n\ WVCRE Create wave from added pulses\n\ WVDEL wid Delete waves w and higher\n\ WVGO Wave transmit (DEPRECATED)\n\ WVGOR Wave transmit repeatedly (DEPRECATED)\n\ WVHLT Wave stop\n\ WVNEW Start a new empty wave\n\ WVSC 0,1,2 Wave get DMA control block stats\n\ WVSM 0,1,2 Wave get micros stats\n\ WVSP 0,1,2 Wave get pulses stats\n\ WVTAT Returns the current transmitting wave\n\ WVTX wid Transmit wave as one-shot\n\ WVTXM wid wmde Transmit wave using mode\n\ WVTXR wid Transmit wave repeatedly\n\ \n\ Numbers may be entered as hex (prefix 0x), octal (prefix 0),\n\ otherwise they are assumed to be decimal.\n\ \n\ Examples\n\ \n\ pigs w 4 1 # set GPIO 4 high\n\ pigs r 5 # read GPIO 5\n\ pigs t # get current tick\n\ pigs i2co 1 0x20 0 # get handle to device 0x20 on I2C bus 1\n\ \n\ man pigs for full details.\n\ \n"; typedef struct { int error; char * str; } errInfo_t; static errInfo_t errInfo[]= { {PI_INIT_FAILED , "pigpio initialisation failed"}, {PI_BAD_USER_GPIO , "GPIO not 0-31"}, {PI_BAD_GPIO , "GPIO not 0-53"}, {PI_BAD_MODE , "mode not 0-7"}, {PI_BAD_LEVEL , "level not 0-1"}, {PI_BAD_PUD , "pud not 0-2"}, {PI_BAD_PULSEWIDTH , "pulsewidth not 0 or 500-2500"}, {PI_BAD_DUTYCYCLE , "dutycycle not 0-range (default 255)"}, {PI_BAD_TIMER , "timer not 0-9"}, {PI_BAD_MS , "ms not 10-60000"}, {PI_BAD_TIMETYPE , "timetype not 0-1"}, {PI_BAD_SECONDS , "seconds < 0"}, {PI_BAD_MICROS , "micros not 0-999999"}, {PI_TIMER_FAILED , "gpioSetTimerFunc failed"}, {PI_BAD_WDOG_TIMEOUT , "timeout not 0-60000"}, {PI_NO_ALERT_FUNC , "DEPRECATED"}, {PI_BAD_CLK_PERIPH , "clock peripheral not 0-1"}, {PI_BAD_CLK_SOURCE , "DEPRECATED"}, {PI_BAD_CLK_MICROS , "clock micros not 1, 2, 4, 5, 8, or 10"}, {PI_BAD_BUF_MILLIS , "buf millis not 100-10000"}, {PI_BAD_DUTYRANGE , "dutycycle range not 25-40000"}, {PI_BAD_SIGNUM , "signum not 0-63"}, {PI_BAD_PATHNAME , "can't open pathname"}, {PI_NO_HANDLE , "no handle available"}, {PI_BAD_HANDLE , "unknown handle"}, {PI_BAD_IF_FLAGS , "ifFlags > 4"}, {PI_BAD_CHANNEL , "DMA channel not 0-14"}, {PI_BAD_SOCKET_PORT , "socket port not 1024-30000"}, {PI_BAD_FIFO_COMMAND , "unknown fifo command"}, {PI_BAD_SECO_CHANNEL , "DMA secondary channel not 0-14"}, {PI_NOT_INITIALISED , "function called before gpioInitialise"}, {PI_INITIALISED , "function called after gpioInitialise"}, {PI_BAD_WAVE_MODE , "waveform mode not 0-1"}, {PI_BAD_CFG_INTERNAL , "bad parameter in gpioCfgInternals call"}, {PI_BAD_WAVE_BAUD , "baud rate not 50-250K(RX)/50-1M(TX)"}, {PI_TOO_MANY_PULSES , "waveform has too many pulses"}, {PI_TOO_MANY_CHARS , "waveform has too many chars"}, {PI_NOT_SERIAL_GPIO , "no bit bang serial read in progress on GPIO"}, {PI_BAD_SERIAL_STRUC , "bad (null) serial structure parameter"}, {PI_BAD_SERIAL_BUF , "bad (null) serial buf parameter"}, {PI_NOT_PERMITTED , "no permission to update GPIO"}, {PI_SOME_PERMITTED , "no permission to update one or more GPIO"}, {PI_BAD_WVSC_COMMND , "bad WVSC subcommand"}, {PI_BAD_WVSM_COMMND , "bad WVSM subcommand"}, {PI_BAD_WVSP_COMMND , "bad WVSP subcommand"}, {PI_BAD_PULSELEN , "trigger pulse length not 1-100"}, {PI_BAD_SCRIPT , "invalid script"}, {PI_BAD_SCRIPT_ID , "unknown script id"}, {PI_BAD_SER_OFFSET , "add serial data offset > 30 minute"}, {PI_GPIO_IN_USE , "GPIO already in use"}, {PI_BAD_SERIAL_COUNT , "must read at least a byte at a time"}, {PI_BAD_PARAM_NUM , "script parameter id not 0-9"}, {PI_DUP_TAG , "script has duplicate tag"}, {PI_TOO_MANY_TAGS , "script has too many tags"}, {PI_BAD_SCRIPT_CMD , "illegal script command"}, {PI_BAD_VAR_NUM , "script variable id not 0-149"}, {PI_NO_SCRIPT_ROOM , "no more room for scripts"}, {PI_NO_MEMORY , "can't allocate temporary memory"}, {PI_SOCK_READ_FAILED , "socket read failed"}, {PI_SOCK_WRIT_FAILED , "socket write failed"}, {PI_TOO_MANY_PARAM , "too many script parameters (> 10)"}, {PI_SCRIPT_NOT_READY , "script initialising"}, {PI_BAD_TAG , "script has unresolved tag"}, {PI_BAD_MICS_DELAY , "bad MICS delay (too large)"}, {PI_BAD_MILS_DELAY , "bad MILS delay (too large)"}, {PI_BAD_WAVE_ID , "non existent wave id"}, {PI_TOO_MANY_CBS , "No more CBs for waveform"}, {PI_TOO_MANY_OOL , "No more OOL for waveform"}, {PI_EMPTY_WAVEFORM , "attempt to create an empty waveform"}, {PI_NO_WAVEFORM_ID , "no more waveform ids"}, {PI_I2C_OPEN_FAILED , "can't open I2C device"}, {PI_SER_OPEN_FAILED , "can't open serial device"}, {PI_SPI_OPEN_FAILED , "can't open SPI device"}, {PI_BAD_I2C_BUS , "bad I2C bus"}, {PI_BAD_I2C_ADDR , "bad I2C address"}, {PI_BAD_SPI_CHANNEL , "bad SPI channel"}, {PI_BAD_FLAGS , "bad i2c/spi/ser open flags"}, {PI_BAD_SPI_SPEED , "bad SPI speed"}, {PI_BAD_SER_DEVICE , "bad serial device name"}, {PI_BAD_SER_SPEED , "bad serial baud rate"}, {PI_BAD_PARAM , "bad i2c/spi/ser parameter"}, {PI_I2C_WRITE_FAILED , "I2C write failed"}, {PI_I2C_READ_FAILED , "I2C read failed"}, {PI_BAD_SPI_COUNT , "bad SPI count"}, {PI_SER_WRITE_FAILED , "ser write failed"}, {PI_SER_READ_FAILED , "ser read failed"}, {PI_SER_READ_NO_DATA , "ser read no data available"}, {PI_UNKNOWN_COMMAND , "unknown command"}, {PI_SPI_XFER_FAILED , "spi xfer/read/write failed"}, {PI_BAD_POINTER , "bad (NULL) pointer"}, {PI_NO_AUX_SPI , "no auxiliary SPI on Pi A or B"}, {PI_NOT_PWM_GPIO , "GPIO is not in use for PWM"}, {PI_NOT_SERVO_GPIO , "GPIO is not in use for servo pulses"}, {PI_NOT_HCLK_GPIO , "GPIO has no hardware clock"}, {PI_NOT_HPWM_GPIO , "GPIO has no hardware PWM"}, {PI_BAD_HPWM_FREQ , "invalid hardware PWM frequency"}, {PI_BAD_HPWM_DUTY , "hardware PWM dutycycle not 0-1M"}, {PI_BAD_HCLK_FREQ , "invalid hardware clock frequency"}, {PI_BAD_HCLK_PASS , "need password to use hardware clock 1"}, {PI_HPWM_ILLEGAL , "illegal, PWM in use for main clock"}, {PI_BAD_DATABITS , "serial data bits not 1-32"}, {PI_BAD_STOPBITS , "serial (half) stop bits not 2-8"}, {PI_MSG_TOOBIG , "socket/pipe message too big"}, {PI_BAD_MALLOC_MODE , "bad memory allocation mode"}, {PI_TOO_MANY_SEGS , "too many I2C transaction segments"}, {PI_BAD_I2C_SEG , "an I2C transaction segment failed"}, {PI_BAD_SMBUS_CMD , "SMBus command not supported by driver"}, {PI_NOT_I2C_GPIO , "no bit bang I2C in progress on GPIO"}, {PI_BAD_I2C_WLEN , "bad I2C write length"}, {PI_BAD_I2C_RLEN , "bad I2C read length"}, {PI_BAD_I2C_CMD , "bad I2C command"}, {PI_BAD_I2C_BAUD , "bad I2C baud rate, not 50-500k"}, {PI_CHAIN_LOOP_CNT , "bad chain loop count"}, {PI_BAD_CHAIN_LOOP , "empty chain loop"}, {PI_CHAIN_COUNTER , "too many chain counters"}, {PI_BAD_CHAIN_CMD , "bad chain command"}, {PI_BAD_CHAIN_DELAY , "bad chain delay micros"}, {PI_CHAIN_NESTING , "chain counters nested too deeply"}, {PI_CHAIN_TOO_BIG , "chain is too long"}, {PI_DEPRECATED , "deprecated function removed"}, {PI_BAD_SER_INVERT , "bit bang serial invert not 0 or 1"}, {PI_BAD_EDGE , "bad ISR edge, not 1, 1, or 2"}, {PI_BAD_ISR_INIT , "bad ISR initialisation"}, {PI_BAD_FOREVER , "loop forever must be last chain command"}, {PI_BAD_FILTER , "bad filter parameter"}, {PI_BAD_PAD , "bad pad number"}, {PI_BAD_STRENGTH , "bad pad drive strength"}, {PI_FIL_OPEN_FAILED , "file open failed"}, {PI_BAD_FILE_MODE , "bad file mode"}, {PI_BAD_FILE_FLAG , "bad file flag"}, {PI_BAD_FILE_READ , "bad file read"}, {PI_BAD_FILE_WRITE , "bad file write"}, {PI_FILE_NOT_ROPEN , "file not open for read"}, {PI_FILE_NOT_WOPEN , "file not open for write"}, {PI_BAD_FILE_SEEK , "bad file seek"}, {PI_NO_FILE_MATCH , "no files match pattern"}, {PI_NO_FILE_ACCESS , "no permission to access file"}, {PI_FILE_IS_A_DIR , "file is a directory"}, {PI_BAD_SHELL_STATUS , "bad shell return status"}, {PI_BAD_SCRIPT_NAME , "bad script name"}, {PI_BAD_SPI_BAUD , "bad SPI baud rate, not 50-500k"}, {PI_NOT_SPI_GPIO , "no bit bang SPI in progress on GPIO"}, {PI_BAD_EVENT_ID , "bad event id"}, {PI_CMD_INTERRUPTED , "command interrupted, Python"}, {PI_NOT_ON_BCM2711 , "not available on BCM2711"}, {PI_ONLY_ON_BCM2711 , "only available on BCM2711"}, }; static char * fmtMdeStr="RW540123"; static char * fmtPudStr="ODU"; static int cmdMatch(char *str) { int i; for (i=0; i<(sizeof(cmdInfo)/sizeof(cmdInfo_t)); i++) { if (strcasecmp(str, cmdInfo[i].name) == 0) return i; } return CMD_UNKNOWN_CMD; } static int getNum(char *str, uintptr_t *val, int8_t *opt) { int f, n; intmax_t v; *opt = 0; f = sscanf(str, " %ji %n", &v, &n); if (f == 1) { *val = v; *opt = CMD_NUMERIC; return n; } f = sscanf(str, " v%ji %n", &v, &n); if (f == 1) { *val = v; if (v < PI_MAX_SCRIPT_VARS) *opt = CMD_VAR; else *opt = -CMD_VAR; return n; } f = sscanf(str, " p%ji %n", &v, &n); if (f == 1) { *val = v; if (v < PI_MAX_SCRIPT_PARAMS) *opt = CMD_PAR; else *opt = -CMD_PAR; return n; } return 0; } static char intCmdStr[32]; static int intCmdIdx; char *cmdStr(void) { return intCmdStr; } int cmdParse( char *buf, uintptr_t *p, unsigned ext_len, char *ext, cmdCtlParse_t *ctl) { int f, valid, idx, val, pp, pars, n, n2; char *p8; int32_t *p32; char c; uintptr_t tp1=0, tp2=0, tp3=0, tp4=0, tp5=0; int8_t to1, to2, to3, to4, to5; int eaten; /* Check that ext is big enough for the largest message. */ if (ext_len < (4 * CMD_MAX_PARAM)) return CMD_EXT_TOO_SMALL; bzero(&ctl->opt, sizeof(ctl->opt)); sscanf(buf+ctl->eaten, " %31s %n", intCmdStr, &pp); ctl->eaten += pp; p[0] = -1; idx = cmdMatch(intCmdStr); intCmdIdx = idx; if (idx < 0) return idx; valid = 0; p[0] = cmdInfo[idx].cmd; p[1] = 0; p[2] = 0; p[3] = 0; switch (cmdInfo[idx].vt) { case 101: /* BR1 BR2 CGI H HELP HWVER DCRA HALT INRA NO PIGPV POPA PUSHA RET T TICK WVBSY WVCLR WVCRE WVGO WVGOR WVHLT WVNEW No parameters, always valid. */ valid = 1; break; case 111: /* ADD AND BC1 BC2 BS1 BS2 CMP CSI DIV LDA LDAB MLT MOD OR RLA RRA STAB SUB WAIT XOR One parameter, any value. */ ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); if (ctl->opt[1] > 0) valid = 1; break; case 112: /* BI2CC FC GDC GPW I2CC I2CRB MG MICS MILS MODEG NC NP PADG PFG PRG PROCD PROCP PROCS PRRG R READ SLRC SPIC WVCAP WVDEL WVSC WVSM WVSP WVTX WVTXR BSPIC One positive parameter. */ ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); if ((ctl->opt[1] > 0) && ((int)p[1] >= 0)) valid = 1; break; case 113: /* DCR INR POP PUSH STA XA One register parameter. */ ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); if ((ctl->opt[1] > 0) && (p[1] < PI_MAX_SCRIPT_VARS)) valid = 1; break; case 114: /* CALL JM JMP JNZ JP JZ TAG One numeric parameter, any value. */ ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); if (ctl->opt[1] == CMD_NUMERIC) valid = 1; break; case 115: /* PARSE PROC One parameter, string (rest of input). */ p[3] = strlen(buf+ctl->eaten); memcpy(ext, buf+ctl->eaten, p[3]); ctl->eaten += p[3]; valid = 1; break; case 116: /* SYS One parameter, a string. */ f = sscanf(buf+ctl->eaten, " %*s%n %n", &n, &n2); if ((f >= 0) && n) { p[3] = n; ctl->opt[3] = CMD_NUMERIC; memcpy(ext, buf+ctl->eaten, n); ctl->eaten += n2; valid = 1; } break; case 121: /* HC FR I2CRD I2CRR I2CRW I2CWB I2CWQ P PADS PFS PRS PWM S SERVO SLR SLRI W WDOG WRITE WVTXM Two positive parameters. */ ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); ctl->eaten += getNum(buf+ctl->eaten, &p[2], &ctl->opt[2]); if ((ctl->opt[1] > 0) && ((int)p[1] >= 0) && (ctl->opt[2] > 0) && ((int)p[2] >= 0)) valid = 1; break; case 122: /* NB Two parameters, first positive, second any value. */ ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); ctl->eaten += getNum(buf+ctl->eaten, &p[2], &ctl->opt[2]); if ((ctl->opt[1] > 0) && ((int)p[1] >= 0) && (ctl->opt[2] > 0)) valid = 1; break; case 123: /* LD RL RR Two parameters, first register, second any value. */ ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); ctl->eaten += getNum(buf+ctl->eaten, &p[2], &ctl->opt[2]); if ((ctl->opt[1] > 0) && (p[1] < PI_MAX_SCRIPT_VARS) && (ctl->opt[2] > 0)) valid = 1; break; case 124: /* X Two register parameters. */ ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); ctl->eaten += getNum(buf+ctl->eaten, &p[2], &ctl->opt[2]); if ((ctl->opt[1] > 0) && (p[1] < PI_MAX_SCRIPT_VARS) && (ctl->opt[2] > 0) && (p[2] < PI_MAX_SCRIPT_VARS)) valid = 1; break; case 125: /* M MODES Two parameters, first positive, second in 'RW540123'. */ ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); f = sscanf(buf+ctl->eaten, " %c %n", &c, &n); if ((ctl->opt[1] > 0) && ((int)p[1] >= 0) && (f >= 1)) { ctl->eaten += n; val = toupper(c); p8 = strchr(fmtMdeStr, val); if (p8 != NULL) { val = p8 - fmtMdeStr; p[2] = val; valid = 1; } } break; case 126: /* PUD Two parameters, first positive, second in 'ODU'. */ ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); f = sscanf(buf+ctl->eaten, " %c %n", &c, &n); if ((ctl->opt[1] > 0) && ((int)p[1] >= 0) && (f >= 1)) { ctl->eaten += n; val = toupper(c); p8 = strchr(fmtPudStr, val); if (p8 != NULL) { val = p8 - fmtPudStr; p[2] = val; valid = 1; } } break; case 127: /* FL FO Two parameters, first a string, other positive. */ f = sscanf(buf+ctl->eaten, " %*s%n %n", &n, &n2); if ((f >= 0) && n) { p[3] = n; ctl->opt[2] = CMD_NUMERIC; memcpy(ext, buf+ctl->eaten, n); ctl->eaten += n2; ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); if ((ctl->opt[1] > 0) && ((int)p[1] >= 0)) valid = 1; } break; case 128: /* SHELL Two string parameters, the first space teminated. The second arbitrary. */ f = sscanf(buf+ctl->eaten, " %*s%n %n", &n, &n2); if ((f >= 0) && n) { valid = 1; p[1] = n; memcpy(ext, buf+ctl->eaten, n); ctl->eaten += n; ext[n] = 0; /* terminate first string */ n2 = strlen(buf+ctl->eaten+1); memcpy(ext+n+1, buf+ctl->eaten+1, n2); ctl->eaten += n2; ctl->eaten ++; p[3] = p[1] + n2 + 1; } break; case 131: /* BI2CO HP I2CO I2CPC I2CRI I2CWB I2CWW SLRO SPIO TRIG Three positive parameters. */ ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); ctl->eaten += getNum(buf+ctl->eaten, &p[2], &ctl->opt[2]); ctl->eaten += getNum(buf+ctl->eaten, &tp1, &ctl->opt[3]); if ((ctl->opt[1] > 0) && ((int)p[1] >= 0) && (ctl->opt[2] > 0) && ((int)p[2] >= 0) && (ctl->opt[3] > 0) && ((int)tp1 >= 0)) { p[3] = 4; memcpy(ext, &tp1, 4); valid = 1; } break; case 132: /* SERO Three parameters, first a string, rest >=0 */ f = sscanf(buf+ctl->eaten, " %*s%n %n", &n, &n2); if ((f >= 0) && n) { p[3] = n; ctl->opt[2] = CMD_NUMERIC; memcpy(ext, buf+ctl->eaten, n); ctl->eaten += n2; ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); ctl->eaten += getNum(buf+ctl->eaten, &p[2], &ctl->opt[2]); if ((ctl->opt[1] > 0) && ((int)p[1] >= 0) && (ctl->opt[2] > 0) && ((int)p[2] >= 0)) valid = 1; } break; case 133: /* FS Three parameters. First and third positive. Second may be negative when interpreted as an int. */ ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); ctl->eaten += getNum(buf+ctl->eaten, &p[2], &ctl->opt[2]); ctl->eaten += getNum(buf+ctl->eaten, &tp1, &to1); if ((ctl->opt[1] > 0) && ((int)p[1] >= 0) && (ctl->opt[2] > 0) && (to1 == CMD_NUMERIC) && ((int)tp1 >= 0)) { p[3] = 4; memcpy(ext, &tp1, 4); valid = 1; } break; case 134: /* BSPIO Six parameters. First to Fifth positive. Sixth may be negative when interpreted as an int. */ ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); ctl->eaten += getNum(buf+ctl->eaten, &tp1, &to1); ctl->eaten += getNum(buf+ctl->eaten, &tp2, &to2); ctl->eaten += getNum(buf+ctl->eaten, &tp3, &to3); ctl->eaten += getNum(buf+ctl->eaten, &tp4, &to4); ctl->eaten += getNum(buf+ctl->eaten, &tp5, &to5); if ((ctl->opt[1] > 0) && ((int)p[1] >= 0) && (to1 == CMD_NUMERIC) && ((int)tp1 >= 0) && (to2 == CMD_NUMERIC) && ((int)tp2 >= 0) && (to3 == CMD_NUMERIC) && ((int)tp3 >= 0) && (to4 == CMD_NUMERIC) && ((int)tp4 >= 0) && (to5 == CMD_NUMERIC)) { p[3] = 5 * 4; memcpy(ext+ 0, &tp1, 4); memcpy(ext+ 4, &tp2, 4); memcpy(ext+ 8, &tp3, 4); memcpy(ext+12, &tp4, 4); memcpy(ext+16, &tp5, 4); valid = 1; } break; case 191: /* PROCR PROCU One to 11 parameters, first positive, optional remainder, any value. */ ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); if ((ctl->opt[1] == CMD_NUMERIC) && ((int)p[1] >= 0)) { pars = 0; p32 = (int32_t *)ext; while (pars < PI_MAX_SCRIPT_PARAMS) { ctl->eaten += getNum(buf+ctl->eaten, &tp1, &to1); if (to1 == CMD_NUMERIC) { pars++; *p32++ = tp1; } else break; } p[3] = pars * 4; valid = 1; } break; case 192: /* WVAG One or more triplets (gpios on, gpios off, delay), any value. */ pars = 0; p32 = (int32_t *)ext; while (pars < CMD_MAX_PARAM) { ctl->eaten += getNum(buf+ctl->eaten, &tp1, &to1); if (to1 == CMD_NUMERIC) { pars++; *p32++ = tp1; } else break; } p[3] = pars * 4; if (pars && ((pars % 3) == 0)) valid = 1; break; case 193: /* BI2CZ BSCX BSPIX FW I2CWD I2CZ SERW SPIW SPIX Two or more parameters, first >=0, rest 0-255. BSCX is special case one or more. */ ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); if ((ctl->opt[1] == CMD_NUMERIC) && ((int)p[1] >= 0)) { pars = 0; p8 = ext; while (pars < CMD_MAX_PARAM) { eaten = getNum(buf+ctl->eaten, &tp1, &to1); if (to1 == CMD_NUMERIC) { if (((int)tp1>=0) && ((int)tp1<=255)) { pars++; *p8++ = tp1; ctl->eaten += eaten; } else break; /* invalid number, end of command */ } else break; } p[3] = pars; if (pars || (p[0]==PI_CMD_BSCX)) valid = 1; } break; case 194: /* I2CPK I2CWI I2CWK Three to 34 parameters, all 0-255. */ ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); ctl->eaten += getNum(buf+ctl->eaten, &p[2], &ctl->opt[2]); if ((ctl->opt[1] == CMD_NUMERIC) && (ctl->opt[2] == CMD_NUMERIC) && ((int)p[1]>=0) && ((int)p[2]>=0) && ((int)p[2]<=255)) { pars = 0; p8 = ext; while (pars < 32) { eaten = getNum(buf+ctl->eaten, &tp1, &to1); if (to1 == CMD_NUMERIC) { if (((int)tp1>=0) && ((int)tp1<=255)) { pars++; *p8++ = tp1; ctl->eaten += eaten; } else break; /* invalid number, end of command */ } else break; } p[3] = pars; if (pars > 0) valid = 1; } break; case 195: /* CF1 CF2 Zero or more parameters, first two >=0, rest 0-255. */ valid = 1; ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); if (ctl->opt[1] == CMD_NUMERIC) { if ((int)p[1] >= 0) { ctl->eaten += getNum(buf+ctl->eaten, &p[2], &ctl->opt[2]); if (ctl->opt[2] == CMD_NUMERIC) { if ((int)p[2] >= 0) { pars = 0; p8 = ext; while (pars < CMD_MAX_PARAM) { eaten = getNum(buf+ctl->eaten, &tp1, &to1); if (to1 == CMD_NUMERIC) { if (((int)tp1>=0) && ((int)tp1<=255)) { pars++; *p8++ = tp1; ctl->eaten += eaten; } else break; } else break; } p[3] = pars; } else valid = 0; } } else valid = 0; } break; case 196: /* WVAS gpio baud offset char... p1 gpio p2 baud p3 len + 4 --------- uint32_t databits uint32_t stophalfbits uint32_t offset uint8_t[len] */ ctl->eaten += getNum(buf+ctl->eaten, &p[1], &ctl->opt[1]); ctl->eaten += getNum(buf+ctl->eaten, &p[2], &ctl->opt[2]); ctl->eaten += getNum(buf+ctl->eaten, &tp1, &to1); ctl->eaten += getNum(buf+ctl->eaten, &tp2, &to2); ctl->eaten += getNum(buf+ctl->eaten, &tp3, &to3); if ((ctl->opt[1] == CMD_NUMERIC) && ((int)p[1] >= 0) && (ctl->opt[2] == CMD_NUMERIC) && ((int)p[2] > 0) && (to1 == CMD_NUMERIC) && (to2 == CMD_NUMERIC) && (to3 == CMD_NUMERIC)) { pars = 0; memcpy(ext, &tp1, 4); memcpy(ext+4, &tp2, 4); memcpy(ext+8, &tp3, 4); p8 = ext + 12; while (pars < CMD_MAX_PARAM) { eaten = getNum(buf+ctl->eaten, &tp1, &to1); if (to1 == CMD_NUMERIC) { if (((int)tp1>=0) && ((int)tp1<=255)) { *p8++ = tp1; pars++; ctl->eaten += eaten; } else break; /* invalid number, end of command */ } else break; } p[3] = pars + 12; if (pars > 0) valid = 1; } break; case 197: /* WVCHA One or more parameters, all 0-255. */ pars = 0; p8 = ext; while (pars < CMD_MAX_PARAM) { eaten = getNum(buf+ctl->eaten, &tp1, &to1); if (to1 == CMD_NUMERIC) { if (((int)tp1>=0) && ((int)tp1<=255)) { pars++; *p8++ = tp1; ctl->eaten += eaten; } else break; /* invalid number, end of command */ } else break; } p[3] = pars; if (pars) valid = 1; break; } if (valid) return idx; else return CMD_BAD_PARAMETER; } char * cmdErrStr(int error) { int i; for (i=0; i<(sizeof(errInfo)/sizeof(errInfo_t)); i++) { if (errInfo[i].error == error) return errInfo[i].str; } return "unknown error"; } int cmdParseScript(char *script, cmdScript_t *s, int diags) { int idx, len, b, i, j, tags, resolved; int status; uintptr_t p[10]; cmdInstr_t instr; cmdCtlParse_t ctl; char v[CMD_MAX_EXTENSION]; ctl.eaten = 0; status = 0; cmdTagStep_t tag_step[PI_MAX_SCRIPT_TAGS]; len = strlen(script); /* calloc space for PARAMS, VARS, CMDS, and STRINGS */ b = (sizeof(int) * (PI_MAX_SCRIPT_PARAMS + PI_MAX_SCRIPT_VARS)) + (sizeof(cmdInstr_t) * (len + 2) / 2) + len; s->par = calloc(1, b); if (s->par == NULL) return -1; s->var = s->par + PI_MAX_SCRIPT_PARAMS; s->instr = (cmdInstr_t *)(s->var + PI_MAX_SCRIPT_VARS); s->str_area = (char *)(s->instr + ((len + 2) / 2)); s->str_area_len = len; s->str_area_pos = 0; s->instrs = 0; tags = 0; idx = 0; while (ctl.eaten= 0) || (idx != CMD_UNKNOWN_CMD)) { if (!cmdInfo[intCmdIdx].cvis) idx = CMD_NOT_IN_SCRIPT; } if (idx >= 0) { if (p[3]) { memcpy(s->str_area + s->str_area_pos, v, p[3]); s->str_area[s->str_area_pos + p[3]] = 0; p[4] = (intptr_t) s->str_area + s->str_area_pos; s->str_area_pos += (p[3] + 1); } memcpy(&instr.p, p, sizeof(instr.p)); if (instr.p[0] == PI_CMD_TAG) { if (tags < PI_MAX_SCRIPT_TAGS) { /* check tag not already used */ for (j=0; jinstrs; tags++; } else { if (diags) { fprintf(stderr, "Too many tags: %"PRIdPTR"\n", instr.p[1]); } if (!status) status = PI_TOO_MANY_TAGS; idx = -1; } } } else { if (diags) { if (idx == CMD_UNKNOWN_CMD) fprintf(stderr, "Unknown command: %s\n", cmdStr()); else if (idx == CMD_NOT_IN_SCRIPT) fprintf(stderr, "Command illegal in script: %s\n", cmdStr()); else fprintf(stderr, "Bad parameter to %s\n", cmdStr()); } if (!status) status = PI_BAD_SCRIPT_CMD; } if (idx >= 0) { if (instr.p[0] != PI_CMD_TAG) { memcpy(instr.opt, &ctl.opt, sizeof(instr.opt)); s->instr[s->instrs++] = instr; } } } for (i=0; iinstrs; i++) { instr = s->instr[i]; /* resolve jumps */ if ((instr.p[0] == PI_CMD_JMP) || (instr.p[0] == PI_CMD_CALL) || (instr.p[0] == PI_CMD_JZ) || (instr.p[0] == PI_CMD_JNZ) || (instr.p[0] == PI_CMD_JM) || (instr.p[0] == PI_CMD_JP)) { resolved = 0; for (j=0; jinstr[i].p[1] = tag_step[j].step; resolved = 1; break; } } if (!resolved) { if (diags) { fprintf(stderr, "Can't resolve tag %"PRIdPTR"\n", instr.p[1]); } if (!status) status = PI_BAD_TAG; } } } return status; } pigpio-78/command.h000066400000000000000000000057351373465704200144150ustar00rootroot00000000000000/* This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to */ /* This version is for pigpio version 70+ */ #ifndef COMMAND_H #define COMMAND_H #include #include #include "pigpio.h" #define CMD_MAX_PARAM 512 #define CMD_MAX_EXTENSION (1<<16) #define CMD_UNKNOWN_CMD -1 #define CMD_BAD_PARAMETER -2 #define CMD_EXT_TOO_SMALL -3 #define CMD_NOT_IN_SCRIPT -4 #define CMD_P_ARR 10 #define CMD_V_ARR 10 #define CMD_NUMERIC 1 #define CMD_VAR 2 #define CMD_PAR 3 typedef struct { uint32_t cmd; uint32_t p1; uint32_t p2; union { uint32_t p3; uint32_t ext_len; uint32_t res; }; } cmdCmd_t; typedef struct { int eaten; int8_t opt[4]; } cmdCtlParse_t; typedef struct { int cmd; /* command number */ char *name; /* command name */ int vt; /* command verification type */ int rv; /* command return value type */ int cvis; /* command valid in a script */ } cmdInfo_t; typedef struct { uint32_t tag; int step; } cmdTagStep_t; typedef struct { uintptr_t p[5]; //these are sometimes converted to pointers, so presumablly they sometimes have pointers stored in them, I haven't figured out where though. --plugwash int8_t opt[4]; } cmdInstr_t; typedef struct { /* +-----------+---------+---------+----------------+ | PARAMS... | VARS... | CMDS... | STRING AREA... | +-----------+---------+---------+----------------+ */ int *par; int *var; cmdInstr_t *instr; int instrs; char *str_area; int str_area_len; int str_area_pos; } cmdScript_t; extern cmdInfo_t cmdInfo[]; extern char *cmdUsage; int cmdParse(char *buf, uintptr_t *p, unsigned ext_len, char *ext, cmdCtlParse_t *ctl); int cmdParseScript(char *script, cmdScript_t *s, int diags); char *cmdErrStr(int error); char *cmdStr(void); #endif pigpio-78/custom.cext000066400000000000000000000021271373465704200150150ustar00rootroot00000000000000/* This version is for pigpio version 26+ If you want customised functions replace this file with your own definitions for gpioCustom1 and gpioCustom2. */ #include "pigpio.h" int gpioCustom1(unsigned arg1, unsigned arg2, char *argx, unsigned count) { int i; unsigned max; DBG(DBG_USER, "arg1=%d arg2=%d count=%d [%s]", arg1, arg2, count, myBuf2Str(count, argx)); CHECK_INITED; /* for dummy just return max parameter */ if (arg1 > arg2) max = arg1; else max = arg2; for (i=0; i max) max = argx[i]; return max; } int gpioCustom2(unsigned arg1, char *argx, unsigned count, char *retBuf, unsigned retMax) { int i, j, t; DBG(DBG_USER, "arg1=%d count=%d [%s] retMax=%d", arg1, count, myBuf2Str(count, argx), retMax); CHECK_INITED; /* for dummy just return argx reversed */ if (count > retMax) count = retMax; for (i=0, j=count-1; i<=j; i++, j--) { /* t used as argx and retBuf may be the same buffer */ t = argx[i]; retBuf[i] = argx[j]; retBuf[j] = t; } return count; } pigpio-78/pig2vcd.1000066400000000000000000000066261373465704200142460ustar00rootroot00000000000000 ." Process this file with ." groff -man -Tascii pig2vcd.1 ." .TH pig2vcd 1 2012-2020 Linux "pigpio archive" .SH NAME pig2vd - A utility to convert pigpio notifications to VCD. .SH SYNOPSIS pig2vcd file.VCD .SH DESCRIPTION .ad l .nh pig2vcd is a utility which reads notifications on stdin and writes the output as a Value Change Dump (VCD) file on stdout. .br .br The VCD file can be viewed using GTKWave. .br .br .SS Notifications .br .br Notifications consist of 12 bytes with the following binary format. .br .br .EX typedef struct .br { .br uint16_t seqno; .br uint16_t flags; .br uint32_t tick; .br uint32_t level; .br } gpioReport_t; .br .EE .br .br seqno: starts at 0 each time the handle is opened and then increments by one for each report. .br .br flags: two flags are defined, PI_NTFY_FLAGS_WDOG and PI_NTFY_FLAGS_ALIVE. If bit 5 is set (PI_NTFY_FLAGS_WDOG) then bits 0-4 of the flags indicate a gpio which has had a watchdog timeout; if bit 6 is set (PI_NTFY_FLAGS_ALIVE) this indicates a keep alive signal on the pipe/socket and is sent once a minute in the absence of other notification activity. .br .br tick: the number of microseconds since system boot. It wraps around after 1h12m. .br .br level: indicates the level of each gpio. If bit 1< */ /* This version is for pigpio version 3+ */ #include #include #include #include #include #include #include #include #include #include "pigpio.h" /* This software converts pigpio notification reports into a VCD format understood by GTKWave. */ #define RS (sizeof(gpioReport_t)) static char * timeStamp() { static char buf[32]; struct timeval now; struct tm tmp; gettimeofday(&now, NULL); localtime_r(&now.tv_sec, &tmp); strftime(buf, sizeof(buf), "%F %T", &tmp); return buf; } int symbol(int bit) { if (bit < 26) return ('A' + bit); else return ('a' + bit - 26); } int main(int argc, char * argv[]) { int b, r, v; uint32_t t0; uint32_t lastLevel, changed; gpioReport_t report; r=read(STDIN_FILENO, &report, RS); if (r != RS) exit(-1); printf("$date %s $end\n", timeStamp()); printf("$version pig2vcd V1 $end\n"); printf("$timescale 1 us $end\n"); printf("$scope module top $end\n"); for (b=0; b<32; b++) printf("$var wire 1 %c %d $end\n", symbol(b), b); printf("$upscope $end\n"); printf("$enddefinitions $end\n"); t0 = report.tick; lastLevel =0; while ((r=read(STDIN_FILENO, &report, RS)) == RS) { if (report.level != lastLevel) { printf("#%u\n", report.tick - t0); changed = report.level ^ lastLevel; lastLevel = report.level; for (b=0; b<32; b++) { if (changed & (1< gcc -Wall -pthread -o prog prog.c -lpigpio -lrt sudo ./prog .SH DESCRIPTION .ad l .nh .br .br pigpio is a C library for the Raspberry which allows control of the GPIO. .br .br .SS Features .br .br o hardware timed PWM on any of GPIO 0-31 .br .br o hardware timed servo pulses on any of GPIO 0-31 .br .br o callbacks when any of GPIO 0-31 change state .br .br o callbacks at timed intervals .br .br o reading/writing all of the GPIO in a bank as one operation .br .br o individually setting GPIO modes, reading and writing .br .br o notifications when any of GPIO 0-31 change state .br .br o the construction of output waveforms with microsecond timing .br .br o rudimentary permission control over GPIO .br .br o a simple interface to start and stop new threads .br .br o I2C, SPI, and serial link wrappers .br .br o creating and running scripts .br .br .SS GPIO .br .br ALL GPIO are identified by their Broadcom number. .br .br .SS Credits .br .br The PWM and servo pulses are timed using the DMA and PWM peripherals. .br .br This use was inspired by Richard Hirst's servoblaster kernel module. .br .br .SS Usage .br .br Include in your source files. .br .br Assuming your source is in prog.c use the following command to build and run the executable. .br .br .EX gcc -Wall -pthread -o prog prog.c -lpigpio -lrt .br sudo ./prog .br .EE .br .br For examples of usage see the C programs within the pigpio archive file. .br .br .SS Notes .br .br All the functions which return an int return < 0 on error. .br .br \fBgpioInitialise\fP must be called before all other library functions with the following exceptions: .br .br .EX \fBgpioCfg*\fP .br \fBgpioVersion\fP .br \fBgpioHardwareRevision\fP .br .EE .br .br If the library is not initialised all but the \fBgpioCfg*\fP, \fBgpioVersion\fP, and \fBgpioHardwareRevision\fP functions will return error PI_NOT_INITIALISED. .br .br If the library is initialised the \fBgpioCfg*\fP functions will return error PI_INITIALISED. .br .br If you intend to rely on signals sent to your application, you should turn off the internal signal handling as shown in this example: .br .br .EX int cfg = gpioCfgGetInternals(); .br cfg |= PI_CFG_NOSIGHANDLER; // (1<<10) .br gpioCfgSetInternals(cfg); .br int status = gpioInitialise(); .br .EE .br .br .SH OVERVIEW .br .SS ESSENTIAL .br .br gpioInitialise Initialise library .br gpioTerminate Stop library .br .SS BASIC .br .br gpioSetMode Set a GPIO mode .br gpioGetMode Get a GPIO mode .br .br gpioSetPullUpDown Set/clear GPIO pull up/down resistor .br .br gpioRead Read a GPIO .br gpioWrite Write a GPIO .br .SS PWM (overrides servo commands on same GPIO) .br .br gpioPWM Start/stop PWM pulses on a GPIO .br gpioSetPWMfrequency Configure PWM frequency for a GPIO .br gpioSetPWMrange Configure PWM range for a GPIO .br .br gpioGetPWMdutycycle Get dutycycle setting on a GPIO .br gpioGetPWMfrequency Get configured PWM frequency for a GPIO .br gpioGetPWMrange Get configured PWM range for a GPIO .br .br gpioGetPWMrealRange Get underlying PWM range for a GPIO .br .SS Servo (overrides PWM commands on same GPIO) .br .br gpioServo Start/stop servo pulses on a GPIO .br .br gpioGetServoPulsewidth Get pulsewidth setting on a GPIO .br .SS INTERMEDIATE .br .br gpioTrigger Send a trigger pulse to a GPIO .br .br gpioSetWatchdog Set a watchdog on a GPIO .br .br gpioRead_Bits_0_31 Read all GPIO in bank 1 .br gpioRead_Bits_32_53 Read all GPIO in bank 2 .br .br gpioWrite_Bits_0_31_Clear Clear selected GPIO in bank 1 .br gpioWrite_Bits_32_53_Clear Clear selected GPIO in bank 2 .br .br gpioWrite_Bits_0_31_Set Set selected GPIO in bank 1 .br gpioWrite_Bits_32_53_Set Set selected GPIO in bank 2 .br .br gpioSetAlertFunc Request a GPIO level change callback .br gpioSetAlertFuncEx Request a GPIO change callback, extended .br .br gpioSetTimerFunc Request a regular timed callback .br gpioSetTimerFuncEx Request a regular timed callback, extended .br .br gpioStartThread Start a new thread .br gpioStopThread Stop a previously started thread .br .SS ADVANCED .br .br gpioNotifyOpen Request a notification handle .br gpioNotifyClose Close a notification .br gpioNotifyOpenWithSize Request a notification with sized pipe .br gpioNotifyBegin Start notifications for selected GPIO .br gpioNotifyPause Pause notifications .br .br gpioHardwareClock Start hardware clock on supported GPIO .br .br gpioHardwarePWM Start hardware PWM on supported GPIO .br .br gpioGlitchFilter Set a glitch filter on a GPIO .br gpioNoiseFilter Set a noise filter on a GPIO .br .br gpioSetPad Sets a pads drive strength .br gpioGetPad Gets a pads drive strength .br .br shell Executes a shell command .br .br gpioSetISRFunc Request a GPIO interrupt callback .br gpioSetISRFuncEx Request a GPIO interrupt callback, extended .br .br gpioSetSignalFunc Request a signal callback .br gpioSetSignalFuncEx Request a signal callback, extended .br .br gpioSetGetSamplesFunc Requests a GPIO samples callback .br gpioSetGetSamplesFuncEx Requests a GPIO samples callback, extended .br .SS Custom .br .br gpioCustom1 User custom function 1 .br gpioCustom2 User custom function 2 .br .SS Events .br .br eventMonitor Sets the events to monitor .br eventSetFunc Request an event callback .br eventSetFuncEx Request an event callback, extended .br .br eventTrigger Trigger an event .br .SS Scripts .br .br gpioStoreScript Store a script .br gpioRunScript Run a stored script .br gpioUpdateScript Set a scripts parameters .br gpioScriptStatus Get script status and parameters .br gpioStopScript Stop a running script .br gpioDeleteScript Delete a stored script .br .SS I2C .br .br i2cOpen Opens an I2C device .br i2cClose Closes an I2C device .br .br i2cWriteQuick SMBus write quick .br .br i2cReadByte SMBus read byte .br i2cWriteByte SMBus write byte .br .br i2cReadByteData SMBus read byte data .br i2cWriteByteData SMBus write byte data .br .br i2cReadWordData SMBus read word data .br i2cWriteWordData SMBus write word data .br .br i2cReadBlockData SMBus read block data .br i2cWriteBlockData SMBus write block data .br .br i2cReadI2CBlockData SMBus read I2C block data .br i2cWriteI2CBlockData SMBus write I2C block data .br .br i2cReadDevice Reads the raw I2C device .br i2cWriteDevice Writes the raw I2C device .br .br i2cProcessCall SMBus process call .br i2cBlockProcessCall SMBus block process call .br .br i2cSwitchCombined Sets or clears the combined flag .br .br i2cSegments Performs multiple I2C transactions .br .br i2cZip Performs multiple I2C transactions .br .SS I2C BIT BANG .br .br bbI2COpen Opens GPIO for bit banging I2C .br bbI2CClose Closes GPIO for bit banging I2C .br .br bbI2CZip Performs bit banged I2C transactions .br .SS I2C/SPI SLAVE .br .br bscXfer I2C/SPI as slave transfer .br .SS SERIAL .br .br serOpen Opens a serial device .br serClose Closes a serial device .br .br serReadByte Reads a byte from a serial device .br serWriteByte Writes a byte to a serial device .br .br serRead Reads bytes from a serial device .br serWrite Writes bytes to a serial device .br .br serDataAvailable Returns number of bytes ready to be read .br .SS SERIAL BIT BANG (read only) .br .br gpioSerialReadOpen Opens a GPIO for bit bang serial reads .br gpioSerialReadClose Closes a GPIO for bit bang serial reads .br .br gpioSerialReadInvert Configures normal/inverted for serial reads .br .br gpioSerialRead Reads bit bang serial data from a GPIO .br .SS SPI .br .br spiOpen Opens a SPI device .br spiClose Closes a SPI device .br .br spiRead Reads bytes from a SPI device .br spiWrite Writes bytes to a SPI device .br spiXfer Transfers bytes with a SPI device .br .SS SPI BIT BANG .br .br bbSPIOpen Opens GPIO for bit banging SPI .br bbSPIClose Closes GPIO for bit banging SPI .br .br bbSPIXfer Performs bit banged SPI transactions .br .SS FILES .br .br fileOpen Opens a file .br fileClose Closes a file .br .br fileRead Reads bytes from a file .br fileWrite Writes bytes to a file .br .br fileSeek Seeks to a position within a file .br .br fileList List files which match a pattern .br .SS WAVES .br .br gpioWaveClear Deletes all waveforms .br .br gpioWaveAddNew Starts a new waveform .br gpioWaveAddGeneric Adds a series of pulses to the waveform .br gpioWaveAddSerial Adds serial data to the waveform .br .br gpioWaveCreate Creates a waveform from added data .br gpioWaveCreatePad Creates a waveform of fixed size from added data .br gpioWaveDelete Deletes a waveform .br .br gpioWaveTxSend Transmits a waveform .br .br gpioWaveChain Transmits a chain of waveforms .br .br gpioWaveTxAt Returns the current transmitting waveform .br .br gpioWaveTxBusy Checks to see if the waveform has ended .br .br gpioWaveTxStop Aborts the current waveform .br .br gpioWaveGetCbs Length in CBs of the current waveform .br gpioWaveGetHighCbs Length of longest waveform so far .br gpioWaveGetMaxCbs Absolute maximum allowed CBs .br .br gpioWaveGetMicros Length in micros of the current waveform .br gpioWaveGetHighMicros Length of longest waveform so far .br gpioWaveGetMaxMicros Absolute maximum allowed micros .br .br gpioWaveGetPulses Length in pulses of the current waveform .br gpioWaveGetHighPulses Length of longest waveform so far .br gpioWaveGetMaxPulses Absolute maximum allowed pulses .br .SS UTILITIES .br .br gpioDelay Delay for a number of microseconds .br .br gpioTick Get current tick (microseconds) .br .br gpioHardwareRevision Get hardware revision .br gpioVersion Get the pigpio version .br .br getBitInBytes Get the value of a bit .br putBitInBytes Set the value of a bit .br .br gpioTime Get current time .br gpioSleep Sleep for specified time .br .br time_sleep Sleeps for a float number of seconds .br time_time Float number of seconds since the epoch .br .SS CONFIGURATION .br .br gpioCfgBufferSize Configure the GPIO sample buffer size .br gpioCfgClock Configure the GPIO sample rate .br gpioCfgDMAchannel Configure the DMA channel (DEPRECATED) .br gpioCfgDMAchannels Configure the DMA channels .br gpioCfgPermissions Configure the GPIO access permissions .br gpioCfgInterfaces Configure user interfaces .br gpioCfgSocketPort Configure socket port .br gpioCfgMemAlloc Configure DMA memory allocation mode .br gpioCfgNetAddr Configure allowed network addresses .br .br gpioCfgGetInternals Get internal configuration settings .br gpioCfgSetInternals Set internal configuration settings .br .SS EXPERT .br .br rawWaveAddSPI Not intended for general use .br rawWaveAddGeneric Not intended for general use .br rawWaveCB Not intended for general use .br rawWaveCBAdr Not intended for general use .br rawWaveGetOOL Not intended for general use .br rawWaveSetOOL Not intended for general use .br rawWaveGetOut Not intended for general use .br rawWaveSetOut Not intended for general use .br rawWaveGetIn Not intended for general use .br rawWaveSetIn Not intended for general use .br rawWaveInfo Not intended for general use .br rawDumpWave Not intended for general use .br rawDumpScript Not intended for general use .br .SH FUNCTIONS .IP "\fBint gpioInitialise(void)\fP" .IP "" 4 Initialises the library. .br .br Returns the pigpio version number if OK, otherwise PI_INIT_FAILED. .br .br gpioInitialise must be called before using the other library functions with the following exceptions: .br .br .EX \fBgpioCfg*\fP .br \fBgpioVersion\fP .br \fBgpioHardwareRevision\fP .br .EE .br .br \fBExample\fP .br .EX if (gpioInitialise() < 0) .br { .br // pigpio initialisation failed. .br } .br else .br { .br // pigpio initialised okay. .br } .br .EE .IP "\fBvoid gpioTerminate(void)\fP" .IP "" 4 Terminates the library. .br .br Returns nothing. .br .br Call before program exit. .br .br This function resets the used DMA channels, releases memory, and terminates any running threads. .br .br \fBExample\fP .br .EX gpioTerminate(); .br .EE .IP "\fBint gpioSetMode(unsigned gpio, unsigned mode)\fP" .IP "" 4 Sets the GPIO mode, typically input or output. .br .br .EX gpio: 0-53 .br mode: 0-7 .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_GPIO or PI_BAD_MODE. .br .br Arduino style: pinMode. .br .br \fBExample\fP .br .EX gpioSetMode(17, PI_INPUT); // Set GPIO17 as input. .br .br gpioSetMode(18, PI_OUTPUT); // Set GPIO18 as output. .br .br gpioSetMode(22,PI_ALT0); // Set GPIO22 to alternative mode 0. .br .EE .br .br See \fBhttp://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf\fP page 102 for an overview of the modes. .IP "\fBint gpioGetMode(unsigned gpio)\fP" .IP "" 4 Gets the GPIO mode. .br .br .EX gpio: 0-53 .br .EE .br .br Returns the GPIO mode if OK, otherwise PI_BAD_GPIO. .br .br \fBExample\fP .br .EX if (gpioGetMode(17) != PI_ALT0) .br { .br gpioSetMode(17, PI_ALT0); // set GPIO17 to ALT0 .br } .br .EE .IP "\fBint gpioSetPullUpDown(unsigned gpio, unsigned pud)\fP" .IP "" 4 Sets or clears resistor pull ups or downs on the GPIO. .br .br .EX gpio: 0-53 .br pud: 0-2 .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_GPIO or PI_BAD_PUD. .br .br \fBExample\fP .br .EX gpioSetPullUpDown(17, PI_PUD_UP); // Sets a pull-up. .br .br gpioSetPullUpDown(18, PI_PUD_DOWN); // Sets a pull-down. .br .br gpioSetPullUpDown(23, PI_PUD_OFF); // Clear any pull-ups/downs. .br .EE .IP "\fBint gpioRead(unsigned gpio)\fP" .IP "" 4 Reads the GPIO level, on or off. .br .br .EX gpio: 0-53 .br .EE .br .br Returns the GPIO level if OK, otherwise PI_BAD_GPIO. .br .br Arduino style: digitalRead. .br .br \fBExample\fP .br .EX printf("GPIO24 is level %d", gpioRead(24)); .br .EE .IP "\fBint gpioWrite(unsigned gpio, unsigned level)\fP" .IP "" 4 Sets the GPIO level, on or off. .br .br .EX gpio: 0-53 .br level: 0-1 .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_GPIO or PI_BAD_LEVEL. .br .br If PWM or servo pulses are active on the GPIO they are switched off. .br .br Arduino style: digitalWrite .br .br \fBExample\fP .br .EX gpioWrite(24, 1); // Set GPIO24 high. .br .EE .IP "\fBint gpioPWM(unsigned user_gpio, unsigned dutycycle)\fP" .IP "" 4 Starts PWM on the GPIO, dutycycle between 0 (off) and range (fully on). Range defaults to 255. .br .br .EX user_gpio: 0-31 .br dutycycle: 0-range .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_BAD_DUTYCYCLE. .br .br Arduino style: analogWrite .br .br This and the servo functionality use the DMA and PWM or PCM peripherals to control and schedule the pulse lengths and dutycycles. .br .br The \fBgpioSetPWMrange\fP function may be used to change the default range of 255. .br .br \fBExample\fP .br .EX gpioPWM(17, 255); // Sets GPIO17 full on. .br .br gpioPWM(18, 128); // Sets GPIO18 half on. .br .br gpioPWM(23, 0); // Sets GPIO23 full off. .br .EE .IP "\fBint gpioGetPWMdutycycle(unsigned user_gpio)\fP" .IP "" 4 Returns the PWM dutycycle setting for the GPIO. .br .br .EX user_gpio: 0-31 .br .EE .br .br Returns between 0 (off) and range (fully on) if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_PWM_GPIO. .br .br For normal PWM the dutycycle will be out of the defined range for the GPIO (see \fBgpioGetPWMrange\fP). .br .br If a hardware clock is active on the GPIO the reported dutycycle will be 500000 (500k) out of 1000000 (1M). .br .br If hardware PWM is active on the GPIO the reported dutycycle will be out of a 1000000 (1M). .br .br Normal PWM range defaults to 255. .IP "\fBint gpioSetPWMrange(unsigned user_gpio, unsigned range)\fP" .IP "" 4 Selects the dutycycle range to be used for the GPIO. Subsequent calls to gpioPWM will use a dutycycle between 0 (off) and range (fully on). .br .br .EX user_gpio: 0-31 .br range: 25-40000 .br .EE .br .br Returns the real range for the given GPIO's frequency if OK, otherwise PI_BAD_USER_GPIO or PI_BAD_DUTYRANGE. .br .br If PWM is currently active on the GPIO its dutycycle will be scaled to reflect the new range. .br .br The real range, the number of steps between fully off and fully on for each frequency, is given in the following table. .br .br .EX 25, 50, 100, 125, 200, 250, 400, 500, 625, .br 800, 1000, 1250, 2000, 2500, 4000, 5000, 10000, 20000 .br .EE .br .br The real value set by \fBgpioPWM\fP is (dutycycle * real range) / range. .br .br \fBExample\fP .br .EX gpioSetPWMrange(24, 2000); // Now 2000 is fully on .br // 1000 is half on .br // 500 is quarter on, etc. .br .EE .IP "\fBint gpioGetPWMrange(unsigned user_gpio)\fP" .IP "" 4 Returns the dutycycle range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. .br .br .EX user_gpio: 0-31 .br .EE .br .br If a hardware clock or hardware PWM is active on the GPIO the reported range will be 1000000 (1M). .br .br \fBExample\fP .br .EX r = gpioGetPWMrange(23); .br .EE .IP "\fBint gpioGetPWMrealRange(unsigned user_gpio)\fP" .IP "" 4 Returns the real range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. .br .br .EX user_gpio: 0-31 .br .EE .br .br If a hardware clock is active on the GPIO the reported real range will be 1000000 (1M). .br .br If hardware PWM is active on the GPIO the reported real range will be approximately 250M divided by the set PWM frequency. .br .br \fBExample\fP .br .EX rr = gpioGetPWMrealRange(17); .br .EE .IP "\fBint gpioSetPWMfrequency(unsigned user_gpio, unsigned frequency)\fP" .IP "" 4 Sets the frequency in hertz to be used for the GPIO. .br .br .EX user_gpio: 0-31 .br frequency: >=0 .br .EE .br .br Returns the numerically closest frequency if OK, otherwise PI_BAD_USER_GPIO. .br .br If PWM is currently active on the GPIO it will be switched off and then back on at the new frequency. .br .br Each GPIO can be independently set to one of 18 different PWM frequencies. .br .br The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5, 8, or 10 microseconds (default 5). .br .br The frequencies for each sample rate are: .br .br .EX Hertz .br .br 1: 40000 20000 10000 8000 5000 4000 2500 2000 1600 .br 1250 1000 800 500 400 250 200 100 50 .br .br 2: 20000 10000 5000 4000 2500 2000 1250 1000 800 .br 625 500 400 250 200 125 100 50 25 .br .br 4: 10000 5000 2500 2000 1250 1000 625 500 400 .br 313 250 200 125 100 63 50 25 13 .br sample .br rate .br (us) 5: 8000 4000 2000 1600 1000 800 500 400 320 .br 250 200 160 100 80 50 40 20 10 .br .br 8: 5000 2500 1250 1000 625 500 313 250 200 .br 156 125 100 63 50 31 25 13 6 .br .br 10: 4000 2000 1000 800 500 400 250 200 160 .br 125 100 80 50 40 25 20 10 5 .br .EE .br .br \fBExample\fP .br .EX gpioSetPWMfrequency(23, 0); // Set GPIO23 to lowest frequency. .br .br gpioSetPWMfrequency(24, 500); // Set GPIO24 to 500Hz. .br .br gpioSetPWMfrequency(25, 100000); // Set GPIO25 to highest frequency. .br .EE .IP "\fBint gpioGetPWMfrequency(unsigned user_gpio)\fP" .IP "" 4 Returns the frequency (in hertz) used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. .br .br .EX user_gpio: 0-31 .br .EE .br .br For normal PWM the frequency will be that defined for the GPIO by \fBgpioSetPWMfrequency\fP. .br .br If a hardware clock is active on the GPIO the reported frequency will be that set by \fBgpioHardwareClock\fP. .br .br If hardware PWM is active on the GPIO the reported frequency will be that set by \fBgpioHardwarePWM\fP. .br .br \fBExample\fP .br .EX f = gpioGetPWMfrequency(23); // Get frequency used for GPIO23. .br .EE .IP "\fBint gpioServo(unsigned user_gpio, unsigned pulsewidth)\fP" .IP "" 4 Starts servo pulses on the GPIO, 0 (off), 500 (most anti-clockwise) to 2500 (most clockwise). .br .br .EX user_gpio: 0-31 .br pulsewidth: 0, 500-2500 .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_BAD_PULSEWIDTH. .br .br The range supported by servos varies and should probably be determined by experiment. A value of 1500 should always be safe and represents the mid-point of rotation. You can DAMAGE a servo if you command it to move beyond its limits. .br .br The following causes an on pulse of 1500 microseconds duration to be transmitted on GPIO 17 at a rate of 50 times per second. This will command a servo connected to GPIO 17 to rotate to its mid-point. .br .br \fBExample\fP .br .EX gpioServo(17, 1000); // Move servo to safe position anti-clockwise. .br .br gpioServo(23, 1500); // Move servo to centre position. .br .br gpioServo(25, 2000); // Move servo to safe position clockwise. .br .EE .br .br OTHER UPDATE RATES: .br .br This function updates servos at 50Hz. If you wish to use a different update frequency you will have to use the PWM functions. .br .br .EX PWM Hz 50 100 200 400 500 .br 1E6/Hz 20000 10000 5000 2500 2000 .br .EE .br .br Firstly set the desired PWM frequency using \fBgpioSetPWMfrequency\fP. .br .br Then set the PWM range using \fBgpioSetPWMrange\fP to 1E6/frequency. Doing this allows you to use units of microseconds when setting the servo pulsewidth. .br .br E.g. If you want to update a servo connected to GPIO25 at 400Hz .br .br .EX gpioSetPWMfrequency(25, 400); .br .br gpioSetPWMrange(25, 2500); .br .EE .br .br Thereafter use the PWM command to move the servo, e.g. gpioPWM(25, 1500) will set a 1500 us pulse. .IP "\fBint gpioGetServoPulsewidth(unsigned user_gpio)\fP" .IP "" 4 Returns the servo pulsewidth setting for the GPIO. .br .br .EX user_gpio: 0-31 .br .EE .br .br Returns 0 (off), 500 (most anti-clockwise) to 2500 (most clockwise) if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERVO_GPIO. .IP "\fBint gpioSetAlertFunc(unsigned user_gpio, gpioAlertFunc_t f)\fP" .IP "" 4 Registers a function to be called (a callback) when the specified GPIO changes state. .br .br .EX user_gpio: 0-31 .br f: the callback function .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO. .br .br One callback may be registered per GPIO. .br .br The callback is passed the GPIO, the new level, and the tick. .br .br .EX Parameter Value Meaning .br .br GPIO 0-31 The GPIO which has changed state .br .br level 0-2 0 = change to low (a falling edge) .br 1 = change to high (a rising edge) .br 2 = no level change (a watchdog timeout) .br .br tick 32 bit The number of microseconds since boot .br WARNING: this wraps around from .br 4294967295 to 0 roughly every 72 minutes .br .EE .br .br The alert may be cancelled by passing NULL as the function. .br .br The GPIO are sampled at a rate set when the library is started. .br .br If a value isn't specifically set the default of 5 us is used. .br .br The number of samples per second is given in the following table. .br .br .EX samples .br per sec .br .br 1 1,000,000 .br 2 500,000 .br sample 4 250,000 .br rate 5 200,000 .br (us) 8 125,000 .br 10 100,000 .br .EE .br .br Level changes shorter than the sample rate may be missed. .br .br The thread which calls the alert functions is triggered nominally 1000 times per second. The active alert functions will be called once per level change since the last time the thread was activated. i.e. The active alert functions will get all level changes but there will be a latency. .br .br If you want to track the level of more than one GPIO do so by maintaining the state in the callback. Do not use \fBgpioRead\fP. Remember the event that triggered the callback may have happened several milliseconds before and the GPIO may have changed level many times since then. .br .br The tick value is the time stamp of the sample in microseconds, see \fBgpioTick\fP for more details. .br .br \fBExample\fP .br .EX void aFunction(int gpio, int level, uint32_t tick) .br { .br printf("GPIO %d became %d at %d", gpio, level, tick); .br } .br .br // call aFunction whenever GPIO 4 changes state .br .br gpioSetAlertFunc(4, aFunction); .br .EE .IP "\fBint gpioSetAlertFuncEx(unsigned user_gpio, gpioAlertFuncEx_t f, void *userdata)\fP" .IP "" 4 Registers a function to be called (a callback) when the specified GPIO changes state. .br .br .EX user_gpio: 0-31 .br f: the callback function .br userdata: pointer to arbitrary user data .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO. .br .br One callback may be registered per GPIO. .br .br The callback is passed the GPIO, the new level, the tick, and the userdata pointer. .br .br .EX Parameter Value Meaning .br .br GPIO 0-31 The GPIO which has changed state .br .br level 0-2 0 = change to low (a falling edge) .br 1 = change to high (a rising edge) .br 2 = no level change (a watchdog timeout) .br .br tick 32 bit The number of microseconds since boot .br WARNING: this wraps around from .br 4294967295 to 0 roughly every 72 minutes .br .br userdata pointer Pointer to an arbitrary object .br .EE .br .br See \fBgpioSetAlertFunc\fP for further details. .br .br Only one of \fBgpioSetAlertFunc\fP or \fBgpioSetAlertFuncEx\fP can be registered per GPIO. .IP "\fBint gpioSetISRFunc(unsigned gpio, unsigned edge, int timeout, gpioISRFunc_t f)\fP" .IP "" 4 Registers a function to be called (a callback) whenever the specified GPIO interrupt occurs. .br .br .EX gpio: 0-53 .br edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE .br timeout: interrupt timeout in milliseconds (<=0 to cancel) .br f: the callback function .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_EDGE, or PI_BAD_ISR_INIT. .br .br One function may be registered per GPIO. .br .br The function is passed the GPIO, the current level, and the current tick. The level will be PI_TIMEOUT if the optional interrupt timeout expires. .br .br .EX Parameter Value Meaning .br .br GPIO 0-53 The GPIO which has changed state .br .br level 0-2 0 = change to low (a falling edge) .br 1 = change to high (a rising edge) .br 2 = no level change (interrupt timeout) .br .br tick 32 bit The number of microseconds since boot .br WARNING: this wraps around from .br 4294967295 to 0 roughly every 72 minutes .br .EE .br .br The underlying Linux sysfs GPIO interface is used to provide the interrupt services. .br .br The first time the function is called, with a non-NULL f, the GPIO is exported, set to be an input, and set to interrupt on the given edge and timeout. .br .br Subsequent calls, with a non-NULL f, can vary one or more of the edge, timeout, or function. .br .br The ISR may be cancelled by passing a NULL f, in which case the GPIO is unexported. .br .br The tick is that read at the time the process was informed of the interrupt. This will be a variable number of microseconds after the interrupt occurred. Typically the latency will be of the order of 50 microseconds. The latency is not guaranteed and will vary with system load. .br .br The level is that read at the time the process was informed of the interrupt, or PI_TIMEOUT if the optional interrupt timeout expired. It may not be the same as the expected edge as interrupts happening in rapid succession may be missed by the kernel (i.e. this mechanism can not be used to capture several interrupts only a few microseconds apart). .IP "\fBint gpioSetISRFuncEx(unsigned gpio, unsigned edge, int timeout, gpioISRFuncEx_t f, void *userdata)\fP" .IP "" 4 Registers a function to be called (a callback) whenever the specified GPIO interrupt occurs. .br .br .EX gpio: 0-53 .br edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE .br timeout: interrupt timeout in milliseconds (<=0 to cancel) .br f: the callback function .br userdata: pointer to arbitrary user data .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_EDGE, or PI_BAD_ISR_INIT. .br .br The function is passed the GPIO, the current level, the current tick, and the userdata pointer. .br .br .EX Parameter Value Meaning .br .br GPIO 0-53 The GPIO which has changed state .br .br level 0-2 0 = change to low (a falling edge) .br 1 = change to high (a rising edge) .br 2 = no level change (interrupt timeout) .br .br tick 32 bit The number of microseconds since boot .br WARNING: this wraps around from .br 4294967295 to 0 roughly every 72 minutes .br .br userdata pointer Pointer to an arbitrary object .br .EE .br .br Only one of \fBgpioSetISRFunc\fP or \fBgpioSetISRFuncEx\fP can be registered per GPIO. .br .br See \fBgpioSetISRFunc\fP for further details. .IP "\fBint gpioNotifyOpen(void)\fP" .IP "" 4 This function requests a free notification handle. .br .br Returns a handle greater than or equal to zero if OK, otherwise PI_NO_HANDLE. .br .br A notification is a method for being notified of GPIO state changes via a pipe or socket. .br .br Pipe notifications for handle x will be available at the pipe named /dev/pigpiox (where x is the handle number). E.g. if the function returns 15 then the notifications must be read from /dev/pigpio15. .br .br Socket notifications are returned to the socket which requested the handle. .br .br \fBExample\fP .br .EX h = gpioNotifyOpen(); .br .br if (h >= 0) .br { .br sprintf(str, "/dev/pigpio%d", h); .br .br fd = open(str, O_RDONLY); .br .br if (fd >= 0) .br { .br // Okay. .br } .br else .br { .br // Error. .br } .br } .br else .br { .br // Error. .br } .br .EE .IP "\fBint gpioNotifyOpenWithSize(int bufSize)\fP" .IP "" 4 This function requests a free notification handle. .br .br It differs from \fBgpioNotifyOpen\fP in that the pipe size may be specified, whereas \fBgpioNotifyOpen\fP uses the default pipe size. .br .br See \fBgpioNotifyOpen\fP for further details. .IP "\fBint gpioNotifyBegin(unsigned handle, uint32_t bits)\fP" .IP "" 4 This function starts notifications on a previously opened handle. .br .br .EX handle: >=0, as returned by \fBgpioNotifyOpen\fP .br bits: a bit mask indicating the GPIO of interest .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .br .br The notification sends state changes for each GPIO whose corresponding bit in bits is set. .br .br Each notification occupies 12 bytes in the fifo and has the following structure. .br .br .EX typedef struct .br { .br uint16_t seqno; .br uint16_t flags; .br uint32_t tick; .br uint32_t level; .br } gpioReport_t; .br .EE .br .br seqno: starts at 0 each time the handle is opened and then increments by one for each report. .br .br flags: three flags are defined, PI_NTFY_FLAGS_WDOG, PI_NTFY_FLAGS_ALIVE, and PI_NTFY_FLAGS_EVENT. .br .br If bit 5 is set (PI_NTFY_FLAGS_WDOG) then bits 0-4 of the flags indicate a GPIO which has had a watchdog timeout. .br .br If bit 6 is set (PI_NTFY_FLAGS_ALIVE) this indicates a keep alive signal on the pipe/socket and is sent once a minute in the absence of other notification activity. .br .br If bit 7 is set (PI_NTFY_FLAGS_EVENT) then bits 0-4 of the flags indicate an event which has been triggered. .br .br tick: the number of microseconds since system boot. It wraps around after 1h12m. .br .br level: indicates the level of each GPIO. If bit 1<=0, as returned by \fBgpioNotifyOpen\fP .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .br .br Notifications for the handle are suspended until \fBgpioNotifyBegin\fP is called again. .br .br \fBExample\fP .br .EX gpioNotifyPause(h); .br .EE .IP "\fBint gpioNotifyClose(unsigned handle)\fP" .IP "" 4 This function stops notifications on a previously opened handle and releases the handle for reuse. .br .br .EX handle: >=0, as returned by \fBgpioNotifyOpen\fP .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .br .br \fBExample\fP .br .EX gpioNotifyClose(h); .br .EE .IP "\fBint gpioWaveClear(void)\fP" .IP "" 4 This function clears all waveforms and any data added by calls to the \fBgpioWaveAdd*\fP functions. .br .br Returns 0 if OK. .br .br \fBExample\fP .br .EX gpioWaveClear(); .br .EE .IP "\fBint gpioWaveAddNew(void)\fP" .IP "" 4 This function starts a new empty waveform. .br .br You wouldn't normally need to call this function as it is automatically called after a waveform is created with the \fBgpioWaveCreate\fP function. .br .br Returns 0 if OK. .br .br \fBExample\fP .br .EX gpioWaveAddNew(); .br .EE .IP "\fBint gpioWaveAddGeneric(unsigned numPulses, gpioPulse_t *pulses)\fP" .IP "" 4 This function adds a number of pulses to the current waveform. .br .br .EX numPulses: the number of pulses .br pulses: an array of pulses .br .EE .br .br Returns the new total number of pulses in the current waveform if OK, otherwise PI_TOO_MANY_PULSES. .br .br The pulses are interleaved in time order within the existing waveform (if any). .br .br Merging allows the waveform to be built in parts, that is the settings for GPIO#1 can be added, and then GPIO#2 etc. .br .br If the added waveform is intended to start after or within the existing waveform then the first pulse should consist of a delay. .br .br \fBExample\fP .br .EX // Construct and send a 30 microsecond square wave. .br .br gpioSetMode(gpio, PI_OUTPUT); .br .br pulse[0].gpioOn = (1<= 0) .br { .br gpioWaveTxSend(wave_id, PI_WAVE_MODE_REPEAT); .br .br // Transmit for 30 seconds. .br .br sleep(30); .br .br gpioWaveTxStop(); .br } .br else .br { .br // Wave create failed. .br } .br .EE .IP "\fBint gpioWaveAddSerial(unsigned user_gpio, unsigned baud, unsigned data_bits, unsigned stop_bits, unsigned offset, unsigned numBytes, char *str)\fP" .IP "" 4 This function adds a waveform representing serial data to the existing waveform (if any). The serial data starts offset microseconds from the start of the waveform. .br .br .EX user_gpio: 0-31 .br baud: 50-1000000 .br data_bits: 1-32 .br stop_bits: 2-8 .br offset: >=0 .br numBytes: >=1 .br str: an array of chars (which may contain nulls) .br .EE .br .br Returns the new total number of pulses in the current waveform if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_WAVE_BAUD, PI_BAD_DATABITS, PI_BAD_STOPBITS, PI_TOO_MANY_CHARS, PI_BAD_SER_OFFSET, or PI_TOO_MANY_PULSES. .br .br NOTES: .br .br The serial data is formatted as one start bit, data_bits data bits, and stop_bits/2 stop bits. .br .br It is legal to add serial data streams with different baud rates to the same waveform. .br .br numBytes is the number of bytes of data in str. .br .br The bytes required for each character depend upon data_bits. .br .br For data_bits 1-8 there will be one byte per character. .br For data_bits 9-16 there will be two bytes per character. .br For data_bits 17-32 there will be four bytes per character. .br .br \fBExample\fP .br .EX #define MSG_LEN 8 .br .br int i; .br char *str; .br char data[MSG_LEN]; .br .br str = "Hello world!"; .br .br gpioWaveAddSerial(4, 9600, 8, 2, 0, strlen(str), str); .br .br for (i=0; i=0, as returned by \fBgpioWaveCreate\fP .br .EE .br .br Wave ids are allocated in order, 0, 1, 2, etc. .br .br Returns 0 if OK, otherwise PI_BAD_WAVE_ID. .IP "\fBint gpioWaveTxSend(unsigned wave_id, unsigned wave_mode)\fP" .IP "" 4 This function transmits the waveform with id wave_id. The mode determines whether the waveform is sent once or cycles endlessly. The SYNC variants wait for the current waveform to reach the end of a cycle or finish before starting the new waveform. .br .br WARNING: bad things may happen if you delete the previous waveform before it has been synced to the new waveform. .br .br NOTE: Any hardware PWM started by \fBgpioHardwarePWM\fP will be cancelled. .br .br .EX wave_id: >=0, as returned by \fBgpioWaveCreate\fP .br wave_mode: PI_WAVE_MODE_ONE_SHOT, PI_WAVE_MODE_REPEAT, .br PI_WAVE_MODE_ONE_SHOT_SYNC, PI_WAVE_MODE_REPEAT_SYNC .br .EE .br .br Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE. .IP "\fBint gpioWaveChain(char *buf, unsigned bufSize)\fP" .IP "" 4 This function transmits a chain of waveforms. .br .br NOTE: Any hardware PWM started by \fBgpioHardwarePWM\fP will be cancelled. .br .br The waves to be transmitted are specified by the contents of buf which contains an ordered list of \fBwave_id\fPs and optional command codes and related data. .br .br .EX buf: pointer to the wave_ids and optional command codes .br bufSize: the number of bytes in buf .br .EE .br .br Returns 0 if OK, otherwise PI_CHAIN_NESTING, PI_CHAIN_LOOP_CNT, PI_BAD_CHAIN_LOOP, PI_BAD_CHAIN_CMD, PI_CHAIN_COUNTER, PI_BAD_CHAIN_DELAY, PI_CHAIN_TOO_BIG, or PI_BAD_WAVE_ID. .br .br Each wave is transmitted in the order specified. A wave may occur multiple times per chain. .br .br A blocks of waves may be transmitted multiple times by using the loop commands. The block is bracketed by loop start and end commands. Loops may be nested. .br .br Delays between waves may be added with the delay command. .br .br The following command codes are supported: .br .br Name Cmd & Data Meaning .br Loop Start 255 0 Identify start of a wave block .br Loop Repeat 255 1 x y loop x + y*256 times .br Delay 255 2 x y delay x + y*256 microseconds .br Loop Forever 255 3 loop forever .br .br .br If present Loop Forever must be the last entry in the chain. .br .br The code is currently dimensioned to support a chain with roughly 600 entries and 20 loop counters. .br .br \fBExample\fP .br .EX #include .br #include .br .br #define WAVES 5 .br #define GPIO 4 .br .br int main(int argc, char *argv[]) .br { .br int i, wid[WAVES]; .br .br if (gpioInitialise()<0) return -1; .br .br gpioSetMode(GPIO, PI_OUTPUT); .br .br printf("start piscope, press return"); getchar(); .br .br for (i=0; i=0 .br .EE .br .br Returns the number of bytes copied if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERIAL_GPIO. .br .br The bytes returned for each character depend upon the number of data bits \fBdata_bits\fP specified in the \fBgpioSerialReadOpen\fP command. .br .br For \fBdata_bits\fP 1-8 there will be one byte per character. .br For \fBdata_bits\fP 9-16 there will be two bytes per character. .br For \fBdata_bits\fP 17-32 there will be four bytes per character. .IP "\fBint gpioSerialReadClose(unsigned user_gpio)\fP" .IP "" 4 This function closes a GPIO for bit bang reading of serial data. .br .br .EX user_gpio: 0-31, previously opened with \fBgpioSerialReadOpen\fP .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_SERIAL_GPIO. .IP "\fBint i2cOpen(unsigned i2cBus, unsigned i2cAddr, unsigned i2cFlags)\fP" .IP "" 4 This returns a handle for the device at the address on the I2C bus. .br .br .EX i2cBus: >=0 .br i2cAddr: 0-0x7F .br i2cFlags: 0 .br .EE .br .br No flags are currently defined. This parameter should be set to zero. .br .br Physically buses 0 and 1 are available on the Pi. Higher numbered buses will be available if a kernel supported bus multiplexor is being used. .br .br The GPIO used are given in the following table. .br .br SDA SCL .br I2C 0 0 1 .br I2C 1 2 3 .br .br .br Returns a handle (>=0) if OK, otherwise PI_BAD_I2C_BUS, PI_BAD_I2C_ADDR, PI_BAD_FLAGS, PI_NO_HANDLE, or PI_I2C_OPEN_FAILED. .br .br For the SMBus commands the low level transactions are shown at the end of the function description. The following abbreviations are used. .br .br .EX S (1 bit) : Start bit .br P (1 bit) : Stop bit .br Rd/Wr (1 bit) : Read/Write bit. Rd equals 1, Wr equals 0. .br A, NA (1 bit) : Accept and not accept bit. .br .br .br Addr (7 bits): I2C 7 bit address. .br i2cReg (8 bits): Command byte, a byte which often selects a register. .br Data (8 bits): A data byte. .br Count (8 bits): A byte defining the length of a block operation. .br .br [..]: Data sent by the device. .br .EE .IP "\fBint i2cClose(unsigned handle)\fP" .IP "" 4 This closes the I2C device associated with the handle. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .IP "\fBint i2cWriteQuick(unsigned handle, unsigned bit)\fP" .IP "" 4 This sends a single bit (in the Rd/Wr bit) to the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br bit: 0-1, the value to write .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br Quick command. SMBus 2.0 5.5.1 .EX S Addr bit [A] P .br .EE .IP "\fBint i2cWriteByte(unsigned handle, unsigned bVal)\fP" .IP "" 4 This sends a single byte to the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br bVal: 0-0xFF, the value to write .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br Send byte. SMBus 2.0 5.5.2 .EX S Addr Wr [A] bVal [A] P .br .EE .IP "\fBint i2cReadByte(unsigned handle)\fP" .IP "" 4 This reads a single byte from the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br .EE .br .br Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, or PI_I2C_READ_FAILED. .br .br Receive byte. SMBus 2.0 5.5.3 .EX S Addr Rd [A] [Data] NA P .br .EE .IP "\fBint i2cWriteByteData(unsigned handle, unsigned i2cReg, unsigned bVal)\fP" .IP "" 4 This writes a single byte to the specified register of the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br i2cReg: 0-255, the register to write .br bVal: 0-0xFF, the value to write .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br Write byte. SMBus 2.0 5.5.4 .EX S Addr Wr [A] i2cReg [A] bVal [A] P .br .EE .IP "\fBint i2cWriteWordData(unsigned handle, unsigned i2cReg, unsigned wVal)\fP" .IP "" 4 This writes a single 16 bit word to the specified register of the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br i2cReg: 0-255, the register to write .br wVal: 0-0xFFFF, the value to write .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br Write word. SMBus 2.0 5.5.4 .EX S Addr Wr [A] i2cReg [A] wValLow [A] wValHigh [A] P .br .EE .IP "\fBint i2cReadByteData(unsigned handle, unsigned i2cReg)\fP" .IP "" 4 This reads a single byte from the specified register of the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br i2cReg: 0-255, the register to read .br .EE .br .br Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br Read byte. SMBus 2.0 5.5.5 .EX S Addr Wr [A] i2cReg [A] S Addr Rd [A] [Data] NA P .br .EE .IP "\fBint i2cReadWordData(unsigned handle, unsigned i2cReg)\fP" .IP "" 4 This reads a single 16 bit word from the specified register of the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br i2cReg: 0-255, the register to read .br .EE .br .br Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br Read word. SMBus 2.0 5.5.5 .EX S Addr Wr [A] i2cReg [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P .br .EE .IP "\fBint i2cProcessCall(unsigned handle, unsigned i2cReg, unsigned wVal)\fP" .IP "" 4 This writes 16 bits of data to the specified register of the device associated with handle and reads 16 bits of data in return. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br i2cReg: 0-255, the register to write/read .br wVal: 0-0xFFFF, the value to write .br .EE .br .br Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br Process call. SMBus 2.0 5.5.6 .EX S Addr Wr [A] i2cReg [A] wValLow [A] wValHigh [A] .br S Addr Rd [A] [DataLow] A [DataHigh] NA P .br .EE .IP "\fBint i2cWriteBlockData(unsigned handle, unsigned i2cReg, char *buf, unsigned count)\fP" .IP "" 4 This writes up to 32 bytes to the specified register of the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br i2cReg: 0-255, the register to write .br buf: an array with the data to send .br count: 1-32, the number of bytes to write .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br Block write. SMBus 2.0 5.5.7 .EX S Addr Wr [A] i2cReg [A] count [A] .br buf0 [A] buf1 [A] ... [A] bufn [A] P .br .EE .IP "\fBint i2cReadBlockData(unsigned handle, unsigned i2cReg, char *buf)\fP" .IP "" 4 This reads a block of up to 32 bytes from the specified register of the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br i2cReg: 0-255, the register to read .br buf: an array to receive the read data .br .EE .br .br The amount of returned data is set by the device. .br .br Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br Block read. SMBus 2.0 5.5.7 .EX S Addr Wr [A] i2cReg [A] .br S Addr Rd [A] [Count] A [buf0] A [buf1] A ... A [bufn] NA P .br .EE .IP "\fBint i2cBlockProcessCall(unsigned handle, unsigned i2cReg, char *buf, unsigned count)\fP" .IP "" 4 This writes data bytes to the specified register of the device associated with handle and reads a device specified number of bytes of data in return. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br i2cReg: 0-255, the register to write/read .br buf: an array with the data to send and to receive the read data .br count: 1-32, the number of bytes to write .br .EE .br .br Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received. The total number of bytes sent/received must be 32 or less. .br .br Block write-block read. SMBus 2.0 5.5.8 .EX S Addr Wr [A] i2cReg [A] count [A] buf0 [A] ... bufn [A] .br S Addr Rd [A] [Count] A [buf0] A ... [bufn] A P .br .EE .IP "\fBint i2cReadI2CBlockData(unsigned handle, unsigned i2cReg, char *buf, unsigned count)\fP" .IP "" 4 This reads count bytes from the specified register of the device associated with handle . The count may be 1-32. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br i2cReg: 0-255, the register to read .br buf: an array to receive the read data .br count: 1-32, the number of bytes to read .br .EE .br .br Returns the number of bytes read (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br .EX S Addr Wr [A] i2cReg [A] .br S Addr Rd [A] [buf0] A [buf1] A ... A [bufn] NA P .br .EE .IP "\fBint i2cWriteI2CBlockData(unsigned handle, unsigned i2cReg, char *buf, unsigned count)\fP" .IP "" 4 This writes 1 to 32 bytes to the specified register of the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br i2cReg: 0-255, the register to write .br buf: the data to write .br count: 1-32, the number of bytes to write .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br .EX S Addr Wr [A] i2cReg [A] buf0 [A] buf1 [A] ... [A] bufn [A] P .br .EE .IP "\fBint i2cReadDevice(unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This reads count bytes from the raw device into buf. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br buf: an array to receive the read data bytes .br count: >0, the number of bytes to read .br .EE .br .br Returns count (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br .EX S Addr Rd [A] [buf0] A [buf1] A ... A [bufn] NA P .br .EE .IP "\fBint i2cWriteDevice(unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This writes count bytes from buf to the raw device. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br buf: an array containing the data bytes to write .br count: >0, the number of bytes to write .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br .EX S Addr Wr [A] buf0 [A] buf1 [A] ... [A] bufn [A] P .br .EE .IP "\fBvoid i2cSwitchCombined(int setting)\fP" .IP "" 4 This sets the I2C (i2c-bcm2708) module "use combined transactions" parameter on or off. .br .br .EX setting: 0 to set the parameter off, non-zero to set it on .br .EE .br .br .br .br NOTE: when the flag is on a write followed by a read to the same slave address will use a repeated start (rather than a stop/start). .IP "\fBint i2cSegments(unsigned handle, pi_i2c_msg_t *segs, unsigned numSegs)\fP" .IP "" 4 This function executes multiple I2C segments in one transaction by calling the I2C_RDWR ioctl. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br segs: an array of I2C segments .br numSegs: >0, the number of I2C segments .br .EE .br .br Returns the number of segments if OK, otherwise PI_BAD_I2C_SEG. .IP "\fBint i2cZip(unsigned handle, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen)\fP" .IP "" 4 This function executes a sequence of I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenated command codes and associated data. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br inBuf: pointer to the concatenated I2C commands, see below .br inLen: size of command buffer .br outBuf: pointer to buffer to hold returned data .br outLen: size of output buffer .br .EE .br .br Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_HANDLE, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN. PI_BAD_I2C_WLEN, or PI_BAD_I2C_SEG. .br .br The following command codes are supported: .br .br Name Cmd & Data Meaning .br End 0 No more commands .br Escape 1 Next P is two bytes .br On 2 Switch combined flag on .br Off 3 Switch combined flag off .br Address 4 P Set I2C address to P .br Flags 5 lsb msb Set I2C flags to lsb + (msb << 8) .br Read 6 P Read P bytes of data .br Write 7 P ... Write P bytes of data .br .br .br The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). .br .br The address defaults to that associated with the handle. The flags default to 0. The address and flags maintain their previous value until updated. .br .br The returned I2C data is stored in consecutive locations of outBuf. .br .br \fBExample\fP .br .EX Set address 0x53, write 0x32, read 6 bytes .br Set address 0x1E, write 0x03, read 6 bytes .br Set address 0x68, write 0x1B, read 8 bytes .br End .br .br 0x04 0x53 0x07 0x01 0x32 0x06 0x06 .br 0x04 0x1E 0x07 0x01 0x03 0x06 0x06 .br 0x04 0x68 0x07 0x01 0x1B 0x06 0x08 .br 0x00 .br .EE .IP "\fBint bbI2COpen(unsigned SDA, unsigned SCL, unsigned baud)\fP" .IP "" 4 This function selects a pair of GPIO for bit banging I2C at a specified baud rate. .br .br Bit banging I2C allows for certain operations which are not possible with the standard I2C driver. .br .br o baud rates as low as 50 .br o repeated starts .br o clock stretching .br o I2C on any pair of spare GPIO .br .br .EX SDA: 0-31 .br SCL: 0-31 .br baud: 50-500000 .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_I2C_BAUD, or PI_GPIO_IN_USE. .br .br NOTE: .br .br The GPIO used for SDA and SCL must have pull-ups to 3V3 connected. As a guide the hardware pull-ups on pins 3 and 5 are 1k8 in value. .IP "\fBint bbI2CClose(unsigned SDA)\fP" .IP "" 4 This function stops bit banging I2C on a pair of GPIO previously opened with \fBbbI2COpen\fP. .br .br .EX SDA: 0-31, the SDA GPIO used in a prior call to \fBbbI2COpen\fP .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_I2C_GPIO. .IP "\fBint bbI2CZip(unsigned SDA, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen)\fP" .IP "" 4 This function executes a sequence of bit banged I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenated command codes and associated data. .br .br .EX SDA: 0-31 (as used in a prior call to \fBbbI2COpen\fP) .br inBuf: pointer to the concatenated I2C commands, see below .br inLen: size of command buffer .br outBuf: pointer to buffer to hold returned data .br outLen: size of output buffer .br .EE .br .br Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_USER_GPIO, PI_NOT_I2C_GPIO, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN, PI_BAD_I2C_WLEN, PI_I2C_READ_FAILED, or PI_I2C_WRITE_FAILED. .br .br The following command codes are supported: .br .br Name Cmd & Data Meaning .br End 0 No more commands .br Escape 1 Next P is two bytes .br Start 2 Start condition .br Stop 3 Stop condition .br Address 4 P Set I2C address to P .br Flags 5 lsb msb Set I2C flags to lsb + (msb << 8) .br Read 6 P Read P bytes of data .br Write 7 P ... Write P bytes of data .br .br .br The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). .br .br The address and flags default to 0. The address and flags maintain their previous value until updated. .br .br No flags are currently defined. .br .br The returned I2C data is stored in consecutive locations of outBuf. .br .br \fBExample\fP .br .EX Set address 0x53 .br start, write 0x32, (re)start, read 6 bytes, stop .br Set address 0x1E .br start, write 0x03, (re)start, read 6 bytes, stop .br Set address 0x68 .br start, write 0x1B, (re)start, read 8 bytes, stop .br End .br .br 0x04 0x53 .br 0x02 0x07 0x01 0x32 0x02 0x06 0x06 0x03 .br .br 0x04 0x1E .br 0x02 0x07 0x01 0x03 0x02 0x06 0x06 0x03 .br .br 0x04 0x68 .br 0x02 0x07 0x01 0x1B 0x02 0x06 0x08 0x03 .br .br 0x00 .br .EE .IP "\fBint bscXfer(bsc_xfer_t *bsc_xfer)\fP" .IP "" 4 This function provides a low-level interface to the SPI/I2C Slave peripheral on the BCM chip. .br .br This peripheral allows the Pi to act as a hardware slave device on an I2C or SPI bus. .br .br This is not a bit bang version and as such is OS timing independent. The bus timing is handled directly by the chip. .br .br The output process is simple. You simply append data to the FIFO buffer on the chip. This works like a queue, you add data to the queue and the master removes it. .br .br I can't get SPI to work properly. I tried with a control word of 0x303 and swapped MISO and MOSI. .br .br The function sets the BSC mode, writes any data in the transmit buffer to the BSC transmit FIFO, and copies any data in the BSC receive FIFO to the receive buffer. .br .br .EX bsc_xfer:= a structure defining the transfer .br .br typedef struct .br { .br uint32_t control; // Write .br int rxCnt; // Read only .br char rxBuf[BSC_FIFO_SIZE]; // Read only .br int txCnt; // Write .br char txBuf[BSC_FIFO_SIZE]; // Write .br } bsc_xfer_t; .br .EE .br .br To start a transfer set control (see below), copy the bytes to be added to the transmit FIFO (if any) to txBuf and set txCnt to the number of copied bytes. .br .br Upon return rxCnt will be set to the number of received bytes placed in rxBuf. .br .br Note that the control word sets the BSC mode. The BSC will stay in that mode until a different control word is sent. .br .br GPIO used for models other than those based on the BCM2711. .br .br SDA SCL MOSI SCLK MISO CE .br I2C 18 19 - - - - .br SPI - - 18 19 20 21 .br .br .br GPIO used for models based on the BCM2711 (e.g. the Pi4B). .br .br SDA SCL MOSI SCLK MISO CE .br I2C 10 11 - - - - .br SPI - - 10 11 9 8 .br .br .br When a zero control word is received the used GPIO will be reset to INPUT mode. .br .br The returned function value is the status of the transfer (see below). .br .br If there was an error the status will be less than zero (and will contain the error code). .br .br The most significant word of the returned status contains the number of bytes actually copied from txBuf to the BSC transmit FIFO (may be less than requested if the FIFO already contained untransmitted data). .br .br control consists of the following bits. .br .br .EX 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 .br a a a a a a a - - IT HC TF IR RE TE BK EC ES PL PH I2 SP EN .br .EE .br .br Bits 0-13 are copied unchanged to the BSC CR register. See pages 163-165 of the Broadcom peripherals document for full details. .br .br aaaaaaa defines the I2C slave address (only relevant in I2C mode) .br IT invert transmit status flags .br HC enable host control .br TF enable test FIFO .br IR invert receive status flags .br RE enable receive .br TE enable transmit .br BK abort operation and clear FIFOs .br EC send control register as first I2C byte .br ES send status register as first I2C byte .br PL set SPI polarity high .br PH set SPI phase high .br I2 enable I2C mode .br SP enable SPI mode .br EN enable BSC peripheral .br .br .br The returned status has the following format .br .br .EX 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 .br S S S S S R R R R R T T T T T RB TE RF TF RE TB .br .EE .br .br Bits 0-15 are copied unchanged from the BSC FR register. See pages 165-166 of the Broadcom peripherals document for full details. .br .br SSSSS number of bytes successfully copied to transmit FIFO .br RRRRR number of bytes in receieve FIFO .br TTTTT number of bytes in transmit FIFO .br RB receive busy .br TE transmit FIFO empty .br RF receive FIFO full .br TF transmit FIFO full .br RE receive FIFO empty .br TB transmit busy .br .br .br The following example shows how to configure the BSC peripheral as an I2C slave with address 0x13 and send four bytes. .br .br \fBExample\fP .br .EX bsc_xfer_t xfer; .br .br xfer.control = (0x13<<16) | 0x305; .br .br memcpy(xfer.txBuf, "ABCD", 4); .br xfer.txCnt = 4; .br .br status = bscXfer(&xfer); .br .br if (status >= 0) .br { .br // process transfer .br } .br .EE .IP "\fBint bbSPIOpen(unsigned CS, unsigned MISO, unsigned MOSI, unsigned SCLK, unsigned baud, unsigned spiFlags)\fP" .IP "" 4 This function selects a set of GPIO for bit banging SPI with a specified baud rate and mode. .br .br .EX CS: 0-31 .br MISO: 0-31 .br MOSI: 0-31 .br SCLK: 0-31 .br baud: 50-250000 .br spiFlags: see below .br .EE .br .br spiFlags consists of the least significant 22 bits. .br .br .EX 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 .br 0 0 0 0 0 0 R T 0 0 0 0 0 0 0 0 0 0 0 p m m .br .EE .br .br mm defines the SPI mode, defaults to 0 .br .br .EX Mode CPOL CPHA .br 0 0 0 .br 1 0 1 .br 2 1 0 .br 3 1 1 .br .EE .br .br p is 0 if CS is active low (default) and 1 for active high. .br .br T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. .br .br R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. .br .br The other bits in flags should be set to zero. .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_SPI_BAUD, or PI_GPIO_IN_USE. .br .br If more than one device is connected to the SPI bus (defined by SCLK, MOSI, and MISO) each must have its own CS. .br .br \fBExample\fP .br .EX bbSPIOpen(10, MISO, MOSI, SCLK, 10000, 0); // device 1 .br bbSPIOpen(11, MISO, MOSI, SCLK, 20000, 3); // device 2 .br .EE .IP "\fBint bbSPIClose(unsigned CS)\fP" .IP "" 4 This function stops bit banging SPI on a set of GPIO opened with \fBbbSPIOpen\fP. .br .br .EX CS: 0-31, the CS GPIO used in a prior call to \fBbbSPIOpen\fP .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_SPI_GPIO. .IP "\fBint bbSPIXfer(unsigned CS, char *inBuf, char *outBuf, unsigned count)\fP" .IP "" 4 This function executes a bit banged SPI transfer. .br .br .EX CS: 0-31 (as used in a prior call to \fBbbSPIOpen\fP) .br inBuf: pointer to buffer to hold data to be sent .br outBuf: pointer to buffer to hold returned data .br count: size of data transfer .br .EE .br .br Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_USER_GPIO, PI_NOT_SPI_GPIO or PI_BAD_POINTER. .br .br \fBExample\fP .br .EX // gcc -Wall -pthread -o bbSPIx_test bbSPIx_test.c -lpigpio .br // sudo ./bbSPIx_test .br .br .br #include .br .br #include "pigpio.h" .br .br #define CE0 5 .br #define CE1 6 .br #define MISO 13 .br #define MOSI 19 .br #define SCLK 12 .br .br int main(int argc, char *argv[]) .br { .br int i, count, set_val, read_val; .br unsigned char inBuf[3]; .br char cmd1[] = {0, 0}; .br char cmd2[] = {12, 0}; .br char cmd3[] = {1, 128, 0}; .br .br if (gpioInitialise() < 0) .br { .br fprintf(stderr, "pigpio initialisation failed.\n"); .br return 1; .br } .br .br bbSPIOpen(CE0, MISO, MOSI, SCLK, 10000, 0); // MCP4251 DAC .br bbSPIOpen(CE1, MISO, MOSI, SCLK, 20000, 3); // MCP3008 ADC .br .br for (i=0; i<256; i++) .br { .br cmd1[1] = i; .br .br count = bbSPIXfer(CE0, cmd1, (char *)inBuf, 2); // > DAC .br .br if (count == 2) .br { .br count = bbSPIXfer(CE0, cmd2, (char *)inBuf, 2); // < DAC .br .br if (count == 2) .br { .br set_val = inBuf[1]; .br .br count = bbSPIXfer(CE1, cmd3, (char *)inBuf, 3); // < ADC .br .br if (count == 3) .br { .br read_val = ((inBuf[1]&3)<<8) | inBuf[2]; .br printf("%d %d\n", set_val, read_val); .br } .br } .br } .br } .br .br bbSPIClose(CE0); .br bbSPIClose(CE1); .br .br gpioTerminate(); .br .br return 0; .br } .br .EE .IP "\fBint spiOpen(unsigned spiChan, unsigned baud, unsigned spiFlags)\fP" .IP "" 4 This function returns a handle for the SPI device on the channel. Data will be transferred at baud bits per second. The flags may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select. .br .br The Pi has two SPI peripherals: main and auxiliary. .br .br The main SPI has two chip selects (channels), the auxiliary has three. .br .br The auxiliary SPI is available on all models but the A and B. .br .br The GPIO used are given in the following table. .br .br MISO MOSI SCLK CE0 CE1 CE2 .br Main SPI 9 10 11 8 7 - .br Aux SPI 19 20 21 18 17 16 .br .br .br .EX spiChan: 0-1 (0-2 for the auxiliary SPI) .br baud: 32K-125M (values above 30M are unlikely to work) .br spiFlags: see below .br .EE .br .br Returns a handle (>=0) if OK, otherwise PI_BAD_SPI_CHANNEL, PI_BAD_SPI_SPEED, PI_BAD_FLAGS, PI_NO_AUX_SPI, or PI_SPI_OPEN_FAILED. .br .br spiFlags consists of the least significant 22 bits. .br .br .EX 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 .br b b b b b b R T n n n n W A u2 u1 u0 p2 p1 p0 m m .br .EE .br .br mm defines the SPI mode. .br .br Warning: modes 1 and 3 do not appear to work on the auxiliary SPI. .br .br .EX Mode POL PHA .br 0 0 0 .br 1 0 1 .br 2 1 0 .br 3 1 1 .br .EE .br .br px is 0 if CEx is active low (default) and 1 for active high. .br .br ux is 0 if the CEx GPIO is reserved for SPI (default) and 1 otherwise. .br .br A is 0 for the main SPI, 1 for the auxiliary SPI. .br .br W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Main SPI only. .br .br nnnn defines the number of bytes (0-15) to write before switching the MOSI line to MISO to read data. This field is ignored if W is not set. Main SPI only. .br .br T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. Auxiliary SPI only. .br .br R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. Auxiliary SPI only. .br .br bbbbbb defines the word size in bits (0-32). The default (0) sets 8 bits per word. Auxiliary SPI only. .br .br The \fBspiRead\fP, \fBspiWrite\fP, and \fBspiXfer\fP functions transfer data packed into 1, 2, or 4 bytes according to the word size in bits. .br .br For bits 1-8 there will be one byte per word. .br For bits 9-16 there will be two bytes per word. .br For bits 17-32 there will be four bytes per word. .br .br Multi-byte transfers are made in least significant byte first order. .br .br E.g. to transfer 32 11-bit words buf should contain 64 bytes and count should be 64. .br .br E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A. .br .br The other bits in flags should be set to zero. .IP "\fBint spiClose(unsigned handle)\fP" .IP "" 4 This functions closes the SPI device identified by the handle. .br .br .EX handle: >=0, as returned by a call to \fBspiOpen\fP .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .IP "\fBint spiRead(unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This function reads count bytes of data from the SPI device associated with the handle. .br .br .EX handle: >=0, as returned by a call to \fBspiOpen\fP .br buf: an array to receive the read data bytes .br count: the number of bytes to read .br .EE .br .br Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. .IP "\fBint spiWrite(unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This function writes count bytes of data from buf to the SPI device associated with the handle. .br .br .EX handle: >=0, as returned by a call to \fBspiOpen\fP .br buf: the data bytes to write .br count: the number of bytes to write .br .EE .br .br Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. .IP "\fBint spiXfer(unsigned handle, char *txBuf, char *rxBuf, unsigned count)\fP" .IP "" 4 This function transfers count bytes of data from txBuf to the SPI device associated with the handle. Simultaneously count bytes of data are read from the device and placed in rxBuf. .br .br .EX handle: >=0, as returned by a call to \fBspiOpen\fP .br txBuf: the data bytes to write .br rxBuf: the received data bytes .br count: the number of bytes to transfer .br .EE .br .br Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. .IP "\fBint serOpen(char *sertty, unsigned baud, unsigned serFlags)\fP" .IP "" 4 This function opens a serial device at a specified baud rate and with specified flags. The device name must start with /dev/tty or /dev/serial. .br .br .EX sertty: the serial device to open .br baud: the baud rate in bits per second, see below .br serFlags: 0 .br .EE .br .br Returns a handle (>=0) if OK, otherwise PI_NO_HANDLE, or PI_SER_OPEN_FAILED. .br .br The baud rate must be one of 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, or 230400. .br .br No flags are currently defined. This parameter should be set to zero. .IP "\fBint serClose(unsigned handle)\fP" .IP "" 4 This function closes the serial device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBserOpen\fP .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .IP "\fBint serWriteByte(unsigned handle, unsigned bVal)\fP" .IP "" 4 This function writes bVal to the serial port associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBserOpen\fP .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED. .IP "\fBint serReadByte(unsigned handle)\fP" .IP "" 4 This function reads a byte from the serial port associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBserOpen\fP .br .EE .br .br Returns the read byte (>=0) if OK, otherwise PI_BAD_HANDLE, PI_SER_READ_NO_DATA, or PI_SER_READ_FAILED. .br .br If no data is ready PI_SER_READ_NO_DATA is returned. .IP "\fBint serWrite(unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This function writes count bytes from buf to the the serial port associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBserOpen\fP .br buf: the array of bytes to write .br count: the number of bytes to write .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED. .IP "\fBint serRead(unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This function reads up count bytes from the the serial port associated with handle and writes them to buf. .br .br .EX handle: >=0, as returned by a call to \fBserOpen\fP .br buf: an array to receive the read data .br count: the maximum number of bytes to read .br .EE .br .br Returns the number of bytes read (>0=) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_READ_NO_DATA. .br .br If no data is ready zero is returned. .IP "\fBint serDataAvailable(unsigned handle)\fP" .IP "" 4 This function returns the number of bytes available to be read from the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBserOpen\fP .br .EE .br .br Returns the number of bytes of data available (>=0) if OK, otherwise PI_BAD_HANDLE. .IP "\fBint gpioTrigger(unsigned user_gpio, unsigned pulseLen, unsigned level)\fP" .IP "" 4 This function sends a trigger pulse to a GPIO. The GPIO is set to level for pulseLen microseconds and then reset to not level. .br .br .EX user_gpio: 0-31 .br pulseLen: 1-100 .br level: 0,1 .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_LEVEL, or PI_BAD_PULSELEN. .IP "\fBint gpioSetWatchdog(unsigned user_gpio, unsigned timeout)\fP" .IP "" 4 Sets a watchdog for a GPIO. .br .br .EX user_gpio: 0-31 .br timeout: 0-60000 .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_BAD_WDOG_TIMEOUT. .br .br The watchdog is nominally in milliseconds. .br .br One watchdog may be registered per GPIO. .br .br The watchdog may be cancelled by setting timeout to 0. .br .br Until cancelled a timeout will be reported every timeout milliseconds after the last GPIO activity. .br .br In particular: .br .br 1) any registered alert function for the GPIO will be called with the level set to PI_TIMEOUT. .br .br 2) any notification for the GPIO will have a report written to the fifo with the flags set to indicate a watchdog timeout. .br .br \fBExample\fP .br .EX void aFunction(int gpio, int level, uint32_t tick) .br { .br printf("GPIO %d became %d at %d", gpio, level, tick); .br } .br .br // call aFunction whenever GPIO 4 changes state .br gpioSetAlertFunc(4, aFunction); .br .br // or approximately every 5 millis .br gpioSetWatchdog(4, 5); .br .EE .IP "\fBint gpioNoiseFilter(unsigned user_gpio, unsigned steady, unsigned active)\fP" .IP "" 4 Sets a noise filter on a GPIO. .br .br Level changes on the GPIO are ignored until a level which has been stable for \fBsteady\fP microseconds is detected. Level changes on the GPIO are then reported for \fBactive\fP microseconds after which the process repeats. .br .br .EX user_gpio: 0-31 .br steady: 0-300000 .br active: 0-1000000 .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER. .br .br This filter affects the GPIO samples returned to callbacks set up with \fBgpioSetAlertFunc\fP, \fBgpioSetAlertFuncEx\fP, \fBgpioSetGetSamplesFunc\fP, and \fBgpioSetGetSamplesFuncEx\fP. .br .br It does not affect interrupts set up with \fBgpioSetISRFunc\fP, \fBgpioSetISRFuncEx\fP, or levels read by \fBgpioRead\fP, \fBgpioRead_Bits_0_31\fP, or \fBgpioRead_Bits_32_53\fP. .br .br Level changes before and after the active period may be reported. Your software must be designed to cope with such reports. .IP "\fBint gpioGlitchFilter(unsigned user_gpio, unsigned steady)\fP" .IP "" 4 Sets a glitch filter on a GPIO. .br .br Level changes on the GPIO are not reported unless the level has been stable for at least \fBsteady\fP microseconds. The level is then reported. Level changes of less than \fBsteady\fP microseconds are ignored. .br .br .EX user_gpio: 0-31 .br steady: 0-300000 .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER. .br .br This filter affects the GPIO samples returned to callbacks set up with \fBgpioSetAlertFunc\fP, \fBgpioSetAlertFuncEx\fP, \fBgpioSetGetSamplesFunc\fP, and \fBgpioSetGetSamplesFuncEx\fP. .br .br It does not affect interrupts set up with \fBgpioSetISRFunc\fP, \fBgpioSetISRFuncEx\fP, or levels read by \fBgpioRead\fP, \fBgpioRead_Bits_0_31\fP, or \fBgpioRead_Bits_32_53\fP. .br .br Each (stable) edge will be timestamped \fBsteady\fP microseconds after it was first detected. .IP "\fBint gpioSetGetSamplesFunc(gpioGetSamplesFunc_t f, uint32_t bits)\fP" .IP "" 4 Registers a function to be called (a callback) every millisecond with the latest GPIO samples. .br .br .EX f: the function to call .br bits: the GPIO of interest .br .EE .br .br Returns 0 if OK. .br .br The function is passed a pointer to the samples (an array of \fBgpioSample_t\fP), and the number of samples. .br .br Only one function can be registered. .br .br The callback may be cancelled by passing NULL as the function. .br .br The samples returned will be the union of bits, plus any active alerts, plus any active notifications. .br .br e.g. if there are alerts for GPIO 7, 8, and 9, notifications for GPIO 8, 10, 23, 24, and bits is (1<<23)|(1<<17) then samples for GPIO 7, 8, 9, 10, 17, 23, and 24 will be reported. .IP "\fBint gpioSetGetSamplesFuncEx(gpioGetSamplesFuncEx_t f, uint32_t bits, void *userdata)\fP" .IP "" 4 Registers a function to be called (a callback) every millisecond with the latest GPIO samples. .br .br .EX f: the function to call .br bits: the GPIO of interest .br userdata: a pointer to arbitrary user data .br .EE .br .br Returns 0 if OK. .br .br The function is passed a pointer to the samples (an array of \fBgpioSample_t\fP), the number of samples, and the userdata pointer. .br .br Only one of \fBgpioGetSamplesFunc\fP or \fBgpioGetSamplesFuncEx\fP can be registered. .br .br See \fBgpioSetGetSamplesFunc\fP for further details. .IP "\fBint gpioSetTimerFunc(unsigned timer, unsigned millis, gpioTimerFunc_t f)\fP" .IP "" 4 Registers a function to be called (a callback) every millis milliseconds. .br .br .EX timer: 0-9 .br millis: 10-60000 .br f: the function to call .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_TIMER, PI_BAD_MS, or PI_TIMER_FAILED. .br .br 10 timers are supported numbered 0 to 9. .br .br One function may be registered per timer. .br .br The timer may be cancelled by passing NULL as the function. .br .br \fBExample\fP .br .EX void bFunction(void) .br { .br printf("two seconds have elapsed"); .br } .br .br // call bFunction every 2000 milliseconds .br gpioSetTimerFunc(0, 2000, bFunction); .br .EE .IP "\fBint gpioSetTimerFuncEx(unsigned timer, unsigned millis, gpioTimerFuncEx_t f, void *userdata)\fP" .IP "" 4 Registers a function to be called (a callback) every millis milliseconds. .br .br .EX timer: 0-9. .br millis: 10-60000 .br f: the function to call .br userdata: a pointer to arbitrary user data .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_TIMER, PI_BAD_MS, or PI_TIMER_FAILED. .br .br The function is passed the userdata pointer. .br .br Only one of \fBgpioSetTimerFunc\fP or \fBgpioSetTimerFuncEx\fP can be registered per timer. .br .br See \fBgpioSetTimerFunc\fP for further details. .IP "\fBpthread_t *gpioStartThread(gpioThreadFunc_t f, void *userdata)\fP" .IP "" 4 Starts a new thread of execution with f as the main routine. .br .br .EX f: the main function for the new thread .br userdata: a pointer to arbitrary user data .br .EE .br .br Returns a pointer to pthread_t if OK, otherwise NULL. .br .br The function is passed the single argument arg. .br .br The thread can be cancelled by passing the pointer to pthread_t to \fBgpioStopThread\fP. .br .br \fBExample\fP .br .EX #include .br #include .br .br void *myfunc(void *arg) .br { .br while (1) .br { .br printf("%s", arg); .br sleep(1); .br } .br } .br .br int main(int argc, char *argv[]) .br { .br pthread_t *p1, *p2, *p3; .br .br if (gpioInitialise() < 0) return 1; .br .br p1 = gpioStartThread(myfunc, "thread 1"); sleep(3); .br .br p2 = gpioStartThread(myfunc, "thread 2"); sleep(3); .br .br p3 = gpioStartThread(myfunc, "thread 3"); sleep(3); .br .br gpioStopThread(p3); sleep(3); .br .br gpioStopThread(p2); sleep(3); .br .br gpioStopThread(p1); sleep(3); .br .br gpioTerminate(); .br } .br .EE .IP "\fBvoid gpioStopThread(pthread_t *pth)\fP" .IP "" 4 Cancels the thread pointed at by pth. .br .br .EX pth: a thread pointer returned by \fBgpioStartThread\fP .br .EE .br .br No value is returned. .br .br The thread to be stopped should have been started with \fBgpioStartThread\fP. .IP "\fBint gpioStoreScript(char *script)\fP" .IP "" 4 This function stores a null terminated script for later execution. .br .br See \fBhttp://abyz.me.uk/rpi/pigpio/pigs.html#Scripts\fP for details. .br .br .EX script: the text of the script .br .EE .br .br The function returns a script id if the script is valid, otherwise PI_BAD_SCRIPT. .IP "\fBint gpioRunScript(unsigned script_id, unsigned numPar, uint32_t *param)\fP" .IP "" 4 This function runs a stored script. .br .br .EX script_id: >=0, as returned by \fBgpioStoreScript\fP .br numPar: 0-10, the number of parameters .br param: an array of parameters .br .EE .br .br The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM. .br .br param is an array of up to 10 parameters which may be referenced in the script as p0 to p9. .IP "\fBint gpioRunScript(unsigned script_id, unsigned numPar, uint32_t *param)\fP" .IP "" 4 This function runs a stored script. .br .br .EX script_id: >=0, as returned by \fBgpioStoreScript\fP .br numPar: 0-10, the number of parameters .br param: an array of parameters .br .EE .br .br The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM. .br .br param is an array of up to 10 parameters which may be referenced in the script as p0 to p9. .IP "\fBint gpioUpdateScript(unsigned script_id, unsigned numPar, uint32_t *param)\fP" .IP "" 4 This function sets the parameters of a script. The script may or may not be running. The first numPar parameters of the script are overwritten with the new values. .br .br .EX script_id: >=0, as returned by \fBgpioStoreScript\fP .br numPar: 0-10, the number of parameters .br param: an array of parameters .br .EE .br .br The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM. .br .br param is an array of up to 10 parameters which may be referenced in the script as p0 to p9. .IP "\fBint gpioScriptStatus(unsigned script_id, uint32_t *param)\fP" .IP "" 4 This function returns the run status of a stored script as well as the current values of parameters 0 to 9. .br .br .EX script_id: >=0, as returned by \fBgpioStoreScript\fP .br param: an array to hold the returned 10 parameters .br .EE .br .br The function returns greater than or equal to 0 if OK, otherwise PI_BAD_SCRIPT_ID. .br .br The run status may be .br .br .EX PI_SCRIPT_INITING .br PI_SCRIPT_HALTED .br PI_SCRIPT_RUNNING .br PI_SCRIPT_WAITING .br PI_SCRIPT_FAILED .br .EE .br .br The current value of script parameters 0 to 9 are returned in param. .IP "\fBint gpioStopScript(unsigned script_id)\fP" .IP "" 4 This function stops a running script. .br .br .EX script_id: >=0, as returned by \fBgpioStoreScript\fP .br .EE .br .br The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID. .IP "\fBint gpioDeleteScript(unsigned script_id)\fP" .IP "" 4 This function deletes a stored script. .br .br .EX script_id: >=0, as returned by \fBgpioStoreScript\fP .br .EE .br .br The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID. .IP "\fBint gpioSetSignalFunc(unsigned signum, gpioSignalFunc_t f)\fP" .IP "" 4 Registers a function to be called (a callback) when a signal occurs. .br .br .EX signum: 0-63 .br f: the callback function .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_SIGNUM. .br .br The function is passed the signal number. .br .br One function may be registered per signal. .br .br The callback may be cancelled by passing NULL. .br .br By default all signals are treated as fatal and cause the library to call gpioTerminate and then exit. .IP "\fBint gpioSetSignalFuncEx(unsigned signum, gpioSignalFuncEx_t f, void *userdata)\fP" .IP "" 4 Registers a function to be called (a callback) when a signal occurs. .br .br .EX signum: 0-63 .br f: the callback function .br userdata: a pointer to arbitrary user data .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_SIGNUM. .br .br The function is passed the signal number and the userdata pointer. .br .br Only one of gpioSetSignalFunc or gpioSetSignalFuncEx can be registered per signal. .br .br See gpioSetSignalFunc for further details. .IP "\fBuint32_t gpioRead_Bits_0_31(void)\fP" .IP "" 4 Returns the current level of GPIO 0-31. .IP "\fBuint32_t gpioRead_Bits_32_53(void)\fP" .IP "" 4 Returns the current level of GPIO 32-53. .IP "\fBint gpioWrite_Bits_0_31_Clear(uint32_t bits)\fP" .IP "" 4 Clears GPIO 0-31 if the corresponding bit in bits is set. .br .br .EX bits: a bit mask of GPIO to clear .br .EE .br .br Returns 0 if OK. .br .br \fBExample\fP .br .EX // To clear (set to 0) GPIO 4, 7, and 15 .br gpioWrite_Bits_0_31_Clear( (1<<4) | (1<<7) | (1<<15) ); .br .EE .IP "\fBint gpioWrite_Bits_32_53_Clear(uint32_t bits)\fP" .IP "" 4 Clears GPIO 32-53 if the corresponding bit (0-21) in bits is set. .br .br .EX bits: a bit mask of GPIO to clear .br .EE .br .br Returns 0 if OK. .IP "\fBint gpioWrite_Bits_0_31_Set(uint32_t bits)\fP" .IP "" 4 Sets GPIO 0-31 if the corresponding bit in bits is set. .br .br .EX bits: a bit mask of GPIO to set .br .EE .br .br Returns 0 if OK. .IP "\fBint gpioWrite_Bits_32_53_Set(uint32_t bits)\fP" .IP "" 4 Sets GPIO 32-53 if the corresponding bit (0-21) in bits is set. .br .br .EX bits: a bit mask of GPIO to set .br .EE .br .br Returns 0 if OK. .br .br \fBExample\fP .br .EX // To set (set to 1) GPIO 32, 40, and 53 .br gpioWrite_Bits_32_53_Set((1<<(32-32)) | (1<<(40-32)) | (1<<(53-32))); .br .EE .IP "\fBint gpioHardwareClock(unsigned gpio, unsigned clkfreq)\fP" .IP "" 4 Starts a hardware clock on a GPIO at the specified frequency. Frequencies above 30MHz are unlikely to work. .br .br .EX gpio: see description .br clkfreq: 0 (off) or 4689-250M (13184-375M for the BCM2711) .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_GPIO, PI_NOT_HCLK_GPIO, PI_BAD_HCLK_FREQ,or PI_BAD_HCLK_PASS. .br .br The same clock is available on multiple GPIO. The latest frequency setting will be used by all GPIO which share a clock. .br .br The GPIO must be one of the following. .br .br .EX 4 clock 0 All models .br 5 clock 1 All models but A and B (reserved for system use) .br 6 clock 2 All models but A and B .br 20 clock 0 All models but A and B .br 21 clock 1 All models but A and Rev.2 B (reserved for system use) .br .br 32 clock 0 Compute module only .br 34 clock 0 Compute module only .br 42 clock 1 Compute module only (reserved for system use) .br 43 clock 2 Compute module only .br 44 clock 1 Compute module only (reserved for system use) .br .EE .br .br Access to clock 1 is protected by a password as its use will likely crash the Pi. The password is given by or'ing 0x5A000000 with the GPIO number. .IP "\fBint gpioHardwarePWM(unsigned gpio, unsigned PWMfreq, unsigned PWMduty)\fP" .IP "" 4 Starts hardware PWM on a GPIO at the specified frequency and dutycycle. Frequencies above 30MHz are unlikely to work. .br .br NOTE: Any waveform started by \fBgpioWaveTxSend\fP, or \fBgpioWaveChain\fP will be cancelled. .br .br This function is only valid if the pigpio main clock is PCM. The main clock defaults to PCM but may be overridden by a call to \fBgpioCfgClock\fP. .br .br .EX gpio: see description .br PWMfreq: 0 (off) or 1-125M (1-187.5M for the BCM2711) .br PWMduty: 0 (off) to 1000000 (1M)(fully on) .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_GPIO, PI_NOT_HPWM_GPIO, PI_BAD_HPWM_DUTY, PI_BAD_HPWM_FREQ, or PI_HPWM_ILLEGAL. .br .br The same PWM channel is available on multiple GPIO. The latest frequency and dutycycle setting will be used by all GPIO which share a PWM channel. .br .br The GPIO must be one of the following. .br .br .EX 12 PWM channel 0 All models but A and B .br 13 PWM channel 1 All models but A and B .br 18 PWM channel 0 All models .br 19 PWM channel 1 All models but A and B .br .br 40 PWM channel 0 Compute module only .br 41 PWM channel 1 Compute module only .br 45 PWM channel 1 Compute module only .br 52 PWM channel 0 Compute module only .br 53 PWM channel 1 Compute module only .br .EE .br .br The actual number of steps beween off and fully on is the integral part of 250M/PWMfreq (375M/PWMfreq for the BCM2711). .br .br The actual frequency set is 250M/steps (375M/steps for the BCM2711). .br .br There will only be a million steps for a PWMfreq of 250 (375 for the BCM2711). Lower frequencies will have more steps and higher frequencies will have fewer steps. PWMduty is automatically scaled to take this into account. .IP "\fBint gpioTime(unsigned timetype, int *seconds, int *micros)\fP" .IP "" 4 Updates the seconds and micros variables with the current time. .br .br .EX timetype: 0 (relative), 1 (absolute) .br seconds: a pointer to an int to hold seconds .br micros: a pointer to an int to hold microseconds .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_TIMETYPE. .br .br If timetype is PI_TIME_ABSOLUTE updates seconds and micros with the number of seconds and microseconds since the epoch (1st January 1970). .br .br If timetype is PI_TIME_RELATIVE updates seconds and micros with the number of seconds and microseconds since the library was initialised. .br .br \fBExample\fP .br .EX int secs, mics; .br .br // print the number of seconds since the library was started .br gpioTime(PI_TIME_RELATIVE, &secs, &mics); .br printf("library started %d.%03d seconds ago", secs, mics/1000); .br .EE .IP "\fBint gpioSleep(unsigned timetype, int seconds, int micros)\fP" .IP "" 4 Sleeps for the number of seconds and microseconds specified by seconds and micros. .br .br .EX timetype: 0 (relative), 1 (absolute) .br seconds: seconds to sleep .br micros: microseconds to sleep .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_TIMETYPE, PI_BAD_SECONDS, or PI_BAD_MICROS. .br .br If timetype is PI_TIME_ABSOLUTE the sleep ends when the number of seconds and microseconds since the epoch (1st January 1970) has elapsed. System clock changes are taken into account. .br .br If timetype is PI_TIME_RELATIVE the sleep is for the specified number of seconds and microseconds. System clock changes do not effect the sleep length. .br .br For short delays (say, 50 microseonds or less) use \fBgpioDelay\fP. .br .br \fBExample\fP .br .EX gpioSleep(PI_TIME_RELATIVE, 2, 500000); // sleep for 2.5 seconds .br .br gpioSleep(PI_TIME_RELATIVE, 0, 100000); // sleep for 0.1 seconds .br .br gpioSleep(PI_TIME_RELATIVE, 60, 0); // sleep for one minute .br .EE .IP "\fBuint32_t gpioDelay(uint32_t micros)\fP" .IP "" 4 Delays for at least the number of microseconds specified by micros. .br .br .EX micros: the number of microseconds to sleep .br .EE .br .br Returns the actual length of the delay in microseconds. .br .br Delays of 100 microseconds or less use busy waits. .IP "\fBuint32_t gpioTick(void)\fP" .IP "" 4 Returns the current system tick. .br .br Tick is the number of microseconds since system boot. .br .br As tick is an unsigned 32 bit quantity it wraps around after 2^32 microseconds, which is approximately 1 hour 12 minutes. .br .br You don't need to worry about the wrap around as long as you take a tick (uint32_t) from another tick, i.e. the following code will always provide the correct difference. .br .br \fBExample\fP .br .EX uint32_t startTick, endTick; .br int diffTick; .br .br startTick = gpioTick(); .br .br // do some processing .br .br endTick = gpioTick(); .br .br diffTick = endTick - startTick; .br .br printf("some processing took %d microseconds", diffTick); .br .EE .IP "\fBunsigned gpioHardwareRevision(void)\fP" .IP "" 4 Returns the hardware revision. .br .br If the hardware revision can not be found or is not a valid hexadecimal number the function returns 0. .br .br The hardware revision is the last few characters on the Revision line of /proc/cpuinfo. .br .br The revision number can be used to determine the assignment of GPIO to pins (see \fBgpio\fP). .br .br There are at least three types of board. .br .br Type 1 boards have hardware revision numbers of 2 and 3. .br .br Type 2 boards have hardware revision numbers of 4, 5, 6, and 15. .br .br Type 3 boards have hardware revision numbers of 16 or greater. .br .br for "Revision : 0002" the function returns 2. .br for "Revision : 000f" the function returns 15. .br for "Revision : 000g" the function returns 0. .IP "\fBunsigned gpioVersion(void)\fP" .IP "" 4 Returns the pigpio version. .IP "\fBint gpioGetPad(unsigned pad)\fP" .IP "" 4 This function returns the pad drive strength in mA. .br .br .EX pad: 0-2, the pad to get .br .EE .br .br Returns the pad drive strength if OK, otherwise PI_BAD_PAD. .br .br Pad GPIO .br 0 0-27 .br 1 28-45 .br 2 46-53 .br .br .br \fBExample\fP .br .EX strength = gpioGetPad(1); // get pad 1 strength .br .EE .IP "\fBint gpioSetPad(unsigned pad, unsigned padStrength)\fP" .IP "" 4 This function sets the pad drive strength in mA. .br .br .EX pad: 0-2, the pad to set .br padStrength: 1-16 mA .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_PAD, or PI_BAD_STRENGTH. .br .br Pad GPIO .br 0 0-27 .br 1 28-45 .br 2 46-53 .br .br .br \fBExample\fP .br .EX gpioSetPad(0, 16); // set pad 0 strength to 16 mA .br .EE .IP "\fBint eventMonitor(unsigned handle, uint32_t bits)\fP" .IP "" 4 This function selects the events to be reported on a previously opened handle. .br .br .EX handle: >=0, as returned by \fBgpioNotifyOpen\fP .br bits: a bit mask indicating the events of interest .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .br .br A report is sent each time an event is triggered providing the corresponding bit in bits is set. .br .br See \fBgpioNotifyBegin\fP for the notification format. .br .br \fBExample\fP .br .EX // Start reporting events 3, 6, and 7. .br .br // bit 76543210 .br // (0xC8 = 0b11001000) .br .br eventMonitor(h, 0xC8); .br .EE .br .br .IP "\fBint eventSetFunc(unsigned event, eventFunc_t f)\fP" .IP "" 4 Registers a function to be called (a callback) when the specified event occurs. .br .br .EX event: 0-31 .br f: the callback function .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_EVENT_ID. .br .br One function may be registered per event. .br .br The function is passed the event, and the tick. .br .br The callback may be cancelled by passing NULL as the function. .IP "\fBint eventSetFuncEx(unsigned event, eventFuncEx_t f, void *userdata)\fP" .IP "" 4 Registers a function to be called (a callback) when the specified event occurs. .br .br .EX event: 0-31 .br f: the callback function .br userdata: pointer to arbitrary user data .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_EVENT_ID. .br .br One function may be registered per event. .br .br The function is passed the event, the tick, and the ueserdata pointer. .br .br The callback may be cancelled by passing NULL as the function. .br .br Only one of \fBeventSetFunc\fP or \fBeventSetFuncEx\fP can be registered per event. .IP "\fBint eventTrigger(unsigned event)\fP" .IP "" 4 This function signals the occurrence of an event. .br .br .EX event: 0-31, the event .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_EVENT_ID. .br .br An event is a signal used to inform one or more consumers to start an action. Each consumer which has registered an interest in the event (e.g. by calling \fBeventSetFunc\fP) will be informed by a callback. .br .br One event, PI_EVENT_BSC (31) is predefined. This event is auto generated on BSC slave activity. .br .br The meaning of other events is arbitrary. .br .br Note that other than its id and its tick there is no data associated with an event. .IP "\fBint shell(char *scriptName, char *scriptString)\fP" .IP "" 4 This function uses the system call to execute a shell script with the given string as its parameter. .br .br .EX scriptName: the name of the script, only alphanumeric characters, .br '-' and '_' are allowed in the name .br scriptString: the string to pass to the script .br .EE .br .br The exit status of the system call is returned if OK, otherwise PI_BAD_SHELL_STATUS. .br .br scriptName must exist in /opt/pigpio/cgi and must be executable. .br .br The returned exit status is normally 256 times that set by the shell script exit function. If the script can't be found 32512 will be returned. .br .br The following table gives some example returned statuses. .br .br Script exit status Returned system call status .br 1 256 .br 5 1280 .br 10 2560 .br 200 51200 .br script not found 32512 .br .br .br \fBExample\fP .br .EX // pass two parameters, hello and world .br status = shell("scr1", "hello world"); .br .br // pass three parameters, hello, string with spaces, and world .br status = shell("scr1", "hello 'string with spaces' world"); .br .br // pass one parameter, hello string with spaces world .br status = shell("scr1", "\"hello string with spaces world\""); .br .EE .IP "\fBint fileOpen(char *file, unsigned mode)\fP" .IP "" 4 This function returns a handle to a file opened in a specified mode. .br .br .EX file: the file to open .br mode: the file open mode .br .EE .br .br Returns a handle (>=0) if OK, otherwise PI_NO_HANDLE, PI_NO_FILE_ACCESS, PI_BAD_FILE_MODE, PI_FILE_OPEN_FAILED, or PI_FILE_IS_A_DIR. .br .br File .br .br A file may only be opened if permission is granted by an entry in /opt/pigpio/access. This is intended to allow remote access to files in a more or less controlled manner. .br .br Each entry in /opt/pigpio/access takes the form of a file path which may contain wildcards followed by a single letter permission. The permission may be R for read, W for write, U for read/write, and N for no access. .br .br Where more than one entry matches a file the most specific rule applies. If no entry matches a file then access is denied. .br .br Suppose /opt/pigpio/access contains the following entries .br .br .EX /home/* n .br /home/pi/shared/dir_1/* w .br /home/pi/shared/dir_2/* r .br /home/pi/shared/dir_3/* u .br /home/pi/shared/dir_1/file.txt n .br .EE .br .br Files may be written in directory dir_1 with the exception of file.txt. .br .br Files may be read in directory dir_2. .br .br Files may be read and written in directory dir_3. .br .br If a directory allows read, write, or read/write access then files may be created in that directory. .br .br In an attempt to prevent risky permissions the following paths are ignored in /opt/pigpio/access. .br .br .EX a path containing .. .br a path containing only wildcards (*?) .br a path containing less than two non-wildcard parts .br .EE .br .br Mode .br .br The mode may have the following values. .br .br Macro Value Meaning .br PI_FILE_READ 1 open file for reading .br PI_FILE_WRITE 2 open file for writing .br PI_FILE_RW 3 open file for reading and writing .br .br .br The following values may be or'd into the mode. .br .br Macro Value Meaning .br PI_FILE_APPEND 4 Writes append data to the end of the file .br PI_FILE_CREATE 8 The file is created if it doesn't exist .br PI_FILE_TRUNC 16 The file is truncated .br .br .br Newly created files are owned by root with permissions owner read and write. .br .br \fBExample\fP .br .EX #include .br #include .br .br int main(int argc, char *argv[]) .br { .br int handle, c; .br char buf[60000]; .br .br if (gpioInitialise() < 0) return 1; .br .br // assumes /opt/pigpio/access contains the following line .br // /ram/*.c r .br .br handle = fileOpen("/ram/pigpio.c", PI_FILE_READ); .br .br if (handle >= 0) .br { .br while ((c=fileRead(handle, buf, sizeof(buf)-1))) .br { .br buf[c] = 0; .br printf("%s", buf); .br } .br .br fileClose(handle); .br } .br .br gpioTerminate(); .br } .br .EE .IP "\fBint fileClose(unsigned handle)\fP" .IP "" 4 This function closes the file associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBfileOpen\fP .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .br .br \fBExample\fP .br .EX fileClose(h); .br .EE .IP "\fBint fileWrite(unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This function writes count bytes from buf to the the file associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBfileOpen\fP .br buf: the array of bytes to write .br count: the number of bytes to write .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_FILE_NOT_WOPEN, or PI_BAD_FILE_WRITE. .br .br \fBExample\fP .br .EX status = fileWrite(h, buf, count); .br if (status == 0) .br { .br // okay .br } .br else .br { .br // error .br } .br .EE .IP "\fBint fileRead(unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This function reads up to count bytes from the the file associated with handle and writes them to buf. .br .br .EX handle: >=0, as returned by a call to \fBfileOpen\fP .br buf: an array to receive the read data .br count: the maximum number of bytes to read .br .EE .br .br Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_FILE_NOT_ROPEN, or PI_BAD_FILE_WRITE. .br .br \fBExample\fP .br .EX if (fileRead(h, buf, sizeof(buf)) > 0) .br { .br // process read data .br } .br .EE .IP "\fBint fileSeek(unsigned handle, int32_t seekOffset, int seekFrom)\fP" .IP "" 4 This function seeks to a position within the file associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBfileOpen\fP .br seekOffset: the number of bytes to move. Positive offsets .br move forward, negative offsets backwards. .br seekFrom: one of PI_FROM_START (0), PI_FROM_CURRENT (1), .br or PI_FROM_END (2) .br .EE .br .br Returns the new byte position within the file (>=0) if OK, otherwise PI_BAD_HANDLE, or PI_BAD_FILE_SEEK. .br .br \fBExample\fP .br .EX fileSeek(0, 20, PI_FROM_START); // Seek to start plus 20 .br .br size = fileSeek(0, 0, PI_FROM_END); // Seek to end, return size .br .br pos = fileSeek(0, 0, PI_FROM_CURRENT); // Return current position .br .EE .IP "\fBint fileList(char *fpat, char *buf, unsigned count)\fP" .IP "" 4 This function returns a list of files which match a pattern. The pattern may contain wildcards. .br .br .EX fpat: file pattern to match .br buf: an array to receive the matching file names .br count: the maximum number of bytes to read .br .EE .br .br Returns the number of returned bytes if OK, otherwise PI_NO_FILE_ACCESS, or PI_NO_FILE_MATCH. .br .br The pattern must match an entry in /opt/pigpio/access. The pattern may contain wildcards. See \fBfileOpen\fP. .br .br NOTE .br .br The returned value is not the number of files, it is the number of bytes in the buffer. The file names are separated by newline characters. .br .br \fBExample\fP .br .EX #include .br #include .br .br int main(int argc, char *argv[]) .br { .br int c; .br char buf[1000]; .br .br if (gpioInitialise() < 0) return 1; .br .br // assumes /opt/pigpio/access contains the following line .br // /ram/*.c r .br .br c = fileList("/ram/p*.c", buf, sizeof(buf)); .br .br if (c >= 0) .br { .br // terminate string .br buf[c] = 0; .br printf("%s", buf); .br } .br .br gpioTerminate(); .br } .br .EE .IP "\fBint gpioCfgBufferSize(unsigned cfgMillis)\fP" .IP "" 4 Configures pigpio to buffer cfgMillis milliseconds of GPIO samples. .br .br This function is only effective if called before \fBgpioInitialise\fP. .br .br .EX cfgMillis: 100-10000 .br .EE .br .br The default setting is 120 milliseconds. .br .br The intention is to allow for bursts of data and protection against other processes hogging cpu time. .br .br I haven't seen a process locked out for more than 100 milliseconds. .br .br Making the buffer bigger uses a LOT of memory at the more frequent sampling rates as shown in the following table in MBs. .br .br .EX buffer milliseconds .br 120 250 500 1sec 2sec 4sec 8sec .br .br 1 16 31 55 107 --- --- --- .br 2 10 18 31 55 107 --- --- .br sample 4 8 12 18 31 55 107 --- .br rate 5 8 10 14 24 45 87 --- .br (us) 8 6 8 12 18 31 55 107 .br 10 6 8 10 14 24 45 87 .br .EE .IP "\fBint gpioCfgClock(unsigned cfgMicros, unsigned cfgPeripheral, unsigned cfgSource)\fP" .IP "" 4 Configures pigpio to use a particular sample rate timed by a specified peripheral. .br .br This function is only effective if called before \fBgpioInitialise\fP. .br .br .EX cfgMicros: 1, 2, 4, 5, 8, 10 .br cfgPeripheral: 0 (PWM), 1 (PCM) .br cfgSource: deprecated, value is ignored .br .EE .br .br The timings are provided by the specified peripheral (PWM or PCM). .br .br The default setting is 5 microseconds using the PCM peripheral. .br .br The approximate CPU percentage used for each sample rate is: .br .br .EX sample cpu .br rate % .br .br 1 25 .br 2 16 .br 4 11 .br 5 10 .br 8 15 .br 10 14 .br .EE .br .br A sample rate of 5 microseconds seeems to be the sweet spot. .IP "\fBint gpioCfgDMAchannel(unsigned DMAchannel)\fP" .IP "" 4 Configures pigpio to use the specified DMA channel. .br .br This function is only effective if called before \fBgpioInitialise\fP. .br .br .EX DMAchannel: 0-14 .br .EE .br .br The default setting is to use channel 14. .IP "\fBint gpioCfgDMAchannels(unsigned primaryChannel, unsigned secondaryChannel)\fP" .IP "" 4 Configures pigpio to use the specified DMA channels. .br .br This function is only effective if called before \fBgpioInitialise\fP. .br .br .EX primaryChannel: 0-14 .br secondaryChannel: 0-14 .br .EE .br .br The default setting depends on whether the Pi has a BCM2711 chip or not (currently only the Pi4B has a BCM2711). .br .br The default setting for a non-BCM2711 is to use channel 14 for the primary channel and channel 6 for the secondary channel. .br .br The default setting for a BCM2711 is to use channel 7 for the primary channel and channel 6 for the secondary channel. .br .br The secondary channel is only used for the transmission of waves. .br .br If possible use one of channels 0 to 6 for the secondary channel (a full channel). .br .br A full channel only requires one DMA control block regardless of the length of a pulse delay. Channels 7 to 14 (lite channels) require one DMA control block for each 16383 microseconds of delay. I.e. a 10 second pulse delay requires one control block on a full channel and 611 control blocks on a lite channel. .IP "\fBint gpioCfgPermissions(uint64_t updateMask)\fP" .IP "" 4 Configures pigpio to restrict GPIO updates via the socket or pipe interfaces to the GPIO specified by the mask. Programs directly calling the pigpio library (i.e. linked with -lpigpio are not affected). A GPIO update is a write to a GPIO or a GPIO mode change or any function which would force such an action. .br .br This function is only effective if called before \fBgpioInitialise\fP. .br .br .EX updateMask: bit (1<=0 .br arg2: >=0 .br argx: extra (byte) arguments .br argc: number of extra arguments .br .EE .br .br Returns >= 0 if OK, less than 0 indicates a user defined error. .IP "\fBint gpioCustom2(unsigned arg1, char *argx, unsigned argc, char *retBuf, unsigned retMax)\fP" .IP "" 4 This function is available for user customisation. .br .br It differs from gpioCustom1 in that it returns an array of bytes rather than just an integer. .br .br The returned value is an integer indicating the number of returned bytes. .EX arg1: >=0 .br argx: extra (byte) arguments .br argc: number of extra arguments .br retBuf: buffer for returned bytes .br retMax: maximum number of bytes to return .br .EE .br .br Returns >= 0 if OK, less than 0 indicates a user defined error. .br .br The number of returned bytes must be retMax or less. .IP "\fBint rawWaveAddSPI(rawSPI_t *spi, unsigned offset, unsigned spiSS, char *buf, unsigned spiTxBits, unsigned spiBitFirst, unsigned spiBitLast, unsigned spiBits)\fP" .IP "" 4 This function adds a waveform representing SPI data to the existing waveform (if any). .br .br .EX spi: a pointer to a spi object .br offset: microseconds from the start of the waveform .br spiSS: the slave select GPIO .br buf: the bits to transmit, most significant bit first .br spiTxBits: the number of bits to write .br spiBitFirst: the first bit to read .br spiBitLast: the last bit to read .br spiBits: the number of bits to transfer .br .EE .br .br Returns the new total number of pulses in the current waveform if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_SER_OFFSET, or PI_TOO_MANY_PULSES. .br .br Not intended for general use. .IP "\fBint rawWaveAddGeneric(unsigned numPulses, rawWave_t *pulses)\fP" .IP "" 4 This function adds a number of pulses to the current waveform. .br .br .EX numPulses: the number of pulses .br pulses: the array containing the pulses .br .EE .br .br Returns the new total number of pulses in the current waveform if OK, otherwise PI_TOO_MANY_PULSES. .br .br The advantage of this function over gpioWaveAddGeneric is that it allows the setting of the flags field. .br .br The pulses are interleaved in time order within the existing waveform (if any). .br .br Merging allows the waveform to be built in parts, that is the settings for GPIO#1 can be added, and then GPIO#2 etc. .br .br If the added waveform is intended to start after or within the existing waveform then the first pulse should consist of a delay. .br .br Not intended for general use. .IP "\fBunsigned rawWaveCB(void)\fP" .IP "" 4 Returns the number of the cb being currently output. .br .br Not intended for general use. .IP "\fBrawCbs_t *rawWaveCBAdr(int cbNum)\fP" .IP "" 4 Return the (Linux) address of contol block cbNum. .br .br .EX cbNum: the cb of interest .br .EE .br .br Not intended for general use. .IP "\fBuint32_t rawWaveGetOOL(int pos)\fP" .IP "" 4 Gets the OOL parameter stored at pos. .br .br .EX pos: the position of interest. .br .EE .br .br Not intended for general use. .IP "\fBvoid rawWaveSetOOL(int pos, uint32_t lVal)\fP" .IP "" 4 Sets the OOL parameter stored at pos to value. .br .br .EX pos: the position of interest .br lVal: the value to write .br .EE .br .br Not intended for general use. .IP "\fBuint32_t rawWaveGetOut(int pos)\fP" .IP "" 4 Gets the wave output parameter stored at pos. .br .br DEPRECATED: use rawWaveGetOOL instead. .br .br .EX pos: the position of interest. .br .EE .br .br Not intended for general use. .IP "\fBvoid rawWaveSetOut(int pos, uint32_t lVal)\fP" .IP "" 4 Sets the wave output parameter stored at pos to value. .br .br DEPRECATED: use rawWaveSetOOL instead. .br .br .EX pos: the position of interest .br lVal: the value to write .br .EE .br .br Not intended for general use. .IP "\fBuint32_t rawWaveGetIn(int pos)\fP" .IP "" 4 Gets the wave input value parameter stored at pos. .br .br DEPRECATED: use rawWaveGetOOL instead. .br .br .EX pos: the position of interest .br .EE .br .br Not intended for general use. .IP "\fBvoid rawWaveSetIn(int pos, uint32_t lVal)\fP" .IP "" 4 Sets the wave input value stored at pos to value. .br .br DEPRECATED: use rawWaveSetOOL instead. .br .br .EX pos: the position of interest .br lVal: the value to write .br .EE .br .br Not intended for general use. .IP "\fBrawWaveInfo_t rawWaveInfo(int wave_id)\fP" .IP "" 4 Gets details about the wave with id wave_id. .br .br .EX wave_id: the wave of interest .br .EE .br .br Not intended for general use. .IP "\fBint getBitInBytes(int bitPos, char *buf, int numBits)\fP" .IP "" 4 Returns the value of the bit bitPos bits from the start of buf. Returns 0 if bitPos is greater than or equal to numBits. .br .br .EX bitPos: bit index from the start of buf .br buf: array of bits .br numBits: number of valid bits in buf .br .EE .br .br .IP "\fBvoid putBitInBytes(int bitPos, char *buf, int bit)\fP" .IP "" 4 Sets the bit bitPos bits from the start of buf to bit. .br .br .EX bitPos: bit index from the start of buf .br buf: array of bits .br bit: 0-1, value to set .br .EE .br .br .IP "\fBdouble time_time(void)\fP" .IP "" 4 Return the current time in seconds since the Epoch. .IP "\fBvoid time_sleep(double seconds)\fP" .IP "" 4 Delay execution for a given number of seconds .br .br .EX seconds: the number of seconds to sleep .br .EE .IP "\fBvoid rawDumpWave(void)\fP" .IP "" 4 Used to print a readable version of the current waveform to stderr. .br .br Not intended for general use. .IP "\fBvoid rawDumpScript(unsigned script_id)\fP" .IP "" 4 Used to print a readable version of a script to stderr. .br .br .EX script_id: >=0, a script_id returned by \fBgpioStoreScript\fP .br .EE .br .br Not intended for general use. .SH PARAMETERS .br .br .IP "\fBactive\fP: 0-1000000" 0 .br .br The number of microseconds level changes are reported for once a noise filter has been triggered (by \fBsteady\fP microseconds of a stable level). .br .br .IP "\fBarg1\fP" 0 .br .br An unsigned argument passed to a user customised function. Its meaning is defined by the customiser. .br .br .IP "\fBarg2\fP" 0 .br .br An unsigned argument passed to a user customised function. Its meaning is defined by the customiser. .br .br .IP "\fBargc\fP" 0 The count of bytes passed to a user customised function. .br .br .IP "\fB*argx\fP" 0 A pointer to an array of bytes passed to a user customised function. Its meaning and content is defined by the customiser. .br .br .IP "\fBbaud\fP" 0 The speed of serial communication (I2C, SPI, serial link, waves) in bits per second. .br .br .IP "\fBbit\fP" 0 A value of 0 or 1. .br .br .IP "\fBbitPos\fP" 0 A bit position within a byte or word. The least significant bit is position 0. .br .br .IP "\fBbits\fP" 0 A value used to select GPIO. If bit n of bits is set then GPIO n is selected. .br .br A convenient way to set bit n is to or in (1<=0" 0 .br .br The number of times a GPIO is swiched on and off per second. This can be set per GPIO and may be as little as 5Hz or as much as 40KHz. The GPIO will be on for a proportion of the time as defined by its dutycycle. .br .br .IP "\fBgpio\fP" 0 .br .br A Broadcom numbered GPIO, in the range 0-53. .br .br There are 54 General Purpose Input Outputs (GPIO) named GPIO0 through GPIO53. .br .br They are split into two banks. Bank 1 consists of GPIO0 through GPIO31. Bank 2 consists of GPIO32 through GPIO53. .br .br All the GPIO which are safe for the user to read and write are in bank 1. Not all GPIO in bank 1 are safe though. Type 1 boards have 17 safe GPIO. Type 2 boards have 21. Type 3 boards have 26. .br .br See \fBgpioHardwareRevision\fP. .br .br The user GPIO are marked with an X in the following table. .br .br .EX 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 .br Type 1 X X - - X - - X X X X X - - X X .br Type 2 - - X X X - - X X X X X - - X X .br Type 3 X X X X X X X X X X X X X X .br .br 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 .br Type 1 - X X - - X X X X X - - - - - - .br Type 2 - X X - - - X X X X - X X X X X .br Type 3 X X X X X X X X X X X X - - - - .br .EE .br .br .IP "\fBgpioAlertFunc_t\fP" 0 .EX typedef void (*gpioAlertFunc_t) (int gpio, int level, uint32_t tick); .br .EE .br .br .IP "\fBgpioAlertFuncEx_t\fP" 0 .EX typedef void (*eventFuncEx_t) .br (int event, int level, uint32_t tick, void *userdata); .br .EE .br .br .IP "\fBgpioCfg*\fP" 0 .br .br These functions are only effective if called before \fBgpioInitialise\fP. .br .br \fBgpioCfgBufferSize\fP .br \fBgpioCfgClock\fP .br \fBgpioCfgDMAchannel\fP .br \fBgpioCfgDMAchannels\fP .br \fBgpioCfgPermissions\fP .br \fBgpioCfgInterfaces\fP .br \fBgpioCfgSocketPort\fP .br \fBgpioCfgMemAlloc\fP .br .br .IP "\fBgpioGetSamplesFunc_t\fP" 0 .EX typedef void (*gpioGetSamplesFunc_t) .br (const gpioSample_t *samples, int numSamples); .br .EE .br .br .IP "\fBgpioGetSamplesFuncEx_t\fP" 0 .EX typedef void (*gpioGetSamplesFuncEx_t) .br (const gpioSample_t *samples, int numSamples, void *userdata); .br .EE .br .br .IP "\fBgpioISRFunc_t\fP" 0 .EX typedef void (*gpioISRFunc_t) .br (int gpio, int level, uint32_t tick); .br .EE .br .br .IP "\fBgpioISRFuncEx_t\fP" 0 .EX typedef void (*gpioISRFuncEx_t) .br (int gpio, int level, uint32_t tick, void *userdata); .br .EE .br .br .IP "\fBgpioPulse_t\fP" 0 .EX typedef struct .br { .br uint32_t gpioOn; .br uint32_t gpioOff; .br uint32_t usDelay; .br } gpioPulse_t; .br .EE .br .br .IP "\fBgpioSample_t\fP" 0 .EX typedef struct .br { .br uint32_t tick; .br uint32_t level; .br } gpioSample_t; .br .EE .br .br .IP "\fBgpioSignalFunc_t\fP" 0 .EX typedef void (*gpioSignalFunc_t) (int signum); .br .EE .br .br .IP "\fBgpioSignalFuncEx_t\fP" 0 .EX typedef void (*gpioSignalFuncEx_t) (int signum, void *userdata); .br .EE .br .br .IP "\fBgpioThreadFunc_t\fP" 0 .EX typedef void *(gpioThreadFunc_t) (void *); .br .EE .br .br .IP "\fBgpioTimerFunc_t\fP" 0 .EX typedef void (*gpioTimerFunc_t) (void); .br .EE .br .br .IP "\fBgpioTimerFuncEx_t\fP" 0 .EX typedef void (*gpioTimerFuncEx_t) (void *userdata); .br .EE .br .br .IP "\fBgpioWaveAdd*\fP" 0 .br .br One of .br .br \fBgpioWaveAddNew\fP .br \fBgpioWaveAddGeneric\fP .br \fBgpioWaveAddSerial\fP .br .br .IP "\fBhandle\fP: >=0" 0 .br .br A number referencing an object opened by one of .br .br \fBfileOpen\fP .br \fBgpioNotifyOpen\fP .br \fBi2cOpen\fP .br \fBserOpen\fP .br \fBspiOpen\fP .br .br .IP "\fBi2cAddr\fP: 0-0x7F" 0 The address of a device on the I2C bus. .br .br .IP "\fBi2cBus\fP: >=0" 0 .br .br An I2C bus number. .br .br .IP "\fBi2cFlags\fP: 0" 0 .br .br Flags which modify an I2C open command. None are currently defined. .br .br .IP "\fBi2cReg\fP: 0-255" 0 .br .br A register of an I2C device. .br .br .IP "\fBifFlags\fP: 0-3" 0 .EX PI_DISABLE_FIFO_IF 1 .br PI_DISABLE_SOCK_IF 2 .br .EE .br .br .IP "\fB*inBuf\fP" 0 A buffer used to pass data to a function. .br .br .IP "\fBinLen\fP" 0 The number of bytes of data in a buffer. .br .br .IP "\fBint\fP" 0 A whole number, negative or positive. .br .br .IP "\fBint32_t\fP" 0 A 32-bit signed value. .br .br .IP "\fBinvert\fP" 0 A flag used to set normal or inverted bit bang serial data level logic. .br .br .IP "\fBlevel\fP" 0 The level of a GPIO. Low or High. .br .br .EX PI_OFF 0 .br PI_ON 1 .br .br PI_CLEAR 0 .br PI_SET 1 .br .br PI_LOW 0 .br PI_HIGH 1 .br .EE .br .br There is one exception. If a watchdog expires on a GPIO the level will be reported as PI_TIMEOUT. See \fBgpioSetWatchdog\fP. .br .br .EX PI_TIMEOUT 2 .br .EE .br .br .br .br .IP "\fBlVal\fP: 0-4294967295 (Hex 0x0-0xFFFFFFFF, Octal 0-37777777777)" 0 .br .br A 32-bit word value. .br .br .IP "\fBmemAllocMode\fP: 0-2" 0 .br .br The DMA memory allocation mode. .br .br .EX PI_MEM_ALLOC_AUTO 0 .br PI_MEM_ALLOC_PAGEMAP 1 .br PI_MEM_ALLOC_MAILBOX 2 .br .EE .br .br .IP "\fB*micros\fP" 0 .br .br A value representing microseconds. .br .br .IP "\fBmicros\fP" 0 .br .br A value representing microseconds. .br .br .IP "\fBmillis\fP" 0 .br .br A value representing milliseconds. .br .br .IP "\fBMISO\fP" 0 The GPIO used for the MISO signal when bit banging SPI. .br .br .IP "\fBmode\fP" 0 .br .br 1. The operational mode of a GPIO, normally INPUT or OUTPUT. .br .br .EX PI_INPUT 0 .br PI_OUTPUT 1 .br PI_ALT0 4 .br PI_ALT1 5 .br PI_ALT2 6 .br PI_ALT3 7 .br PI_ALT4 3 .br PI_ALT5 2 .br .EE .br .br 2. A file open mode. .br .br .EX PI_FILE_READ 1 .br PI_FILE_WRITE 2 .br PI_FILE_RW 3 .br .EE .br .br The following values can be or'd into the mode. .br .br .EX PI_FILE_APPEND 4 .br PI_FILE_CREATE 8 .br PI_FILE_TRUNC 16 .br .EE .br .br .IP "\fBMOSI\fP" 0 The GPIO used for the MOSI signal when bit banging SPI. .br .br .IP "\fBnumBits\fP" 0 .br .br The number of bits stored in a buffer. .br .br .IP "\fBnumBytes\fP" 0 The number of bytes used to store characters in a string. Depending on the number of bits per character there may be 1, 2, or 4 bytes per character. .br .br .IP "\fBnumPar\fP: 0-10" 0 The number of parameters passed to a script. .br .br .IP "\fBnumPulses\fP" 0 The number of pulses to be added to a waveform. .br .br .IP "\fBnumSegs\fP" 0 The number of segments in a combined I2C transaction. .br .br .IP "\fBnumSockAddr\fP" 0 The number of network addresses allowed to use the socket interface. .br .br 0 means all addresses allowed. .br .br .IP "\fBoffset\fP" 0 The associated data starts this number of microseconds from the start of the waveform. .br .br .IP "\fB*outBuf\fP" 0 A buffer used to return data from a function. .br .br .IP "\fBoutLen\fP" 0 The size in bytes of an output buffer. .br .br .IP "\fBpad\fP: 0-2" 0 A set of GPIO which share common drivers. .br .br Pad GPIO .br 0 0-27 .br 1 28-45 .br 2 46-53 .br .br .br .IP "\fBpadStrength\fP: 1-16" 0 The mA which may be drawn from each GPIO whilst still guaranteeing the high and low levels. .br .br .IP "\fB*param\fP" 0 An array of script parameters. .br .br .IP "\fBpctBOOL\fP: 0-100" 0 percent On-Off-Level (OOL) buffer to consume for wave output. .br .br .IP "\fBpctCB\fP: 0-100" 0 the percent of all DMA control blocks to consume. .br .br .IP "\fBpctTOOL\fP: 0-100" 0 the percent of OOL buffer to consume for wave input (flags). .br .br .IP "\fBpi_i2c_msg_t\fP" 0 .EX typedef struct .br { .br uint16_t addr; // slave address .br uint16_t flags; .br uint16_t len; // msg length .br uint8_t *buf; // pointer to msg data .br } pi_i2c_msg_t; .br .EE .br .br .IP "\fBport\fP: 1024-32000" 0 The port used to bind to the pigpio socket. Defaults to 8888. .br .br .IP "\fBpos\fP" 0 The position of an item. .br .br .IP "\fBprimaryChannel\fP: 0-15" 0 The DMA channel used to time the sampling of GPIO and to time servo and PWM pulses. .br .br .IP "\fB*pth\fP" 0 .br .br A thread identifier, returned by \fBgpioStartThread\fP. .br .br .IP "\fBpthread_t\fP" 0 .br .br A thread identifier. .br .br .IP "\fBpud\fP: 0-2" 0 .br .br The setting of the pull up/down resistor for a GPIO, which may be off, pull-up, or pull-down. .br .br .EX PI_PUD_OFF 0 .br PI_PUD_DOWN 1 .br PI_PUD_UP 2 .br .EE .br .br .IP "\fBpulseLen\fP" 0 .br .br 1-100, the length of a trigger pulse in microseconds. .br .br .IP "\fB*pulses\fP" 0 .br .br An array of pulses to be added to a waveform. .br .br .IP "\fBpulsewidth\fP: 0, 500-2500" 0 .EX PI_SERVO_OFF 0 .br PI_MIN_SERVO_PULSEWIDTH 500 .br PI_MAX_SERVO_PULSEWIDTH 2500 .br .EE .br .br .IP "\fBPWMduty\fP: 0-1000000 (1M)" 0 The hardware PWM dutycycle. .br .br .EX PI_HW_PWM_RANGE 1000000 .br .EE .br .br .IP "\fBPWMfreq\fP: 1-125M (1-187.5M for the BCM2711)" 0 The hardware PWM frequency. .br .br .EX PI_HW_PWM_MIN_FREQ 1 .br PI_HW_PWM_MAX_FREQ 125000000 .br PI_HW_PWM_MAX_FREQ_2711 187500000 .br .EE .br .br .IP "\fBrange\fP: 25-40000" 0 .EX PI_MIN_DUTYCYCLE_RANGE 25 .br PI_MAX_DUTYCYCLE_RANGE 40000 .br .EE .br .br .IP "\fBrawCbs_t\fP" 0 .EX typedef struct // linux/arch/arm/mach-bcm2708/include/mach/dma.h .br { .br unsigned long info; .br unsigned long src; .br unsigned long dst; .br unsigned long length; .br unsigned long stride; .br unsigned long next; .br unsigned long pad[2]; .br } rawCbs_t; .br .EE .br .br .IP "\fBrawSPI_t\fP" 0 .EX typedef struct .br { .br int clk; // GPIO for clock .br int mosi; // GPIO for MOSI .br int miso; // GPIO for MISO .br int ss_pol; // slave select off state .br int ss_us; // delay after slave select .br int clk_pol; // clock off state .br int clk_pha; // clock phase .br int clk_us; // clock micros .br } rawSPI_t; .br .EE .br .br .IP "\fBrawWave_t\fP" 0 .EX typedef struct .br { .br uint32_t gpioOn; .br uint32_t gpioOff; .br uint32_t usDelay; .br uint32_t flags; .br } rawWave_t; .br .EE .br .br .IP "\fBrawWaveInfo_t\fP" 0 .EX typedef struct .br { .br uint16_t botCB; // first CB used by wave .br uint16_t topCB; // last CB used by wave .br uint16_t botOOL; // last OOL used by wave .br uint16_t topOOL; // first OOL used by wave .br uint16_t deleted; .br uint16_t numCB; .br uint16_t numBOOL; .br uint16_t numTOOL; .br } rawWaveInfo_t; .br .EE .br .br .IP "\fB*retBuf\fP" 0 .br .br A buffer to hold a number of bytes returned to a used customised function, .br .br .IP "\fBretMax\fP" 0 .br .br The maximum number of bytes a user customised function should return. .br .br .IP "\fB*rxBuf\fP" 0 .br .br A pointer to a buffer to receive data. .br .br .IP "\fBSCL\fP" 0 The user GPIO to use for the clock when bit banging I2C. .br .br .IP "\fBSCLK\fP" 0 The GPIO used for the SCLK signal when bit banging SPI. .br .br .IP "\fB*script\fP" 0 A pointer to the text of a script. .br .br .IP "\fBscript_id\fP" 0 An id of a stored script as returned by \fBgpioStoreScript\fP. .br .br .IP "\fB*scriptName\fP" 0 The name of a \fBshell\fP script to be executed. The script must be present in /opt/pigpio/cgi and must have execute permission. .br .br .IP "\fB*scriptString\fP" 0 The string to be passed to a \fBshell\fP script to be executed. .br .br .IP "\fBSDA\fP" 0 The user GPIO to use for data when bit banging I2C. .br .br .IP "\fBsecondaryChannel\fP: 0-6" 0 .br .br The DMA channel used to time output waveforms. .br .br .IP "\fB*seconds\fP" 0 .br .br A pointer to a uint32_t to store the second component of a returned time. .br .br .IP "\fBseconds\fP" 0 The number of seconds. .br .br .IP "\fBseekFrom\fP" 0 .br .br .EX PI_FROM_START 0 .br PI_FROM_CURRENT 1 .br PI_FROM_END 2 .br .EE .br .br .IP "\fBseekOffset\fP" 0 The number of bytes to move forward (positive) or backwards (negative) from the seek position (start, current, or end of file). .br .br .IP "\fB*segs\fP" 0 An array of segments which make up a combined I2C transaction. .br .br .IP "\fBserFlags\fP" 0 Flags which modify a serial open command. None are currently defined. .br .br .IP "\fB*sertty\fP" 0 The name of a serial tty device, e.g. /dev/ttyAMA0, /dev/ttyUSB0, /dev/tty1. .br .br .IP "\fBsetting\fP" 0 A value used to set a flag, 0 for false, non-zero for true. .br .br .IP "\fBsignum\fP: 0-63" 0 .EX PI_MIN_SIGNUM 0 .br PI_MAX_SIGNUM 63 .br .EE .br .br .IP "\fBsize_t\fP" 0 .br .br A standard type used to indicate the size of an object in bytes. .br .br .IP "\fB*sockAddr\fP" 0 An array of network addresses allowed to use the socket interface encoded as 32 bit numbers. .br .br E.g. address 192.168.1.66 would be encoded as 0x4201a8c0. .br .br .IP "\fB*spi\fP" 0 A pointer to a \fBrawSPI_t\fP structure. .br .br .IP "\fBspiBitFirst\fP" 0 GPIO reads are made from spiBitFirst to spiBitLast. .br .br .IP "\fBspiBitLast\fP" 0 .br .br GPIO reads are made from spiBitFirst to spiBitLast. .br .br .IP "\fBspiBits\fP" 0 The number of bits to transfer in a raw SPI transaction. .br .br .IP "\fBspiChan\fP" 0 A SPI channel, 0-2. .br .br .IP "\fBspiFlags\fP" 0 See \fBspiOpen\fP and \fBbbSPIOpen\fP. .br .br .IP "\fBspiSS\fP" 0 The SPI slave select GPIO in a raw SPI transaction. .br .br .IP "\fBspiTxBits\fP" 0 The number of bits to transfer dring a raw SPI transaction .br .br .IP "\fBsteady\fP: 0-300000" 0 .br .br The number of microseconds level changes must be stable for before reporting the level changed (\fBgpioGlitchFilter\fP) or triggering the active part of a noise filter (\fBgpioNoiseFilter\fP). .br .br .IP "\fBstop_bits\fP: 2-8" 0 The number of (half) stop bits to be used when adding serial data to a waveform. .br .br .EX PI_MIN_WAVE_HALFSTOPBITS 2 .br PI_MAX_WAVE_HALFSTOPBITS 8 .br .EE .br .br .IP "\fB*str\fP" 0 An array of characters. .br .br .IP "\fBtimeout\fP" 0 A GPIO level change timeout in milliseconds. .br .br \fBgpioSetWatchdog\fP .EX PI_MIN_WDOG_TIMEOUT 0 .br PI_MAX_WDOG_TIMEOUT 60000 .br .EE .br .br \fBgpioSetISRFunc\fP and \fBgpioSetISRFuncEx\fP .EX <=0 cancel timeout .br >0 timeout after specified milliseconds .br .EE .br .br .IP "\fBtimer\fP" 0 .EX PI_MIN_TIMER 0 .br PI_MAX_TIMER 9 .br .EE .br .br .IP "\fBtimetype\fP" 0 .EX PI_TIME_RELATIVE 0 .br PI_TIME_ABSOLUTE 1 .br .EE .br .br .IP "\fB*txBuf\fP" 0 .br .br An array of bytes to transmit. .br .br .IP "\fBuint32_t\fP: 0-0-4,294,967,295 (Hex 0x0-0xFFFFFFFF)" 0 .br .br A 32-bit unsigned value. .br .br .IP "\fBuint64_t\fP: 0-(2^64)-1" 0 .br .br A 64-bit unsigned value. .br .br .IP "\fBunsigned\fP" 0 .br .br A whole number >= 0. .br .br .IP "\fBupdateMask\fP" 0 .br .br A 64 bit mask indicating which GPIO may be written to by the user. .br .br If GPIO#n may be written then bit (1< 4 .br #define PI_BAD_CHANNEL -27 // DMA channel not 0-15 .br #define PI_BAD_PRIM_CHANNEL -27 // DMA primary channel not 0-15 .br #define PI_BAD_SOCKET_PORT -28 // socket port not 1024-32000 .br #define PI_BAD_FIFO_COMMAND -29 // unrecognized fifo command .br #define PI_BAD_SECO_CHANNEL -30 // DMA secondary channel not 0-15 .br #define PI_NOT_INITIALISED -31 // function called before gpioInitialise .br #define PI_INITIALISED -32 // function called after gpioInitialise .br #define PI_BAD_WAVE_MODE -33 // waveform mode not 0-3 .br #define PI_BAD_CFG_INTERNAL -34 // bad parameter in gpioCfgInternals call .br #define PI_BAD_WAVE_BAUD -35 // baud rate not 50-250K(RX)/50-1M(TX) .br #define PI_TOO_MANY_PULSES -36 // waveform has too many pulses .br #define PI_TOO_MANY_CHARS -37 // waveform has too many chars .br #define PI_NOT_SERIAL_GPIO -38 // no bit bang serial read on GPIO .br #define PI_BAD_SERIAL_STRUC -39 // bad (null) serial structure parameter .br #define PI_BAD_SERIAL_BUF -40 // bad (null) serial buf parameter .br #define PI_NOT_PERMITTED -41 // GPIO operation not permitted .br #define PI_SOME_PERMITTED -42 // one or more GPIO not permitted .br #define PI_BAD_WVSC_COMMND -43 // bad WVSC subcommand .br #define PI_BAD_WVSM_COMMND -44 // bad WVSM subcommand .br #define PI_BAD_WVSP_COMMND -45 // bad WVSP subcommand .br #define PI_BAD_PULSELEN -46 // trigger pulse length not 1-100 .br #define PI_BAD_SCRIPT -47 // invalid script .br #define PI_BAD_SCRIPT_ID -48 // unknown script id .br #define PI_BAD_SER_OFFSET -49 // add serial data offset > 30 minutes .br #define PI_GPIO_IN_USE -50 // GPIO already in use .br #define PI_BAD_SERIAL_COUNT -51 // must read at least a byte at a time .br #define PI_BAD_PARAM_NUM -52 // script parameter id not 0-9 .br #define PI_DUP_TAG -53 // script has duplicate tag .br #define PI_TOO_MANY_TAGS -54 // script has too many tags .br #define PI_BAD_SCRIPT_CMD -55 // illegal script command .br #define PI_BAD_VAR_NUM -56 // script variable id not 0-149 .br #define PI_NO_SCRIPT_ROOM -57 // no more room for scripts .br #define PI_NO_MEMORY -58 // can't allocate temporary memory .br #define PI_SOCK_READ_FAILED -59 // socket read failed .br #define PI_SOCK_WRIT_FAILED -60 // socket write failed .br #define PI_TOO_MANY_PARAM -61 // too many script parameters (> 10) .br #define PI_NOT_HALTED -62 // DEPRECATED .br #define PI_SCRIPT_NOT_READY -62 // script initialising .br #define PI_BAD_TAG -63 // script has unresolved tag .br #define PI_BAD_MICS_DELAY -64 // bad MICS delay (too large) .br #define PI_BAD_MILS_DELAY -65 // bad MILS delay (too large) .br #define PI_BAD_WAVE_ID -66 // non existent wave id .br #define PI_TOO_MANY_CBS -67 // No more CBs for waveform .br #define PI_TOO_MANY_OOL -68 // No more OOL for waveform .br #define PI_EMPTY_WAVEFORM -69 // attempt to create an empty waveform .br #define PI_NO_WAVEFORM_ID -70 // no more waveforms .br #define PI_I2C_OPEN_FAILED -71 // can't open I2C device .br #define PI_SER_OPEN_FAILED -72 // can't open serial device .br #define PI_SPI_OPEN_FAILED -73 // can't open SPI device .br #define PI_BAD_I2C_BUS -74 // bad I2C bus .br #define PI_BAD_I2C_ADDR -75 // bad I2C address .br #define PI_BAD_SPI_CHANNEL -76 // bad SPI channel .br #define PI_BAD_FLAGS -77 // bad i2c/spi/ser open flags .br #define PI_BAD_SPI_SPEED -78 // bad SPI speed .br #define PI_BAD_SER_DEVICE -79 // bad serial device name .br #define PI_BAD_SER_SPEED -80 // bad serial baud rate .br #define PI_BAD_PARAM -81 // bad i2c/spi/ser parameter .br #define PI_I2C_WRITE_FAILED -82 // i2c write failed .br #define PI_I2C_READ_FAILED -83 // i2c read failed .br #define PI_BAD_SPI_COUNT -84 // bad SPI count .br #define PI_SER_WRITE_FAILED -85 // ser write failed .br #define PI_SER_READ_FAILED -86 // ser read failed .br #define PI_SER_READ_NO_DATA -87 // ser read no data available .br #define PI_UNKNOWN_COMMAND -88 // unknown command .br #define PI_SPI_XFER_FAILED -89 // spi xfer/read/write failed .br #define PI_BAD_POINTER -90 // bad (NULL) pointer .br #define PI_NO_AUX_SPI -91 // no auxiliary SPI on Pi A or B .br #define PI_NOT_PWM_GPIO -92 // GPIO is not in use for PWM .br #define PI_NOT_SERVO_GPIO -93 // GPIO is not in use for servo pulses .br #define PI_NOT_HCLK_GPIO -94 // GPIO has no hardware clock .br #define PI_NOT_HPWM_GPIO -95 // GPIO has no hardware PWM .br #define PI_BAD_HPWM_FREQ -96 // invalid hardware PWM frequency .br #define PI_BAD_HPWM_DUTY -97 // hardware PWM dutycycle not 0-1M .br #define PI_BAD_HCLK_FREQ -98 // invalid hardware clock frequency .br #define PI_BAD_HCLK_PASS -99 // need password to use hardware clock 1 .br #define PI_HPWM_ILLEGAL -100 // illegal, PWM in use for main clock .br #define PI_BAD_DATABITS -101 // serial data bits not 1-32 .br #define PI_BAD_STOPBITS -102 // serial (half) stop bits not 2-8 .br #define PI_MSG_TOOBIG -103 // socket/pipe message too big .br #define PI_BAD_MALLOC_MODE -104 // bad memory allocation mode .br #define PI_TOO_MANY_SEGS -105 // too many I2C transaction segments .br #define PI_BAD_I2C_SEG -106 // an I2C transaction segment failed .br #define PI_BAD_SMBUS_CMD -107 // SMBus command not supported by driver .br #define PI_NOT_I2C_GPIO -108 // no bit bang I2C in progress on GPIO .br #define PI_BAD_I2C_WLEN -109 // bad I2C write length .br #define PI_BAD_I2C_RLEN -110 // bad I2C read length .br #define PI_BAD_I2C_CMD -111 // bad I2C command .br #define PI_BAD_I2C_BAUD -112 // bad I2C baud rate, not 50-500k .br #define PI_CHAIN_LOOP_CNT -113 // bad chain loop count .br #define PI_BAD_CHAIN_LOOP -114 // empty chain loop .br #define PI_CHAIN_COUNTER -115 // too many chain counters .br #define PI_BAD_CHAIN_CMD -116 // bad chain command .br #define PI_BAD_CHAIN_DELAY -117 // bad chain delay micros .br #define PI_CHAIN_NESTING -118 // chain counters nested too deeply .br #define PI_CHAIN_TOO_BIG -119 // chain is too long .br #define PI_DEPRECATED -120 // deprecated function removed .br #define PI_BAD_SER_INVERT -121 // bit bang serial invert not 0 or 1 .br #define PI_BAD_EDGE -122 // bad ISR edge value, not 0-2 .br #define PI_BAD_ISR_INIT -123 // bad ISR initialisation .br #define PI_BAD_FOREVER -124 // loop forever must be last command .br #define PI_BAD_FILTER -125 // bad filter parameter .br #define PI_BAD_PAD -126 // bad pad number .br #define PI_BAD_STRENGTH -127 // bad pad drive strength .br #define PI_FIL_OPEN_FAILED -128 // file open failed .br #define PI_BAD_FILE_MODE -129 // bad file mode .br #define PI_BAD_FILE_FLAG -130 // bad file flag .br #define PI_BAD_FILE_READ -131 // bad file read .br #define PI_BAD_FILE_WRITE -132 // bad file write .br #define PI_FILE_NOT_ROPEN -133 // file not open for read .br #define PI_FILE_NOT_WOPEN -134 // file not open for write .br #define PI_BAD_FILE_SEEK -135 // bad file seek .br #define PI_NO_FILE_MATCH -136 // no files match pattern .br #define PI_NO_FILE_ACCESS -137 // no permission to access file .br #define PI_FILE_IS_A_DIR -138 // file is a directory .br #define PI_BAD_SHELL_STATUS -139 // bad shell return status .br #define PI_BAD_SCRIPT_NAME -140 // bad script name .br #define PI_BAD_SPI_BAUD -141 // bad SPI baud rate, not 50-500k .br #define PI_NOT_SPI_GPIO -142 // no bit bang SPI in progress on GPIO .br #define PI_BAD_EVENT_ID -143 // bad event id .br #define PI_CMD_INTERRUPTED -144 // Used by Python .br #define PI_NOT_ON_BCM2711 -145 // not available on BCM2711 .br #define PI_ONLY_ON_BCM2711 -146 // only available on BCM2711 .br .br #define PI_PIGIF_ERR_0 -2000 .br #define PI_PIGIF_ERR_99 -2099 .br .br #define PI_CUSTOM_ERR_0 -3000 .br #define PI_CUSTOM_ERR_999 -3999 .br .br .EE .SH Defaults .EX .br #define PI_DEFAULT_BUFFER_MILLIS 120 .br #define PI_DEFAULT_CLK_MICROS 5 .br #define PI_DEFAULT_CLK_PERIPHERAL PI_CLOCK_PCM .br #define PI_DEFAULT_IF_FLAGS 0 .br #define PI_DEFAULT_FOREGROUND 0 .br #define PI_DEFAULT_DMA_CHANNEL 14 .br #define PI_DEFAULT_DMA_PRIMARY_CHANNEL 14 .br #define PI_DEFAULT_DMA_SECONDARY_CHANNEL 6 .br #define PI_DEFAULT_DMA_PRIMARY_CH_2711 7 .br #define PI_DEFAULT_DMA_SECONDARY_CH_2711 6 .br #define PI_DEFAULT_DMA_NOT_SET 15 .br #define PI_DEFAULT_SOCKET_PORT 8888 .br #define PI_DEFAULT_SOCKET_PORT_STR "8888" .br #define PI_DEFAULT_SOCKET_ADDR_STR "localhost" .br #define PI_DEFAULT_UPDATE_MASK_UNKNOWN 0x0000000FFFFFFCLL .br #define PI_DEFAULT_UPDATE_MASK_B1 0x03E7CF93 .br #define PI_DEFAULT_UPDATE_MASK_A_B2 0xFBC7CF9C .br #define PI_DEFAULT_UPDATE_MASK_APLUS_BPLUS 0x0080480FFFFFFCLL .br #define PI_DEFAULT_UPDATE_MASK_ZERO 0x0080000FFFFFFCLL .br #define PI_DEFAULT_UPDATE_MASK_PI2B 0x0080480FFFFFFCLL .br #define PI_DEFAULT_UPDATE_MASK_PI3B 0x0000000FFFFFFCLL .br #define PI_DEFAULT_UPDATE_MASK_PI4B 0x0000000FFFFFFCLL .br #define PI_DEFAULT_UPDATE_MASK_COMPUTE 0x00FFFFFFFFFFFFLL .br #define PI_DEFAULT_MEM_ALLOC_MODE PI_MEM_ALLOC_AUTO .br .br #define PI_DEFAULT_CFG_INTERNALS 0 .br .br .EE .SH SEE ALSO pigpiod(1), pig2vcd(1), pigs(1), pigpiod_if(3), pigpiod_if2(3) .SH AUTHOR joan@abyz.me.uk pigpio-78/pigpio.c000066400000000000000000012302051373465704200142520ustar00rootroot00000000000000/* This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to */ /* pigpio version 78 */ /* include ------------------------------------------------------- */ #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "pigpio.h" #include "command.h" /* --------------------------------------------------------------- */ /* 0 GPFSEL0 GPIO Function Select 0 1 GPFSEL1 GPIO Function Select 1 2 GPFSEL2 GPIO Function Select 2 3 GPFSEL3 GPIO Function Select 3 4 GPFSEL4 GPIO Function Select 4 5 GPFSEL5 GPIO Function Select 5 6 - Reserved 7 GPSET0 GPIO Pin Output Set 0 8 GPSET1 GPIO Pin Output Set 1 9 - Reserved 10 GPCLR0 GPIO Pin Output Clear 0 11 GPCLR1 GPIO Pin Output Clear 1 12 - Reserved 13 GPLEV0 GPIO Pin Level 0 14 GPLEV1 GPIO Pin Level 1 15 - Reserved 16 GPEDS0 GPIO Pin Event Detect Status 0 17 GPEDS1 GPIO Pin Event Detect Status 1 18 - Reserved 19 GPREN0 GPIO Pin Rising Edge Detect Enable 0 20 GPREN1 GPIO Pin Rising Edge Detect Enable 1 21 - Reserved 22 GPFEN0 GPIO Pin Falling Edge Detect Enable 0 23 GPFEN1 GPIO Pin Falling Edge Detect Enable 1 24 - Reserved 25 GPHEN0 GPIO Pin High Detect Enable 0 26 GPHEN1 GPIO Pin High Detect Enable 1 27 - Reserved 28 GPLEN0 GPIO Pin Low Detect Enable 0 29 GPLEN1 GPIO Pin Low Detect Enable 1 30 - Reserved 31 GPAREN0 GPIO Pin Async. Rising Edge Detect 0 32 GPAREN1 GPIO Pin Async. Rising Edge Detect 1 33 - Reserved 34 GPAFEN0 GPIO Pin Async. Falling Edge Detect 0 35 GPAFEN1 GPIO Pin Async. Falling Edge Detect 1 36 - Reserved 37 GPPUD GPIO Pin Pull-up/down Enable 38 GPPUDCLK0 GPIO Pin Pull-up/down Enable Clock 0 39 GPPUDCLK1 GPIO Pin Pull-up/down Enable Clock 1 40 - Reserved 41 - Test 42-56 Reserved 57 GPPUPPDN1 Pin pull-up/down for pins 15:0 58 GPPUPPDN1 Pin pull-up/down for pins 31:16 59 GPPUPPDN2 Pin pull-up/down for pins 47:32 60 GPPUPPDN3 Pin pull-up/down for pins 57:48 */ /* 0 CS DMA Channel 0 Control and Status 1 CPI_ONBLK_AD DMA Channel 0 Control Block Address 2 TI DMA Channel 0 CB Word 0 (Transfer Information) 3 SOURCE_AD DMA Channel 0 CB Word 1 (Source Address) 4 DEST_AD DMA Channel 0 CB Word 2 (Destination Address) 5 TXFR_LEN DMA Channel 0 CB Word 3 (Transfer Length) 6 STRIDE DMA Channel 0 CB Word 4 (2D Stride) 7 NEXTCPI_ONBK DMA Channel 0 CB Word 5 (Next CB Address) 8 DEBUG DMA Channel 0 Debug */ /* DEBUG register bits bit 2 READ_ERROR Slave Read Response Error RW 0x0 Set if the read operation returned an error value on the read response bus. It can be cleared by writing a 1. bit 1 FIFO_ERROR Fifo Error RW 0x0 Set if the optional read Fifo records an error condition. It can be cleared by writing a 1. bit 0 READ_LAST_NOT_SET_ERROR Read Last Not Set Error RW 0x0 If the AXI read last signal was not set when expected, then this error bit will be set. It can be cleared by writing a 1. */ /* 0 CTL PWM Control 1 STA PWM Status 2 DMAC PWM DMA Configuration 4 RNG1 PWM Channel 1 Range 5 DAT1 PWM Channel 1 Data 6 FIF1 PWM FIFO Input 8 RNG2 PWM Channel 2 Range 9 DAT2 PWM Channel 2 Data */ /* 0 PCM_CS PCM Control and Status 1 PCM_FIFO PCM FIFO Data 2 PCM_MODE PCM Mode 3 PCM_RXC PCM Receive Configuration 4 PCM_TXC PCM Transmit Configuration 5 PCM_DREQ PCM DMA Request Level 6 PCM_INTEN PCM Interrupt Enables 7 PCM_INTSTC PCM Interrupt Status & Clear 8 PCM_GRAY PCM Gray Mode Control */ /* 0 CS System Timer Control/Status 1 CLO System Timer Counter Lower 32 bits 2 CHI System Timer Counter Higher 32 bits 3 C0 System Timer Compare 0 4 C1 System Timer Compare 1 5 C2 System Timer Compare 2 6 C3 System Timer Compare 3 */ /* define -------------------------------------------------------- */ #define THOUSAND 1000 #define MILLION 1000000 #define BILLION 1000000000 #define BANK (gpio>>5) #define BIT (1<<(gpio&0x1F)) #ifndef EMBEDDED_IN_VM #define DBG(level, format, arg...) DO_DBG(level, format, ## arg) #else #define DBG(level, format, arg...) #endif #define DO_DBG(level, format, arg...) \ { \ if ((gpioCfg.dbgLevel >= level) && \ (!(gpioCfg.internals & PI_CFG_NOSIGHANDLER))) \ fprintf(stderr, "%s %s: " format "\n" , \ myTimeStamp(), __FUNCTION__ , ## arg); \ } #ifndef DISABLE_SER_CHECK_INITED #define SER_CHECK_INITED CHECK_INITED #else #define SER_CHECK_INITED #endif #define CHECK_INITED \ do \ { \ if (!libInitialised) \ { \ DBG(DBG_ALWAYS, \ "pigpio uninitialised, call gpioInitialise()"); \ return PI_NOT_INITIALISED; \ } \ } \ while (0) #define CHECK_INITED_RET_NULL_PTR \ do \ { \ if (!libInitialised) \ { \ DBG(DBG_ALWAYS, \ "pigpio uninitialised, call gpioInitialise()"); \ return (NULL); \ } \ } \ while (0) #define CHECK_INITED_RET_NIL \ do \ { \ if (!libInitialised) \ { \ DBG(DBG_ALWAYS, \ "pigpio uninitialised, call gpioInitialise()"); \ } \ } \ while (0) #define CHECK_NOT_INITED \ do \ { \ if (libInitialised) \ { \ DBG(DBG_ALWAYS, \ "pigpio initialised, call gpioTerminate()"); \ return PI_INITIALISED; \ } \ } \ while (0) #define SOFT_ERROR(x, format, arg...) \ do \ { \ DBG(DBG_ALWAYS, format, ## arg); \ return x; \ } \ while (0) #define TIMER_ADD(a, b, result) \ do \ { \ (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ (result)->tv_nsec = (a)->tv_nsec + (b)->tv_nsec; \ if ((result)->tv_nsec >= BILLION) \ { \ ++(result)->tv_sec; \ (result)->tv_nsec -= BILLION; \ } \ } \ while (0) #define TIMER_SUB(a, b, result) \ do \ { \ (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ (result)->tv_nsec = (a)->tv_nsec - (b)->tv_nsec; \ if ((result)->tv_nsec < 0) \ { \ --(result)->tv_sec; \ (result)->tv_nsec += BILLION; \ } \ } \ while (0) #define PI_PERI_BUS 0x7E000000 #define AUX_BASE (pi_peri_phys + 0x00215000) #define BSCS_BASE (pi_peri_phys + 0x00214000) #define CLK_BASE (pi_peri_phys + 0x00101000) #define DMA_BASE (pi_peri_phys + 0x00007000) #define DMA15_BASE (pi_peri_phys + 0x00E05000) #define GPIO_BASE (pi_peri_phys + 0x00200000) #define PADS_BASE (pi_peri_phys + 0x00100000) #define PCM_BASE (pi_peri_phys + 0x00203000) #define PWM_BASE (pi_peri_phys + 0x0020C000) #define SPI_BASE (pi_peri_phys + 0x00204000) #define SYST_BASE (pi_peri_phys + 0x00003000) #define AUX_LEN 0xD8 #define BSCS_LEN 0x40 #define CLK_LEN 0xA8 #define DMA_LEN 0x1000 /* allow access to all channels */ #define GPIO_LEN 0xF4 /* 2711 has more registers */ #define PADS_LEN 0x38 #define PCM_LEN 0x24 #define PWM_LEN 0x28 #define SPI_LEN 0x18 #define SYST_LEN 0x1C #define DMA_ENABLE (0xFF0/4) #define GPFSEL0 0 #define GPSET0 7 #define GPSET1 8 #define GPCLR0 10 #define GPCLR1 11 #define GPLEV0 13 #define GPLEV1 14 #define GPEDS0 16 #define GPEDS1 17 #define GPREN0 19 #define GPREN1 20 #define GPFEN0 22 #define GPFEN1 23 #define GPHEN0 25 #define GPHEN1 26 #define GPLEN0 28 #define GPLEN1 29 #define GPAREN0 31 #define GPAREN1 32 #define GPAFEN0 34 #define GPAFEN1 35 #define GPPUD 37 #define GPPUDCLK0 38 #define GPPUDCLK1 39 /* BCM2711 has different pulls */ #define GPPUPPDN0 57 #define GPPUPPDN1 58 #define GPPUPPDN2 59 #define GPPUPPDN3 60 #define DMA_CS 0 #define DMA_CONBLK_AD 1 #define DMA_DEBUG 8 /* DMA CS Control and Status bits */ #define DMA_CHANNEL_RESET (1<<31) #define DMA_CHANNEL_ABORT (1<<30) #define DMA_WAIT_ON_WRITES (1<<28) #define DMA_PANIC_PRIORITY(x) ((x)<<20) #define DMA_PRIORITY(x) ((x)<<16) #define DMA_INTERRUPT_STATUS (1<< 2) #define DMA_END_FLAG (1<< 1) #define DMA_ACTIVE (1<< 0) /* DMA control block "info" field bits */ #define DMA_NO_WIDE_BURSTS (1<<26) #define DMA_PERIPHERAL_MAPPING(x) ((x)<<16) #define DMA_BURST_LENGTH(x) ((x)<<12) #define DMA_SRC_IGNORE (1<<11) #define DMA_SRC_DREQ (1<<10) #define DMA_SRC_WIDTH (1<< 9) #define DMA_SRC_INC (1<< 8) #define DMA_DEST_IGNORE (1<< 7) #define DMA_DEST_DREQ (1<< 6) #define DMA_DEST_WIDTH (1<< 5) #define DMA_DEST_INC (1<< 4) #define DMA_WAIT_RESP (1<< 3) #define DMA_TDMODE (1<< 1) #define DMA_DEBUG_READ_ERR (1<<2) #define DMA_DEBUG_FIFO_ERR (1<<1) #define DMA_DEBUG_RD_LST_NOT_SET_ERR (1<<0) #define DMA_LITE_FIRST 7 #define DMA_LITE_MAX 0xfffc #define PWM_CTL 0 #define PWM_STA 1 #define PWM_DMAC 2 #define PWM_RNG1 4 #define PWM_DAT1 5 #define PWM_FIFO 6 #define PWM_RNG2 8 #define PWM_DAT2 9 #define PWM_CTL_MSEN2 (1<<15) #define PWM_CTL_PWEN2 (1<<8) #define PWM_CTL_MSEN1 (1<<7) #define PWM_CTL_CLRF1 (1<<6) #define PWM_CTL_USEF1 (1<<5) #define PWM_CTL_MODE1 (1<<1) #define PWM_CTL_PWEN1 (1<<0) #define PWM_DMAC_ENAB (1 <<31) #define PWM_DMAC_PANIC(x) ((x)<< 8) #define PWM_DMAC_DREQ(x) (x) #define PCM_CS 0 #define PCM_FIFO 1 #define PCM_MODE 2 #define PCM_RXC 3 #define PCM_TXC 4 #define PCM_DREQ 5 #define PCM_INTEN 6 #define PCM_INTSTC 7 #define PCM_GRAY 8 #define PCM_CS_STBY (1 <<25) #define PCM_CS_SYNC (1 <<24) #define PCM_CS_RXSEX (1 <<23) #define PCM_CS_RXERR (1 <<16) #define PCM_CS_TXERR (1 <<15) #define PCM_CS_DMAEN (1 <<9) #define PCM_CS_RXTHR(x) ((x)<<7) #define PCM_CS_TXTHR(x) ((x)<<5) #define PCM_CS_RXCLR (1 <<4) #define PCM_CS_TXCLR (1 <<3) #define PCM_CS_TXON (1 <<2) #define PCM_CS_RXON (1 <<1) #define PCM_CS_EN (1 <<0) #define PCM_MODE_CLK_DIS (1 <<28) #define PCM_MODE_PDMN (1 <<27) #define PCM_MODE_PDME (1 <<26) #define PCM_MODE_FRXP (1 <<25) #define PCM_MODE_FTXP (1 <<24) #define PCM_MODE_CLKM (1 <<23) #define PCM_MODE_CLKI (1 <<22) #define PCM_MODE_FSM (1 <<21) #define PCM_MODE_FSI (1 <<20) #define PCM_MODE_FLEN(x) ((x)<<10) #define PCM_MODE_FSLEN(x) ((x)<< 0) #define PCM_RXC_CH1WEX (1 <<31) #define PCM_RXC_CH1EN (1 <<30) #define PCM_RXC_CH1POS(x) ((x)<<20) #define PCM_RXC_CH1WID(x) ((x)<<16) #define PCM_RXC_CH2WEX (1 <<15) #define PCM_RXC_CH2EN (1 <<14) #define PCM_RXC_CH2POS(x) ((x)<< 4) #define PCM_RXC_CH2WID(x) ((x)<< 0) #define PCM_TXC_CH1WEX (1 <<31) #define PCM_TXC_CH1EN (1 <<30) #define PCM_TXC_CH1POS(x) ((x)<<20) #define PCM_TXC_CH1WID(x) ((x)<<16) #define PCM_TXC_CH2WEX (1 <<15) #define PCM_TXC_CH2EN (1 <<14) #define PCM_TXC_CH2POS(x) ((x)<< 4) #define PCM_TXC_CH2WID(x) ((x)<< 0) #define PCM_DREQ_TX_PANIC(x) ((x)<<24) #define PCM_DREQ_RX_PANIC(x) ((x)<<16) #define PCM_DREQ_TX_REQ_L(x) ((x)<< 8) #define PCM_DREQ_RX_REQ_L(x) ((x)<< 0) #define PCM_INTEN_RXERR (1<<3) #define PCM_INTEN_TXERR (1<<2) #define PCM_INTEN_RXR (1<<1) #define PCM_INTEN_TXW (1<<0) #define PCM_INTSTC_RXERR (1<<3) #define PCM_INTSTC_TXERR (1<<2) #define PCM_INTSTC_RXR (1<<1) #define PCM_INTSTC_TXW (1<<0) #define PCM_GRAY_FLUSH (1<<2) #define PCM_GRAY_CLR (1<<1) #define PCM_GRAY_EN (1<<0) #define BCM_PASSWD (0x5A<<24) #define CLK_CTL_MASH(x)((x)<<9) #define CLK_CTL_BUSY (1 <<7) #define CLK_CTL_KILL (1 <<5) #define CLK_CTL_ENAB (1 <<4) #define CLK_CTL_SRC(x) ((x)<<0) #define CLK_SRCS 2 #define CLK_CTL_SRC_OSC 1 #define CLK_CTL_SRC_PLLD 6 #define CLK_OSC_FREQ 19200000 #define CLK_OSC_FREQ_2711 54000000 #define CLK_PLLD_FREQ 500000000 #define CLK_PLLD_FREQ_2711 750000000 #define CLK_DIV_DIVI(x) ((x)<<12) #define CLK_DIV_DIVF(x) ((x)<< 0) #define CLK_GP0_CTL 28 #define CLK_GP0_DIV 29 #define CLK_GP1_CTL 30 #define CLK_GP1_DIV 31 #define CLK_GP2_CTL 32 #define CLK_GP2_DIV 33 #define CLK_PCMCTL 38 #define CLK_PCMDIV 39 #define CLK_PWMCTL 40 #define CLK_PWMDIV 41 #define SYST_CS 0 #define SYST_CLO 1 #define SYST_CHI 2 /* SPI */ #define SPI_CS 0 #define SPI_FIFO 1 #define SPI_CLK 2 #define SPI_DLEN 3 #define SPI_LTOH 4 #define SPI_DC 5 #define SPI_CS_LEN_LONG (1<<25) #define SPI_CS_DMA_LEN (1<<24) #define SPI_CS_CSPOLS(x) ((x)<<21) #define SPI_CS_RXF (1<<20) #define SPI_CS_RXR (1<<19) #define SPI_CS_TXD (1<<18) #define SPI_CS_RXD (1<<17) #define SPI_CS_DONE (1<<16) #define SPI_CS_LEN (1<<13) #define SPI_CS_REN (1<<12) #define SPI_CS_ADCS (1<<11) #define SPI_CS_INTR (1<<10) #define SPI_CS_INTD (1<<9) #define SPI_CS_DMAEN (1<<8) #define SPI_CS_TA (1<<7) #define SPI_CS_CSPOL(x) ((x)<<6) #define SPI_CS_CLEAR(x) ((x)<<4) #define SPI_CS_MODE(x) ((x)<<2) #define SPI_CS_CS(x) ((x)<<0) #define SPI_DC_RPANIC(x) ((x)<<24) #define SPI_DC_RDREQ(x) ((x)<<16) #define SPI_DC_TPANIC(x) ((x)<<8) #define SPI_DC_TDREQ(x) ((x)<<0) #define SPI_MODE0 0 #define SPI_MODE1 1 #define SPI_MODE2 2 #define SPI_MODE3 3 #define SPI_CS0 0 #define SPI_CS1 1 #define SPI_CS2 2 /* standard SPI gpios (ALT0) */ #define PI_SPI_CE0 8 #define PI_SPI_CE1 7 #define PI_SPI_SCLK 11 #define PI_SPI_MISO 9 #define PI_SPI_MOSI 10 /* auxiliary SPI gpios (ALT4) */ #define PI_ASPI_CE0 18 #define PI_ASPI_CE1 17 #define PI_ASPI_CE2 16 #define PI_ASPI_MISO 19 #define PI_ASPI_MOSI 20 #define PI_ASPI_SCLK 21 /* AUX */ #define AUX_IRQ 0 #define AUX_ENABLES 1 #define AUX_MU_IO_REG 16 #define AUX_MU_IER_REG 17 #define AUX_MU_IIR_REG 18 #define AUX_MU_LCR_REG 19 #define AUX_MU_MCR_REG 20 #define AUX_MU_LSR_REG 21 #define AUX_MU_MSR_REG 22 #define AUX_MU_SCRATCH 23 #define AUX_MU_CNTL_REG 24 #define AUX_MU_STAT_REG 25 #define AUX_MU_BAUD_REG 26 #define AUX_SPI0_CNTL0_REG 32 #define AUX_SPI0_CNTL1_REG 33 #define AUX_SPI0_STAT_REG 34 #define AUX_SPI0_PEEK_REG 35 #define AUX_SPI0_IO_REG 40 #define AUX_SPI0_TX_HOLD 44 #define AUX_SPI1_CNTL0_REG 48 #define AUX_SPI1_CNTL1_REG 49 #define AUX_SPI1_STAT_REG 50 #define AUX_SPI1_PEEK_REG 51 #define AUX_SPI1_IO_REG 56 #define AUX_SPI1_TX_HOLD 60 #define AUXENB_SPI2 (1<<2) #define AUXENB_SPI1 (1<<1) #define AUXENB_UART (1<<0) #define AUXSPI_CNTL0_SPEED(x) ((x)<<20) #define AUXSPI_CNTL0_CS(x) ((x)<<17) #define AUXSPI_CNTL0_POSTINP (1<<16) #define AUXSPI_CNTL0_VAR_CS (1<<15) #define AUXSPI_CNTL0_VAR_WIDTH (1<<14) #define AUXSPI_CNTL0_DOUT_HOLD(x) ((x)<<12) #define AUXSPI_CNTL0_ENABLE (1<<11) #define AUXSPI_CNTL0_IN_RISING(x) ((x)<<10) #define AUXSPI_CNTL0_CLR_FIFOS (1<<9) #define AUXSPI_CNTL0_OUT_RISING(x) ((x)<<8) #define AUXSPI_CNTL0_INVERT_CLK(x) ((x)<<7) #define AUXSPI_CNTL0_MSB_FIRST(x) ((x)<<6) #define AUXSPI_CNTL0_SHIFT_LEN(x) ((x)<<0) #define AUXSPI_CNTL1_CS_HIGH(x) ((x)<<8) #define AUXSPI_CNTL1_TX_IRQ (1<<7) #define AUXSPI_CNTL1_DONE_IRQ (1<<6) #define AUXSPI_CNTL1_MSB_FIRST(x)((x)<<1) #define AUXSPI_CNTL1_KEEP_INPUT (1<<0) #define AUXSPI_STAT_TX_FIFO(x) ((x)<<28) #define AUXSPI_STAT_RX_FIFO(x) ((x)<<20) #define AUXSPI_STAT_TX_FULL (1<<10) #define AUXSPI_STAT_TX_EMPTY (1<<9) #define AUXSPI_STAT_RX_EMPTY (1<<7) #define AUXSPI_STAT_BUSY (1<<6) #define AUXSPI_STAT_BITS(x) ((x)<<0) /* --------------------------------------------------------------- */ #define NORMAL_DMA (DMA_NO_WIDE_BURSTS | DMA_WAIT_RESP) #define TWO_BEAT_DMA (DMA_TDMODE | DMA_BURST_LENGTH(1)) #define TIMED_DMA(x) (DMA_DEST_DREQ | DMA_PERIPHERAL_MAPPING(x)) #define PCM_TIMER (((PCM_BASE + PCM_FIFO*4) & 0x00ffffff) | PI_PERI_BUS) #define PWM_TIMER (((PWM_BASE + PWM_FIFO*4) & 0x00ffffff) | PI_PERI_BUS) #define DBG_MIN_LEVEL 0 #define DBG_ALWAYS 0 #define DBG_STARTUP 1 #define DBG_DMACBS 2 #define DBG_SCRIPT 3 #define DBG_USER 4 #define DBG_INTERNAL 5 #define DBG_SLOW_TICK 6 #define DBG_FAST_TICK 7 #define DBG_MAX_LEVEL 8 #define GPIO_UNDEFINED 0 #define GPIO_WRITE 1 #define GPIO_PWM 2 #define GPIO_SERVO 3 #define GPIO_HW_CLK 4 #define GPIO_HW_PWM 5 #define GPIO_SPI 6 #define GPIO_I2C 7 #define STACK_SIZE (256*1024) #define PAGE_SIZE 4096 #define PWM_FREQS 18 #define CYCLES_PER_BLOCK 80 #define PULSE_PER_CYCLE 25 #define PAGES_PER_BLOCK 53 #define CBS_PER_IPAGE 117 #define LVS_PER_IPAGE 38 #define OFF_PER_IPAGE 38 #define TCK_PER_IPAGE 2 #define ON_PER_IPAGE 2 #define PAD_PER_IPAGE 7 #define CBS_PER_OPAGE 118 #define OOL_PER_OPAGE 79 /* Wave Count Block Assumes two counters per block. Each counter 4 * 16 (16^4=65536) 0 CB [13] 13*8 104 CBs for counter 0 104 CB [13] 13*8 104 CBs for counter 1 208 CB [60] 60*8 480 CBs reserved to construct wave 688 OOL [60] 60*1 60 OOL reserved to construct wave 748 OOL[136] 136*1 136 OOL for counter 0 884 OOL[136] 136*1 136 OOL for counter 1 1020 pad [4] 4*1 4 spare */ #define WCB_CNT_PER_PAGE 2 #define WCB_COUNTERS (WCB_CNT_PER_PAGE * PI_WAVE_COUNT_PAGES) #define WCB_CNT_CBS 13 #define WCB_CNT_OOL 68 #define WCB_COUNTER_OOL (WCB_CNT_PER_PAGE * WCB_CNT_OOL) #define WCB_COUNTER_CBS (WCB_CNT_PER_PAGE * WCB_CNT_CBS) #define WCB_CHAIN_CBS 60 #define WCB_CHAIN_OOL 60 #define CBS_PER_CYCLE ((PULSE_PER_CYCLE*3)+2) #define NUM_CBS (CBS_PER_CYCLE * bufferCycles) #define SUPERCYCLE 800 #define SUPERLEVEL 20000 #define BLOCK_SIZE (PAGES_PER_BLOCK*PAGE_SIZE) #define DMAI_PAGES (PAGES_PER_BLOCK * bufferBlocks) #define DMAO_PAGES (PAGES_PER_BLOCK * PI_WAVE_BLOCKS) #define NUM_WAVE_OOL (DMAO_PAGES * OOL_PER_OPAGE) #define NUM_WAVE_CBS (DMAO_PAGES * CBS_PER_OPAGE) #define TICKSLOTS 50 #define PI_I2C_CLOSED 0 #define PI_I2C_RESERVED 1 #define PI_I2C_OPENED 2 #define PI_SPI_CLOSED 0 #define PI_SPI_RESERVED 1 #define PI_SPI_OPENED 2 #define PI_SER_CLOSED 0 #define PI_SER_RESERVED 1 #define PI_SER_OPENED 2 #define PI_FILE_CLOSED 0 #define PI_FILE_RESERVED 1 #define PI_FILE_OPENED 2 #define PI_NOTIFY_CLOSED 0 #define PI_NOTIFY_RESERVED 1 #define PI_NOTIFY_CLOSING 2 #define PI_NOTIFY_OPENED 3 #define PI_NOTIFY_RUNNING 4 #define PI_NOTIFY_PAUSED 5 #define PI_WFRX_NONE 0 #define PI_WFRX_SERIAL 1 #define PI_WFRX_I2C_SDA 2 #define PI_WFRX_I2C_SCL 3 #define PI_WFRX_SPI_SCLK 4 #define PI_WFRX_SPI_MISO 5 #define PI_WFRX_SPI_MOSI 6 #define PI_WFRX_SPI_CS 7 #define PI_WF_MICROS 1 #define BPD 4 #define MAX_REPORT 250 #define MAX_SAMPLE 4000 #define DEFAULT_PWM_IDX 5 #define MAX_EMITS (PIPE_BUF / sizeof(gpioReport_t)) #define SRX_BUF_SIZE 8192 #define PI_I2C_RETRIES 0x0701 #define PI_I2C_TIMEOUT 0x0702 #define PI_I2C_SLAVE 0x0703 #define PI_I2C_FUNCS 0x0705 #define PI_I2C_RDWR 0x0707 #define PI_I2C_SMBUS 0x0720 #define PI_I2C_SMBUS_READ 1 #define PI_I2C_SMBUS_WRITE 0 #define PI_I2C_SMBUS_QUICK 0 #define PI_I2C_SMBUS_BYTE 1 #define PI_I2C_SMBUS_BYTE_DATA 2 #define PI_I2C_SMBUS_WORD_DATA 3 #define PI_I2C_SMBUS_PROC_CALL 4 #define PI_I2C_SMBUS_BLOCK_DATA 5 #define PI_I2C_SMBUS_I2C_BLOCK_BROKEN 6 #define PI_I2C_SMBUS_BLOCK_PROC_CALL 7 #define PI_I2C_SMBUS_I2C_BLOCK_DATA 8 #define PI_I2C_SMBUS_BLOCK_MAX 32 #define PI_I2C_SMBUS_I2C_BLOCK_MAX 32 #define PI_I2C_FUNC_SMBUS_QUICK 0x00010000 #define PI_I2C_FUNC_SMBUS_READ_BYTE 0x00020000 #define PI_I2C_FUNC_SMBUS_WRITE_BYTE 0x00040000 #define PI_I2C_FUNC_SMBUS_READ_BYTE_DATA 0x00080000 #define PI_I2C_FUNC_SMBUS_WRITE_BYTE_DATA 0x00100000 #define PI_I2C_FUNC_SMBUS_READ_WORD_DATA 0x00200000 #define PI_I2C_FUNC_SMBUS_WRITE_WORD_DATA 0x00400000 #define PI_I2C_FUNC_SMBUS_PROC_CALL 0x00800000 #define PI_I2C_FUNC_SMBUS_READ_BLOCK_DATA 0x01000000 #define PI_I2C_FUNC_SMBUS_WRITE_BLOCK_DATA 0x02000000 #define PI_I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000 #define PI_I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 #define PI_MASH_MAX_FREQ 23800000 #define FLUSH_PAGES 1024 #define MB_DEV_MAJOR 100 #define MB_IOCTL _IOWR(MB_DEV_MAJOR, 0, char *) #define MB_DEV1 "/dev/vcio" #define MB_DEV2 "/dev/pigpio-mb" #define BUS_TO_PHYS(x) ((x)&~0xC0000000) #define MB_END_TAG 0 #define MB_PROCESS_REQUEST 0 #define MB_ALLOCATE_MEMORY_TAG 0x3000C #define MB_LOCK_MEMORY_TAG 0x3000D #define MB_UNLOCK_MEMORY_TAG 0x3000E #define MB_RELEASE_MEMORY_TAG 0x3000F #define PI_SCRIPT_FREE 0 #define PI_SCRIPT_RESERVED 1 #define PI_SCRIPT_IN_USE 2 #define PI_SCRIPT_DYING 3 #define PI_SCRIPT_HALT 0 #define PI_SCRIPT_RUN 1 #define PI_SCRIPT_DELETE 2 #define PI_SCRIPT_STACK_SIZE 256 #define PI_SPI_FLAGS_CHANNEL(x) ((x&7)<<29) #define PI_SPI_FLAGS_GET_CHANNEL(x) (((x)>>29)&7) #define PI_SPI_FLAGS_GET_BITLEN(x) (((x)>>16)&63) #define PI_SPI_FLAGS_GET_RX_LSB(x) (((x)>>15)&1) #define PI_SPI_FLAGS_GET_TX_LSB(x) (((x)>>14)&1) #define PI_SPI_FLAGS_GET_3WREN(x) (((x)>>10)&15) #define PI_SPI_FLAGS_GET_3WIRE(x) (((x)>>9)&1) #define PI_SPI_FLAGS_GET_AUX_SPI(x) (((x)>>8)&1) #define PI_SPI_FLAGS_GET_RESVD(x) (((x)>>5)&7) #define PI_SPI_FLAGS_GET_CSPOLS(x) (((x)>>2)&7) #define PI_SPI_FLAGS_GET_MODE(x) ((x)&3) #define PI_SPI_FLAGS_GET_CPHA(x) ((x)&1) #define PI_SPI_FLAGS_GET_CPOL(x) ((x)&2) #define PI_SPI_FLAGS_GET_CSPOL(x) ((x)&4) #define PI_STARTING 0 #define PI_RUNNING 1 #define PI_ENDING 2 #define PI_THREAD_NONE 0 #define PI_THREAD_STARTED 1 #define PI_THREAD_RUNNING 2 #define PI_MAX_PATH 512 /* typedef ------------------------------------------------------- */ typedef void (*callbk_t) (); typedef struct { rawCbs_t cb [128]; } dmaPage_t; typedef struct { rawCbs_t cb [CBS_PER_IPAGE]; uint32_t level [LVS_PER_IPAGE]; uint32_t gpioOff [OFF_PER_IPAGE]; uint32_t tick [TCK_PER_IPAGE]; uint32_t gpioOn [ON_PER_IPAGE]; uint32_t periphData; uint32_t pad [PAD_PER_IPAGE]; } dmaIPage_t; typedef struct { rawCbs_t cb [CBS_PER_OPAGE]; uint32_t OOL [OOL_PER_OPAGE]; uint32_t periphData; } dmaOPage_t; typedef struct { uint8_t is; uint8_t pad; uint16_t width; uint16_t range; /* dutycycles specified by 0 .. range */ uint16_t freqIdx; uint16_t deferOff; uint16_t deferRng; } gpioInfo_t; typedef struct { callbk_t func; unsigned ex; void *userdata; int wdSteadyUs; uint32_t wdTick; uint32_t wdLBitV; int nfSteadyUs; int nfActiveUs; int nfActive; uint32_t nfTick1; uint32_t nfTick2; uint32_t nfLBitV; uint32_t nfRBitV; uint32_t gfSteadyUs; uint8_t gfInitialised; uint32_t gfTick; uint32_t gfLBitV; uint32_t gfRBitV; } gpioAlert_t; typedef struct { callbk_t func; unsigned ex; void *userdata; int ignore; int fired; } eventAlert_t; typedef struct { unsigned gpio; pthread_t *pth; callbk_t func; unsigned edge; int timeout; unsigned ex; void *userdata; int fd; int inited; } gpioISR_t; typedef struct { callbk_t func; unsigned ex; void *userdata; } gpioSignal_t; typedef struct { callbk_t func; unsigned ex; void *userdata; uint32_t bits; } gpioGetSamples_t; typedef struct { callbk_t func; unsigned ex; void *userdata; unsigned id; unsigned running; unsigned millis; pthread_t pthId; } gpioTimer_t; typedef struct { unsigned id; unsigned state; unsigned request; unsigned run_state; uint32_t waitBits; uint32_t eventBits; uint32_t changedBits; pthread_t *pthIdp; pthread_mutex_t pthMutex; pthread_cond_t pthCond; cmdScript_t script; } gpioScript_t; typedef struct { uint16_t valid; uint16_t servoIdx; } clkCfg_t; typedef struct { uint16_t seqno; uint16_t state; uint32_t bits; uint32_t eventBits; uint32_t lastReportTick; int fd; int pipe; int max_emits; } gpioNotify_t; typedef struct { uint16_t state; int16_t fd; uint32_t mode; } fileInfo_t; typedef struct { uint16_t state; int16_t fd; uint32_t addr; uint32_t flags; uint32_t funcs; } i2cInfo_t; typedef struct { uint16_t state; int16_t fd; uint32_t flags; } serInfo_t; typedef struct { uint16_t state; unsigned speed; uint32_t flags; } spiInfo_t; typedef struct { uint32_t alertTicks; uint32_t lateTicks; uint32_t moreToDo; uint32_t diffTick[TICKSLOTS]; uint32_t cbTicks; uint32_t cbCalls; uint32_t maxEmit; uint32_t emitFrags; uint32_t maxSamples; uint32_t numSamples; uint32_t DMARestarts; uint32_t dmaInitCbsCount; uint32_t goodPipeWrite; uint32_t shortPipeWrite; uint32_t wouldBlockPipeWrite; } gpioStats_t; typedef struct { unsigned bufferMilliseconds; unsigned clockMicros; unsigned clockPeriph; unsigned DMAprimaryChannel; unsigned DMAsecondaryChannel; unsigned socketPort; unsigned ifFlags; unsigned memAllocMode; unsigned dbgLevel; unsigned alertFreq; uint32_t internals; /* 0-3: dbgLevel 4-7: alertFreq */ } gpioCfg_t; typedef struct { uint32_t micros; uint32_t highMicros; uint32_t maxMicros; uint32_t pulses; uint32_t highPulses; uint32_t maxPulses; uint32_t cbs; uint32_t highCbs; uint32_t maxCbs; } wfStats_t; typedef struct { char *buf; uint32_t bufSize; int readPos; int writePos; uint32_t fullBit; /* nanoseconds */ uint32_t halfBit; /* nanoseconds */ int timeout; /* millisconds */ uint32_t startBitTick; /* microseconds */ uint32_t nextBitDiff; /* nanoseconds */ int bit; uint32_t data; int bytes; /* 1, 2, 4 */ int level; int dataBits; /* 1-32 */ int invert; /* 0, 1 */ } wfRxSerial_t; typedef struct { int SDA; int SCL; int delay; int SDAMode; int SCLMode; int started; } wfRxI2C_t; typedef struct { int CS; int MISO; int MOSI; int SCLK; int usage; int delay; int spiFlags; int MISOMode; int MOSIMode; int CSMode; int SCLKMode; } wfRxSPI_t; typedef struct { int mode; int gpio; uint32_t baud; pthread_mutex_t mutex; union { wfRxSerial_t s; wfRxI2C_t I; wfRxSPI_t S; }; } wfRx_t; union my_smbus_data { uint8_t byte; uint16_t word; uint8_t block[PI_I2C_SMBUS_BLOCK_MAX + 2]; }; struct my_smbus_ioctl_data { uint8_t read_write; uint8_t command; uint32_t size; union my_smbus_data *data; }; typedef struct { pi_i2c_msg_t *msgs; /* pointers to pi_i2c_msgs */ uint32_t nmsgs; /* number of pi_i2c_msgs */ } my_i2c_rdwr_ioctl_data_t; typedef struct { unsigned div; unsigned frac; unsigned clock; } clkInf_t; typedef struct { unsigned handle; /* mbAllocateMemory() */ uintptr_t bus_addr; /* mbLockMemory() */ uintptr_t *virtual_addr; /* mbMapMem() */ unsigned size; /* in bytes */ } DMAMem_t; /* global -------------------------------------------------------- */ /* initialise once then preserve */ static volatile uint32_t piCores = 0; static volatile uint32_t pi_peri_phys = 0x20000000; static volatile uint32_t pi_dram_bus = 0x40000000; static volatile uint32_t pi_mem_flag = 0x0C; static volatile uint32_t pi_ispi = 0; static volatile uint32_t pi_is_2711 = 0; static volatile uint32_t clk_osc_freq = CLK_OSC_FREQ; static volatile uint32_t clk_plld_freq = CLK_PLLD_FREQ; static volatile uint32_t hw_pwm_max_freq = PI_HW_PWM_MAX_FREQ; static volatile uint32_t hw_clk_min_freq = PI_HW_CLK_MIN_FREQ; static volatile uint32_t hw_clk_max_freq = PI_HW_CLK_MAX_FREQ; static int libInitialised = 0; /* initialise every gpioInitialise */ static struct timespec libStarted; static uint32_t sockNetAddr[MAX_CONNECT_ADDRESSES]; static int numSockNetAddr = 0; static uint32_t reportedLevel = 0; static int waveClockInited = 0; static int PWMClockInited = 0; static volatile gpioStats_t gpioStats; static int gpioMaskSet = 0; /* initialise if not libInitialised */ static uint64_t gpioMask; static rawWave_t wf[3][PI_WAVE_MAX_PULSES]; static int wfc[3]={0, 0, 0}; static int wfcur=0; static wfStats_t wfStats= { 0, 0, PI_WAVE_MAX_MICROS, 0, 0, PI_WAVE_MAX_PULSES, 0, 0, (DMAO_PAGES * CBS_PER_OPAGE) }; static rawWaveInfo_t waveInfo[PI_MAX_WAVES]; static wfRx_t wfRx[PI_MAX_USER_GPIO+1]; static int waveOutBotCB = PI_WAVE_COUNT_PAGES*CBS_PER_OPAGE; static int waveOutBotOOL = PI_WAVE_COUNT_PAGES*OOL_PER_OPAGE; static int waveOutTopOOL = NUM_WAVE_OOL; static int waveOutCount = 0; static uint32_t *waveEndPtr = NULL; static volatile uint32_t alertBits = 0; static volatile uint32_t monitorBits = 0; static volatile uint32_t notifyBits = 0; static volatile uint32_t scriptBits = 0; static volatile uint32_t gFilterBits = 0; static volatile uint32_t nFilterBits = 0; static volatile uint32_t wdogBits = 0; static volatile uint32_t scriptEventBits = 0; static volatile int runState = PI_STARTING; static int pthAlertRunning = PI_THREAD_NONE; static int pthFifoRunning = PI_THREAD_NONE; static int pthSocketRunning = PI_THREAD_NONE; static gpioAlert_t gpioAlert [PI_MAX_USER_GPIO+1]; static eventAlert_t eventAlert [PI_MAX_EVENT+1]; static gpioISR_t gpioISR [PI_MAX_GPIO+1]; static gpioGetSamples_t gpioGetSamples; static gpioInfo_t gpioInfo [PI_MAX_GPIO+1]; static gpioNotify_t gpioNotify [PI_NOTIFY_SLOTS]; static fileInfo_t fileInfo [PI_FILE_SLOTS]; static i2cInfo_t i2cInfo [PI_I2C_SLOTS]; static serInfo_t serInfo [PI_SER_SLOTS]; static spiInfo_t spiInfo [PI_SPI_SLOTS]; static gpioScript_t gpioScript [PI_MAX_SCRIPTS]; static gpioSignal_t gpioSignal [PI_MAX_SIGNUM+1]; static gpioTimer_t gpioTimer [PI_MAX_TIMER+1]; static int pwmFreq[PWM_FREQS]; /* reset after gpioTerminated */ /* resources which must be released on gpioTerminate */ static FILE * inpFifo = NULL; static FILE * outFifo = NULL; static int fdLock = -1; static int fdMem = -1; static int fdSock = -1; static int fdPmap = -1; static int fdMbox = -1; static DMAMem_t *dmaMboxBlk = MAP_FAILED; static uintptr_t * * dmaPMapBlk = MAP_FAILED; static dmaPage_t * * dmaVirt = MAP_FAILED; static dmaPage_t * * dmaBus = MAP_FAILED; static dmaIPage_t * * dmaIVirt = MAP_FAILED; static dmaIPage_t * * dmaIBus = MAP_FAILED; static dmaOPage_t * * dmaOVirt = MAP_FAILED; static dmaOPage_t * * dmaOBus = MAP_FAILED; static volatile uint32_t * auxReg = MAP_FAILED; static volatile uint32_t * bscsReg = MAP_FAILED; static volatile uint32_t * clkReg = MAP_FAILED; static volatile uint32_t * dmaReg = MAP_FAILED; static volatile uint32_t * gpioReg = MAP_FAILED; static volatile uint32_t * padsReg = MAP_FAILED; static volatile uint32_t * pcmReg = MAP_FAILED; static volatile uint32_t * pwmReg = MAP_FAILED; static volatile uint32_t * spiReg = MAP_FAILED; static volatile uint32_t * systReg = MAP_FAILED; static volatile uint32_t * dmaIn = MAP_FAILED; static volatile uint32_t * dmaOut = MAP_FAILED; static uint32_t hw_clk_freq[3]; static uint32_t hw_pwm_freq[2]; static uint32_t hw_pwm_duty[2]; static uint32_t hw_pwm_real_range[2]; static volatile gpioCfg_t gpioCfg = { PI_DEFAULT_BUFFER_MILLIS, PI_DEFAULT_CLK_MICROS, PI_DEFAULT_CLK_PERIPHERAL, PI_DEFAULT_DMA_NOT_SET, /* primary DMA */ PI_DEFAULT_DMA_NOT_SET, /* secondary DMA */ PI_DEFAULT_SOCKET_PORT, PI_DEFAULT_IF_FLAGS, PI_DEFAULT_MEM_ALLOC_MODE, 0, /* dbgLevel */ 0, /* alertFreq */ 0, /* internals */ }; /* no initialisation required */ static unsigned bufferBlocks; /* number of blocks in buffer */ static unsigned bufferCycles; /* number of cycles */ static pthread_t pthAlert; static pthread_t pthFifo; static pthread_t pthSocket; static uint32_t spi_dummy; static unsigned old_mode_ce0; static unsigned old_mode_ce1; static unsigned old_mode_sclk; static unsigned old_mode_miso; static unsigned old_mode_mosi; static uint32_t old_spi_cs; static uint32_t old_spi_clk; static unsigned old_mode_ace0; static unsigned old_mode_ace1; static unsigned old_mode_ace2; static unsigned old_mode_asclk; static unsigned old_mode_amiso; static unsigned old_mode_amosi; static uint32_t old_spi_cntl0; static uint32_t old_spi_cntl1; static uint32_t bscFR; /* const --------------------------------------------------------- */ static const uint8_t clkDef[PI_MAX_GPIO + 1] = { /* 0 1 2 3 4 5 6 7 8 9 */ /* 0 */ 0x00, 0x00, 0x00, 0x00, 0x84, 0x94, 0xA4, 0x00, 0x00, 0x00, /* 1 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 2 */ 0x82, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 3 */ 0x00, 0x00, 0x84, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, /* 4 */ 0x00, 0x00, 0x94, 0xA4, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, /* 5 */ 0x00, 0x00, 0x00, 0x00, }; /* 7 6 5 4 3 2 1 0 V . C C . M M M V: 0 no clock, 1 has a clock CC: 00 CLK0, 01 CLK1, 10 CLK2 M: 100 ALT0, 010 ALT5 gpio4 GPCLK0 ALT0 gpio5 GPCLK1 ALT0 B+ and compute module only (reserved for system use) gpio6 GPCLK2 ALT0 B+ and compute module only gpio20 GPCLK0 ALT5 B+ and compute module only gpio21 GPCLK1 ALT5 Not available on Rev.2 B (reserved for system use) gpio32 GPCLK0 ALT0 Compute module only gpio34 GPCLK0 ALT0 Compute module only gpio42 GPCLK1 ALT0 Compute module only (reserved for system use) gpio43 GPCLK2 ALT0 Compute module only gpio44 GPCLK1 ALT0 Compute module only (reserved for system use) */ static const uint8_t PWMDef[PI_MAX_GPIO + 1] = { /* 0 1 2 3 4 5 6 7 8 9 */ /* 0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 1 */ 0x00, 0x00, 0x84, 0x94, 0x00, 0x00, 0x00, 0x00, 0x82, 0x92, /* 2 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 3 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 4 */ 0x84, 0x94, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x00, /* 5 */ 0x00, 0x00, 0x85, 0x95, }; /* 7 6 5 4 3 2 1 0 V . . P . M M M V: 0 no PWM, 1 has a PWM P: 0 PWM0, 1 PWM1 M: 010 ALT5, 100 ALT0, 101 ALT1 gpio12 pwm0 ALT0 gpio13 pwm1 ALT0 gpio18 pwm0 ALT5 gpio19 pwm1 ALT5 gpio40 pwm0 ALT0 gpio41 pwm1 ALT0 gpio45 pwm1 ALT0 gpio52 pwm0 ALT1 gpio53 pwm1 ALT1 */ static const clkCfg_t clkCfg[]= { /* valid servo */ { 0, 0}, /* 0 */ { 1, 17}, /* 1 */ { 1, 16}, /* 2 */ { 0, 0}, /* 3 */ { 1, 15}, /* 4 */ { 1, 14}, /* 5 */ { 0, 0}, /* 6 */ { 0, 0}, /* 7 */ { 1, 13}, /* 8 */ { 0, 0}, /* 9 */ { 1, 12}, /* 10 */ }; static const uint16_t pwmCycles[PWM_FREQS]= { 1, 2, 4, 5, 8, 10, 16, 20, 25, 32, 40, 50, 80, 100, 160, 200, 400, 800}; static const uint16_t pwmRealRange[PWM_FREQS]= { 25, 50, 100, 125, 200, 250, 400, 500, 625, 800, 1000, 1250, 2000, 2500, 4000, 5000, 10000, 20000}; /* prototype ----------------------------------------------------- */ static void intNotifyBits(void); static void intScriptBits(void); static void intScriptEventBits(void); static int gpioNotifyOpenInBand(int fd); static void initHWClk (int clkCtl, int clkDiv, int clkSrc, int divI, int divF, int MASH); static void initDMAgo(volatile uint32_t *dmaAddr, uint32_t cbAddr); int gpioWaveTxStart(unsigned wave_mode); /* deprecated */ static void closeOrphanedNotifications(int slot, int fd); /* ======================================================================= */ int myScriptNameValid(char *name) { int i, c, len, valid; len = strlen(name); valid = 1; for (i=0; i 40) c = 40; else c = count; for (i=0; ibyte+1, (char*)data)); args.read_write = rw; args.command = cmd; args.size = size; args.data = data; return ioctl(fd, PI_I2C_SMBUS, &args); } /* ----------------------------------------------------------------------- */ static void myGpioSetMode(unsigned gpio, unsigned mode) { int reg, shift; reg = gpio/10; shift = (gpio%10) * 3; gpioReg[reg] = (gpioReg[reg] & ~(7<level[slot]; return level; } /* ----------------------------------------------------------------------- */ static int myI2CGetPar(char *inBuf, int *inPos, int inLen, int *esc) { int bytes; if (*esc) bytes = 2; else bytes = 1; *esc = 0; if (*inPos <= (inLen - bytes)) { if (bytes == 1) { return inBuf[(*inPos)++]; } else { (*inPos) += 2; return inBuf[*inPos-2] + (inBuf[*inPos-1]<<8); } } return -1; } /* ----------------------------------------------------------------------- */ static uint32_t myGetTick(int pos) { uint32_t tick; int page, slot; myTckPageSlot(pos, &page, &slot); tick = dmaIVirt[page]->tick[slot]; return tick; } static int myPermit(unsigned gpio) { if (gpio <= PI_MAX_GPIO) { if (gpioMask & ((uint64_t)(1)<>32; res = gpioWrite_Bits_32_53_Clear(p[1]&mask); if ((mask | p[1]) != mask) { DBG(DBG_USER, "gpioWrite_Bits_32_53_Clear: bad bits %08"PRIXPTR" (permissions %08X)", p[1], mask); res = PI_SOME_PERMITTED; } break; case PI_CMD_BI2CC: res = bbI2CClose(p[1]); break; case PI_CMD_BI2CO: memcpy(&p[4], buf, 4); res = bbI2COpen(p[1], p[2], p[4]); break; case PI_CMD_BI2CZ: /* use half buffer for write, half buffer for read */ if (p[3] > (bufSize/2)) p[3] = bufSize/2; res = bbI2CZip(p[1], buf, p[3], buf+(bufSize/2), bufSize/2); if (res > 0) { memcpy(buf, buf+(bufSize/2), res); } break; case PI_CMD_BSCX: xfer.control = p[1]; if (p[3] > BSC_FIFO_SIZE) p[3] = BSC_FIFO_SIZE; xfer.txCnt = p[3]; if (p[3]) memcpy(&xfer.txBuf, buf, p[3]); res = bscXfer(&xfer); if (res >= 0) { memcpy(buf, &res, 4); res = 4 + xfer.rxCnt; if (res > 4) memcpy(buf+4, &xfer.rxBuf, res-4); } break; case PI_CMD_BSPIO: memcpy(&tmp1, buf+ 0, 4); // MISO memcpy(&tmp2, buf+ 4, 4); // MOSI memcpy(&tmp3, buf+ 8, 4); // SCLK memcpy(&tmp4, buf+12, 4); // baud memcpy(&tmp5, buf+16, 4); // flags if (!myPermit(p[1])) { DBG(DBG_USER, "bbSPIOpen: gpio %"PRIdPTR", no permission to update CS", p[1]); res = PI_NOT_PERMITTED; } if (!myPermit(tmp1)) { DBG(DBG_USER, "bbSPIOpen: gpio %d, no permission to update MISO", tmp1); res = PI_NOT_PERMITTED; } if (!myPermit(tmp2)) { DBG(DBG_USER, "bbSPIOpen: gpio %d, no permission to update MOSI", tmp2); res = PI_NOT_PERMITTED; } if (!myPermit(tmp3)) { DBG(DBG_USER, "bbSPIOpen: gpio %d, no permission to update SCLK", tmp3); res = PI_NOT_PERMITTED; } if (!res) res = bbSPIOpen(p[1], tmp1, tmp2, tmp3, tmp4, tmp5); break; case PI_CMD_BSPIC: res = bbSPIClose(p[1]); break; case PI_CMD_BSPIX: if (p[3] > bufSize) p[3] = bufSize; res = bbSPIXfer(p[1], buf, buf, p[3]); break; case PI_CMD_BR1: res = gpioRead_Bits_0_31(); break; case PI_CMD_BR2: res = gpioRead_Bits_32_53(); break; case PI_CMD_BS1: mask = gpioMask; res = gpioWrite_Bits_0_31_Set(p[1]&mask); if ((mask | p[1]) != mask) { DBG(DBG_USER, "gpioWrite_Bits_0_31_Set: bad bits %08"PRIXPTR" (permissions %08X)", p[1], mask); res = PI_SOME_PERMITTED; } break; case PI_CMD_BS2: mask = gpioMask>>32; res = gpioWrite_Bits_32_53_Set(p[1]&mask); if ((mask | p[1]) != mask) { DBG(DBG_USER, "gpioWrite_Bits_32_53_Set: bad bits %08"PRIXPTR" (permissions %08X)", p[1], mask); res = PI_SOME_PERMITTED; } break; case PI_CMD_CF1: res = gpioCustom1(p[1], p[2], buf, p[3]); break; case PI_CMD_CF2: /* a couple of extra precautions for untrusted code */ if (p[2] > bufSize) p[2] = bufSize; res = gpioCustom2(p[1], buf, p[3], buf, p[2]); if (res > p[2]) res = p[2]; break; case PI_CMD_CGI: res = gpioCfgGetInternals(); break; case PI_CMD_CSI: res = gpioCfgSetInternals(p[1]); break; case PI_CMD_EVM: res = eventMonitor(p[1], p[2]); break; case PI_CMD_EVT: res = eventTrigger(p[1]); break; case PI_CMD_FC: res = fileClose(p[1]); break; case PI_CMD_FG: res = gpioGlitchFilter(p[1], p[2]); break; case PI_CMD_FL: if (p[1] > bufSize) p[1] = bufSize; res = fileList(buf, buf, p[1]); break; case PI_CMD_FN: memcpy(&p[4], buf, 4); res = gpioNoiseFilter(p[1], p[2], p[4]); break; case PI_CMD_FO: res = fileOpen(buf, p[1]); break; case PI_CMD_FR: if (p[2] > bufSize) p[2] = bufSize; res = fileRead(p[1], buf, p[2]); break; case PI_CMD_FS: memcpy(&p[4], buf, 4); res = fileSeek(p[1], p[2], p[4]); break; case PI_CMD_FW: res = fileWrite(p[1], buf, p[3]); break; case PI_CMD_GDC: res = gpioGetPWMdutycycle(p[1]); break; case PI_CMD_GPW: res = gpioGetServoPulsewidth(p[1]); break; case PI_CMD_HC: /* special case to allow password in upper byte */ if (myPermit(p[1]&0xFFFFFF)) res = gpioHardwareClock(p[1], p[2]); else { DBG(DBG_USER, "gpioHardwareClock: gpio %"PRIdPTR", no permission to update", p[1] & 0xFFFFFF); res = PI_NOT_PERMITTED; } break; case PI_CMD_HELP: break; case PI_CMD_HP: if (myPermit(p[1])) { memcpy(&p[4], buf, 4); res = gpioHardwarePWM(p[1], p[2], p[4]); } else { DBG(DBG_USER, "gpioHardwarePWM: gpio %"PRIdPTR", no permission to update", p[1]); res = PI_NOT_PERMITTED; } break; case PI_CMD_HWVER: res = gpioHardwareRevision(); break; case PI_CMD_I2CC: res = i2cClose(p[1]); break; case PI_CMD_I2CO: memcpy(&p[4], buf, 4); res = i2cOpen(p[1], p[2], p[4]); break; case PI_CMD_I2CPC: memcpy(&p[4], buf, 4); res = i2cProcessCall(p[1], p[2], p[4]); break; case PI_CMD_I2CPK: res = i2cBlockProcessCall(p[1], p[2], buf, p[3]); break; case PI_CMD_I2CRB: res = i2cReadByteData(p[1], p[2]); break; case PI_CMD_I2CRD: if (p[2] > bufSize) p[2] = bufSize; res = i2cReadDevice(p[1], buf, p[2]); break; case PI_CMD_I2CRI: memcpy(&p[4], buf, 4); res = i2cReadI2CBlockData(p[1], p[2], buf, p[4]); break; case PI_CMD_I2CRK: res = i2cReadBlockData(p[1], p[2], buf); break; case PI_CMD_I2CRS: res = i2cReadByte(p[1]); break; case PI_CMD_I2CRW: res = i2cReadWordData(p[1], p[2]); break; case PI_CMD_I2CWB: memcpy(&p[4], buf, 4); res = i2cWriteByteData(p[1], p[2], p[4]); break; case PI_CMD_I2CWD: res = i2cWriteDevice(p[1], buf, p[3]); break; case PI_CMD_I2CWI: res = i2cWriteI2CBlockData(p[1], p[2], buf, p[3]); break; case PI_CMD_I2CWK: res = i2cWriteBlockData(p[1], p[2], buf, p[3]); break; case PI_CMD_I2CWQ: res = i2cWriteQuick(p[1], p[2]); break; case PI_CMD_I2CWS: res = i2cWriteByte(p[1], p[2]); break; case PI_CMD_I2CWW: memcpy(&p[4], buf, 4); res = i2cWriteWordData(p[1], p[2], p[4]); break; case PI_CMD_I2CZ: /* use half buffer for write, half buffer for read */ if (p[3] > (bufSize/2)) p[3] = bufSize/2; res = i2cZip(p[1], buf, p[3], buf+(bufSize/2), bufSize/2); if (res > 0) { memcpy(buf, buf+(bufSize/2), res); } break; case PI_CMD_MICS: if (p[1] <= PI_MAX_MICS_DELAY) myGpioDelay(p[1]); else res = PI_BAD_MICS_DELAY; break; case PI_CMD_MILS: if (p[1] <= PI_MAX_MILS_DELAY) myGpioDelay(p[1] * 1000); else res = PI_BAD_MILS_DELAY; break; case PI_CMD_MODEG: res = gpioGetMode(p[1]); break; case PI_CMD_MODES: if (myPermit(p[1])) res = gpioSetMode(p[1], p[2]); else { DBG(DBG_USER, "gpioSetMode: gpio %"PRIdPTR", no permission to update", p[1]); res = PI_NOT_PERMITTED; } break; case PI_CMD_NB: res = gpioNotifyBegin(p[1], p[2]); break; case PI_CMD_NC: res = gpioNotifyClose(p[1]); break; case PI_CMD_NO: res = gpioNotifyOpen(); break; case PI_CMD_NP: res = gpioNotifyPause(p[1]); break; case PI_CMD_PADG: res = gpioGetPad(p[1]); break; case PI_CMD_PADS: res = gpioSetPad(p[1], p[2]); break; case PI_CMD_PFG: res = gpioGetPWMfrequency(p[1]); break; case PI_CMD_PFS: if (myPermit(p[1])) res = gpioSetPWMfrequency(p[1], p[2]); else { DBG(DBG_USER, "gpioSetPWMfrequency: gpio %"PRIdPTR", no permission to update", p[1]); res = PI_NOT_PERMITTED; } break; case PI_CMD_PIGPV: res = gpioVersion(); break; case PI_CMD_PRG: res = gpioGetPWMrange(p[1]); break; case PI_CMD_PROC: res = gpioStoreScript(buf); break; case PI_CMD_PROCD: res = gpioDeleteScript(p[1]); break; case PI_CMD_PROCP: res = gpioScriptStatus(p[1], (uint32_t *)buf); break; case PI_CMD_PROCR: res = gpioRunScript(p[1], p[3]/4, (uint32_t *)buf); break; case PI_CMD_PROCS: res = gpioStopScript(p[1]); break; case PI_CMD_PROCU: res = gpioUpdateScript(p[1], p[3]/4, (uint32_t *)buf); break; case PI_CMD_PRRG: res = gpioGetPWMrealRange(p[1]); break; case PI_CMD_PRS: if (myPermit(p[1])) res = gpioSetPWMrange(p[1], p[2]); else { DBG(DBG_USER, "gpioSetPWMrange: gpio %"PRIdPTR", no permission to update", p[1]); res = PI_NOT_PERMITTED; } break; case PI_CMD_PUD: if (myPermit(p[1])) res = gpioSetPullUpDown(p[1], p[2]); else { DBG(DBG_USER, "gpioSetPullUpDown: gpio %"PRIdPTR", no permission to update", p[1]); res = PI_NOT_PERMITTED; } break; case PI_CMD_PWM: if (myPermit(p[1])) res = gpioPWM(p[1], p[2]); else { DBG(DBG_USER, "gpioPWM: gpio %"PRIdPTR", no permission to update", p[1]); res = PI_NOT_PERMITTED; } break; case PI_CMD_READ: res = gpioRead(p[1]); break; case PI_CMD_SERVO: if (myPermit(p[1])) res = gpioServo(p[1], p[2]); else { DBG(DBG_USER, "gpioServo: gpio %"PRIdPTR", no permission to update", p[1]); res = PI_NOT_PERMITTED; } break; case PI_CMD_SERRB: res = serReadByte(p[1]); break; case PI_CMD_SERWB: res = serWriteByte(p[1], p[2]); break; case PI_CMD_SERC: res = serClose(p[1]); break; case PI_CMD_SERDA: res = serDataAvailable(p[1]); break; case PI_CMD_SERO: res = serOpen(buf, p[1], p[2]); break; case PI_CMD_SERR: if (p[2] > bufSize) p[2] = bufSize; res = serRead(p[1], buf, p[2]); break; case PI_CMD_SERW: res = serWrite(p[1], buf, p[3]); break; case PI_CMD_SHELL: res = shell(buf, buf+p[1]+1); break; case PI_CMD_SLR: if (p[2] > bufSize) p[2] = bufSize; res = gpioSerialRead(p[1], buf, p[2]); break; case PI_CMD_SLRC: res = gpioSerialReadClose(p[1]); break; case PI_CMD_SLRO: memcpy(&p[4], buf, 4); res = gpioSerialReadOpen(p[1], p[2], p[4]); break; case PI_CMD_SLRI: res = gpioSerialReadInvert(p[1], p[2]); break; case PI_CMD_SPIC: res = spiClose(p[1]); break; case PI_CMD_SPIO: memcpy(&p[4], buf, 4); res = spiOpen(p[1], p[2], p[4]); break; case PI_CMD_SPIR: if (p[2] > bufSize) p[2] = bufSize; res = spiRead(p[1], buf, p[2]); break; case PI_CMD_SPIW: if (p[3] > bufSize) p[3] = bufSize; res = spiWrite(p[1], buf, p[3]); break; case PI_CMD_SPIX: if (p[3] > bufSize) p[3] = bufSize; res = spiXfer(p[1], buf, buf, p[3]); break; case PI_CMD_TICK: res = gpioTick(); break; case PI_CMD_TRIG: if (myPermit(p[1])) { memcpy(&p[4], buf, 4); res = gpioTrigger(p[1], p[2], p[4]); } else { DBG(DBG_USER, "gpioTrigger: gpio %"PRIdPTR", no permission to update", p[1]); res = PI_NOT_PERMITTED; } break; case PI_CMD_WDOG: res = gpioSetWatchdog(p[1], p[2]); break; case PI_CMD_WRITE: if (myPermit(p[1])) res = gpioWrite(p[1], p[2]); else { DBG(DBG_USER, "gpioWrite: gpio %"PRIdPTR", no permission to update", p[1]); res = PI_NOT_PERMITTED; } break; case PI_CMD_WVAG: /* need to mask off any non permitted gpios */ mask = gpioMask; pulse = (gpioPulse_t *)buf; j = p[3]/sizeof(gpioPulse_t); masked = 0; for (i=0; i= 0)) res = PI_SOME_PERMITTED; break; case PI_CMD_WVAS: if (myPermit(p[1])) { memcpy(&tmp1, buf, 4); /* databits */ memcpy(&tmp2, buf+4, 4); /* stophalfbits */ memcpy(&tmp3, buf+8, 4); /* offset */ res = gpioWaveAddSerial (p[1], p[2], tmp1, tmp2, tmp3, p[3]-12, buf+12); } else { DBG( DBG_USER, "gpioWaveAddSerial: gpio %"PRIdPTR", no permission to update", p[1]); res = PI_NOT_PERMITTED; } break; case PI_CMD_WVBSY: res = gpioWaveTxBusy(); break; case PI_CMD_WVCHA: if (p[3] > bufSize) p[3] = bufSize; res = gpioWaveChain(buf, p[3]); break; case PI_CMD_WVCLR: res = gpioWaveClear(); break; case PI_CMD_WVCRE: res = gpioWaveCreate(); break; case PI_CMD_WVCAP: /* Make WVCAP variadic */ if (p[3] == 4) { memcpy(&tmp3, buf, 4); /* percent TOOL */ res = gpioWaveCreatePad(p[1], p[2], tmp3); /* rawWaveAdd* usage */ break; } if (p[2] && p[3]==0) { res = gpioWaveCreatePad(p[1], p[2], 0); break; } if (p[2]==0 && p[3]==0) { res = gpioWaveCreatePad(p[1], p[1], 0); /* typical usage */ break; } res = PI_BAD_WAVE_ID; // FIX? break; case PI_CMD_WVDEL: res = gpioWaveDelete(p[1]); break; case PI_CMD_WVGO: res = gpioWaveTxStart(PI_WAVE_MODE_ONE_SHOT); break; case PI_CMD_WVGOR: res = gpioWaveTxStart(PI_WAVE_MODE_REPEAT); break; case PI_CMD_WVHLT: res = gpioWaveTxStop(); break; case PI_CMD_WVNEW: res = gpioWaveAddNew(); break; case PI_CMD_WVSC: switch(p[1]) { case 0: res = gpioWaveGetCbs(); break; case 1: res = gpioWaveGetHighCbs(); break; case 2: res = gpioWaveGetMaxCbs(); break; default: res = PI_BAD_WVSC_COMMND; } break; case PI_CMD_WVSM: switch(p[1]) { case 0: res = gpioWaveGetMicros(); break; case 1: res = gpioWaveGetHighMicros(); break; case 2: res = gpioWaveGetMaxMicros(); break; default: res = PI_BAD_WVSM_COMMND; } break; case PI_CMD_WVSP: switch(p[1]) { case 0: res = gpioWaveGetPulses(); break; case 1: res = gpioWaveGetHighPulses(); break; case 2: res = gpioWaveGetMaxPulses(); break; default: res = PI_BAD_WVSP_COMMND; } break; case PI_CMD_WVTAT: res = gpioWaveTxAt(); break; case PI_CMD_WVTX: res = gpioWaveTxSend(p[1], PI_WAVE_MODE_ONE_SHOT); break; case PI_CMD_WVTXM: res = gpioWaveTxSend(p[1], p[2]); break; case PI_CMD_WVTXR: res = gpioWaveTxSend(p[1], PI_WAVE_MODE_REPEAT); break; default: res = PI_UNKNOWN_COMMAND; break; } return res; } /* ----------------------------------------------------------------------- */ static void mySetGpioOff(unsigned gpio, int pos) { int page, slot; myOffPageSlot(pos, &page, &slot); dmaIVirt[page]->gpioOff[slot] |= (1<gpioOff[slot] &= ~(1<gpioOn[slot] |= (1<gpioOn[slot] &= ~(1< oldOff) { for (i=0; i oldOff) { for (i=0; ihandle) { mbUnmapMem(DMAMemP->virtual_addr, DMAMemP->size); mbUnlockMemory(fdMbox, DMAMemP->handle); mbReleaseMemory(fdMbox, DMAMemP->handle); DMAMemP->handle = 0; } } static int mbDMAAlloc(DMAMem_t *DMAMemP, unsigned size, uint32_t pi_mem_flag) { DMAMemP->size = size; DMAMemP->handle = mbAllocateMemory(fdMbox, size, PAGE_SIZE, pi_mem_flag); if (DMAMemP->handle) { DMAMemP->bus_addr = mbLockMemory(fdMbox, DMAMemP->handle); DMAMemP->virtual_addr = mbMapMem(BUS_TO_PHYS(DMAMemP->bus_addr), size); return 1; } return 0; } /* ======================================================================= */ rawCbs_t * rawWaveCBAdr(int cbNum) { int page, slot; page = cbNum/CBS_PER_OPAGE; slot = cbNum%CBS_PER_OPAGE; return &dmaOVirt[page]->cb[slot]; } /* ----------------------------------------------------------------------- */ static uint32_t waveCbPOadr(int pos) { int page, slot; page = pos/CBS_PER_OPAGE; slot = pos%CBS_PER_OPAGE; //cast twice to suppress compiler warning, I belive this cast is ok //because dmaOBus contains bus addresses, not virtual addresses. return (uint32_t)(uintptr_t) &dmaOBus[page]->cb[slot]; } /* ----------------------------------------------------------------------- */ static void waveOOLPageSlot(int pos, int *page, int *slot) { *page = pos/OOL_PER_OPAGE; *slot = pos%OOL_PER_OPAGE; } /* ----------------------------------------------------------------------- */ static void waveSetOOL(int pos, uint32_t OOL) { int page, slot; waveOOLPageSlot(pos, &page, &slot); dmaOVirt[page]->OOL[slot] = OOL; } /* ----------------------------------------------------------------------- */ static uint32_t waveOOLPOadr(int pos) { int page, slot; waveOOLPageSlot(pos, &page, &slot); //cast twice to suppress compiler warning, I belive this cast is ok //because dmaOBus contains bus addresses, not virtual addresses. return (uint32_t)(uintptr_t) &dmaOBus[page]->OOL[slot]; } /* ----------------------------------------------------------------------- */ static void waveBitDelay (unsigned baud, unsigned bits, unsigned stops, unsigned *bitDelay) { unsigned fullBit, last, diff, t, i; /* scaled 1000X */ fullBit = 1000000000 / baud; last = 0; for (i=0; i<=bits; i++) { t = (((i+1)*fullBit)+500)/1000; diff = t - last; last = t; bitDelay[i] = diff; } t = (((bits+1)*fullBit) + ((stops*fullBit)/2) + 500)/1000; diff = t - last; bitDelay[i] = diff; } static int waveDelayCBs(uint32_t delay) { uint32_t cbs; if (!delay) return 0; if (gpioCfg.DMAsecondaryChannel < DMA_LITE_FIRST) return 1; cbs = BPD * delay / DMA_LITE_MAX; if ((BPD * delay) % DMA_LITE_MAX) cbs++; return cbs; } /* ----------------------------------------------------------------------- */ static void waveCBsOOLs(int *numCBs, int *numBOOLs, int *numTOOLs) { int numCB=0, numBOOL=0, numTOOL=0; unsigned i; unsigned numWaves; rawWave_t *waves; numWaves = wfc[wfcur]; waves = wf [wfcur]; /* delay cb at start of DMA */ numCB++; for (i=0; iinfo = NORMAL_DMA | TIMED_DMA(2); p->dst = PCM_TIMER; } else { p->info = NORMAL_DMA | TIMED_DMA(5); p->dst = PWM_TIMER; } //cast twice to suppress compiler warning, I belive this cast is ok //because dmaOBus contains bus addresses, not virtual addresses. p->src = (uint32_t)(uintptr_t) (&dmaOBus[0]->periphData); p->length = BPD * 20 / PI_WF_MICROS; /* 20 micros delay */ p->next = waveCbPOadr(botCB); repeatCB = botCB; for (i=0; iinfo = TWO_BEAT_DMA; p->src = waveOOLPOadr(botOOL); waveSetOOL(botOOL++, waves[i].gpioOn); s_stride = waveOOLPOadr(botOOL) - p->src; waveSetOOL(botOOL++, waves[i].gpioOff); p->dst = ((GPIO_BASE + (GPSET0*4)) & 0x00ffffff) | PI_PERI_BUS; p->length = (2<<16) + 4; // 2 transfers of 4 bytes each p->stride = (12<<16) + s_stride; // d_stride = (GPCLR0-GPSET0)*4 = 12 p->next = waveCbPOadr(botCB); } if (waves[i].gpioOn && !waves[i].gpioOff) { waveSetOOL(botOOL, waves[i].gpioOn); p = rawWaveCBAdr(botCB++); p->info = NORMAL_DMA; p->src = waveOOLPOadr(botOOL++); p->dst = ((GPIO_BASE + (GPSET0*4)) & 0x00ffffff) | PI_PERI_BUS; p->length = 4; p->next = waveCbPOadr(botCB); } if (waves[i].gpioOff && !waves[i].gpioOn) { waveSetOOL(botOOL, waves[i].gpioOff); p = rawWaveCBAdr(botCB++); p->info = NORMAL_DMA; p->src = waveOOLPOadr(botOOL++); p->dst = ((GPIO_BASE + (GPCLR0*4)) & 0x00ffffff) | PI_PERI_BUS; p->length = 4; p->next = waveCbPOadr(botCB); } if (waves[i].flags & WAVE_FLAG_READ) { p = rawWaveCBAdr(botCB++); p->info = NORMAL_DMA; p->src = ((GPIO_BASE + (GPLEV0*4)) & 0x00ffffff) | PI_PERI_BUS; p->dst = waveOOLPOadr(--topOOL); p->length = 4; p->next = waveCbPOadr(botCB); } if (waves[i].flags & WAVE_FLAG_TICK) { p = rawWaveCBAdr(botCB++); p->info = NORMAL_DMA; p->src = ((SYST_BASE + (SYST_CLO*4)) & 0x00ffffff) | PI_PERI_BUS; p->dst = waveOOLPOadr(--topOOL); p->length = 4; p->next = waveCbPOadr(botCB); } if (waves[i].usDelay) { delayLeft = waves[i].usDelay; delayCBs = waveDelayCBs(delayLeft); for (dcb=0; dcbinfo = NORMAL_DMA | TIMED_DMA(2); p->dst = PCM_TIMER; } else { p->info = NORMAL_DMA | TIMED_DMA(5); p->dst = PWM_TIMER; } //cast twice to suppress compiler warning, I belive this cast is ok //because dmaOBus contains bus addresses, not virtual addresses. p->src = (uint32_t)(uintptr_t) (&dmaOBus[0]->periphData); p->length = BPD * delayLeft / PI_WF_MICROS; if ((gpioCfg.DMAsecondaryChannel >= DMA_LITE_FIRST) && (p->length > DMA_LITE_MAX)) { p->length = DMA_LITE_MAX; } delayLeft -= (p->length / BPD); p->next = waveCbPOadr(botCB); } } } if (numCB) { /* Pad the wave */ botCB = *CB + numCB - 1; botOOL = *BOOL + numBOOL - 1; topOOL = *TOOL - numTOOL; /* Link the last CB to end of wave */ p->next = waveCbPOadr(botCB); /* Insert sentinel CB at end of DMA */ p = rawWaveCBAdr(botCB++); p->info = NORMAL_DMA | DMA_DEST_IGNORE; p->src = waveOOLPOadr(botOOL++); p->dst = ((GPIO_BASE + (GPSET0*4)) & 0x00ffffff) | PI_PERI_BUS; p->length = 4; p->next = 0; } if (p != NULL) { if (wave_mode == PI_WAVE_MODE_ONE_SHOT) p->next = 0; else p->next = waveCbPOadr(repeatCB); } status = botCB - *CB; *CB = botCB; *BOOL = botOOL; *TOOL = topOOL; return status; } /* ----------------------------------------------------------------------- */ static void waveRxSerial(wfRx_t *w, int level, uint32_t tick) { int diffTicks, lastLevel; int newWritePos; level = level ^ w->s.invert; if (w->s.bit >= 0) { diffTicks = tick - w->s.startBitTick; if (level != PI_TIMEOUT) { w->s.level = level; lastLevel = !level; } else lastLevel = w->s.level; while ((w->s.bit <= w->s.dataBits) && (diffTicks > (w->s.nextBitDiff/1000))) { if (w->s.bit) { if (lastLevel) w->s.data |= (1<<(w->s.bit-1)); } else w->s.data = 0; ++(w->s.bit); w->s.nextBitDiff += w->s.fullBit; } if (w->s.bit > w->s.dataBits) { memcpy(w->s.buf + w->s.writePos, &w->s.data, w->s.bytes); /* don't let writePos catch readPos */ newWritePos = (w->s.writePos + w->s.bytes) % (w->s.bufSize); if (newWritePos != w->s.readPos) w->s.writePos = newWritePos; if (level == 0) { gpioSetWatchdog(w->gpio, w->s.timeout); w->s.bit = 0; w->s.startBitTick = tick; w->s.nextBitDiff = w->s.halfBit; } else { w->s.bit = -1; gpioSetWatchdog(w->gpio, 0); } } } else { /* start bit if high->low */ if (level == 0) { gpioSetWatchdog(w->gpio, w->s.timeout); w->s.level = 0; w->s.bit = 0; w->s.startBitTick = tick; w->s.nextBitDiff = w->s.halfBit; } } } /* ----------------------------------------------------------------------- */ static void waveRxBit(int gpio, int level, uint32_t tick) { switch (wfRx[gpio].mode) { case PI_WFRX_SERIAL: waveRxSerial(&wfRx[gpio], level, tick); } } /* ----------------------------------------------------------------------- */ int rawWaveAddGeneric(unsigned numIn1, rawWave_t *in1) { unsigned inPos1=0, inPos2=0, outPos=0, level = NUM_WAVE_OOL; unsigned cbs=0; unsigned numIn2, numOut; uint32_t tNow, tNext1, tNext2, tDelay, tMax; rawWave_t *in2, *out; numIn2 = wfc[wfcur]; in2 = wf[wfcur]; numOut = PI_WAVE_MAX_PULSES; out = wf[1-wfcur]; tNow = 0; tMax = 0; if (!numIn1) tNext1 = -1; else tNext1 = 0; if (!numIn2) tNext2 = -1; else tNext2 = 0; while (((inPos1= numIn1) tNext1 = -1; if (inPos2 >= numIn2) tNext2 = -1; } if (tNow < tMax) { /* extend previous delay */ out[outPos-1].usDelay += (tMax - tNow); tNow = tMax; } if ((outPos < numOut) && (outPos < level)) { wfStats.micros = tNow; if (tNow > wfStats.highMicros) wfStats.highMicros = tNow; wfStats.pulses = outPos; if (outPos > wfStats.highPulses) wfStats.highPulses = outPos; wfStats.cbs = cbs; if (cbs > wfStats.highCbs) wfStats.highCbs = cbs; wfc[1-wfcur] = outPos; wfcur = 1 - wfcur; return outPos; } else return PI_TOO_MANY_PULSES; } /* ======================================================================= */ int i2cWriteQuick(unsigned handle, unsigned bit) { int status; DBG(DBG_USER, "handle=%d bit=%d", handle, bit); CHECK_INITED; if (handle >= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if ((i2cInfo[handle].funcs & PI_I2C_FUNC_SMBUS_QUICK) == 0) SOFT_ERROR(PI_BAD_SMBUS_CMD, "SMBUS command not supported by driver"); if (bit > 1) SOFT_ERROR(PI_BAD_PARAM, "bad bit (%d)", bit); status = my_smbus_access( i2cInfo[handle].fd, bit, 0, PI_I2C_SMBUS_QUICK, NULL); if (status < 0) { DBG(DBG_USER, "error=%d (%m)", status); return PI_I2C_WRITE_FAILED; } return status; } int i2cReadByte(unsigned handle) { union my_smbus_data data; int status; DBG(DBG_USER, "handle=%d", handle); CHECK_INITED; if (handle >= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if ((i2cInfo[handle].funcs & PI_I2C_FUNC_SMBUS_READ_BYTE) == 0) SOFT_ERROR(PI_BAD_SMBUS_CMD, "SMBUS command not supported by driver"); status = my_smbus_access( i2cInfo[handle].fd, PI_I2C_SMBUS_READ, 0, PI_I2C_SMBUS_BYTE, &data); if (status < 0) { DBG(DBG_USER, "error=%d (%m)", status); return PI_I2C_READ_FAILED; } return 0xFF & data.byte; } int i2cWriteByte(unsigned handle, unsigned bVal) { int status; DBG(DBG_USER, "handle=%d bVal=%d", handle, bVal); CHECK_INITED; if (handle >= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if ((i2cInfo[handle].funcs & PI_I2C_FUNC_SMBUS_WRITE_BYTE) == 0) SOFT_ERROR(PI_BAD_SMBUS_CMD, "SMBUS command not supported by driver"); if (bVal > 0xFF) SOFT_ERROR(PI_BAD_PARAM, "bad bVal (%d)", bVal); status = my_smbus_access( i2cInfo[handle].fd, PI_I2C_SMBUS_WRITE, bVal, PI_I2C_SMBUS_BYTE, NULL); if (status < 0) { DBG(DBG_USER, "error=%d (%m)", status); return PI_I2C_WRITE_FAILED; } return status; } int i2cReadByteData(unsigned handle, unsigned reg) { union my_smbus_data data; int status; DBG(DBG_USER, "handle=%d reg=%d", handle, reg); CHECK_INITED; if (handle >= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if ((i2cInfo[handle].funcs & PI_I2C_FUNC_SMBUS_READ_BYTE_DATA) == 0) SOFT_ERROR(PI_BAD_SMBUS_CMD, "SMBUS command not supported by driver"); if (reg > 0xFF) SOFT_ERROR(PI_BAD_PARAM, "bad reg (%d)", reg); status = my_smbus_access(i2cInfo[handle].fd, PI_I2C_SMBUS_READ, reg, PI_I2C_SMBUS_BYTE_DATA, &data); if (status < 0) { DBG(DBG_USER, "error=%d (%m)", status); return PI_I2C_READ_FAILED; } return 0xFF & data.byte; } int i2cWriteByteData(unsigned handle, unsigned reg, unsigned bVal) { union my_smbus_data data; int status; DBG(DBG_USER, "handle=%d reg=%d bVal=%d", handle, reg, bVal); CHECK_INITED; if (handle >= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if ((i2cInfo[handle].funcs & PI_I2C_FUNC_SMBUS_WRITE_BYTE_DATA) == 0) SOFT_ERROR(PI_BAD_SMBUS_CMD, "SMBUS command not supported by driver"); if (reg > 0xFF) SOFT_ERROR(PI_BAD_PARAM, "bad reg (%d)", reg); if (bVal > 0xFF) SOFT_ERROR(PI_BAD_PARAM, "bad bVal (%d)", bVal); data.byte = bVal; status = my_smbus_access( i2cInfo[handle].fd, PI_I2C_SMBUS_WRITE, reg, PI_I2C_SMBUS_BYTE_DATA, &data); if (status < 0) { DBG(DBG_USER, "error=%d (%m)", status); return PI_I2C_WRITE_FAILED; } return status; } int i2cReadWordData(unsigned handle, unsigned reg) { union my_smbus_data data; int status; DBG(DBG_USER, "handle=%d reg=%d", handle, reg); CHECK_INITED; if (handle >= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if ((i2cInfo[handle].funcs & PI_I2C_FUNC_SMBUS_READ_WORD_DATA) == 0) SOFT_ERROR(PI_BAD_SMBUS_CMD, "SMBUS command not supported by driver"); if (reg > 0xFF) SOFT_ERROR(PI_BAD_PARAM, "bad reg (%d)", reg); status = (my_smbus_access( i2cInfo[handle].fd, PI_I2C_SMBUS_READ, reg, PI_I2C_SMBUS_WORD_DATA, &data)); if (status < 0) { DBG(DBG_USER, "error=%d (%m)", status); return PI_I2C_READ_FAILED; } return 0xFFFF & data.word; } int i2cWriteWordData(unsigned handle, unsigned reg, unsigned wVal) { union my_smbus_data data; int status; DBG(DBG_USER, "handle=%d reg=%d wVal=%d", handle, reg, wVal); CHECK_INITED; if (handle >= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if ((i2cInfo[handle].funcs & PI_I2C_FUNC_SMBUS_WRITE_WORD_DATA) == 0) SOFT_ERROR(PI_BAD_SMBUS_CMD, "SMBUS command not supported by driver"); if (reg > 0xFF) SOFT_ERROR(PI_BAD_PARAM, "bad reg (%d)", reg); if (wVal > 0xFFFF) SOFT_ERROR(PI_BAD_PARAM, "bad wVal (%d)", wVal); data.word = wVal; status = my_smbus_access( i2cInfo[handle].fd, PI_I2C_SMBUS_WRITE, reg, PI_I2C_SMBUS_WORD_DATA, &data); if (status < 0) { DBG(DBG_USER, "error=%d (%m)", status); return PI_I2C_WRITE_FAILED; } return status; } int i2cProcessCall(unsigned handle, unsigned reg, unsigned wVal) { union my_smbus_data data; int status; DBG(DBG_USER, "handle=%d reg=%d wVal=%d", handle, reg, wVal); CHECK_INITED; if (handle >= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if ((i2cInfo[handle].funcs & PI_I2C_FUNC_SMBUS_PROC_CALL) == 0) SOFT_ERROR(PI_BAD_SMBUS_CMD, "SMBUS command not supported by driver"); if (reg > 0xFF) SOFT_ERROR(PI_BAD_PARAM, "bad reg (%d)", reg); if (wVal > 0xFFFF) SOFT_ERROR(PI_BAD_PARAM, "bad wVal (%d)", wVal); data.word = wVal; status = (my_smbus_access( i2cInfo[handle].fd, PI_I2C_SMBUS_WRITE, reg, PI_I2C_SMBUS_PROC_CALL, &data)); if (status < 0) { DBG(DBG_USER, "error=%d (%m)", status); return PI_I2C_READ_FAILED; } return 0xFFFF & data.word; } int i2cReadBlockData(unsigned handle, unsigned reg, char *buf) { union my_smbus_data data; int i, status; DBG(DBG_USER, "handle=%d reg=%d buf=%08"PRIXPTR, handle, reg, (uintptr_t)buf); CHECK_INITED; if (handle >= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if ((i2cInfo[handle].funcs & PI_I2C_FUNC_SMBUS_READ_BLOCK_DATA) == 0) SOFT_ERROR(PI_BAD_SMBUS_CMD, "SMBUS command not supported by driver"); if (reg > 0xFF) SOFT_ERROR(PI_BAD_PARAM, "bad reg (%d)", reg); status = (my_smbus_access( i2cInfo[handle].fd, PI_I2C_SMBUS_READ, reg, PI_I2C_SMBUS_BLOCK_DATA, &data)); if (status < 0) { DBG(DBG_USER, "error=%d (%m)", status); return PI_I2C_READ_FAILED; } else { if (data.block[0] <= PI_I2C_SMBUS_BLOCK_MAX) { for (i=0; i= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if ((i2cInfo[handle].funcs & PI_I2C_FUNC_SMBUS_WRITE_BLOCK_DATA) == 0) SOFT_ERROR(PI_BAD_SMBUS_CMD, "SMBUS command not supported by driver"); if (reg > 0xFF) SOFT_ERROR(PI_BAD_PARAM, "bad reg (%d)", reg); if ((count < 1) || (count > 32)) SOFT_ERROR(PI_BAD_PARAM, "bad count (%d)", count); for (i=1; i<=count; i++) data.block[i] = buf[i-1]; data.block[0] = count; status = my_smbus_access( i2cInfo[handle].fd, PI_I2C_SMBUS_WRITE, reg, PI_I2C_SMBUS_BLOCK_DATA, &data); if (status < 0) { DBG(DBG_USER, "error=%d (%m)", status); return PI_I2C_WRITE_FAILED; } return status; } int i2cBlockProcessCall( unsigned handle, unsigned reg, char *buf, unsigned count) { union my_smbus_data data; int i, status; DBG(DBG_USER, "handle=%d reg=%d count=%d [%s]", handle, reg, count, myBuf2Str(count, buf)); CHECK_INITED; if (handle >= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if ((i2cInfo[handle].funcs & PI_I2C_FUNC_SMBUS_PROC_CALL) == 0) SOFT_ERROR(PI_BAD_SMBUS_CMD, "SMBUS command not supported by driver"); if (reg > 0xFF) SOFT_ERROR(PI_BAD_PARAM, "bad reg (%d)", reg); if ((count < 1) || (count > 32)) SOFT_ERROR(PI_BAD_PARAM, "bad count (%d)", count); for (i=1; i<=count; i++) data.block[i] = buf[i-1]; data.block[0] = count; status = (my_smbus_access( i2cInfo[handle].fd, PI_I2C_SMBUS_WRITE, reg, PI_I2C_SMBUS_BLOCK_PROC_CALL, &data)); if (status < 0) { DBG(DBG_USER, "error=%d (%m)", status); return PI_I2C_READ_FAILED; } else { if (data.block[0] <= PI_I2C_SMBUS_BLOCK_MAX) { for (i=0; i= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if ((i2cInfo[handle].funcs & PI_I2C_FUNC_SMBUS_READ_I2C_BLOCK) == 0) SOFT_ERROR(PI_BAD_SMBUS_CMD, "SMBUS command not supported by driver"); if (reg > 0xFF) SOFT_ERROR(PI_BAD_PARAM, "bad reg (%d)", reg); if ((count < 1) || (count > 32)) SOFT_ERROR(PI_BAD_PARAM, "bad count (%d)", count); if (count == 32) size = PI_I2C_SMBUS_I2C_BLOCK_BROKEN; else size = PI_I2C_SMBUS_I2C_BLOCK_DATA; data.block[0] = count; status = (my_smbus_access( i2cInfo[handle].fd, PI_I2C_SMBUS_READ, reg, size, &data)); if (status < 0) { DBG(DBG_USER, "error=%d (%m)", status); return PI_I2C_READ_FAILED; } else { if (data.block[0] <= PI_I2C_SMBUS_I2C_BLOCK_MAX) { for (i=0; i= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if ((i2cInfo[handle].funcs & PI_I2C_FUNC_SMBUS_WRITE_I2C_BLOCK) == 0) SOFT_ERROR(PI_BAD_SMBUS_CMD, "SMBUS command not supported by driver"); if (reg > 0xFF) SOFT_ERROR(PI_BAD_PARAM, "bad reg (%d)", reg); if ((count < 1) || (count > 32)) SOFT_ERROR(PI_BAD_PARAM, "bad count (%d)", count); for (i=1; i<=count; i++) data.block[i] = buf[i-1]; data.block[0] = count; status = my_smbus_access( i2cInfo[handle].fd, PI_I2C_SMBUS_WRITE, reg, PI_I2C_SMBUS_I2C_BLOCK_BROKEN, &data); if (status < 0) { DBG(DBG_USER, "error=%d (%m)", status); return PI_I2C_WRITE_FAILED; } return status; } int i2cWriteDevice(unsigned handle, char *buf, unsigned count) { int bytes; DBG(DBG_USER, "handle=%d count=%d [%s]", handle, count, myBuf2Str(count, buf)); CHECK_INITED; if (handle >= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if ((count < 1) || (count > PI_MAX_I2C_DEVICE_COUNT)) SOFT_ERROR(PI_BAD_PARAM, "bad count (%d)", count); bytes = write(i2cInfo[handle].fd, buf, count); if (bytes != count) { DBG(DBG_USER, "error=%d (%m)", bytes); return PI_I2C_WRITE_FAILED; } return 0; } int i2cReadDevice(unsigned handle, char *buf, unsigned count) { int bytes; DBG(DBG_USER, "handle=%d count=%d buf=%08"PRIXPTR, handle, count, (uintptr_t)buf); CHECK_INITED; if (handle >= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if ((count < 1) || (count > PI_MAX_I2C_DEVICE_COUNT)) SOFT_ERROR(PI_BAD_PARAM, "bad count (%d)", count); bytes = read(i2cInfo[handle].fd, buf, count); if (bytes != count) { DBG(DBG_USER, "error=%d (%m)", bytes); return PI_I2C_READ_FAILED; } return bytes; } int i2cOpen(unsigned i2cBus, unsigned i2cAddr, unsigned i2cFlags) { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; char dev[32]; int i, slot, fd; uint32_t funcs; DBG(DBG_USER, "i2cBus=%d i2cAddr=%d flags=0x%X", i2cBus, i2cAddr, i2cFlags); CHECK_INITED; if (i2cAddr > PI_MAX_I2C_ADDR) SOFT_ERROR(PI_BAD_I2C_ADDR, "bad I2C address (%d)", i2cAddr); if (i2cFlags) SOFT_ERROR(PI_BAD_FLAGS, "bad flags (0x%X)", i2cFlags); slot = -1; pthread_mutex_lock(&mutex); for (i=0; i= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].fd >= 0) close(i2cInfo[handle].fd); i2cInfo[handle].fd = -1; i2cInfo[handle].state = PI_I2C_CLOSED; return 0; } void i2cSwitchCombined(int setting) { int fd; DBG(DBG_USER, "setting=%d", setting); fd = open(PI_I2C_COMBINED, O_WRONLY); if (fd >= 0) { if (setting) { if (write(fd, "1\n", 2) == -1) { /* ignore errors */ } } else { if (write(fd, "0\n", 2) == -1) { /* ignore errors */ } } close(fd); } } int i2cSegments(unsigned handle, pi_i2c_msg_t *segs, unsigned numSegs) { int retval; my_i2c_rdwr_ioctl_data_t rdwr; DBG(DBG_USER, "handle=%d", handle); CHECK_INITED; if (handle >= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (segs == NULL) SOFT_ERROR(PI_BAD_POINTER, "null segments"); if (numSegs > PI_I2C_RDRW_IOCTL_MAX_MSGS) SOFT_ERROR(PI_TOO_MANY_SEGS, "too many segments (%d)", numSegs); rdwr.msgs = segs; rdwr.nmsgs = numSegs; retval = ioctl(i2cInfo[handle].fd, PI_I2C_RDWR, &rdwr); if (retval >= 0) return retval; else return PI_BAD_I2C_SEG; } int i2cZip( unsigned handle, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen) { int numSegs, inPos, outPos, status, bytes, flags, addr; int esc, setesc; pi_i2c_msg_t segs[PI_I2C_RDRW_IOCTL_MAX_MSGS]; DBG(DBG_USER, "handle=%d inBuf=%s outBuf=%08"PRIXPTR" len=%d", handle, myBuf2Str(inLen, (char *)inBuf), (uintptr_t)outBuf, outLen); CHECK_INITED; if (handle >= PI_I2C_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (i2cInfo[handle].state != PI_I2C_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (!inBuf || !inLen) SOFT_ERROR(PI_BAD_POINTER, "input buffer can't be NULL"); if (!outBuf && outLen) SOFT_ERROR(PI_BAD_POINTER, "output buffer can't be NULL"); numSegs = 0; inPos = 0; outPos = 0; status = 0; addr = i2cInfo[handle].addr; flags = 0; esc = 0; setesc = 0; while (!status && (inPos < inLen)) { DBG(DBG_INTERNAL, "status=%d inpos=%d inlen=%d cmd=%d addr=%d flags=%x", status, inPos, inLen, inBuf[inPos], addr, flags); switch (inBuf[inPos++]) { case PI_I2C_END: status = 1; break; case PI_I2C_COMBINED_ON: /* Run prior transactions before setting combined flag */ if (numSegs) { status = i2cSegments(handle, segs, numSegs); if (status >= 0) status = 0; /* continue */ numSegs = 0; } i2cSwitchCombined(1); break; case PI_I2C_COMBINED_OFF: /* Run prior transactions before clearing combined flag */ if (numSegs) { status = i2cSegments(handle, segs, numSegs); if (status >= 0) status = 0; /* continue */ numSegs = 0; } i2cSwitchCombined(0); break; case PI_I2C_ADDR: addr = myI2CGetPar(inBuf, &inPos, inLen, &esc); if (addr < 0) status = PI_BAD_I2C_CMD; break; case PI_I2C_FLAGS: /* cheat to force two byte flags */ esc = 1; flags = myI2CGetPar(inBuf, &inPos, inLen, &esc); if (flags < 0) status = PI_BAD_I2C_CMD; break; case PI_I2C_ESC: setesc = 1; break; case PI_I2C_READ: bytes = myI2CGetPar(inBuf, &inPos, inLen, &esc); if (bytes >= 0) { if ((bytes + outPos) < outLen) { segs[numSegs].addr = addr; segs[numSegs].flags = (flags|1); segs[numSegs].len = bytes; segs[numSegs].buf = (uint8_t *)(outBuf + outPos); outPos += bytes; numSegs++; if (numSegs >= PI_I2C_RDRW_IOCTL_MAX_MSGS) { status = i2cSegments(handle, segs, numSegs); if (status >= 0) status = 0; /* continue */ numSegs = 0; } } else status = PI_BAD_I2C_RLEN; } else status = PI_BAD_I2C_RLEN; break; case PI_I2C_WRITE: bytes = myI2CGetPar(inBuf, &inPos, inLen, &esc); if (bytes >= 0) { if ((bytes + inPos) < inLen) { segs[numSegs].addr = addr; segs[numSegs].flags = (flags&0xfffe); segs[numSegs].len = bytes; segs[numSegs].buf = (uint8_t *)(inBuf + inPos); inPos += bytes; numSegs++; if (numSegs >= PI_I2C_RDRW_IOCTL_MAX_MSGS) { status = i2cSegments(handle, segs, numSegs); if (status >= 0) status = 0; /* continue */ numSegs = 0; } } else status = PI_BAD_I2C_WLEN; } else status = PI_BAD_I2C_WLEN; break; default: status = PI_BAD_I2C_CMD; } if (setesc) esc = 1; else esc = 0; setesc = 0; } if (status >= 0) { if (numSegs) status = i2cSegments(handle, segs, numSegs); } if (status >= 0) status = outPos; return status; } /* ======================================================================= */ /*SPI */ static uint32_t _spiTXBits(char *buf, int pos, int bitlen, int msbf) { uint32_t bits=0; if (buf) { if (bitlen <= 8) bits = *((( uint8_t*)buf)+pos); else if (bitlen <= 16) bits = *(((uint16_t*)buf)+pos); else bits = *(((uint32_t*)buf)+pos); if (msbf) bits <<= (32-bitlen); } return bits; } static void _spiRXBits( char *buf, int pos, int bitlen, int msbf, uint32_t bits) { if (buf) { if (!msbf) bits >>= (32-bitlen); if (bitlen <= 8) *((( uint8_t*)buf)+pos) = bits; else if (bitlen <= 16) *(((uint16_t*)buf)+pos) = bits; else *(((uint32_t*)buf)+pos) = bits; } } static void spiACS(int channel, int on) { int gpio; switch (channel) { case 0: gpio = PI_ASPI_CE0; break; case 1: gpio = PI_ASPI_CE1; break; default: gpio = PI_ASPI_CE2; break; } myGpioWrite(gpio, on); } static void spiGoA( unsigned speed, /* bits per second */ uint32_t flags, /* flags */ char *txBuf, /* tx buffer */ char *rxBuf, /* rx buffer */ unsigned count) /* number of bytes */ { int cs; char bit_ir[4] = {1, 0, 0, 1}; /* read on rising edge */ char bit_or[4] = {0, 1, 1, 0}; /* write on rising edge */ char bit_ic[4] = {0, 0, 1, 1}; /* invert clock */ int mode, bitlen, txmsbf, rxmsbf, channel; unsigned txCnt=0; unsigned rxCnt=0; uint32_t spiDefaults; uint32_t statusReg; int txFull, rxEmpty; channel = PI_SPI_FLAGS_GET_CHANNEL(flags); mode = PI_SPI_FLAGS_GET_MODE (flags); bitlen = PI_SPI_FLAGS_GET_BITLEN (flags); if (!bitlen) bitlen = 8; /* correct count for word size */ if (bitlen > 8) count /= 2; if (bitlen > 16) count /= 2; txmsbf = !PI_SPI_FLAGS_GET_TX_LSB (flags); rxmsbf = !PI_SPI_FLAGS_GET_RX_LSB (flags); cs = PI_SPI_FLAGS_GET_CSPOLS(flags) & (1<>28)&15) > 2); if (rxCnt < count) { if (!rxEmpty) { _spiRXBits( rxBuf, rxCnt++, bitlen, rxmsbf, auxReg[AUX_SPI0_IO_REG]); } } if (txCnt < count) { if (!txFull) { if (txCnt != (count-1)) { auxReg[AUX_SPI0_TX_HOLD] = _spiTXBits(txBuf, txCnt++, bitlen, txmsbf); } else { auxReg[AUX_SPI0_IO_REG] = _spiTXBits(txBuf, txCnt++, bitlen, txmsbf); } } } } while ((auxReg[AUX_SPI0_STAT_REG] & AUXSPI_STAT_BUSY)) ; spiACS(channel, !cs); } static void spiGoS( unsigned speed, uint32_t flags, char *txBuf, char *rxBuf, unsigned count) { unsigned txCnt=0; unsigned rxCnt=0; unsigned cnt, cnt4w, cnt3w; uint32_t spiDefaults; unsigned mode, channel, cspol, cspols, flag3w, ren3w; channel = PI_SPI_FLAGS_GET_CHANNEL(flags); mode = PI_SPI_FLAGS_GET_MODE (flags); cspols = PI_SPI_FLAGS_GET_CSPOLS(flags); cspol = (cspols>>channel) & 1; flag3w = PI_SPI_FLAGS_GET_3WIRE(flags); ren3w = PI_SPI_FLAGS_GET_3WREN(flags); spiDefaults = SPI_CS_MODE(mode) | SPI_CS_CSPOLS(cspols) | SPI_CS_CS(channel) | SPI_CS_CSPOL(cspol) | SPI_CS_CLEAR(3); spiReg[SPI_DLEN] = 2; /* undocumented, stops inter-byte gap */ spiReg[SPI_CS] = spiDefaults; /* stop */ if (!count) return; if (flag3w) { if (ren3w < count) { cnt4w = ren3w; cnt3w = count - ren3w; } else { cnt4w = count; cnt3w = 0; } } else { cnt4w = count; cnt3w = 0; } spiReg[SPI_CLK] = 250000000/speed; spiReg[SPI_CS] = spiDefaults | SPI_CS_TA; /* start */ cnt = cnt4w; while((txCnt < cnt) || (rxCnt < cnt)) { while((rxCnt < cnt) && ((spiReg[SPI_CS] & SPI_CS_RXD))) { if (rxBuf) rxBuf[rxCnt] = spiReg[SPI_FIFO]; else spi_dummy = spiReg[SPI_FIFO]; rxCnt++; } while((txCnt < cnt) && ((spiReg[SPI_CS] & SPI_CS_TXD))) { if (txBuf) spiReg[SPI_FIFO] = txBuf[txCnt]; else spiReg[SPI_FIFO] = 0; txCnt++; } } while (!(spiReg[SPI_CS] & SPI_CS_DONE)) ; /* now switch to 3-wire bus */ cnt += cnt3w; spiReg[SPI_CS] |= SPI_CS_REN; while((txCnt < cnt) || (rxCnt < cnt)) { while((rxCnt < cnt) && ((spiReg[SPI_CS] & SPI_CS_RXD))) { if (rxBuf) rxBuf[rxCnt] = spiReg[SPI_FIFO]; else spi_dummy = spiReg[SPI_FIFO]; rxCnt++; } while((txCnt < cnt) && ((spiReg[SPI_CS] & SPI_CS_TXD))) { if (txBuf) spiReg[SPI_FIFO] = txBuf[txCnt]; else spiReg[SPI_FIFO] = 0; txCnt++; } } while (!(spiReg[SPI_CS] & SPI_CS_DONE)) ; spiReg[SPI_CS] = spiDefaults; /* stop */ } static void spiGo( unsigned speed, uint32_t flags, char *txBuf, char *rxBuf, unsigned count) { static pthread_mutex_t main_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t aux_mutex = PTHREAD_MUTEX_INITIALIZER; if (PI_SPI_FLAGS_GET_AUX_SPI(flags)) { pthread_mutex_lock(&aux_mutex); spiGoA(speed, flags, txBuf, rxBuf, count); pthread_mutex_unlock(&aux_mutex); } else { pthread_mutex_lock(&main_mutex); spiGoS(speed, flags, txBuf, rxBuf, count); pthread_mutex_unlock(&main_mutex); } } static int spiAnyOpen(uint32_t flags) { int i, aux; aux = PI_SPI_FLAGS_GET_AUX_SPI(flags); for (i=0; i= i) SOFT_ERROR(PI_BAD_SPI_CHANNEL, "bad spiChan (%d)", spiChan); if ((baud < PI_SPI_MIN_BAUD) || (baud > PI_SPI_MAX_BAUD)) SOFT_ERROR(PI_BAD_SPI_SPEED, "bad baud (%d)", baud); if (spiFlags > (1<<22)) SOFT_ERROR(PI_BAD_FLAGS, "bad spiFlags (0x%X)", spiFlags); if (!spiAnyOpen(spiFlags)) /* initialise on first open */ { spiInit(spiFlags); spiGo(baud, spiFlags, NULL, NULL, 0); } slot = -1; pthread_mutex_lock(&mutex); for (i=0; i= PI_SPI_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (spiInfo[handle].state != PI_SPI_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); spiInfo[handle].state = PI_SPI_CLOSED; if (!spiAnyOpen(spiInfo[handle].flags)) spiTerm(spiInfo[handle].flags); /* terminate on last close */ return 0; } int spiRead(unsigned handle, char *buf, unsigned count) { DBG(DBG_USER, "handle=%d count=%d [%s]", handle, count, myBuf2Str(count, buf)); CHECK_INITED; if (handle >= PI_SPI_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (spiInfo[handle].state != PI_SPI_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (count > PI_MAX_SPI_DEVICE_COUNT) SOFT_ERROR(PI_BAD_SPI_COUNT, "bad count (%d)", count); spiGo(spiInfo[handle].speed, spiInfo[handle].flags, NULL, buf, count); return count; } int spiWrite(unsigned handle, char *buf, unsigned count) { DBG(DBG_USER, "handle=%d count=%d [%s]", handle, count, myBuf2Str(count, buf)); CHECK_INITED; if (handle >= PI_SPI_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (spiInfo[handle].state != PI_SPI_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (count > PI_MAX_SPI_DEVICE_COUNT) SOFT_ERROR(PI_BAD_SPI_COUNT, "bad count (%d)", count); spiGo(spiInfo[handle].speed, spiInfo[handle].flags, buf, NULL, count); return count; } int spiXfer(unsigned handle, char *txBuf, char *rxBuf, unsigned count) { DBG(DBG_USER, "handle=%d count=%d [%s]", handle, count, myBuf2Str(count, txBuf)); CHECK_INITED; if (handle >= PI_SPI_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (spiInfo[handle].state != PI_SPI_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (count > PI_MAX_SPI_DEVICE_COUNT) SOFT_ERROR(PI_BAD_SPI_COUNT, "bad count (%d)", count); spiGo(spiInfo[handle].speed, spiInfo[handle].flags, txBuf, rxBuf, count); return count; } /* ======================================================================= */ int serOpen(char *tty, unsigned serBaud, unsigned serFlags) { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; struct termios new; int speed; int fd; int i, slot; DBG(DBG_USER, "tty=%s serBaud=%d serFlags=0x%X", tty, serBaud, serFlags); SER_CHECK_INITED; if (strncmp("/dev/tty", tty, 8) && strncmp("/dev/serial", tty, 11)) SOFT_ERROR(PI_BAD_SER_DEVICE, "bad device (%s)", tty); switch (serBaud) { case 50: speed = B50; break; case 75: speed = B75; break; case 110: speed = B110; break; case 134: speed = B134; break; case 150: speed = B150; break; case 200: speed = B200; break; case 300: speed = B300; break; case 600: speed = B600; break; case 1200: speed = B1200; break; case 1800: speed = B1800; break; case 2400: speed = B2400; break; case 4800: speed = B4800; break; case 9600: speed = B9600; break; case 19200: speed = B19200; break; case 38400: speed = B38400; break; case 57600: speed = B57600; break; case 115200: speed = B115200; break; case 230400: speed = B230400; break; default: SOFT_ERROR(PI_BAD_SER_SPEED, "bad speed (%d)", serBaud); } if (serFlags) SOFT_ERROR(PI_BAD_FLAGS, "bad flags (0x%X)", serFlags); slot = -1; pthread_mutex_lock(&mutex); for (i=0; i= PI_SER_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (serInfo[handle].state != PI_SER_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (serInfo[handle].fd >= 0) close(serInfo[handle].fd); serInfo[handle].fd = -1; serInfo[handle].state = PI_SER_CLOSED; return 0; } int serWriteByte(unsigned handle, unsigned bVal) { char c; DBG(DBG_USER, "handle=%d bVal=%d", handle, bVal); SER_CHECK_INITED; if (handle >= PI_SER_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (serInfo[handle].state != PI_SER_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (bVal > 0xFF) SOFT_ERROR(PI_BAD_PARAM, "bad parameter (%d)", bVal); c = bVal; if (write(serInfo[handle].fd, &c, 1) != 1) return PI_SER_WRITE_FAILED; else return 0; } int serReadByte(unsigned handle) { int r; char x; DBG(DBG_USER, "handle=%d", handle); SER_CHECK_INITED; if (handle >= PI_SER_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (serInfo[handle].state != PI_SER_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); r = read(serInfo[handle].fd, &x, 1); if (r == 1) return ((int)x) & 0xFF; else if (r == 0) return PI_SER_READ_NO_DATA; else if ((r == -1) && (errno == EAGAIN)) return PI_SER_READ_NO_DATA; else return PI_SER_READ_FAILED; } int serWrite(unsigned handle, char *buf, unsigned count) { int written=0, wrote=0; DBG(DBG_USER, "handle=%d count=%d [%s]", handle, count, myBuf2Str(count, buf)); SER_CHECK_INITED; if (handle >= PI_SER_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (serInfo[handle].state != PI_SER_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (!count) SOFT_ERROR(PI_BAD_PARAM, "bad count (%d)", count); while ((written != count) && (wrote >= 0)) { wrote = write(serInfo[handle].fd, buf+written, count-written); if (wrote >= 0) { written += wrote; if (written != count) time_sleep(0.05); } } if (written != count) return PI_SER_WRITE_FAILED; else return 0; } int serRead(unsigned handle, char *buf, unsigned count) { int r; DBG(DBG_USER, "handle=%d count=%d buf=0x%"PRIXPTR, handle, count, (uintptr_t)buf); SER_CHECK_INITED; if (handle >= PI_SER_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (serInfo[handle].state != PI_SER_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (!count) SOFT_ERROR(PI_BAD_PARAM, "bad count (%d)", count); r = read(serInfo[handle].fd, buf, count); if (r == -1) { if (errno == EAGAIN) return PI_SER_READ_NO_DATA; else return PI_SER_READ_FAILED; } else { if (r < count) buf[r] = 0; return r; } } int serDataAvailable(unsigned handle) { int result; DBG(DBG_USER, "handle=%d", handle); SER_CHECK_INITED; if (handle >= PI_SER_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (serInfo[handle].state != PI_SER_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (ioctl(serInfo[handle].fd, FIONREAD, &result) == -1) return 0; return result; } /* ======================================================================= */ static int chooseBestClock (clkInf_t *clkInf, unsigned f, unsigned numc, unsigned *cf) { int c, valid; double fdiv, offby, best_offby; unsigned div, frac; valid = 0; best_offby = 0; for (c=0; c 1) && (div < 4096)) { offby = f - (cf[c] / (div + (frac / 4096.0))); if (offby < 0) offby = - offby; if ((!valid) || (offby <= best_offby)) { valid = 1; clkInf->div = div; clkInf->frac = frac; clkInf->clock = c; best_offby = offby; } } } return valid; } /* ======================================================================= */ static rawCbs_t * dmaCB2adr(int pos) { int page, slot; page = pos/CBS_PER_IPAGE; slot = pos%CBS_PER_IPAGE; return &dmaIVirt[page]->cb[slot]; } /* ----------------------------------------------------------------------- */ static void dmaCbPrint(int pos) { rawCbs_t * p; p = dmaCB2adr(pos); fprintf(stderr, "i=%x s=%x d=%x len=%x s=%x nxt=%x\n", p->info, p->src, p->dst, p->length, p->stride, p->next); } /* ----------------------------------------------------------------------- */ static unsigned dmaNowAtICB(void) { unsigned cb; static unsigned lastPage=0; unsigned page; uint32_t cbAddr; uint32_t startTick, endTick; startTick = systReg[SYST_CLO]; cbAddr = dmaIn[DMA_CONBLK_AD]; page = lastPage; /* which page are we dma'ing? */ while (1) { //cast twice to suppress compiler warning, I belive this cast is ok //because dmaIbus contains bus addresses, not user addresses. --plugwash cb = (cbAddr - ((int)(uintptr_t)dmaIBus[page])) / 32; if (cb < CBS_PER_IPAGE) { endTick = systReg[SYST_CLO]; if (endTick != startTick) gpioStats.cbTicks += (endTick - startTick); gpioStats.cbCalls++; lastPage = page; return (page*CBS_PER_IPAGE) + cb; } if (page++ >= DMAI_PAGES) page=0; if (page == lastPage) break; } return 0; } /* ----------------------------------------------------------------------- */ static int dmaNowAtOCB(void) { unsigned cb; unsigned page; uint32_t cbAddr; cbAddr = dmaOut[DMA_CONBLK_AD]; if (!cbAddr) return -PI_NO_TX_WAVE; page = 0; /* which page are we dma'ing? */ while (1) { //cast twice to suppress compiler warning, I belive this cast is ok //because dmaIbus contains bus addresses, not user addresses. --plugwash cb = (cbAddr - ((int)(uintptr_t)dmaOBus[page])) / 32; if (cb < CBS_PER_OPAGE) return (page*CBS_PER_OPAGE) + cb; if (page++ >= DMAO_PAGES) break; } /* Try twice */ cbAddr = dmaOut[DMA_CONBLK_AD]; if (!cbAddr) return -PI_NO_TX_WAVE; page = 0; /* which page are we dma'ing? */ while (1) { //cast twice to suppress compiler warning, I belive this cast is ok //because dmaIbus contains bus addresses, not user addresses. --plugwash cb = (cbAddr - ((int)(uintptr_t)dmaOBus[page])) / 32; if (cb < CBS_PER_OPAGE) return (page*CBS_PER_OPAGE) + cb; if (page++ >= DMAO_PAGES) break; } return -PI_WAVE_NOT_FOUND; } /* ----------------------------------------------------------------------- */ unsigned rawWaveCB(void) { unsigned cb; static unsigned lastPage=0; unsigned page; uint32_t cbAddr; cbAddr = dmaOut[DMA_CONBLK_AD]; if (!cbAddr) return -1; page = lastPage; /* which page are we dma'ing? */ while (1) { //cast twice to suppress compiler warning, I belive this cast is ok //because dmaIbus contains bus addresses, not user addresses. --plugwash cb = (cbAddr - ((int)(uintptr_t)dmaOBus[page])) / 32; if (cb < CBS_PER_OPAGE) { lastPage = page; return (page*CBS_PER_OPAGE) + cb; } if (page++ >= DMAO_PAGES) page=0; if (page == lastPage) break; } return 0; } /* ----------------------------------------------------------------------- */ static unsigned dmaCurrentSlot(unsigned pos) { unsigned cycle=0, slot=0, tmp; cycle = (pos/CBS_PER_CYCLE); tmp = (pos%CBS_PER_CYCLE); if (tmp > 2) slot = ((tmp-2)/3); return (cycle*PULSE_PER_CYCLE)+slot; } /* ----------------------------------------------------------------------- */ static uint32_t dmaPwmDataAdr(int pos) { //cast twice to suppress compiler warning, I belive this cast is ok //because dmaIbus contains bus addresses, not user addresses. --plugwash return (uint32_t)(uintptr_t) &dmaIBus[pos]->periphData; } /* ----------------------------------------------------------------------- */ static uint32_t dmaGpioOnAdr(int pos) { int page, slot; page = pos/ON_PER_IPAGE; slot = pos%ON_PER_IPAGE; //cast twice to suppress compiler warning, I belive this cast is ok //because dmaIbus contains bus addresses, not user addresses. --plugwash return (uint32_t)(uintptr_t) &dmaIBus[page]->gpioOn[slot]; } /* ----------------------------------------------------------------------- */ static uint32_t dmaGpioOffAdr(int pos) { int page, slot; myOffPageSlot(pos, &page, &slot); //cast twice to suppress compiler warning, I belive this cast is ok //because dmaIbus contains bus addresses, not user addresses. --plugwash return (uint32_t)(uintptr_t) &dmaIBus[page]->gpioOff[slot]; } /* ----------------------------------------------------------------------- */ static uint32_t dmaTickAdr(int pos) { int page, slot; myTckPageSlot(pos, &page, &slot); //cast twice to suppress compiler warning, I belive this cast is ok //because dmaIbus contains bus addresses, not user addresses. --plugwash return (uint32_t)(uintptr_t) &dmaIBus[page]->tick[slot]; } /* ----------------------------------------------------------------------- */ static uint32_t dmaReadLevelsAdr(int pos) { int page, slot; myLvsPageSlot(pos, &page, &slot); //cast twice to suppress compiler warning, I belive this cast is ok //because dmaIbus contains bus addresses, not user addresses. --plugwash return (uint32_t)(uintptr_t) &dmaIBus[page]->level[slot]; } /* ----------------------------------------------------------------------- */ static uint32_t dmaCbAdr(int pos) { int page, slot; page = (pos/CBS_PER_IPAGE); slot = (pos%CBS_PER_IPAGE); //cast twice to suppress compiler warning, I belive this cast is ok //because dmaIbus contains bus addresses, not user addresses. --plugwash return (uint32_t)(uintptr_t) &dmaIBus[page]->cb[slot]; } /* ----------------------------------------------------------------------- */ static void dmaGpioOnCb(int b, int pos) { rawCbs_t * p; p = dmaCB2adr(b); p->info = NORMAL_DMA; p->src = dmaGpioOnAdr(pos); p->dst = ((GPIO_BASE + (GPSET0*4)) & 0x00ffffff) | PI_PERI_BUS; p->length = 4; p->next = dmaCbAdr(b+1); } /* ----------------------------------------------------------------------- */ static void dmaTickCb(int b, int pos) { rawCbs_t * p; p = dmaCB2adr(b); p->info = NORMAL_DMA; p->src = ((SYST_BASE + (SYST_CLO*4)) & 0x00ffffff) | PI_PERI_BUS; p->dst = dmaTickAdr(pos); p->length = 4; p->next = dmaCbAdr(b+1); } /* ----------------------------------------------------------------------- */ static void dmaGpioOffCb(int b, int pos) { rawCbs_t * p; p = dmaCB2adr(b); p->info = NORMAL_DMA; p->src = dmaGpioOffAdr(pos); p->dst = ((GPIO_BASE + (GPCLR0*4)) & 0x00ffffff) | PI_PERI_BUS; p->length = 4; p->next = dmaCbAdr(b+1); } /* ----------------------------------------------------------------------- */ static void dmaReadLevelsCb(int b, int pos) { rawCbs_t * p; p = dmaCB2adr(b); p->info = NORMAL_DMA; p->src = ((GPIO_BASE + (GPLEV0*4)) & 0x00ffffff) | PI_PERI_BUS; p->dst = dmaReadLevelsAdr(pos); p->length = 4; p->next = dmaCbAdr(b+1); } /* ----------------------------------------------------------------------- */ static void dmaDelayCb(int b) { rawCbs_t * p; p = dmaCB2adr(b); if (gpioCfg.clockPeriph == PI_CLOCK_PCM) { p->info = NORMAL_DMA | TIMED_DMA(2); p->dst = PCM_TIMER; } else { p->info = NORMAL_DMA | TIMED_DMA(5); p->dst = PWM_TIMER; } p->src = dmaPwmDataAdr(b%DMAI_PAGES); p->length = 4; p->next = dmaCbAdr(b+1); } /* ----------------------------------------------------------------------- */ static void dmaInitCbs(void) { int b, pulse, level, cycle; rawCbs_t * p; /* set up the DMA control blocks */ DBG(DBG_STARTUP, ""); gpioStats.dmaInitCbsCount++; b = -1; level = 0; for (cycle=0; cyclenext = dmaCbAdr(0); DBG(DBG_STARTUP, "DMA page type count = %zd", sizeof(dmaIPage_t)); DBG(DBG_STARTUP, "%d control blocks (exp=%d)", b+1, NUM_CBS); } /* ======================================================================= */ static void sigHandler(int signum) { if ((signum >= PI_MIN_SIGNUM) && (signum <= PI_MAX_SIGNUM)) { if (gpioSignal[signum].func) { if (gpioSignal[signum].ex) { (gpioSignal[signum].func)(signum, gpioSignal[signum].userdata); } else { (gpioSignal[signum].func)(signum); } } else { switch(signum) { case SIGUSR1: if (gpioCfg.dbgLevel > DBG_MIN_LEVEL) --gpioCfg.dbgLevel; else gpioCfg.dbgLevel = DBG_MIN_LEVEL; DBG(DBG_USER, "Debug level %d\n", gpioCfg.dbgLevel); break; case SIGUSR2: if (gpioCfg.dbgLevel < DBG_MAX_LEVEL) ++gpioCfg.dbgLevel; else gpioCfg.dbgLevel = DBG_MAX_LEVEL; DBG(DBG_USER, "Debug level %d\n", gpioCfg.dbgLevel); break; case SIGPIPE: case SIGWINCH: DBG(DBG_USER, "signal %d ignored", signum); break; case SIGCHLD: /* Used to notify threads of events */ break; default: DBG(DBG_ALWAYS, "Unhandled signal %d, terminating\n", signum); gpioTerminate(); exit(-1); } } } else { /* exit */ DBG(DBG_ALWAYS, "Unhandled signal %d, terminating\n", signum); gpioTerminate(); exit(-1); } } /* ----------------------------------------------------------------------- */ static void sigSetHandler(void) { int i; struct sigaction new; for (i=PI_MIN_SIGNUM; i<=PI_MAX_SIGNUM; i++) { memset(&new, 0, sizeof(new)); new.sa_handler = sigHandler; sigaction(i, &new, NULL); } } /* freq mics net 0 1000 1000 900 1 4000 250 225 2 3750 266 240 3 3500 285 257 4 3250 307 276 5 3000 333 300 6 2750 363 327 7 2500 400 360 8 2250 444 400 9 2000 500 450 10 1750 571 514 11 1500 666 600 12 1250 800 720 13 1000 1000 900 14 750 1333 1200 15 500 2000 1800 */ unsigned alert_delays[]= { 900000, 225000, 240000, 257142, 276923, 300000, 327272, 360000, 400000, 450000, 514285, 600000, 720000, 900000, 1200000, 1800000 }; /* ======================================================================= */ static void alertGlitchFilter(gpioSample_t *sample, int numSamples) { int i, j, diff; uint32_t steadyUs, changedTick, RBitV, LBitV, initialised; uint32_t bit, bitV; for (i=0; i<=PI_MAX_USER_GPIO; i++) { bit = (1< 0) { /* Initialise filter with first sample */ bitV = sample[0].level & bit; gpioAlert[i].gfRBitV = bitV; gpioAlert[i].gfLBitV = bitV; gpioAlert[i].gfTick = sample[0].tick; gpioAlert[i].gfInitialised = 1; } steadyUs = gpioAlert[i].gfSteadyUs; RBitV = gpioAlert[i].gfRBitV; LBitV = gpioAlert[i].gfLBitV; changedTick = gpioAlert[i].gfTick; for (j=0; j= steadyUs) { /* Level stable for steady period. */ RBitV = bitV; } else { /* Keep reporting old level. */ sample[j].level ^= bit; } } } gpioAlert[i].gfRBitV = RBitV; gpioAlert[i].gfLBitV = LBitV; gpioAlert[i].gfTick = changedTick; } } } static void alertNoiseFilter(gpioSample_t *sample, int numSamples) { int i, j, diff; uint32_t LBitV; uint32_t bit, bitV; uint32_t nowTick; for (i=0; i<=PI_MAX_USER_GPIO; i++) { bit = (1<= 0) { /* Stop reporting gpio changes */ gpioAlert[i].nfActive = 0; gpioAlert[i].nfTick1 = nowTick; } } else /* waiting for steady us */ { if (bitV != LBitV) { diff = nowTick - gpioAlert[i].nfTick1; gpioAlert[i].nfTick1 = nowTick; if (diff >= gpioAlert[i].nfSteadyUs) { /* Start reporting gpio changes */ gpioAlert[i].nfRBitV = LBitV; gpioAlert[i].nfActive = 1; gpioAlert[i].nfTick2 = nowTick + gpioAlert[i].nfActiveUs; } } } if (!gpioAlert[i].nfActive) { if (bitV != gpioAlert[i].nfRBitV) sample[j].level ^= bit; } LBitV = bitV; } gpioAlert[i].nfLBitV = LBitV; } } } static void alertEmit( gpioSample_t *sample, int numSamples, uint32_t changedBits, uint32_t eTick) { uint32_t oldLevel, newLevel; int32_t diff; int emit, seqno, emitted; uint32_t changes, bits, timeoutBits, eventBits; int d; int b, n, v; int err; int max_emits; char fifo[32]; /* ensure space for maximum number of watchdog and event notifications */ gpioReport_t report[MAX_REPORT+PI_MAX_USER_GPIO+1+PI_MAX_EVENT+1]; if (changedBits) { if (gpioGetSamples.func) { if (gpioGetSamples.ex) { (gpioGetSamples.func) (sample, numSamples, gpioGetSamples.userdata); } else { (gpioGetSamples.func)(sample, numSamples); } } } eventBits = 0; if (bscFR != (bscsReg[BSC_FR]&0xffff)) { bscFR = bscsReg[BSC_FR]&0xffff; eventAlert[PI_EVENT_BSC].fired = 1; } for (b=0; b<=PI_MAX_EVENT; b++) { if (eventAlert[b].fired && (!eventAlert[b].ignore)) { eventBits |= (1<= gpioAlert[b].wdSteadyUs) { timeoutBits |= (1<= PI_NOTIFY_OPENED) { bits = gpioNotify[n].bits; emit = 0; seqno = gpioNotify[n].seqno; if (gpioNotify[n].state == PI_NOTIFY_RUNNING) { /* check to see if any bits have changed for this notification. bits is the set of notification bits changedBits is the set of changed bits */ if (changedBits & bits) { oldLevel = reportedLevel & bits; for (d=0; d 60000000) { if (numSamples) newLevel = sample[numSamples-1].level; else newLevel = reportedLevel; report[emit].seqno = seqno; report[emit].flags = PI_NTFY_FLAGS_ALIVE; report[emit].tick = eTick; report[emit].level = newLevel; emit++; seqno++; } } if (emit) { DBG(DBG_FAST_TICK, "notification %d (%d reports, %x-%x)", n, emit, report[0].seqno, report[emit-1].seqno); gpioNotify[n].lastReportTick = eTick; max_emits = gpioNotify[n].max_emits; if (emit > gpioStats.maxEmit) gpioStats.maxEmit = emit; emitted = 0; while (emit > 0) { if (emit > max_emits) { gpioStats.emitFrags++; err = write(gpioNotify[n].fd, report+emitted, max_emits*sizeof(gpioReport_t)); if (err != (max_emits*sizeof(gpioReport_t))) { if (err < 0) { if ((errno != EAGAIN) && (errno != EWOULDBLOCK)) { /* serious error, no point continuing */ DBG(DBG_ALWAYS, "fd=%d err=%d errno=%d", gpioNotify[n].fd, err, errno); DBG(DBG_ALWAYS, "%s", strerror(errno)); gpioNotify[n].bits = 0; gpioNotify[n].state = PI_NOTIFY_CLOSING; intNotifyBits(); break; } else gpioStats.wouldBlockPipeWrite++; } else { gpioStats.shortPipeWrite++; DBG(DBG_ALWAYS, "emitted %zd, asked for %d", err/sizeof(gpioReport_t), max_emits); } } else { gpioStats.goodPipeWrite++; } emitted += max_emits; emit -= max_emits; } else { err = write(gpioNotify[n].fd, report+emitted, emit*sizeof(gpioReport_t)); if (err != (emit*sizeof(gpioReport_t))) { if (err < 0) { if ((errno != EAGAIN) && (errno != EWOULDBLOCK)) { DBG(DBG_ALWAYS, "fd=%d err=%d errno=%d", gpioNotify[n].fd, err, errno); DBG(DBG_ALWAYS, "%s", strerror(errno)); /* serious error, no point continuing */ gpioNotify[n].bits = 0; gpioNotify[n].state = PI_NOTIFY_CLOSING; intNotifyBits(); break; } else gpioStats.wouldBlockPipeWrite++; } else { gpioStats.shortPipeWrite++; DBG(DBG_ALWAYS, "emitted %zd, asked for %d", err/sizeof(gpioReport_t), emit); } } else { gpioStats.goodPipeWrite++; } emitted += emit; emit = 0; } } gpioNotify[n].seqno = seqno; } } } if (changedBits & scriptBits) { for (n=0; n= PULSE_PER_CYCLE) { pulse = 0; if (++cycle >= bufferCycles) { cycle = 0; oldSlot = 0; } expected = sTick; sTick = myGetTick(cycle); if (stickInited) { diff = sTick - expected; if (abs(diff) > minDiff) { ft = sample[numSamples-PULSE_PER_CYCLE].tick; ticks = sTick - ft; for (i=1; i= TICKSLOTS) { gpioStats.diffTick[TICKSLOTS-1]++; } else gpioStats.diffTick[diff]++; } else { stickInited = 1; numSamples = 0; if (!(gpioCfg.ifFlags & PI_DISABLE_ALERT)) { pthAlertRunning = PI_THREAD_RUNNING; } } } } if (oldSlot == newSlot) moreToDo = 0; else moreToDo = 1; /* Apply glitch filter */ if (numSamples && gFilterBits) alertGlitchFilter(sample, numSamples); /* Apply noise filter */ if (numSamples && nFilterBits) alertNoiseFilter(sample, numSamples); /* Compact samples */ changedBits = 0; oldLevel &= monitorBits; reports = 0; totalSamples = 0; for (rp=0; rp= MAX_REPORT) { totalSamples += reports; /* Rebase watchdog timeouts */ if (wdogBits) alertWdogCheck(sample, reports); gpioStats.numSamples += reports; alertEmit(sample, reports, changedBits, sample[rp].tick); changedBits = 0; reports = 0; } } } if (reports) { totalSamples += reports; /* Rebase watchdog timeouts */ if (wdogBits) alertWdogCheck(sample, reports); gpioStats.numSamples += reports; } alertEmit(sample, reports, changedBits, sTick); reportedLevel = sample[numSamples -1].level; if (totalSamples > gpioStats.maxSamples) gpioStats.maxSamples = numSamples; req.tv_sec = 0; req.tv_nsec = alert_delays[(gpioCfg.internals>>PI_CFG_ALERT_FREQ)&15]; if (moreToDo) { gpioStats.moreToDo++; } else { gpioStats.alertTicks++; while (nanosleep(&req, &rem)) { req.tv_sec = rem.tv_sec; req.tv_nsec = rem.tv_nsec; } } } return 0; } /* ======================================================================= */ static int scrPop(gpioScript_t *s, int *SP, int *S) { if ((*SP) > 0) { return S[--(*SP)]; } else { s->run_state = PI_SCRIPT_FAILED; DBG(DBG_ALWAYS, "script %d too many pops", s->id); return 0; } } /* ----------------------------------------------------------------------- */ static void scrPush(gpioScript_t *s, int *SP, int *S, int val) { if ((*SP) < PI_SCRIPT_STACK_SIZE) { S[(*SP)++] = val; } else { s->run_state = PI_SCRIPT_FAILED; DBG(DBG_ALWAYS, "script %d too many pushes", s->id); } } /* ----------------------------------------------------------------------- */ static void scrSwap(int *v1, int *v2) { int t; t=*v1; *v1=*v2; *v2= t; } /* ----------------------------------------------------------------------- */ static int scrEvtWait(gpioScript_t *s, uint32_t bits) { pthread_mutex_lock(&s->pthMutex); if (s->request == PI_SCRIPT_RUN) { s->run_state = PI_SCRIPT_WAITING; s->eventBits = bits; intScriptEventBits(); pthread_cond_wait(&s->pthCond, &s->pthMutex); s->waitBits = 0; intScriptEventBits(); s->run_state = PI_SCRIPT_RUNNING; } pthread_mutex_unlock(&s->pthMutex); return s->changedBits; } /* ----------------------------------------------------------------------- */ static int scrWait(gpioScript_t *s, uint32_t bits) { pthread_mutex_lock(&s->pthMutex); if (s->request == PI_SCRIPT_RUN) { s->run_state = PI_SCRIPT_WAITING; s->waitBits = bits; intScriptBits(); pthread_cond_wait(&s->pthCond, &s->pthMutex); s->waitBits = 0; intScriptBits(); s->run_state = PI_SCRIPT_RUNNING; } pthread_mutex_unlock(&s->pthMutex); return s->changedBits; } /* ----------------------------------------------------------------------- */ static int scrSys(char *cmd, uint32_t p1, uint32_t p2) { char buf[1024]; int status; if (!myScriptNameValid(cmd)) SOFT_ERROR(PI_BAD_SCRIPT_NAME, "bad script name (%s)", cmd); snprintf(buf, sizeof(buf), "/opt/pigpio/cgi/%s %u %u", cmd, p1, p2); DBG(DBG_USER, "%s", buf); status = system(buf); if (status < 0) status = PI_BAD_SHELL_STATUS; return status; } /* ----------------------------------------------------------------------- */ static void *pthScript(void *x) { gpioScript_t *s; cmdInstr_t instr; int p1, p2, p1o, p2o, p3o, *t1, *t2; int PC, A, F, SP; int S[PI_SCRIPT_STACK_SIZE]; char buf[CMD_MAX_EXTENSION]; S[0] = 0; /* to prevent compiler warning */ s = x; while ((volatile int)s->request != PI_SCRIPT_DELETE) { pthread_mutex_lock(&s->pthMutex); s->run_state = PI_SCRIPT_HALTED; pthread_cond_wait(&s->pthCond, &s->pthMutex); pthread_mutex_unlock(&s->pthMutex); s->run_state = PI_SCRIPT_RUNNING; A = 0; F = 0; PC = 0; SP = 0; while (((volatile int)s->request == PI_SCRIPT_RUN ) && (s->run_state == PI_SCRIPT_RUNNING)) { instr = s->script.instr[PC]; p1o = instr.p[1]; p2o = instr.p[2]; if (instr.opt[1] == CMD_VAR) instr.p[1] = s->script.var[p1o]; else if (instr.opt[1] == CMD_PAR) instr.p[1] = s->script.par[p1o]; if (instr.opt[2] == CMD_VAR) instr.p[2] = s->script.var[p2o]; else if (instr.opt[2] == CMD_PAR) instr.p[2] = s->script.par[p2o]; /* fprintf(stderr, "PC=%d cmd=%d p1o=%d p1=%d p2o=%d p2=%d\n", PC, instr.p[0], p1o, instr.p[1], p2o, instr.p[2]); fflush(stderr); */ if (instr.p[0] < PI_CMD_SCRIPT) { if (instr.p[3]) { if ((instr.p[3] == sizeof(int)) && ((instr.opt[3] == CMD_VAR) || (instr.opt[3] == CMD_PAR))) { /* Hack to allow register use in 3rd parameter */ memcpy((char*)&p3o, (char *)instr.p[4], sizeof(int)); if (instr.opt[3] == CMD_VAR) memcpy(buf, (char *)&(s->script.var[p3o]), sizeof(int)); else memcpy(buf, (char *)&(s->script.par[p3o]), sizeof(int)); } else { memcpy(buf, (char *)instr.p[4], instr.p[3]); } } A = myDoCommand(instr.p, sizeof(buf)-1, buf); F = A; PC++; } else { p1 = instr.p[1]; p2 = instr.p[2]; switch (instr.p[0]) { case PI_CMD_ADD: A+=p1; F=A; PC++; break; case PI_CMD_AND: A&=p1; F=A; PC++; break; case PI_CMD_CALL: scrPush(s, &SP, S, PC+1); PC = p1; break; case PI_CMD_CMP: F=A-p1; PC++; break; case PI_CMD_DCR: if (instr.opt[1] == CMD_PAR) {--s->script.par[p1o]; F=s->script.par[p1o];} else {--s->script.var[p1o]; F=s->script.var[p1o];} PC++; break; case PI_CMD_DCRA: --A; F=A; PC++; break; case PI_CMD_DIV: A/=p1; F=A; PC++; break; case PI_CMD_HALT: s->run_state = PI_SCRIPT_HALTED; break; case PI_CMD_EVTWT: A=scrEvtWait(s, p1); F=A; PC++; break; case PI_CMD_INR: if (instr.opt[1] == CMD_PAR) {++s->script.par[p1o]; F=s->script.par[p1o];} else {++s->script.var[p1o]; F=s->script.var[p1o];} PC++; break; case PI_CMD_INRA: ++A; F=A; PC++; break; case PI_CMD_JM: if (F<0) PC=p1; else PC++; break; case PI_CMD_JMP: PC=p1; break; case PI_CMD_JNZ: if (F) PC=p1; else PC++; break; case PI_CMD_JP: if (F>=0) PC=p1; else PC++; break; case PI_CMD_JZ: if (!F) PC=p1; else PC++; break; case PI_CMD_LD: if (instr.opt[1] == CMD_PAR) s->script.par[p1o]=p2; else s->script.var[p1o]=p2; PC++; break; case PI_CMD_LDA: A=p1; PC++; break; case PI_CMD_LDAB: if ((p1 >= 0) && (p1 < sizeof(buf))) A = buf[p1]; PC++; break; case PI_CMD_MLT: A*=p1; F=A; PC++; break; case PI_CMD_MOD: A%=p1; F=A; PC++; break; case PI_CMD_OR: A|=p1; F=A; PC++; break; case PI_CMD_POP: if (instr.opt[1] == CMD_PAR) s->script.par[p1o]=scrPop(s, &SP, S); else s->script.var[p1o]=scrPop(s, &SP, S); PC++; break; case PI_CMD_POPA: A=scrPop(s, &SP, S); PC++; break; case PI_CMD_PUSH: if (instr.opt[1] == CMD_PAR) scrPush(s, &SP, S, s->script.par[p1o]); else scrPush(s, &SP, S, s->script.var[p1o]); PC++; break; case PI_CMD_PUSHA: scrPush(s, &SP, S, A); PC++; break; case PI_CMD_RET: PC=scrPop(s, &SP, S); break; case PI_CMD_RL: if (instr.opt[1] == CMD_PAR) {s->script.par[p1o]<<=p2; F=s->script.par[p1o];} else {s->script.var[p1o]<<=p2; F=s->script.var[p1o];} PC++; break; case PI_CMD_RLA: A<<=p1; F=A; PC++; break; case PI_CMD_RR: if (instr.opt[1] == CMD_PAR) {s->script.par[p1o]>>=p2; F=s->script.par[p1o];} else {s->script.var[p1o]>>=p2; F=s->script.var[p1o];} PC++; break; case PI_CMD_RRA: A>>=p1; F=A; PC++; break; case PI_CMD_STA: if (instr.opt[1] == CMD_PAR) s->script.par[p1o]=A; else s->script.var[p1o]=A; PC++; break; case PI_CMD_STAB: if ((p1 >= 0) && (p1 < sizeof(buf))) buf[p1] = A; PC++; break; case PI_CMD_SUB: A-=p1; F=A; PC++; break; case PI_CMD_SYS: A=scrSys((char*)instr.p[4], A, *(gpioReg + GPLEV0)); F=A; PC++; break; case PI_CMD_WAIT: A=scrWait(s, p1); F=A; PC++; break; case PI_CMD_X: if (instr.opt[1] == CMD_PAR) t1 = &s->script.par[p1o]; else t1 = &s->script.var[p1o]; if (instr.opt[2] == CMD_PAR) t2 = &s->script.par[p2o]; else t2 = &s->script.var[p2o]; scrSwap(t1, t2); PC++; break; case PI_CMD_XA: if (instr.opt[1] == CMD_PAR) scrSwap(&s->script.par[p1o], &A); else scrSwap(&s->script.var[p1o], &A); PC++; break; case PI_CMD_XOR: A^=p1; F=A; PC++; break; } } if (PC >= s->script.instrs) s->run_state = PI_SCRIPT_HALTED; } if ((volatile int)s->request == PI_SCRIPT_HALT) s->run_state = PI_SCRIPT_HALTED; } return 0; } /* ----------------------------------------------------------------------- */ static void * pthTimerTick(void *x) { gpioTimer_t *tp; struct timespec req, rem; tp = x; while (1) { req.tv_sec = tp->millis / THOUSAND; req.tv_nsec = (tp->millis % THOUSAND) * THOUSAND * THOUSAND; while (nanosleep(&req, &rem)) { req.tv_sec = rem.tv_sec; req.tv_nsec = rem.tv_nsec; } if (tp->ex) (tp->func)(tp->userdata); else (tp->func)(); } return 0; } /* ----------------------------------------------------------------------- */ static void * pthFifoThread(void *x) { char buf[CMD_MAX_EXTENSION]; int idx, flags, len, res, i; uintptr_t p[CMD_P_ARR]; cmdCtlParse_t ctl; uint32_t *param; char v[CMD_MAX_EXTENSION]; myCreatePipe(PI_INPFIFO, 0662); if ((inpFifo = fopen(PI_INPFIFO, "r+")) == NULL) SOFT_ERROR((void*)PI_INIT_FAILED, "fopen %s failed(%m)", PI_INPFIFO); myCreatePipe(PI_OUTFIFO, 0664); if ((outFifo = fopen(PI_OUTFIFO, "w+")) == NULL) SOFT_ERROR((void*)PI_INIT_FAILED, "fopen %s failed (%m)", PI_OUTFIFO); /* set outFifo non-blocking */ flags = fcntl(fileno(outFifo), F_GETFL, 0); fcntl(fileno(outFifo), F_SETFL, flags | O_NONBLOCK); /* don't start until DMA started */ spinWhileStarting(); while (1) { if (fgets(buf, sizeof(buf), inpFifo) == NULL) SOFT_ERROR((void*)PI_INIT_FAILED, "fifo fgets failed (%m)"); len = strlen(buf); if (len) { --len; buf[len] = 0; /* replace terminating */ } ctl.eaten = 0; idx = 0; while (((ctl.eaten)= 0)) { if ((idx=cmdParse(buf, p, CMD_MAX_EXTENSION, v, &ctl)) >= 0) { /* make sure extensions are null terminated */ v[p[3]] = 0; res = myDoCommand(p, sizeof(v)-1, v); switch (cmdInfo[idx].rv) { case 0: fprintf(outFifo, "%d\n", res); break; case 1: fprintf(outFifo, "%d\n", res); break; case 2: fprintf(outFifo, "%d\n", res); break; case 3: fprintf(outFifo, "%08X\n", res); break; case 4: fprintf(outFifo, "%u\n", res); break; case 5: fprintf(outFifo, "%s", cmdUsage); break; case 6: fprintf(outFifo, "%d", res); if (res > 0) { for (i=0; i= 0) { memcpy(buf, &p[3], 4); p[3] = 4 + (4*PI_MAX_SCRIPT_PARAMS); } break; default: p[3] = myDoCommand(p, sizeof(buf)-1, buf); } if (sizeof(uintptr_t) == 8) // 64-bit system { for (i = 0; i < 4; i++) response[i] = (uint32_t)p[i]; if (write(sock, response, 16) == -1) { /* ignore errors */ } } else // 32-bit system { if (write(sock, p, 16) == -1) { /* ignore errors */ } } switch (p[0]) { /* extensions */ case PI_CMD_BI2CZ: case PI_CMD_BSCX: case PI_CMD_CF2: case PI_CMD_FL: case PI_CMD_FR: case PI_CMD_I2CPK: case PI_CMD_I2CRD: case PI_CMD_I2CRI: case PI_CMD_I2CRK: case PI_CMD_I2CZ: case PI_CMD_PROCP: case PI_CMD_SERR: case PI_CMD_SLR: case PI_CMD_SPIX: case PI_CMD_SPIR: case PI_CMD_BSPIX: if (((int)p[3]) > 0) { if (write(sock, buf, p[3]) == 1) { /* ignore errors */ } } break; default: break; } } closeOrphanedNotifications(-1, sock); close(sock); DBG(DBG_USER, "Socket %d closed", sock); return 0; } static int addrAllowed(struct sockaddr *saddr) { int i; uint32_t addr; if (!numSockNetAddr) return 1; // FIXME: add IPv6 whitelisting support if (saddr->sa_family != AF_INET) return 0; addr = ((struct sockaddr_in *) saddr)->sin_addr.s_addr; for (i=0; i= 0) { pthread_t thr; fdC = accept(fdSock, (struct sockaddr *)&client, (socklen_t*)&c); closeOrphanedNotifications(-1, fdC); if (addrAllowed((struct sockaddr *)&client)) { DBG(DBG_USER, "Connection accepted on socket %d", fdC); sock = malloc(sizeof(int)); *sock = fdC; /* Enable tcp_keepalive */ int optval = 1; socklen_t optlen = sizeof(optval); if (setsockopt(fdC, SOL_SOCKET, SO_KEEPALIVE, &optval, optlen) < 0) { DBG(DBG_ALWAYS, "setsockopt() fail, closing socket %d", fdC); close(fdC); } DBG(DBG_USER, "SO_KEEPALIVE enabled on socket %d\n", fdC); if (pthread_create (&thr, &attr, pthSocketThreadHandler, (void*) sock) < 0) SOFT_ERROR((void*)PI_INIT_FAILED, "socket pthread_create failed (%m)"); } else { DBG(DBG_ALWAYS, "Connection rejected, closing"); close(fdC); } } if (fdC < 0) SOFT_ERROR((void*)PI_INIT_FAILED, "accept failed (%m)"); return 0; } /* ======================================================================= */ static void initCheckLockFile(void) { int fd; int count; int pid; int err; int delete; char str[20]; fd = open(PI_LOCKFILE, O_RDONLY); if (fd != -1) { DBG(DBG_STARTUP, "lock file exists"); delete = 1; count = read(fd, str, sizeof(str)-1); if (count) { pid = atoi(str); err = kill(pid, 0); if (!err) delete = 0; /* process still exists */ DBG(DBG_STARTUP, "lock file pid=%d err=%d", pid, err); } close(fd); DBG(DBG_STARTUP, "lock file delete=%d", delete); if (delete) unlink(PI_LOCKFILE); } } static int initGrabLockFile(void) { int fd; int lockResult; char pidStr[20]; initCheckLockFile(); /* try to grab the lock file */ fd = open(PI_LOCKFILE, O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0644); if (fd != -1) { lockResult = flock(fd, LOCK_EX|LOCK_NB); if(lockResult == 0) { sprintf(pidStr, "%d\n", (int)getpid()); if (write(fd, pidStr, strlen(pidStr)) == -1) { /* ignore errors */ } } else { close(fd); return -1; } } return fd; } /* ----------------------------------------------------------------------- */ static uint32_t * initMapMem(int fd, uint32_t addr, uint32_t len) { return (uint32_t *) mmap(0, len, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_LOCKED, fd, addr); } /* ----------------------------------------------------------------------- */ static int initCheckPermitted(void) { DBG(DBG_STARTUP, ""); if (!pi_ispi) { DBG(DBG_ALWAYS, "\n" \ "+---------------------------------------------------------+\n" \ "|Sorry, this system does not appear to be a raspberry pi. |\n" \ "|aborting. |\n" \ "+---------------------------------------------------------+\n\n"); return -1; } if ((fdMem = open("/dev/mem", O_RDWR | O_SYNC) ) < 0) { DBG(DBG_ALWAYS, "\n" \ "+---------------------------------------------------------+\n" \ "|Sorry, you don't have permission to run this program. |\n" \ "|Try running as root, e.g. precede the command with sudo. |\n" \ "+---------------------------------------------------------+\n\n"); return -1; } return 0; } /* ----------------------------------------------------------------------- */ static int initPeripherals(void) { DBG(DBG_STARTUP, ""); gpioReg = initMapMem(fdMem, GPIO_BASE, GPIO_LEN); if (gpioReg == MAP_FAILED) SOFT_ERROR(PI_INIT_FAILED, "mmap gpio failed (%m)"); dmaReg = initMapMem(fdMem, DMA_BASE, DMA_LEN); if (dmaReg == MAP_FAILED) SOFT_ERROR(PI_INIT_FAILED, "mmap dma failed (%m)"); /* we should know if we are running on a BCM2711 by now */ if (gpioCfg.DMAprimaryChannel == PI_DEFAULT_DMA_NOT_SET) { if (pi_is_2711) gpioCfg.DMAprimaryChannel = PI_DEFAULT_DMA_PRIMARY_CH_2711; else gpioCfg.DMAprimaryChannel = PI_DEFAULT_DMA_PRIMARY_CHANNEL; } if (gpioCfg.DMAsecondaryChannel == PI_DEFAULT_DMA_NOT_SET) { if (pi_is_2711) gpioCfg.DMAsecondaryChannel = PI_DEFAULT_DMA_SECONDARY_CH_2711; else gpioCfg.DMAsecondaryChannel = PI_DEFAULT_DMA_SECONDARY_CHANNEL; } dmaIn = dmaReg + (gpioCfg.DMAprimaryChannel * 0x40); dmaOut = dmaReg + (gpioCfg.DMAsecondaryChannel * 0x40); DBG(DBG_STARTUP, "DMA #%d @ %08"PRIXPTR, gpioCfg.DMAprimaryChannel, (uintptr_t)dmaIn); DBG(DBG_STARTUP, "debug reg is %08X", dmaIn[DMA_DEBUG]); clkReg = initMapMem(fdMem, CLK_BASE, CLK_LEN); if (clkReg == MAP_FAILED) SOFT_ERROR(PI_INIT_FAILED, "mmap clk failed (%m)"); systReg = initMapMem(fdMem, SYST_BASE, SYST_LEN); if (systReg == MAP_FAILED) SOFT_ERROR(PI_INIT_FAILED, "mmap syst failed (%m)"); spiReg = initMapMem(fdMem, SPI_BASE, SPI_LEN); if (spiReg == MAP_FAILED) SOFT_ERROR(PI_INIT_FAILED, "mmap spi failed (%m)"); pwmReg = initMapMem(fdMem, PWM_BASE, PWM_LEN); if (pwmReg == MAP_FAILED) SOFT_ERROR(PI_INIT_FAILED, "mmap pwm failed (%m)"); pcmReg = initMapMem(fdMem, PCM_BASE, PCM_LEN); if (pcmReg == MAP_FAILED) SOFT_ERROR(PI_INIT_FAILED, "mmap pcm failed (%m)"); auxReg = initMapMem(fdMem, AUX_BASE, AUX_LEN); if (auxReg == MAP_FAILED) SOFT_ERROR(PI_INIT_FAILED, "mmap aux failed (%m)"); padsReg = initMapMem(fdMem, PADS_BASE, PADS_LEN); if (padsReg == MAP_FAILED) SOFT_ERROR(PI_INIT_FAILED, "mmap pads failed (%m)"); bscsReg = initMapMem(fdMem, BSCS_BASE, BSCS_LEN); if (bscsReg == MAP_FAILED) SOFT_ERROR(PI_INIT_FAILED, "mmap bscs failed (%m)"); return 0; } /* ----------------------------------------------------------------------- */ static int initZaps (int pmapFd, void *virtualBase, int basePage, int pages) { int n; uintptr_t index; off_t offset; ssize_t t; uint32_t physical; int status; uintptr_t pageAdr; unsigned long long pa; DBG(DBG_STARTUP, ""); status = 0; pageAdr = (uintptr_t) dmaVirt[basePage]; index = ((uintptr_t)virtualBase / PAGE_SIZE) * 8; offset = lseek(pmapFd, index, SEEK_SET); if (offset != index) SOFT_ERROR(PI_INIT_FAILED, "lseek pagemap failed (%m)"); for (n=0; n PI_DEFAULT_BUFFER_MILLIS))) { /* pagemap allocation of DMA memory */ dmaPMapBlk = mmap( 0, (bufferBlocks+PI_WAVE_BLOCKS)*sizeof(dmaPage_t *), PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_LOCKED, -1, 0); if (dmaPMapBlk == MAP_FAILED) SOFT_ERROR(PI_INIT_FAILED, "pagemap mmap block failed (%m)"); fdPmap = open("/proc/self/pagemap", O_RDONLY); if (fdPmap < 0) SOFT_ERROR(PI_INIT_FAILED, "pagemap open failed(%m)"); for (i=0; i<(bufferBlocks+PI_WAVE_BLOCKS); i++) { status = initPagemapBlock(i); if (status < 0) { close(fdPmap); return status; } } close(fdPmap); DBG(DBG_STARTUP, "dmaPMapBlk=%08"PRIXPTR" dmaIn=%08"PRIXPTR, (uintptr_t)dmaPMapBlk, (uintptr_t)dmaIn); } else { /* mailbox allocation of DMA memory */ dmaMboxBlk = mmap( 0, (bufferBlocks+PI_WAVE_BLOCKS)*sizeof(DMAMem_t), PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_LOCKED, -1, 0); if (dmaMboxBlk == MAP_FAILED) SOFT_ERROR(PI_INIT_FAILED, "mmap mbox block failed (%m)"); fdMbox = mbOpen(); if (fdMbox < 0) SOFT_ERROR(PI_INIT_FAILED, "mbox open failed(%m)"); for (i=0; i<(bufferBlocks+PI_WAVE_BLOCKS); i++) { status = initMboxBlock(i); if (status < 0) { mbClose(fdMbox); return status; } } mbClose(fdMbox); DBG(DBG_STARTUP, "dmaMboxBlk=%08"PRIXPTR" dmaIn=%08"PRIXPTR, (uintptr_t)dmaMboxBlk, (uintptr_t)dmaIn); } DBG(DBG_STARTUP, "gpioReg=%08"PRIXPTR" pwmReg=%08"PRIXPTR" pcmReg=%08"PRIXPTR" clkReg=%08"PRIXPTR" auxReg=%08"PRIXPTR, (uintptr_t)gpioReg, (uintptr_t)pwmReg, (uintptr_t)pcmReg, (uintptr_t)clkReg, (uintptr_t)auxReg); for (i=0; i= DBG_DMACBS) { fprintf(stderr, "*** INPUT DMA CONTROL BLOCKS ***\n"); for (i=0; iperiphData = 1; /* enable PWM DMA, raise panic and dreq thresholds to 15 */ pwmReg[PWM_DMAC] = PWM_DMAC_ENAB | PWM_DMAC_PANIC(15) | PWM_DMAC_DREQ(15); myGpioDelay(10); /* clear PWM fifo */ pwmReg[PWM_CTL] = PWM_CTL_CLRF1; myGpioDelay(10); /* enable PWM channel 1 and use fifo */ pwmReg[PWM_CTL] = PWM_CTL_USEF1 | PWM_CTL_MODE1 | PWM_CTL_PWEN1; } /* ----------------------------------------------------------------------- */ static void initPCM(unsigned bits) { DBG(DBG_STARTUP, "bits=%d", bits); /* disable PCM so we can modify the regs */ pcmReg[PCM_CS] = 0; myGpioDelay(1000); pcmReg[PCM_FIFO] = 0; pcmReg[PCM_MODE] = 0; pcmReg[PCM_RXC] = 0; pcmReg[PCM_TXC] = 0; pcmReg[PCM_DREQ] = 0; pcmReg[PCM_INTEN] = 0; pcmReg[PCM_INTSTC] = 0; pcmReg[PCM_GRAY] = 0; myGpioDelay(1000); pcmReg[PCM_MODE] = PCM_MODE_FLEN(bits-1); /* # bits in frame */ /* enable channel 1 with # bits width */ pcmReg[PCM_TXC] = PCM_TXC_CH1EN | PCM_TXC_CH1WID(bits-8); pcmReg[PCM_CS] |= PCM_CS_STBY; /* clear standby */ myGpioDelay(1000); pcmReg[PCM_CS] |= PCM_CS_TXCLR; /* clear TX FIFO */ pcmReg[PCM_CS] |= PCM_CS_DMAEN; /* enable DREQ */ pcmReg[PCM_DREQ] = PCM_DREQ_TX_PANIC(16) | PCM_DREQ_TX_REQ_L(30); pcmReg[PCM_INTSTC] = 0b1111; /* clear status bits */ /* enable PCM */ pcmReg[PCM_CS] |= PCM_CS_EN; /* enable tx */ pcmReg[PCM_CS] |= PCM_CS_TXON; dmaIVirt[0]->periphData = 0x0F; } /* ----------------------------------------------------------------------- */ static void initHWClk (int clkCtl, int clkDiv, int clkSrc, int divI, int divF, int MASH) { DBG(DBG_INTERNAL, "ctl=%d div=%d src=%d /I=%d /f=%d M=%d", clkCtl, clkDiv, clkSrc, divI, divF, MASH); /* kill the clock if busy, anything else isn't reliable */ if (clkReg[clkCtl] & CLK_CTL_BUSY) { do { clkReg[clkCtl] = BCM_PASSWD | CLK_CTL_KILL; } while (clkReg[clkCtl] & CLK_CTL_BUSY); } clkReg[clkDiv] = (BCM_PASSWD | CLK_DIV_DIVI(divI) | CLK_DIV_DIVF(divF)); usleep(10); clkReg[clkCtl] = (BCM_PASSWD | CLK_CTL_MASH(MASH) | CLK_CTL_SRC(clkSrc)); usleep(10); clkReg[clkCtl] |= (BCM_PASSWD | CLK_CTL_ENAB); } static void initClock(int mainClock) { const unsigned BITS=10; int clockPWM; unsigned clkCtl, clkDiv, clkSrc, clkDivI, clkDivF, clkMash, clkBits; char *per; unsigned micros; DBG(DBG_STARTUP, "mainClock=%d", mainClock); if (mainClock) micros = gpioCfg.clockMicros; else micros = PI_WF_MICROS; clockPWM = mainClock ^ (gpioCfg.clockPeriph == PI_CLOCK_PCM); if (clockPWM) { clkCtl = CLK_PWMCTL; clkDiv = CLK_PWMDIV; per = "PWM"; } else { clkCtl = CLK_PCMCTL; clkDiv = CLK_PCMDIV; per = "PCM"; } clkSrc = CLK_CTL_SRC_PLLD; clkDivI = clk_plld_freq / (10000000 / micros); /* 10 MHz - 1 MHz */ clkBits = BITS; /* 10/BITS MHz - 1/BITS MHz */ clkDivF = 0; clkMash = 0; DBG(DBG_STARTUP, "%s PLLD divi=%d divf=%d mash=%d bits=%d", per, clkDivI, clkDivF, clkMash, clkBits); initHWClk(clkCtl, clkDiv, clkSrc, clkDivI, clkDivF, clkMash); if (clockPWM) initPWM(BITS); else initPCM(BITS); myGpioDelay(2000); } static void initKillDMA(volatile uint32_t *dmaAddr) { dmaAddr[DMA_CS] = DMA_CHANNEL_ABORT; dmaAddr[DMA_CS] = 0; dmaAddr[DMA_CS] = DMA_CHANNEL_RESET; dmaAddr[DMA_CONBLK_AD] = 0; } /* ----------------------------------------------------------------------- */ static void initDMAgo(volatile uint32_t *dmaAddr, uint32_t cbAddr) { DBG(DBG_STARTUP, ""); initKillDMA(dmaAddr); dmaAddr[DMA_CS] = DMA_INTERRUPT_STATUS | DMA_END_FLAG; dmaAddr[DMA_CONBLK_AD] = cbAddr; /* clear READ/FIFO/READ_LAST_NOT_SET error bits */ dmaAddr[DMA_DEBUG] = DMA_DEBUG_READ_ERR | DMA_DEBUG_FIFO_ERR | DMA_DEBUG_RD_LST_NOT_SET_ERR; dmaAddr[DMA_CS] = DMA_WAIT_ON_WRITES | DMA_PANIC_PRIORITY(8) | DMA_PRIORITY(8) | DMA_ACTIVE; } /* ----------------------------------------------------------------------- */ static void initClearGlobals(void) { int i; DBG(DBG_STARTUP, ""); alertBits = 0; monitorBits = 0; notifyBits = 0; scriptBits = 0; gFilterBits = 0; nFilterBits = 0; wdogBits = 0; pthAlertRunning = PI_THREAD_NONE; pthFifoRunning = PI_THREAD_NONE; pthSocketRunning = PI_THREAD_NONE; wfc[0] = 0; wfc[1] = 0; wfc[2] = 0; wfcur=0; wfStats.micros = 0; wfStats.highMicros = 0; wfStats.maxMicros = PI_WAVE_MAX_MICROS; wfStats.pulses = 0; wfStats.highPulses = 0; wfStats.maxPulses = PI_WAVE_MAX_PULSES; wfStats.cbs = 0; wfStats.highCbs = 0; wfStats.maxCbs = (PI_WAVE_BLOCKS * PAGES_PER_BLOCK * CBS_PER_OPAGE); gpioGetSamples.func = NULL; gpioGetSamples.ex = 0; gpioGetSamples.userdata = NULL; gpioGetSamples.bits = 0; for (i=0; i<=PI_MAX_USER_GPIO; i++) { wfRx[i].mode = PI_WFRX_NONE; pthread_mutex_init(&wfRx[i].mutex, NULL); gpioAlert[i].func = NULL; } for (i=0; i<=PI_MAX_GPIO; i++) { gpioInfo [i].is = GPIO_UNDEFINED; gpioInfo [i].width = 0; gpioInfo [i].range = PI_DEFAULT_DUTYCYCLE_RANGE; gpioInfo [i].freqIdx = DEFAULT_PWM_IDX; } for (i=0; i> 4) & 0xFF; /* model 0=A 1=B 2=A+ 3=B+ 4=Pi2B 5=Alpha 6=Compute Module 7=Unknown 8=Pi3B 9=Zero 12=Zero W 13=Pi3B+ 14=Pi3A+ 17=Pi4B */ if (model < 2) gpioMask = PI_DEFAULT_UPDATE_MASK_A_B2; else if (model < 4) gpioMask = PI_DEFAULT_UPDATE_MASK_APLUS_BPLUS; else if (model == 4) gpioMask = PI_DEFAULT_UPDATE_MASK_PI2B; else if (model == 6 || model ==10 || model ==16) gpioMask = PI_DEFAULT_UPDATE_MASK_COMPUTE; else if (model == 8 || model ==13 || model ==14) gpioMask = PI_DEFAULT_UPDATE_MASK_PI3B; else if (model == 9 || model ==12) gpioMask = PI_DEFAULT_UPDATE_MASK_ZERO; else if (model ==17) gpioMask = PI_DEFAULT_UPDATE_MASK_PI4B; else gpioMask = PI_DEFAULT_UPDATE_MASK_UNKNOWN; } gpioMaskSet = 1; } #ifndef EMBEDDED_IN_VM if (!(gpioCfg.internals & PI_CFG_NOSIGHANDLER)) sigSetHandler(); #endif if (initPeripherals() < 0) return PI_INIT_FAILED; if (initAllocDMAMem() < 0) return PI_INIT_FAILED; /* done with /dev/mem */ if (fdMem != -1) { close(fdMem); fdMem = -1; } param.sched_priority = sched_get_priority_max(SCHED_FIFO); if (gpioCfg.internals & PI_CFG_RT_PRIORITY) sched_setscheduler(0, SCHED_FIFO, ¶m); initClock(1); /* initialise main clock */ atexit(gpioTerminate); if (pthread_attr_init(&pthAttr)) SOFT_ERROR(PI_INIT_FAILED, "pthread_attr_init failed (%m)"); if (pthread_attr_setstacksize(&pthAttr, STACK_SIZE)) SOFT_ERROR(PI_INIT_FAILED, "pthread_attr_setstacksize failed (%m)"); if (!(gpioCfg.ifFlags & PI_DISABLE_ALERT)) { if (pthread_create(&pthAlert, &pthAttr, pthAlertThread, &i)) SOFT_ERROR(PI_INIT_FAILED, "pthread_create alert failed (%m)"); pthAlertRunning = PI_THREAD_STARTED; } if (!(gpioCfg.ifFlags & PI_DISABLE_FIFO_IF)) { if (pthread_create(&pthFifo, &pthAttr, pthFifoThread, &i)) SOFT_ERROR(PI_INIT_FAILED, "pthread_create fifo failed (%m)"); pthFifoRunning = PI_THREAD_STARTED; } if (!(gpioCfg.ifFlags & PI_DISABLE_SOCK_IF)) { portStr = getenv(PI_ENVPORT); if (portStr) port = atoi(portStr); else port = gpioCfg.socketPort; // Accept connections on IPv6, unless we have an IPv4-only whitelist if (!numSockNetAddr) { fdSock = socket(AF_INET6, SOCK_STREAM , 0); if (fdSock != -1) { bzero((char *)&server6, sizeof(server6)); server6.sin6_family = AF_INET6; if (gpioCfg.ifFlags & PI_LOCALHOST_SOCK_IF) { server6.sin6_addr = in6addr_loopback; } else { server6.sin6_addr = in6addr_any; } server6.sin6_port = htons(port); int opt = 1; setsockopt(fdSock, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)); if (bind(fdSock,(struct sockaddr *)&server6, sizeof(server6)) < 0) SOFT_ERROR(PI_INIT_FAILED, "bind to port %d failed (%m)", port); } } if (numSockNetAddr || fdSock == -1) { fdSock = socket(AF_INET , SOCK_STREAM , 0); if (fdSock == -1) SOFT_ERROR(PI_INIT_FAILED, "socket failed (%m)"); else { int opt = 1; setsockopt(fdSock, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)); } server.sin_family = AF_INET; if (gpioCfg.ifFlags & PI_LOCALHOST_SOCK_IF) { server.sin_addr.s_addr = htonl(INADDR_LOOPBACK); } else { server.sin_addr.s_addr = htonl(INADDR_ANY); } server.sin_port = htons(port); if (bind(fdSock,(struct sockaddr *)&server , sizeof(server)) < 0) SOFT_ERROR(PI_INIT_FAILED, "bind to port %d failed (%m)", port); } if (pthread_create(&pthSocket, &pthAttr, pthSocketThread, &i)) SOFT_ERROR(PI_INIT_FAILED, "pthread_create socket failed (%m)"); pthSocketRunning = PI_THREAD_STARTED; } myGpioDelay(1000); dmaInitCbs(); flushMemory(); //cast twice to suppress compiler warning, I belive this cast //is ok because dmaIBus contains bus addresses, not virtual //addresses. initDMAgo((uint32_t *)dmaIn, (uint32_t)(uintptr_t)dmaIBus[0]); return PIGPIO_VERSION; } /* ======================================================================= */ int getBitInBytes(int bitPos, char *buf, int numBits) { int bitp, bufp; if (bitPos < numBits) { bufp = bitPos / 8; bitp = 7 - (bitPos % 8); if (buf[bufp] & (1<= 0) && (pos < NUM_WAVE_OOL)) { waveOOLPageSlot(pos, &page, &slot); return (dmaOVirt[page]->OOL[slot]); } return -1; } /* ----------------------------------------------------------------------- */ void rawWaveSetOOL(int pos, uint32_t value) { int page, slot; if ((pos >= 0) && (pos < NUM_WAVE_OOL)) { waveOOLPageSlot(pos, &page, &slot); dmaOVirt[page]->OOL[slot] = value; } } /* ----------------------------------------------------------------------- */ uint32_t rawWaveGetOut(int pos) { int page, slot; if ((pos >= 0) && (pos < NUM_WAVE_OOL)) { waveOOLPageSlot(pos, &page, &slot); return (dmaOVirt[page]->OOL[slot]); } return -1; } /* ----------------------------------------------------------------------- */ void rawWaveSetOut(int pos, uint32_t value) { int page, slot; if ((pos >= 0) && (pos < NUM_WAVE_OOL)) { waveOOLPageSlot(pos, &page, &slot); dmaOVirt[page]->OOL[slot] = value; } } /* ----------------------------------------------------------------------- */ uint32_t rawWaveGetIn(int pos) { int page, slot; if ((pos >= 0) && (pos < NUM_WAVE_OOL)) { waveOOLPageSlot((NUM_WAVE_OOL-1)-pos, &page, &slot); return (dmaOVirt[page]->OOL[slot]); } return -1; } /* ----------------------------------------------------------------------- */ void rawWaveSetIn(int pos, uint32_t value) { int page, slot; if ((pos >= 0) && (pos < NUM_WAVE_OOL)) { waveOOLPageSlot((NUM_WAVE_OOL-1)-pos, &page, &slot); dmaOVirt[page]->OOL[slot] = value; } } /* ----------------------------------------------------------------------- */ rawWaveInfo_t rawWaveInfo(int wave_id) { rawWaveInfo_t dummy = {0, 0, 0, 0, 0, 0, 0, 0}; if ((wave_id >=0) && (wave_id < PI_MAX_WAVES)) return waveInfo[wave_id]; else return dummy; } /* ----------------------------------------------------------------------- */ double time_time(void) { struct timeval tv; double t; gettimeofday(&tv, 0); t = (double)tv.tv_sec + ((double)tv.tv_usec / 1E6); return t; } /* ----------------------------------------------------------------------- */ void time_sleep(double seconds) { struct timespec ts, rem; if (seconds > 0.0) { ts.tv_sec = seconds; ts.tv_nsec = (seconds-(double)ts.tv_sec) * 1E9; while (clock_nanosleep(CLOCK_REALTIME, 0, &ts, &rem)) { /* copy remaining time to ts */ ts.tv_sec = rem.tv_sec; ts.tv_nsec = rem.tv_nsec; } } } /* ----------------------------------------------------------------------- */ void rawDumpWave(void) { int i; unsigned numWaves, t; rawWave_t *waves; numWaves = wfc[wfcur]; waves = wf [wfcur]; t = 0; for (i=0; i= PI_MAX_SCRIPTS) return; if (gpioScript[script_id].state == PI_SCRIPT_IN_USE) { for (i=0; i> 4) & 3; if (pwm == 0) pwmReg[PWM_CTL] &= (~PWM_CTL_PWEN1); else pwmReg[PWM_CTL] &= (~PWM_CTL_PWEN2); gpioInfo[i].width = 0; gpioInfo[i].is = GPIO_UNDEFINED; } } } /* ----------------------------------------------------------------------- */ int gpioSetMode(unsigned gpio, unsigned mode) { int reg, shift, old_mode; DBG(DBG_USER, "gpio=%d mode=%d", gpio, mode); CHECK_INITED; if (gpio > PI_MAX_GPIO) SOFT_ERROR(PI_BAD_GPIO, "bad gpio (%d)", gpio); if (mode > PI_ALT3) SOFT_ERROR(PI_BAD_MODE, "gpio %d, bad mode (%d)", gpio, mode); reg = gpio/10; shift = (gpio%10) * 3; old_mode = (gpioReg[reg] >> shift) & 7; if (mode != old_mode) { switchFunctionOff(gpio); gpioInfo[gpio].is = GPIO_UNDEFINED; } gpioReg[reg] = (gpioReg[reg] & ~(7< PI_MAX_GPIO) SOFT_ERROR(PI_BAD_GPIO, "bad gpio (%d)", gpio); reg = gpio/10; shift = (gpio%10) * 3; return (gpioReg[reg] >> shift) & 7; } /* ----------------------------------------------------------------------- */ int gpioSetPullUpDown(unsigned gpio, unsigned pud) { int shift = (gpio & 0xf) << 1; uint32_t bits; uint32_t pull; DBG(DBG_USER, "gpio=%d pud=%d", gpio, pud); CHECK_INITED; if (gpio > PI_MAX_GPIO) SOFT_ERROR(PI_BAD_GPIO, "bad gpio (%d)", gpio); if (pud > PI_PUD_UP) SOFT_ERROR(PI_BAD_PUD, "gpio %d, bad pud (%d)", gpio, pud); if (pi_is_2711) { switch (pud) { case PI_PUD_OFF: pull = 0; break; case PI_PUD_UP: pull = 1; break; case PI_PUD_DOWN: pull = 2; break; } bits = *(gpioReg + GPPUPPDN0 + (gpio>>4)); bits &= ~(3 << shift); bits |= (pull << shift); *(gpioReg + GPPUPPDN0 + (gpio>>4)) = bits; } else { *(gpioReg + GPPUD) = pud; myGpioDelay(1); *(gpioReg + GPPUDCLK0 + BANK) = BIT; myGpioDelay(1); *(gpioReg + GPPUD) = 0; *(gpioReg + GPPUDCLK0 + BANK) = 0; } return 0; } /* ----------------------------------------------------------------------- */ int gpioRead(unsigned gpio) { DBG(DBG_USER, "gpio=%d", gpio); CHECK_INITED; if (gpio > PI_MAX_GPIO) SOFT_ERROR(PI_BAD_GPIO, "bad gpio (%d)", gpio); if ((*(gpioReg + GPLEV0 + BANK) & BIT) != 0) return PI_ON; else return PI_OFF; } /* ----------------------------------------------------------------------- */ int gpioWrite(unsigned gpio, unsigned level) { DBG(DBG_USER, "gpio=%d level=%d", gpio, level); CHECK_INITED; if (gpio > PI_MAX_GPIO) SOFT_ERROR(PI_BAD_GPIO, "bad gpio (%d)", gpio); if (level > PI_ON) SOFT_ERROR(PI_BAD_LEVEL, "gpio %d, bad level (%d)", gpio, level); if (gpio <= PI_MAX_GPIO) { if (gpioInfo[gpio].is != GPIO_WRITE) { /* stop a glitch between setting mode then level */ if (level == PI_OFF) *(gpioReg + GPCLR0 + BANK) = BIT; else *(gpioReg + GPSET0 + BANK) = BIT; switchFunctionOff(gpio); gpioInfo[gpio].is = GPIO_WRITE; } } myGpioSetMode(gpio, PI_OUTPUT); if (level == PI_OFF) *(gpioReg + GPCLR0 + BANK) = BIT; else *(gpioReg + GPSET0 + BANK) = BIT; return 0; } /* ----------------------------------------------------------------------- */ int gpioPWM(unsigned gpio, unsigned val) { DBG(DBG_USER, "gpio=%d dutycycle=%d", gpio, val); CHECK_INITED; if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); if (val > gpioInfo[gpio].range) SOFT_ERROR(PI_BAD_DUTYCYCLE, "gpio %d, bad dutycycle (%d)", gpio, val); if (gpioInfo[gpio].is != GPIO_PWM) { switchFunctionOff(gpio); gpioInfo[gpio].is = GPIO_PWM; if (!val) myGpioWrite(gpio, 0); } myGpioSetMode(gpio, PI_OUTPUT); myGpioSetPwm(gpio, gpioInfo[gpio].width, val); gpioInfo[gpio].width=val; return 0; } /* ----------------------------------------------------------------------- */ int gpioGetPWMdutycycle(unsigned gpio) { unsigned pwm; DBG(DBG_USER, "gpio=%d", gpio); CHECK_INITED; if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); switch (gpioInfo[gpio].is) { case GPIO_PWM: return gpioInfo[gpio].width; case GPIO_HW_PWM: pwm = (PWMDef[gpio] >> 4) & 3; return hw_pwm_duty[pwm]; case GPIO_HW_CLK: return PI_HW_PWM_RANGE/2; default: SOFT_ERROR(PI_NOT_PWM_GPIO, "not a PWM gpio (%d)", gpio); } } /* ----------------------------------------------------------------------- */ int gpioSetPWMrange(unsigned gpio, unsigned range) { int oldWidth, newWidth; DBG(DBG_USER, "gpio=%d range=%d", gpio, range); CHECK_INITED; if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); if ((range < PI_MIN_DUTYCYCLE_RANGE) || (range > PI_MAX_DUTYCYCLE_RANGE)) SOFT_ERROR(PI_BAD_DUTYRANGE, "gpio %d, bad range (%d)", gpio, range); oldWidth = gpioInfo[gpio].width; if (oldWidth) { if (gpioInfo[gpio].is == GPIO_PWM) { newWidth = (range * oldWidth) / gpioInfo[gpio].range; myGpioSetPwm(gpio, oldWidth, 0); gpioInfo[gpio].range = range; gpioInfo[gpio].width = newWidth; myGpioSetPwm(gpio, 0, newWidth); } } gpioInfo[gpio].range = range; /* return the actual range for the current gpio frequency */ return pwmRealRange[gpioInfo[gpio].freqIdx]; } /* ----------------------------------------------------------------------- */ int gpioGetPWMrange(unsigned gpio) { DBG(DBG_USER, "gpio=%d", gpio); CHECK_INITED; if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); switch (gpioInfo[gpio].is) { case GPIO_HW_PWM: case GPIO_HW_CLK: return PI_HW_PWM_RANGE; default: return gpioInfo[gpio].range; } } /* ----------------------------------------------------------------------- */ int gpioGetPWMrealRange(unsigned gpio) { unsigned pwm; DBG(DBG_USER, "gpio=%d", gpio); CHECK_INITED; if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); switch (gpioInfo[gpio].is) { case GPIO_HW_PWM: pwm = (PWMDef[gpio] >> 4) & 3; return hw_pwm_real_range[pwm]; case GPIO_HW_CLK: return PI_HW_PWM_RANGE; default: return pwmRealRange[gpioInfo[gpio].freqIdx]; } } /* ----------------------------------------------------------------------- */ int gpioSetPWMfrequency(unsigned gpio, unsigned frequency) { int i, width; unsigned diff, best, idx; DBG(DBG_USER, "gpio=%d frequency=%d", gpio, frequency); CHECK_INITED; if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); if (frequency > pwmFreq[0]) idx = 0; else if (frequency < pwmFreq[PWM_FREQS-1]) idx = PWM_FREQS-1; else { best = 100000; /* impossibly high frequency difference */ idx = 0; for (i=0; i pwmFreq[i]) diff = frequency - pwmFreq[i]; else diff = pwmFreq[i] - frequency; if (diff < best) { best = diff; idx = i; } } } width = gpioInfo[gpio].width; if (width) { if (gpioInfo[gpio].is == GPIO_PWM) { myGpioSetPwm(gpio, width, 0); gpioInfo[gpio].freqIdx = idx; myGpioSetPwm(gpio, 0, width); } } gpioInfo[gpio].freqIdx = idx; return pwmFreq[idx]; } /* ----------------------------------------------------------------------- */ int gpioGetPWMfrequency(unsigned gpio) { unsigned pwm, clock; DBG(DBG_USER, "gpio=%d", gpio); CHECK_INITED; if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); switch (gpioInfo[gpio].is) { case GPIO_HW_PWM: pwm = (PWMDef[gpio] >> 4) & 3; return hw_pwm_freq[pwm]; case GPIO_HW_CLK: clock = (clkDef[gpio] >> 4) & 3; return hw_clk_freq[clock]; default: return pwmFreq[gpioInfo[gpio].freqIdx]; } } /* ----------------------------------------------------------------------- */ int gpioServo(unsigned gpio, unsigned val) { DBG(DBG_USER, "gpio=%d pulsewidth=%d", gpio, val); CHECK_INITED; if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); if ((val!=PI_SERVO_OFF) && (valPI_MAX_SERVO_PULSEWIDTH) SOFT_ERROR(PI_BAD_PULSEWIDTH, "gpio %d, bad pulsewidth (%d)", gpio, val); if (gpioInfo[gpio].is != GPIO_SERVO) { switchFunctionOff(gpio); gpioInfo[gpio].is = GPIO_SERVO; if (!val) myGpioWrite(gpio, 0); } myGpioSetMode(gpio, PI_OUTPUT); myGpioSetServo(gpio, gpioInfo[gpio].width, val); gpioInfo[gpio].width=val; return 0; } /* ----------------------------------------------------------------------- */ int gpioGetServoPulsewidth(unsigned gpio) { DBG(DBG_USER, "gpio=%d", gpio); CHECK_INITED; if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); if (gpioInfo[gpio].is != GPIO_SERVO) SOFT_ERROR(PI_NOT_SERVO_GPIO, "not a servo gpio (%d)", gpio); return gpioInfo[gpio].width; } /* ----------------------------------------------------------------------- */ int gpioWaveClear(void) { DBG(DBG_USER, ""); CHECK_INITED; wfc[0] = 0; wfc[1] = 0; wfc[2] = 0; wfcur = 0; wfStats.micros = 0; wfStats.pulses = 0; wfStats.cbs = 0; waveOutBotCB = PI_WAVE_COUNT_PAGES*CBS_PER_OPAGE; waveOutBotOOL = PI_WAVE_COUNT_PAGES*OOL_PER_OPAGE; waveOutTopOOL = NUM_WAVE_OOL; waveOutCount = 0; waveEndPtr = NULL; return 0; } /* ----------------------------------------------------------------------- */ int gpioWaveAddNew(void) { DBG(DBG_USER, ""); CHECK_INITED; wfc[0] = 0; wfc[1] = 0; wfc[2] = 0; wfcur = 0; wfStats.micros = 0; wfStats.pulses = 0; wfStats.cbs = 0; return 0; } /* ----------------------------------------------------------------------- */ int gpioWaveAddGeneric(unsigned numPulses, gpioPulse_t *pulses) { int p; DBG(DBG_USER, "numPulses=%u pulses=%08"PRIXPTR, numPulses, (uintptr_t)pulses); CHECK_INITED; if (numPulses > PI_WAVE_MAX_PULSES) SOFT_ERROR(PI_TOO_MANY_PULSES, "bad number of pulses (%d)", numPulses); if (!pulses) SOFT_ERROR(PI_BAD_POINTER, "bad (NULL) pulses pointer"); for (p=0; p PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); if ((baud < PI_WAVE_MIN_BAUD) || (baud > PI_WAVE_MAX_BAUD)) SOFT_ERROR(PI_BAD_WAVE_BAUD, "bad baud rate (%d)", baud); if ((data_bits < PI_MIN_WAVE_DATABITS) || (data_bits > PI_MAX_WAVE_DATABITS)) SOFT_ERROR(PI_BAD_DATABITS, "bad number of databits (%d)", data_bits); if ((stop_bits < PI_MIN_WAVE_HALFSTOPBITS) || (stop_bits > PI_MAX_WAVE_HALFSTOPBITS)) SOFT_ERROR(PI_BAD_STOPBITS, "bad number of (half) stop bits (%d)", stop_bits); if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); if (numBytes > PI_WAVE_MAX_CHARS) SOFT_ERROR(PI_TOO_MANY_CHARS, "too many chars (%d)", numBytes); if (offset > PI_WAVE_MAX_MICROS) SOFT_ERROR(PI_BAD_SER_OFFSET, "offset too large (%d)", offset); if (data_bits > 8) numBytes /= 2; if (data_bits > 16) numBytes /= 2; if (!numBytes) return 0; waveBitDelay(baud, data_bits, stop_bits, bitDelay); p = 0; wf[2][p].gpioOn = (1< bitDelay[0]) wf[2][p].usDelay = offset; else wf[2][p].usDelay = bitDelay[0]; for (i=0; i PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", spiSS); /* CPOL CPHA 0 0 read rising/write falling 0 1 read falling/write rising 1 0 read falling/write rising 1 1 read rising/write falling */ if (spi->clk_pol) {rising_edge[0] = 0; rising_edge[1] = 1;} else {rising_edge[0] = 1; rising_edge[1] = 0;} if (spi->clk_pha) {read_cycle[0] = 0; read_cycle[1] = 1;} else {read_cycle[0] = 1; read_cycle[1] = 0;} p = 0; if (offset) { wf[2][p].gpioOn = 0; wf[2][p].gpioOff = 0; wf[2][p].flags = 0; wf[2][p].usDelay = offset; p++; } on_bits = 0; off_bits = 0; tx_bit_pos = 0; /* preset initial mosi bit */ if (getBitInBytes(tx_bit_pos, buf, spiTxBits)) { on_bits |= (1<<(spi->mosi)); dbv = 1; } else { off_bits |= (1<<(spi->mosi)); dbv = 0; } if (!spi->clk_pha) tx_bit_pos ++; if (spi->ss_pol) off_bits |= (1<clk_pol) on_bits |= (1<<(spi->clk)); else off_bits |= (1<<(spi->clk)); wf[2][p].gpioOn = on_bits; wf[2][p].gpioOff = off_bits; wf[2][p].flags = 0; if (spi->clk_us > spi->ss_us) wf[2][p].usDelay = spi->clk_us; else wf[2][p].usDelay = spi->ss_us; p++; for (bit=1; bit<=spiBits; bit++) { for (halfbit=0; halfbit<2; halfbit++) { wf[2][p].usDelay = spi->clk_us; wf[2][p].flags = 0; on_bits = 0; off_bits = 0; if (read_cycle[halfbit]) { if ((bit>=spiBitFirst) && (bit<=spiBitLast)) wf[2][p].flags = WAVE_FLAG_READ; } else { if (getBitInBytes(tx_bit_pos, buf, spiTxBits)) { if (!dbv) on_bits |= (1<<(spi->mosi)); dbv = 1; } else { if (dbv) off_bits |= (1<<(spi->mosi)); dbv = 0; } ++tx_bit_pos; } if (rising_edge[halfbit]) on_bits |= (1<<(spi->clk)); else off_bits |= (1<<(spi->clk)); wf[2][p].gpioOn = on_bits; wf[2][p].gpioOff = off_bits; p++; } } on_bits = 0; off_bits = 0; if (spi->ss_pol) on_bits |= (1< NUM_WAVE_CBS) return PI_TOO_MANY_CBS; if ((numBOOL+waveOutBotOOL) > (waveOutTopOOL-numTOOL)) return PI_TOO_MANY_OOL; if (wid >= PI_MAX_WAVES) return PI_NO_WAVEFORM_ID; wid = waveOutCount++; waveInfo[wid].botCB = waveOutBotCB; waveInfo[wid].topCB = waveOutBotCB + numCB -1; waveInfo[wid].botOOL = waveOutBotOOL; waveInfo[wid].topOOL = waveOutTopOOL; waveInfo[wid].numCB = numCB; waveInfo[wid].numBOOL = numBOOL; waveInfo[wid].numTOOL = numTOOL; waveOutBotCB += numCB; waveOutBotOOL += numBOOL; waveOutTopOOL -= numTOOL; } /* Must be room if got this far. */ CB = waveInfo[wid].botCB; BOOL = waveInfo[wid].botOOL; TOOL = waveInfo[wid].topOOL; wave2Cbs(PI_WAVE_MODE_ONE_SHOT, &CB, &BOOL, &TOOL, 0, 0, 0); /* Sanity check. */ if ( (numCB != (CB-waveInfo[wid].botCB)) || (numBOOL != (BOOL-waveInfo[wid].botOOL)) || (numTOOL != (waveInfo[wid].topOOL-TOOL)) ) { DBG(DBG_ALWAYS, "ERROR wid=%d CBs %d=%d BOOL %d=%d TOOL %d=%d", wid, numCB, CB-waveInfo[wid].botCB, numBOOL, BOOL-waveInfo[wid].botOOL, numTOOL, waveInfo[wid].topOOL-TOOL); } DBG(DBG_USER, "Wave Stats: wid=%d CBs %d BOOL %d TOOL %d", wid, numCB, numBOOL, numTOOL); waveInfo[wid].deleted = 0; /* Consume waves. */ wfc[0] = 0; wfc[1] = 0; wfc[2] = 0; wfcur = 0; return wid; } int gpioWaveCreatePad(int pctCB, int pctBOOL, int pctTOOL) { int i, wid; int numCB, numBOOL, numTOOL; int CB, BOOL, TOOL; DBG(DBG_USER, "%d, %d, %d", pctCB, pctBOOL, pctTOOL); CHECK_INITED; if (pctCB < 0 || pctCB > 100) SOFT_ERROR(PI_BAD_PARAM, "bad wave param, pctCB=(%d)", pctCB); if (pctBOOL < 0 || pctBOOL > 100) SOFT_ERROR(PI_BAD_PARAM, "bad wave param, pctBOOL=(%d)", pctBOOL); if (pctTOOL < 0 || pctTOOL > 100) SOFT_ERROR(PI_BAD_PARAM, "bad wave param, pctTOOL=(%d)", pctTOOL); if (wfc[wfcur] == 0) return PI_EMPTY_WAVEFORM; /* What resources are needed? */ waveCBsOOLs(&numCB, &numBOOL, &numTOOL); /* Amount of pad required */ CB = (NUM_WAVE_CBS - PI_WAVE_COUNT_PAGES*CBS_PER_OPAGE) * pctCB / 100; BOOL = (NUM_WAVE_OOL - PI_WAVE_COUNT_PAGES*OOL_PER_OPAGE) * pctBOOL /100; TOOL = (NUM_WAVE_OOL - PI_WAVE_COUNT_PAGES*OOL_PER_OPAGE) * pctTOOL /100; /* Reject if wave is too big */ if (numCB > CB) return PI_TOO_MANY_CBS; if (numBOOL > BOOL) return PI_TOO_MANY_OOL; if (numTOOL > TOOL) return PI_TOO_MANY_OOL; /* Set the padding */ numCB = CB; numBOOL = BOOL; numTOOL = TOOL; wid = -1; /* Is there an exact fit with a deleted wave. */ for (i=0; i NUM_WAVE_CBS) return PI_TOO_MANY_CBS; if ((numBOOL+waveOutBotOOL) > (waveOutTopOOL-numTOOL)) return PI_TOO_MANY_OOL; if (wid >= PI_MAX_WAVES) return PI_NO_WAVEFORM_ID; wid = waveOutCount++; waveInfo[wid].botCB = waveOutBotCB; waveInfo[wid].topCB = waveOutBotCB + numCB -1; waveInfo[wid].botOOL = waveOutBotOOL; waveInfo[wid].topOOL = waveOutTopOOL; waveInfo[wid].numCB = numCB; waveInfo[wid].numBOOL = numBOOL; waveInfo[wid].numTOOL = numTOOL; waveOutBotCB += numCB; waveOutBotOOL += numBOOL; waveOutTopOOL -= numTOOL; } /* Must be room if got this far. */ CB = waveInfo[wid].botCB; BOOL = waveInfo[wid].botOOL; TOOL = waveInfo[wid].topOOL; wave2Cbs(PI_WAVE_MODE_ONE_SHOT, &CB, &BOOL, &TOOL, numCB, numBOOL, numTOOL); /* Sanity check. */ if ( (numCB != (CB-waveInfo[wid].botCB)) || (numBOOL != (BOOL-waveInfo[wid].botOOL)) || (numTOOL != (waveInfo[wid].topOOL-TOOL)) ) { DBG(DBG_ALWAYS, "ERROR wid=%d CBs %d=%d BOOL %d=%d TOOL %d=%d", wid, numCB, CB-waveInfo[wid].botCB, numBOOL, BOOL-waveInfo[wid].botOOL, numTOOL, waveInfo[wid].topOOL-TOOL); } DBG(DBG_USER, "Wave padding: wid=%d CBs %d BOOL %d TOOL %d", wid, numCB, numBOOL, numTOOL); waveInfo[wid].deleted = 0; /* Consume waves. */ wfc[0] = 0; wfc[1] = 0; wfc[2] = 0; wfcur = 0; return wid; } /* ----------------------------------------------------------------------- */ int gpioWaveDelete(unsigned wave_id) { DBG(DBG_USER, "wave id=%d", wave_id); CHECK_INITED; if ((wave_id >= waveOutCount) || waveInfo[wave_id].deleted) SOFT_ERROR(PI_BAD_WAVE_ID, "bad wave id (%d)", wave_id); waveInfo[wave_id].deleted = 1; if (wave_id == (waveOutCount-1)) { /* top wave deleted, garbage collect any other deleted waves */ while ((wave_id > 0) && (waveInfo[wave_id-1].deleted)) --wave_id; waveOutBotCB = waveInfo[wave_id].botCB; waveOutBotOOL = waveInfo[wave_id].botOOL; waveOutTopOOL = waveInfo[wave_id].topOOL; waveOutCount = wave_id; } return 0; } /* ----------------------------------------------------------------------- */ int gpioWaveTxStart(unsigned wave_mode) { /* This function is deprecated and has been removed. */ CHECK_INITED; SOFT_ERROR(PI_DEPRECATED, "deprected function removed"); } /* ----------------------------------------------------------------------- */ int gpioWaveTxSend(unsigned wave_id, unsigned wave_mode) { rawCbs_t *p=NULL; DBG(DBG_USER, "wave_id=%d wave_mode=%d", wave_id, wave_mode); CHECK_INITED; if ((wave_id >= waveOutCount) || waveInfo[wave_id].deleted) SOFT_ERROR(PI_BAD_WAVE_ID, "bad wave id (%d)", wave_id); if (wave_mode > PI_WAVE_MODE_REPEAT_SYNC) SOFT_ERROR(PI_BAD_WAVE_MODE, "bad wave mode (%d)", wave_mode); if (!waveClockInited) { stopHardwarePWM(); initClock(0); /* initialise secondary clock */ waveClockInited = 1; PWMClockInited = 0; } if (wave_mode < PI_WAVE_MODE_ONE_SHOT_SYNC) initKillDMA(dmaOut); p = rawWaveCBAdr(waveInfo[wave_id].topCB); if ((wave_mode & 1) == PI_WAVE_MODE_ONE_SHOT) p->next = 0; else p->next = waveCbPOadr(waveInfo[wave_id].botCB+1); if (waveEndPtr && (wave_mode > PI_WAVE_MODE_REPEAT)) { *waveEndPtr = waveCbPOadr(waveInfo[wave_id].botCB+1); if (!dmaOut[DMA_CONBLK_AD]) { initDMAgo((uint32_t *)dmaOut, waveCbPOadr(waveInfo[wave_id].botCB)); } } else { initDMAgo((uint32_t *)dmaOut, waveCbPOadr(waveInfo[wave_id].botCB)); } waveEndPtr = &p->next; /* for compatability with the deprecated gpioWaveTxStart return the number of cbs */ return (waveInfo[wave_id].topCB - waveInfo[wave_id].botCB) + 1; } /* ----------------------------------------------------------------------- */ static int chainGetCB(int n) { int block, index; if (n < (WCB_CHAIN_CBS * PI_WAVE_COUNT_PAGES)) { block = n / WCB_CHAIN_CBS; index = n % WCB_CHAIN_CBS; return (block*CBS_PER_OPAGE) + WCB_COUNTER_CBS + index; } return -1; } static void chainSetVal(int n, uint32_t val) { int block, index; uint32_t *p; if (n < (WCB_CHAIN_OOL * PI_WAVE_COUNT_PAGES)) { block = n / WCB_CHAIN_OOL; index = n % WCB_CHAIN_OOL; p = (uint32_t *) dmaOVirt[block] + (WCB_COUNTER_CBS+WCB_CHAIN_CBS) * 8; p[index] = val; } } static uint32_t chainGetValPadr(int n) { int block, index; uint32_t *p; if (n < (WCB_CHAIN_OOL * PI_WAVE_COUNT_PAGES)) { block = n / WCB_CHAIN_OOL; index = n % WCB_CHAIN_OOL; p = (uint32_t *) dmaOBus[block] + (WCB_COUNTER_CBS+WCB_CHAIN_CBS) * 8; //cast twice to suppress warning, I belive this is ok as dmaOBus //contains bus addresses not virtual addresses. return (uint32_t)(uintptr_t) (p + index); } return 0; } static uint32_t chainGetCntVal(int counter, int slot) { uint32_t *p; int page, offset; page = counter / 2; offset = (counter % 2 ? WCB_COUNTER_OOL : 0); p = (uint32_t *) dmaOVirt[page] + (WCB_COUNTER_CBS+WCB_CHAIN_CBS) * 8; return p[WCB_CHAIN_OOL+ offset + slot]; } static void chainSetCntVal(int counter, int slot, uint32_t value) { uint32_t *p; int page, offset; page = counter / 2; offset = (counter % 2 ? WCB_COUNTER_OOL : 0); p = (uint32_t *) dmaOVirt[page] + (WCB_COUNTER_CBS+WCB_CHAIN_CBS) * 8; p[WCB_CHAIN_OOL + offset + slot] = value; } static uint32_t chainGetCntValPadr(int counter, int slot) { uint32_t *p; int page, offset; page = counter / 2; offset = (counter % 2 ? WCB_COUNTER_OOL : 0); p = (uint32_t *) dmaOBus[page] + (WCB_COUNTER_CBS+WCB_CHAIN_CBS) * 8; //cast twice to suppress warning, I belive this is ok as dmaOBus //contains bus addresses not virtual addresses. --plugwash return (uint32_t)(uintptr_t)(p + WCB_CHAIN_OOL + offset + slot); } static int chainGetCntCB(int counter) { int page, offset; page = counter / 2; offset = (counter % 2 ? WCB_CNT_CBS : 0); return ((page * CBS_PER_OPAGE) + offset); } static void chainMakeCounter( unsigned counter, unsigned blklen, unsigned blocks, unsigned count, uint32_t repeat, uint32_t next) { rawCbs_t *p=NULL; int b, baseCB, dig; uint32_t nxt; int botCB; botCB = chainGetCntCB(counter); baseCB = botCB; /* set up all the OOLs */ for (b=0; b < (blocks*(blklen+1)); b++) chainSetCntVal(counter, b, repeat); for (b=0; binfo = NORMAL_DMA; p->src = chainGetCntValPadr(counter, b*(blklen+1)); p->dst = (waveCbPOadr(botCB+1) + 20); p->length = 4; p->next = waveCbPOadr(botCB); /* copy BOTTOM to TOP */ p = rawWaveCBAdr(botCB++); p->info = NORMAL_DMA; p->src = chainGetCntValPadr(counter, b*(blklen+1)); p->dst = chainGetCntValPadr(counter, (b*(blklen+1))+blklen); p->length = 4; p->next = waveCbPOadr(botCB); /* shift all down one */ p = rawWaveCBAdr(botCB++); p->info = NORMAL_DMA|DMA_SRC_INC|DMA_DEST_INC; p->src = chainGetCntValPadr(counter, ((b*(blklen+1))+1)); p->dst = chainGetCntValPadr(counter, ((b*(blklen+1))+0)); p->length = blklen*4; p->next = repeat; } /* reset the counter */ p = rawWaveCBAdr(botCB); p->info = NORMAL_DMA|DMA_SRC_INC|DMA_DEST_INC; p->src = chainGetCntValPadr(counter, blocks*(blklen+1)); p->dst = chainGetCntValPadr(counter, 0); p->length = blocks*(blklen+1)*4; p->next = next; b = 0; while (count && (binfo = NORMAL_DMA | TIMED_DMA(2); p->dst = PCM_TIMER; } else { p->info = NORMAL_DMA | TIMED_DMA(5); p->dst = PWM_TIMER; } //cast twice to suppress warning, I belive this is ok as dmaOBus //contains bus addresses not virtual addresses. --plugwash p->src = (uint32_t)(uintptr_t) (&dmaOBus[0]->periphData); p->length = BPD * 20 / PI_WF_MICROS; /* 20 micros delay */ p->next = waveCbPOadr(chainGetCB(cb)); counters = 0; wid = -1; i = 0; while (i bufSize) SOFT_ERROR(PI_BAD_CHAIN_CMD, "incomplete chain command (at %d)", i); cmd = buf[i+1]; if (cmd == 0) /* loop begin */ { if (stk_lev >= (sizeof(stk_pos)/sizeof(int))) SOFT_ERROR(PI_CHAIN_NESTING, "chain counters nested too deep (at %d)", i); stk_pos[stk_lev++] = cb; i += 2; } else if (cmd == 1) /* loop end */ { if (counters >= WCB_COUNTERS) SOFT_ERROR(PI_CHAIN_COUNTER, "too many chain counters (at %d)", i); if ((i+4) > bufSize) SOFT_ERROR(PI_BAD_CHAIN_CMD, "incomplete chain command (at %d)", i); loop = 0; if (--stk_lev >= 0) loop = stk_pos[stk_lev]; if ((loop < 1) || (loop == cb)) SOFT_ERROR(PI_BAD_CHAIN_LOOP, "empty chain loop (at %d)", i); cycles = ((unsigned)buf[i+3] << 8) + (unsigned)buf[i+2]; i += 4; if (cycles > PI_MAX_WAVE_CYCLES) SOFT_ERROR(PI_CHAIN_LOOP_CNT, "bad chain loop count (%d)", cycles); if (cycles == 0) { /* Skip the complete loop block. Change the next pointing to the start of the loop block to the current cb. */ p = rawWaveCBAdr(chainGetCB(loop)); p->next = waveCbPOadr(chainGetCB(cb)); } else if (cycles == 1) { /* Nothing to do, no need for a counter. */ } else { chaincb = chainGetCB(cb++); if (chaincb < 0) SOFT_ERROR(PI_CHAIN_TOO_BIG, "chain is too long (%d)", cb); p = rawWaveCBAdr(chaincb); repeat = waveCbPOadr(chainGetCB(loop)); /* Need to check next cb as well. */ chaincb = chainGetCB(cb); if (chaincb < 0) SOFT_ERROR(PI_CHAIN_TOO_BIG, "chain is too long (%d)", cb); next = waveCbPOadr(chainGetCB(cb)); /* dummy src and dest */ p->info = NORMAL_DMA; //cast twice to suppress warning, I belive this is ok as dmaOBus //contains bus addresses not virtual addresses. --plugwash p->src = (uint32_t)(uintptr_t) (&dmaOBus[0]->periphData); p->dst = (uint32_t)(uintptr_t) (&dmaOBus[0]->periphData); p->length = 4; p->next = waveCbPOadr(chainGetCntCB(counters)); chainMakeCounter(counters, blklen, blocks, cycles-1, repeat, next); counters++; } } else if (cmd == 2) /* delay us */ { if ((i+4) > bufSize) SOFT_ERROR(PI_BAD_CHAIN_CMD, "incomplete chain command (at %d)", i); cycles = ((unsigned)buf[i+3] << 8) + (unsigned)buf[i+2]; i += 4; if (cycles > PI_MAX_WAVE_DELAY) SOFT_ERROR(PI_BAD_CHAIN_DELAY, "bad chain delay micros (%d)", cycles); if (cycles) { delayLeft = cycles; delayCBs = waveDelayCBs(delayLeft); for (dcb=0; dcbinfo = NORMAL_DMA | TIMED_DMA(2); p->dst = PCM_TIMER; } else { p->info = NORMAL_DMA | TIMED_DMA(5); p->dst = PWM_TIMER; } //cast twice to suppress warning, I belive this is ok as dmaOBus //contains bus addresses not virtual addresses. --plugwash p->src = (uint32_t)(uintptr_t) (&dmaOBus[0]->periphData); p->length = BPD * delayLeft / PI_WF_MICROS; if ((gpioCfg.DMAsecondaryChannel >= DMA_LITE_FIRST) && (p->length > DMA_LITE_MAX)) { p->length = DMA_LITE_MAX; } delayLeft -= (p->length / BPD); p->next = waveCbPOadr(chainGetCB(cb)); } } } else if (cmd == 3) /* repeat loop forever */ { i += 2; loop = 0; if (--stk_lev >= 0) loop = stk_pos[stk_lev]; if ((loop < 1) || (loop == cb)) SOFT_ERROR(PI_BAD_CHAIN_LOOP, "empty chain loop (at %d)", i); chaincb = chainGetCB(cb++); if (chaincb < 0) SOFT_ERROR(PI_CHAIN_TOO_BIG, "chain is too long (%d)", cb); if (i < bufSize) SOFT_ERROR(PI_BAD_FOREVER, "loop forever must be last command"); p = rawWaveCBAdr(chaincb); /* dummy src and dest */ p->info = NORMAL_DMA; //cast twice to suppress warning, I belive this is ok as dmaOBus //contains bus addresses not virtual addresses. --plugwash p->src = (uint32_t)(uintptr_t) (&dmaOBus[0]->periphData); p->dst = (uint32_t)(uintptr_t) (&dmaOBus[0]->periphData); p->length = 4; p->next = waveCbPOadr(chainGetCB(loop)); endPtr = &p->next; } else SOFT_ERROR(PI_BAD_CHAIN_CMD, "unknown chain command (255 %d)", cmd); } else if ((wid >= waveOutCount) || waveInfo[wid].deleted) SOFT_ERROR(PI_BAD_WAVE_ID, "undefined wave (%d)", wid); else { chaincb = chainGetCB(cb++); if (chaincb < 0) SOFT_ERROR(PI_CHAIN_TOO_BIG, "chain is too long (%d)", cb); p = rawWaveCBAdr(chaincb); chaincb = chainGetCB(cb); if (chaincb < 0) SOFT_ERROR(PI_CHAIN_TOO_BIG, "chain is too long (%d)", cb); chainSetVal(cb-1, waveCbPOadr(chaincb)); /* patch next of wid topCB to next cb */ p->info = NORMAL_DMA; p->src = chainGetValPadr(cb-1); /* this next */ p->dst = waveCbPOadr(waveInfo[wid].topCB) + 20; /* wid next */ p->length = 4; p->next = waveCbPOadr(waveInfo[wid].botCB+1); i += 1; } } chaincb = chainGetCB(cb++); if (chaincb < 0) SOFT_ERROR(PI_CHAIN_TOO_BIG, "chain is too long (%d)", cb); p = rawWaveCBAdr(chaincb); p->info = NORMAL_DMA; //cast twice to suppress warning, I belive this is ok as dmaOBus //contains bus addresses not virtual addresses. --plugwash p->src = (uint32_t)(uintptr_t) (&dmaOBus[0]->periphData); p->dst = (uint32_t)(uintptr_t) (&dmaOBus[0]->periphData); p->length = 4; p->next = 0; if (!endPtr) endPtr = &p->next; initDMAgo((uint32_t *)dmaOut, waveCbPOadr(chainGetCB(0))); waveEndPtr = endPtr; return 0; } /*-------------------------------------------------------------------------*/ int gpioWaveTxBusy(void) { DBG(DBG_USER, ""); CHECK_INITED; if (dmaOut[DMA_CONBLK_AD]) return 1; else return 0; } /*-------------------------------------------------------------------------*/ int gpioWaveTxAt(void) { int i, cb; DBG(DBG_USER, ""); CHECK_INITED; cb = dmaNowAtOCB(); if (cb < 0) return -cb; for (i=0; i= waveInfo[i].botCB) && (cb <= waveInfo[i].topCB) ) return i; } return PI_WAVE_NOT_FOUND; } /* ----------------------------------------------------------------------- */ int gpioWaveTxStop(void) { DBG(DBG_USER, ""); CHECK_INITED; initKillDMA(dmaOut); waveEndPtr = NULL; return 0; } /* ----------------------------------------------------------------------- */ int gpioWaveGetMicros(void) { DBG(DBG_USER, ""); CHECK_INITED; return wfStats.micros; } /* ----------------------------------------------------------------------- */ int gpioWaveGetHighMicros(void) { DBG(DBG_USER, ""); CHECK_INITED; return wfStats.highMicros; } /* ----------------------------------------------------------------------- */ int gpioWaveGetMaxMicros(void) { DBG(DBG_USER, ""); CHECK_INITED; return wfStats.maxMicros; } /* ----------------------------------------------------------------------- */ int gpioWaveGetPulses(void) { DBG(DBG_USER, ""); CHECK_INITED; return wfStats.pulses; } /* ----------------------------------------------------------------------- */ int gpioWaveGetHighPulses(void) { DBG(DBG_USER, ""); CHECK_INITED; return wfStats.highPulses; } /* ----------------------------------------------------------------------- */ int gpioWaveGetMaxPulses(void) { DBG(DBG_USER, ""); CHECK_INITED; return wfStats.maxPulses; } /* ----------------------------------------------------------------------- */ int gpioWaveGetCbs(void) { DBG(DBG_USER, ""); CHECK_INITED; return wfStats.cbs; } /* ----------------------------------------------------------------------- */ int gpioWaveGetHighCbs(void) { DBG(DBG_USER, ""); CHECK_INITED; return wfStats.highCbs; } /* ----------------------------------------------------------------------- */ int gpioWaveGetMaxCbs(void) { DBG(DBG_USER, ""); CHECK_INITED; return wfStats.maxCbs; } /* ----------------------------------------------------------------------- */ static int read_SDA(wfRx_t *w) { myGpioSetMode(w->I.SDA, PI_INPUT); return myGpioRead(w->I.SDA); } static void set_SDA(wfRx_t *w) { myGpioSetMode(w->I.SDA, PI_INPUT); } static void clear_SDA(wfRx_t *w) { myGpioSetMode(w->I.SDA, PI_OUTPUT); myGpioWrite(w->I.SDA, 0); } static void clear_SCL(wfRx_t *w) { myGpioSetMode(w->I.SCL, PI_OUTPUT); myGpioWrite(w->I.SCL, 0); } static void I2C_delay(wfRx_t *w) { myGpioDelay(w->I.delay); } static void I2C_clock_stretch(wfRx_t *w) { uint32_t now, max_stretch=100000; myGpioSetMode(w->I.SCL, PI_INPUT); now = gpioTick(); while ((myGpioRead(w->I.SCL) == 0) && ((gpioTick()-now) < max_stretch)); } static void I2CStart(wfRx_t *w) { if (w->I.started) { set_SDA(w); I2C_delay(w); I2C_clock_stretch(w); I2C_delay(w); } clear_SDA(w); I2C_delay(w); clear_SCL(w); I2C_delay(w); w->I.started = 1; } static void I2CStop(wfRx_t *w) { clear_SDA(w); I2C_delay(w); I2C_clock_stretch(w); I2C_delay(w); set_SDA(w); I2C_delay(w); w->I.started = 0; } static void I2CPutBit(wfRx_t *w, int bit) { if (bit) set_SDA(w); else clear_SDA(w); I2C_delay(w); I2C_clock_stretch(w); I2C_delay(w); clear_SCL(w); } static int I2CGetBit(wfRx_t *w) { int bit; set_SDA(w); /* let SDA float */ I2C_delay(w); I2C_clock_stretch(w); bit = read_SDA(w); I2C_delay(w); clear_SCL(w); return bit; } static int I2CPutByte(wfRx_t *w, int byte) { int bit, nack; for(bit=0; bit<8; bit++) { I2CPutBit(w, byte & 0x80); byte <<= 1; } nack = I2CGetBit(w); return nack; } static uint8_t I2CGetByte(wfRx_t *w, int nack) { int bit, byte=0; for (bit=0; bit<8; bit++) { byte = (byte << 1) | I2CGetBit(w); } I2CPutBit(w, nack); return byte; } /*-------------------------------------------------------------------------*/ int bbI2COpen(unsigned SDA, unsigned SCL, unsigned baud) { DBG(DBG_USER, "SDA=%d SCL=%d baud=%d", SDA, SCL, baud); CHECK_INITED; if (SDA > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad SDA (%d)", SDA); if (SCL > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad SCL (%d)", SCL); if ((baud < PI_BB_I2C_MIN_BAUD) || (baud > PI_BB_I2C_MAX_BAUD)) SOFT_ERROR(PI_BAD_I2C_BAUD, "SDA %d, bad baud rate (%d)", SDA, baud); if (wfRx[SDA].mode != PI_WFRX_NONE) SOFT_ERROR(PI_GPIO_IN_USE, "gpio %d is already being used", SDA); if ((wfRx[SCL].mode != PI_WFRX_NONE) || (SCL == SDA)) SOFT_ERROR(PI_GPIO_IN_USE, "gpio %d is already being used", SCL); wfRx[SDA].gpio = SDA; wfRx[SDA].mode = PI_WFRX_I2C_SDA; wfRx[SDA].baud = baud; wfRx[SDA].I.started = 0; wfRx[SDA].I.SDA = SDA; wfRx[SDA].I.SCL = SCL; wfRx[SDA].I.delay = 500000 / baud; wfRx[SDA].I.SDAMode = gpioGetMode(SDA); wfRx[SDA].I.SCLMode = gpioGetMode(SCL); wfRx[SCL].gpio = SCL; wfRx[SCL].mode = PI_WFRX_I2C_SCL; myGpioSetMode(SDA, PI_INPUT); myGpioSetMode(SCL, PI_INPUT); return 0; } /* ----------------------------------------------------------------------- */ int bbI2CClose(unsigned SDA) { DBG(DBG_USER, "SDA=%d", SDA); CHECK_INITED; if (SDA > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", SDA); switch(wfRx[SDA].mode) { case PI_WFRX_I2C_SDA: myGpioSetMode(wfRx[SDA].I.SDA, wfRx[SDA].I.SDAMode); myGpioSetMode(wfRx[SDA].I.SCL, wfRx[SDA].I.SCLMode); wfRx[wfRx[SDA].I.SDA].mode = PI_WFRX_NONE; wfRx[wfRx[SDA].I.SCL].mode = PI_WFRX_NONE; break; default: SOFT_ERROR(PI_NOT_I2C_GPIO, "no I2C on gpio (%d)", SDA); break; } return 0; } /*-------------------------------------------------------------------------*/ int bbI2CZip( unsigned SDA, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen) { int i, ack, inPos, outPos, status, bytes; int addr, flags, esc, setesc; wfRx_t *w; DBG(DBG_USER, "gpio=%d inBuf=%s outBuf=%08"PRIXPTR" len=%d", SDA, myBuf2Str(inLen, (char *)inBuf), (uintptr_t)outBuf, outLen); CHECK_INITED; if (SDA > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", SDA); if (wfRx[SDA].mode != PI_WFRX_I2C_SDA) SOFT_ERROR(PI_NOT_I2C_GPIO, "no I2C on gpio (%d)", SDA); if (!inBuf || !inLen) SOFT_ERROR(PI_BAD_POINTER, "input buffer can't be NULL"); if (!outBuf && outLen) SOFT_ERROR(PI_BAD_POINTER, "output buffer can't be NULL"); w = &wfRx[SDA]; inPos = 0; outPos = 0; status = 0; addr = 0; flags = 0; esc = 0; setesc = 0; wfRx_lock(SDA); while (!status && (inPos < inLen)) { DBG(DBG_INTERNAL, "status=%d inpos=%d inlen=%d cmd=%d addr=%d flags=%x", status, inPos, inLen, inBuf[inPos], addr, flags); switch (inBuf[inPos++]) { case PI_I2C_END: status = 1; break; case PI_I2C_START: I2CStart(w); break; case PI_I2C_STOP: I2CStop(w); break; case PI_I2C_ADDR: addr = myI2CGetPar(inBuf, &inPos, inLen, &esc); if (addr < 0) status = PI_BAD_I2C_CMD; break; case PI_I2C_FLAGS: /* cheat to force two byte flags */ esc = 1; flags = myI2CGetPar(inBuf, &inPos, inLen, &esc); if (flags < 0) status = PI_BAD_I2C_CMD; break; case PI_I2C_ESC: setesc = 1; break; case PI_I2C_READ: bytes = myI2CGetPar(inBuf, &inPos, inLen, &esc); if (bytes >= 0) ack = I2CPutByte(w, (addr<<1)|1); if (bytes > 0) { if (!ack) { if ((bytes + outPos) <= outLen) { for (i=0; i<(bytes-1); i++) { outBuf[outPos++] = I2CGetByte(w, 0); } outBuf[outPos++] = I2CGetByte(w, 1); } else status = PI_BAD_I2C_RLEN; } else status = PI_I2C_READ_FAILED; } else status = PI_BAD_I2C_CMD; break; case PI_I2C_WRITE: bytes = myI2CGetPar(inBuf, &inPos, inLen, &esc); if (bytes >= 0) ack = I2CPutByte(w, addr<<1); if (bytes > 0) { if (!ack) { if ((bytes + inPos) <= inLen) { for (i=0; i<(bytes-1); i++) { ack = I2CPutByte(w, inBuf[inPos++]); if (ack) status = PI_I2C_WRITE_FAILED; } ack = I2CPutByte(w, inBuf[inPos++]); } else status = PI_BAD_I2C_WLEN; } else status = PI_I2C_WRITE_FAILED; } else status = PI_BAD_I2C_CMD; break; default: status = PI_BAD_I2C_CMD; } if (setesc) esc = 1; else esc = 0; setesc = 0; } wfRx_unlock(SDA); if (status >= 0) status = outPos; return status; } /* ----------------------------------------------------------------------- */ void bscInit(int mode) { int sda, scl, miso, ce; bscsReg[BSC_CR]=0; /* clear device */ bscsReg[BSC_RSR]=0; /* clear underrun and overrun errors */ bscsReg[BSC_SLV]=0; /* clear I2C slave address */ bscsReg[BSC_IMSC]=0xf; /* mask off all interrupts */ bscsReg[BSC_ICR]=0x0f; /* clear all interrupts */ if (pi_is_2711) { sda = BSC_SDA_MOSI_2711; scl = BSC_SCL_SCLK_2711; miso = BSC_MISO_2711; ce = BSC_CE_N_2711; } else { sda = BSC_SDA_MOSI; scl = BSC_SCL_SCLK; miso = BSC_MISO; ce = BSC_CE_N; } gpioSetMode(sda, PI_ALT3); gpioSetMode(scl, PI_ALT3); if (mode > 1) /* SPI uses all GPIO */ { gpioSetMode(miso, PI_ALT3); gpioSetMode(ce, PI_ALT3); } } void bscTerm(int mode) { int sda, scl, miso, ce; bscsReg[BSC_CR] = 0; /* clear device */ bscsReg[BSC_RSR]=0; /* clear underrun and overrun errors */ bscsReg[BSC_SLV]=0; /* clear I2C slave address */ if (pi_is_2711) { sda = BSC_SDA_MOSI_2711; scl = BSC_SCL_SCLK_2711; miso = BSC_MISO_2711; ce = BSC_CE_N_2711; } else { sda = BSC_SDA_MOSI; scl = BSC_SCL_SCLK; miso = BSC_MISO; ce = BSC_CE_N; } gpioSetMode(sda, PI_INPUT); gpioSetMode(scl, PI_INPUT); if (mode > 1) { gpioSetMode(miso, PI_INPUT); gpioSetMode(ce, PI_INPUT); } } int bscXfer(bsc_xfer_t *xfer) { static int bscMode = 0; int copied=0; int active, mode; DBG(DBG_USER, "control=0x%X (sa=0x%X, cr=0x%X) tx=%d [%s]", xfer->control, ((xfer->control)>>16) & 127, (xfer->control) & 0x3fff, xfer->txCnt, myBuf2Str(xfer->txCnt, (char *)xfer->txBuf)); CHECK_INITED; eventAlert[PI_EVENT_BSC].ignore = 1; if (xfer->control) { /* bscMode (0=None, 1=I2C, 2=SPI) tracks which GPIO have been set to BSC mode */ if (xfer->control & 2) mode = 2; /* SPI */ else mode = 1; /* assume I2C */ if (mode > bscMode) { bscInit(mode); bscMode = mode; } } else { if (bscMode) bscTerm(bscMode); bscMode = 0; return 0; /* leave ignore set */ } xfer->rxCnt = 0; bscsReg[BSC_SLV] = ((xfer->control)>>16) & 127; bscsReg[BSC_CR] = (xfer->control) & 0x3fff; bscsReg[BSC_RSR]=0; /* clear underrun and overrun errors */ active = 1; while (active) { active = 0; while ((copied < xfer->txCnt) && (!(bscsReg[BSC_FR] & BSC_FR_TXFF))) { bscsReg[BSC_DR] = xfer->txBuf[copied++]; active = 1; } while ((xfer->rxCnt < BSC_FIFO_SIZE) && (!(bscsReg[BSC_FR] & BSC_FR_RXFE))) { xfer->rxBuf[xfer->rxCnt++] = bscsReg[BSC_DR]; active = 1; } if (!active) { active = bscsReg[BSC_FR] & (BSC_FR_RXBUSY | BSC_FR_TXBUSY); } if (active) myGpioSleep(0, 20); } bscFR = bscsReg[BSC_FR] & 0xffff; eventAlert[PI_EVENT_BSC].ignore = 0; return (copied<<16) | bscFR; } /* ----------------------------------------------------------------------- */ static void set_CS(wfRx_t *w) { myGpioWrite(w->S.CS, PI_SPI_FLAGS_GET_CSPOL(w->S.spiFlags)); } static void clear_CS(wfRx_t *w) { myGpioWrite(w->S.CS, !PI_SPI_FLAGS_GET_CSPOL(w->S.spiFlags)); } static void set_SCLK(wfRx_t *w) { myGpioWrite(w->S.SCLK, !PI_SPI_FLAGS_GET_CPOL(w->S.spiFlags)); } static void clear_SCLK(wfRx_t *w) { myGpioWrite(w->S.SCLK, PI_SPI_FLAGS_GET_CPOL(w->S.spiFlags)); } static void SPI_delay(wfRx_t *w) { myGpioDelay(w->S.delay); } static void bbSPIStart(wfRx_t *w) { clear_SCLK(w); SPI_delay(w); set_CS(w); SPI_delay(w); } static void bbSPIStop(wfRx_t *w) { SPI_delay(w); clear_CS(w); SPI_delay(w); clear_SCLK(w); } static uint8_t bbSPIXferByte(wfRx_t *w, char txByte) { uint8_t bit, rxByte=0; if (PI_SPI_FLAGS_GET_CPHA(w->S.spiFlags)) { /* CPHA = 1 write on set clock read on clear clock */ for (bit=0; bit<8; bit++) { set_SCLK(w); if (PI_SPI_FLAGS_GET_TX_LSB(w->S.spiFlags)) { myGpioWrite(w->S.MOSI, txByte & 0x01); txByte >>= 1; } else { myGpioWrite(w->S.MOSI, txByte & 0x80); txByte <<= 1; } SPI_delay(w); clear_SCLK(w); if (PI_SPI_FLAGS_GET_RX_LSB(w->S.spiFlags)) { rxByte = (rxByte >> 1) | myGpioRead(w->S.MISO) << 7; } else { rxByte = (rxByte << 1) | myGpioRead(w->S.MISO); } SPI_delay(w); } } else { /* CPHA = 0 read on set clock write on clear clock */ for (bit=0; bit<8; bit++) { if (PI_SPI_FLAGS_GET_TX_LSB(w->S.spiFlags)) { myGpioWrite(w->S.MOSI, txByte & 0x01); txByte >>= 1; } else { myGpioWrite(w->S.MOSI, txByte & 0x80); txByte <<= 1; } SPI_delay(w); set_SCLK(w); if (PI_SPI_FLAGS_GET_RX_LSB(w->S.spiFlags)) { rxByte = (rxByte >> 1) | myGpioRead(w->S.MISO) << 7; } else { rxByte = (rxByte << 1) | myGpioRead(w->S.MISO); } SPI_delay(w); clear_SCLK(w); } } return rxByte; } /*-------------------------------------------------------------------------*/ int bbSPIOpen( unsigned CS, unsigned MISO, unsigned MOSI, unsigned SCLK, unsigned baud, unsigned spiFlags) { int valid; uint32_t bits; DBG(DBG_USER, "CS=%d MISO=%d MOSI=%d SCLK=%d baud=%d flags=%d", CS, MISO, MOSI, SCLK, baud, spiFlags); CHECK_INITED; if (CS > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad CS (%d)", CS); if (MISO > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad MISO (%d)", MISO); if (MOSI > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad MOSI (%d)", MOSI); if (SCLK > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad SCLK (%d)", SCLK); if ((baud < PI_BB_SPI_MIN_BAUD) || (baud > PI_BB_SPI_MAX_BAUD)) SOFT_ERROR(PI_BAD_SPI_BAUD, "CS %d, bad baud (%d)", CS, baud); if (wfRx[CS].mode != PI_WFRX_NONE) SOFT_ERROR(PI_GPIO_IN_USE, "CS %d is already being used, mode %d", CS, wfRx[CS].mode); valid = 0; /* check all GPIO unique */ bits = (1< PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", CS); switch(wfRx[CS].mode) { case PI_WFRX_SPI_CS: myGpioSetMode(wfRx[CS].S.CS, wfRx[CS].S.CSMode); wfRx[CS].mode = PI_WFRX_NONE; SCLK = wfRx[CS].S.SCLK; if (--wfRx[SCLK].S.usage <= 0) { myGpioSetMode(wfRx[SCLK].S.MISO, wfRx[SCLK].S.MISOMode); myGpioSetMode(wfRx[SCLK].S.MOSI, wfRx[SCLK].S.MOSIMode); myGpioSetMode(wfRx[SCLK].S.SCLK, wfRx[SCLK].S.SCLKMode); wfRx[wfRx[SCLK].S.MISO].mode = PI_WFRX_NONE; wfRx[wfRx[SCLK].S.MOSI].mode = PI_WFRX_NONE; wfRx[wfRx[SCLK].S.SCLK].mode = PI_WFRX_NONE; } break; default: SOFT_ERROR(PI_NOT_SPI_GPIO, "no SPI on gpio (%d)", CS); break; } return 0; } /*-------------------------------------------------------------------------*/ int bbSPIXfer( unsigned CS, char *inBuf, char *outBuf, unsigned count) { int SCLK; int pos; wfRx_t *w; DBG(DBG_USER, "CS=%d inBuf=%s outBuf=%08"PRIXPTR" count=%d", CS, myBuf2Str(count, (char *)inBuf), (uintptr_t)outBuf, count); CHECK_INITED; if (CS > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", CS); if (wfRx[CS].mode != PI_WFRX_SPI_CS) SOFT_ERROR(PI_NOT_SPI_GPIO, "no SPI on gpio (%d)", CS); if (!inBuf || !count) SOFT_ERROR(PI_BAD_POINTER, "input buffer can't be NULL"); if (!outBuf && count) SOFT_ERROR(PI_BAD_POINTER, "output buffer can't be NULL"); SCLK = wfRx[CS].S.SCLK; wfRx[SCLK].S.CS = CS; wfRx[SCLK].baud = wfRx[CS].baud; wfRx[SCLK].S.delay = wfRx[CS].S.delay; wfRx[SCLK].S.spiFlags = wfRx[CS].S.spiFlags; w = &wfRx[SCLK]; wfRx_lock(SCLK); bbSPIStart(w); for (pos=0; pos < count; pos++) { outBuf[pos] = bbSPIXferByte(w, inBuf[pos]); } bbSPIStop(w); wfRx_unlock(SCLK); return count; } /*-------------------------------------------------------------------------*/ int gpioSerialReadOpen(unsigned gpio, unsigned baud, unsigned data_bits) { int bitTime, timeout; DBG(DBG_USER, "gpio=%d baud=%d data_bits=%d", gpio, baud, data_bits); CHECK_INITED; if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); if ((baud < PI_BB_SER_MIN_BAUD) || (baud > PI_BB_SER_MAX_BAUD)) SOFT_ERROR(PI_BAD_WAVE_BAUD, "gpio %d, bad baud rate (%d)", gpio, baud); if ((data_bits < PI_MIN_WAVE_DATABITS) || (data_bits > PI_MAX_WAVE_DATABITS)) SOFT_ERROR(PI_BAD_DATABITS, "gpio %d, bad data bits (%d)", gpio, data_bits); if (wfRx[gpio].mode != PI_WFRX_NONE) SOFT_ERROR(PI_GPIO_IN_USE, "gpio %d is already being used", gpio); bitTime = (1000 * MILLION) / baud; /* nanos */ timeout = ((data_bits+2) * bitTime)/MILLION; /* millis */ if (timeout < 1) timeout = 1; wfRx[gpio].gpio = gpio; wfRx[gpio].mode = PI_WFRX_SERIAL; wfRx[gpio].baud = baud; wfRx[gpio].s.buf = malloc(SRX_BUF_SIZE); wfRx[gpio].s.bufSize = SRX_BUF_SIZE; wfRx[gpio].s.timeout = timeout; wfRx[gpio].s.fullBit = bitTime; /* nanos */ wfRx[gpio].s.halfBit = (bitTime/2)+500; /* nanos (500 for rounding) */ wfRx[gpio].s.readPos = 0; wfRx[gpio].s.writePos = 0; wfRx[gpio].s.bit = -1; wfRx[gpio].s.dataBits = data_bits; wfRx[gpio].s.invert = PI_BB_SER_NORMAL; if (data_bits < 9) wfRx[gpio].s.bytes = 1; else if (data_bits < 17) wfRx[gpio].s.bytes = 2; else wfRx[gpio].s.bytes = 4; gpioSetAlertFunc(gpio, waveRxBit); return 0; } /*-------------------------------------------------------------------------*/ int gpioSerialReadInvert(unsigned gpio, unsigned invert) { DBG(DBG_USER, "gpio=%d invert=%d", gpio, invert); CHECK_INITED; if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); if (wfRx[gpio].mode != PI_WFRX_SERIAL) SOFT_ERROR(PI_NOT_SERIAL_GPIO, "no serial read on gpio (%d)", gpio); if ((invert < PI_BB_SER_NORMAL) || (invert > PI_BB_SER_INVERT)) SOFT_ERROR(PI_BAD_SER_INVERT, "bad invert level for gpio %d (%d)", gpio, invert); wfRx[gpio].s.invert = invert; return 0; } /*-------------------------------------------------------------------------*/ int gpioSerialRead(unsigned gpio, void *buf, size_t bufSize) { unsigned bytes=0, wpos; volatile wfRx_t *w; DBG(DBG_USER, "gpio=%d buf=%08"PRIXPTR" bufSize=%zd", gpio, (uintptr_t)buf, bufSize); CHECK_INITED; if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); if (bufSize == 0) SOFT_ERROR(PI_BAD_SERIAL_COUNT, "buffer size can't be zero"); if (wfRx[gpio].mode != PI_WFRX_SERIAL) SOFT_ERROR(PI_NOT_SERIAL_GPIO, "no serial read on gpio (%d)", gpio); w = &wfRx[gpio]; if (w->s.readPos != w->s.writePos) { wpos = w->s.writePos; if (wpos > w->s.readPos) bytes = wpos - w->s.readPos; else bytes = w->s.bufSize - w->s.readPos; if (bytes > bufSize) bytes = bufSize; /* copy in multiples of the data size in bytes */ bytes = (bytes / w->s.bytes) * w->s.bytes; if (buf) memcpy(buf, w->s.buf+w->s.readPos, bytes); w->s.readPos += bytes; if (w->s.readPos >= w->s.bufSize) w->s.readPos = 0; } return bytes; } /*-------------------------------------------------------------------------*/ int gpioSerialReadClose(unsigned gpio) { DBG(DBG_USER, "gpio=%d", gpio); CHECK_INITED; if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); switch(wfRx[gpio].mode) { case PI_WFRX_NONE: SOFT_ERROR(PI_NOT_SERIAL_GPIO, "no serial read on gpio (%d)", gpio); break; case PI_WFRX_SERIAL: free(wfRx[gpio].s.buf); gpioSetWatchdog(gpio, 0); /* switch off timeouts */ gpioSetAlertFunc(gpio, NULL); /* cancel alert */ wfRx[gpio].mode = PI_WFRX_NONE; break; } return 0; } /* ----------------------------------------------------------------------- */ static int intEventSetFunc( unsigned event, void * f, int user, void * userdata) { DBG(DBG_INTERNAL, "event=%d function=%08"PRIXPTR", user=%d, userdata=%08"PRIXPTR, event, (uintptr_t)f, user, (uintptr_t)userdata); eventAlert[event].ex = user; eventAlert[event].userdata = userdata; eventAlert[event].func = f; return 0; } /* ----------------------------------------------------------------------- */ int eventSetFunc(unsigned event, eventFunc_t f) { DBG(DBG_USER, "event=%d function=%08"PRIXPTR, event, (uintptr_t)f); CHECK_INITED; if (event > PI_MAX_EVENT) SOFT_ERROR(PI_BAD_EVENT_ID, "bad event (%d)", event); intEventSetFunc(event, f, 0, NULL); return 0; } /* ----------------------------------------------------------------------- */ int eventSetFuncEx(unsigned event, eventFuncEx_t f, void *userdata) { DBG(DBG_USER, "event=%d function=%08"PRIxPTR" userdata=%08"PRIxPTR, event, (uintptr_t)f, (uintptr_t)userdata); CHECK_INITED; if (event > PI_MAX_EVENT) SOFT_ERROR(PI_BAD_EVENT_ID, "bad event (%d)", event); intEventSetFunc(event, f, 1, userdata); return 0; } /* ----------------------------------------------------------------------- */ int eventMonitor(unsigned handle, uint32_t bits) { DBG(DBG_USER, "handle=%d bits=%08X", handle, bits); CHECK_INITED; if (handle >= PI_NOTIFY_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (gpioNotify[handle].state <= PI_NOTIFY_CLOSING) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); gpioNotify[handle].eventBits = bits; return 0; } /* ----------------------------------------------------------------------- */ int eventTrigger(unsigned event) { DBG(DBG_USER, "event=%d", event); CHECK_INITED; if (event > PI_MAX_EVENT) SOFT_ERROR(PI_BAD_EVENT_ID, "bad event (%d)", event); eventAlert[event].fired = 1; return 0; } /* ----------------------------------------------------------------------- */ static int intGpioSetAlertFunc( unsigned gpio, void * f, int user, void * userdata) { DBG(DBG_INTERNAL, "gpio=%d function=%08"PRIXPTR", user=%d, userdata=%08"PRIXPTR, gpio, (uintptr_t)f, user, (uintptr_t)userdata); gpioAlert[gpio].ex = user; gpioAlert[gpio].userdata = userdata; gpioAlert[gpio].func = f; if (f) { alertBits |= BIT; } else { alertBits &= ~BIT; } monitorBits = alertBits | notifyBits | scriptBits | gpioGetSamples.bits; return 0; } /* ----------------------------------------------------------------------- */ int gpioSetAlertFunc(unsigned gpio, gpioAlertFunc_t f) { DBG(DBG_USER, "gpio=%d function=%08"PRIXPTR, gpio, (uintptr_t)f); CHECK_INITED; if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); intGpioSetAlertFunc(gpio, f, 0, NULL); return 0; } /* ----------------------------------------------------------------------- */ int gpioSetAlertFuncEx(unsigned gpio, gpioAlertFuncEx_t f, void *userdata) { DBG(DBG_USER, "gpio=%d function=%08"PRIXPTR" userdata=%08"PRIXPTR, gpio, (uintptr_t)f, (uintptr_t)userdata); CHECK_INITED; if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); intGpioSetAlertFunc(gpio, f, 1, userdata); return 0; } static void *pthISRThread(void *x) { gpioISR_t *isr = x; int fd; int retval; uint32_t tick; int level; uint32_t levels; struct pollfd pfd; char buf[64]; DBG(DBG_USER, "gpio=%d edge=%d timeout=%d f=%"PRIxPTR" u=%d data=%"PRIxPTR, isr->gpio, isr->edge, isr->timeout, (uintptr_t)isr->func, isr->ex, (uintptr_t)isr->userdata); sprintf(buf, "/sys/class/gpio/gpio%d/value", isr->gpio); isr->fd = -1; /* no fd assigned */ if ((fd = open(buf, O_RDONLY)) < 0) { DBG(DBG_ALWAYS, "gpio %d not exported", isr->gpio); return NULL; } isr->fd = fd; /* store fd so it can be closed */ pfd.fd = fd; pfd.events = POLLPRI; lseek(fd, 0, SEEK_SET); /* consume any prior interrupt */ if (read(fd, buf, sizeof buf) == -1) { /* ignore errors */ } while (1) { retval = poll(&pfd, 1, isr->timeout); /* wait for interrupt */ tick = systReg[SYST_CLO]; levels = *(gpioReg + GPLEV0); if (retval >= 0) { lseek(fd, 0, SEEK_SET); /* consume interrupt */ if (read(fd, buf, sizeof buf) == -1) { /* ignore errors */ } if (retval) { if (levels & (1<gpio)) level = PI_ON; else level = PI_OFF; } else level = PI_TIMEOUT; if (isr->ex) (isr->func)(isr->gpio, level, tick, isr->userdata); else (isr->func)(isr->gpio, level, tick); } } return NULL; } /* ----------------------------------------------------------------------- */ static int intGpioSetISRFunc( unsigned gpio, unsigned edge, int timeout, void *f, int user, void *userdata) { char buf[64]; char *edge_str[]={"rising\n", "falling\n", "both\n"}; int fd; int err; DBG(DBG_INTERNAL, "gpio=%d edge=%d timeout=%d function=%08"PRIXPTR" user=%d userdata=%08"PRIXPTR, gpio, edge, timeout, (uintptr_t)f, user, (uintptr_t)userdata); if (f) { if (!gpioISR[gpio].inited) /* export gpio if unexported */ { fd = open("/sys/class/gpio/export", O_WRONLY); if (fd < 0) return PI_BAD_ISR_INIT; /* ignore write fail if already exported */ sprintf(buf, "%d\n", gpio); err = write(fd, buf, strlen(buf)); close(fd); sprintf(buf, "/sys/class/gpio/gpio%d/direction", gpio); fd = open(buf, O_WRONLY); if (fd < 0) return PI_BAD_ISR_INIT; err = write(fd, "in\n", 3); close(fd); if (err != 3) return PI_BAD_ISR_INIT; gpioISR[gpio].gpio = gpio; gpioISR[gpio].edge = -1; gpioISR[gpio].timeout = -1; gpioISR[gpio].inited = 1; } if (gpioISR[gpio].edge != edge) { sprintf(buf, "/sys/class/gpio/gpio%d/edge", gpio); fd = open(buf, O_WRONLY); if (fd < 0) return PI_BAD_ISR_INIT; err = write(fd, edge_str[edge], strlen(edge_str[edge])); close(fd); if (err != strlen(edge_str[edge])) return PI_BAD_ISR_INIT; gpioISR[gpio].edge = edge; if (gpioISR[gpio].pth != NULL) pthread_kill(*gpioISR[gpio].pth, SIGCHLD); } if (timeout <= 0) timeout = -1; if (gpioISR[gpio].timeout != timeout) { gpioISR[gpio].timeout = timeout; if (gpioISR[gpio].pth != NULL) pthread_kill(*gpioISR[gpio].pth, SIGCHLD); } gpioISR[gpio].func = f; gpioISR[gpio].ex = user; gpioISR[gpio].userdata = userdata; if (gpioISR[gpio].pth == NULL) gpioISR[gpio].pth = gpioStartThread(pthISRThread, &gpioISR[gpio]); } else /* null function, delete ISR, unexport gpio */ { if (gpioISR[gpio].pth) /* delete any existing ISR */ { gpioStopThread(gpioISR[gpio].pth); if (gpioISR[gpio].fd >= 0) { close(gpioISR[gpio].fd); gpioISR[gpio].fd = -1; } gpioISR[gpio].func = NULL; gpioISR[gpio].pth = NULL; } if (gpioISR[gpio].inited) /* unexport the gpio */ { fd = open("/sys/class/gpio/unexport", O_WRONLY); if (fd < 0) return PI_BAD_ISR_INIT; sprintf(buf, "%d\n", gpio); err = write(fd, buf, strlen(buf)); close(fd); if (err != strlen(buf)) return PI_BAD_ISR_INIT; gpioISR[gpio].inited = 0; } } return 0; } /* ----------------------------------------------------------------------- */ int gpioSetISRFunc( unsigned gpio, unsigned edge, int timeout, gpioISRFunc_t f) { DBG(DBG_USER, "gpio=%d edge=%d timeout=%d function=%08"PRIXPTR, gpio, edge, timeout, (uintptr_t)f); CHECK_INITED; if (gpio > PI_MAX_GPIO) SOFT_ERROR(PI_BAD_GPIO, "bad gpio (%d)", gpio); if (edge > EITHER_EDGE) SOFT_ERROR(PI_BAD_EDGE, "bad ISR edge (%d)", edge); return intGpioSetISRFunc(gpio, edge, timeout, f, 0, NULL); } /* ----------------------------------------------------------------------- */ int gpioSetISRFuncEx( unsigned gpio, unsigned edge, int timeout, gpioAlertFuncEx_t f, void *userdata) { DBG(DBG_USER, "gpio=%d edge=%d timeout=%d function=%08"PRIXPTR" userdata=%08"PRIXPTR, gpio, edge, timeout, (uintptr_t)f, (uintptr_t)userdata); CHECK_INITED; if (gpio > PI_MAX_GPIO) SOFT_ERROR(PI_BAD_GPIO, "bad gpio (%d)", gpio); if (edge > EITHER_EDGE) SOFT_ERROR(PI_BAD_EDGE, "bad ISR edge (%d)", edge); return intGpioSetISRFunc(gpio, edge, timeout, f, 1, userdata); } static void closeOrphanedNotifications(int slot, int fd) { int i; /* Check for and close any orphaned notifications. */ for (i=0; i= PI_NOTIFY_OPENED) && (gpioNotify[i].fd == fd)) { DBG(DBG_USER, "closed orphaned fd=%d (handle=%d)", fd, i); gpioNotify[i].state = PI_NOTIFY_CLOSED; intNotifyBits(); } } } /* ----------------------------------------------------------------------- */ static void notifyMutex(int lock) { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; if (lock) pthread_mutex_lock(&mutex); else pthread_mutex_unlock(&mutex); } /* ----------------------------------------------------------------------- */ int gpioNotifyOpenWithSize(int bufSize) { int i, slot, fd; char name[32]; DBG(DBG_USER, "bufSize=%d", bufSize); CHECK_INITED; slot = -1; notifyMutex(1); for (i=0; i= PI_NOTIFY_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (gpioNotify[handle].state <= PI_NOTIFY_CLOSING) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); gpioNotify[handle].bits = bits; gpioNotify[handle].state = PI_NOTIFY_RUNNING; intNotifyBits(); return 0; } /* ----------------------------------------------------------------------- */ int gpioNotifyPause (unsigned handle) { DBG(DBG_USER, "handle=%d", handle); CHECK_INITED; if (handle >= PI_NOTIFY_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (gpioNotify[handle].state <= PI_NOTIFY_CLOSING) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); gpioNotify[handle].bits = 0; gpioNotify[handle].state = PI_NOTIFY_PAUSED; intNotifyBits(); return 0; } /* ----------------------------------------------------------------------- */ int gpioNotifyClose(unsigned handle) { char fifo[32]; DBG(DBG_USER, "handle=%d", handle); CHECK_INITED; if (handle >= PI_NOTIFY_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (gpioNotify[handle].state <= PI_NOTIFY_CLOSING) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); gpioNotify[handle].bits = 0; gpioNotify[handle].state = PI_NOTIFY_CLOSING; intNotifyBits(); if (gpioCfg.ifFlags & PI_DISABLE_ALERT) { if (gpioNotify[handle].pipe) { DBG(DBG_INTERNAL, "close notify pipe %d", gpioNotify[handle].fd); close(gpioNotify[handle].fd); sprintf(fifo, "/dev/pigpio%d", handle); unlink(fifo); } gpioNotify[handle].state = PI_NOTIFY_CLOSED; } else { /* actual close done in alert thread */ } return 0; } /* ----------------------------------------------------------------------- */ int gpioTrigger(unsigned gpio, unsigned pulseLen, unsigned level) { DBG(DBG_USER, "gpio=%d pulseLen=%d level=%d", gpio, pulseLen, level); CHECK_INITED; if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); if (level > PI_ON) SOFT_ERROR(PI_BAD_LEVEL, "gpio %d, bad level (%d)", gpio, level); if ((pulseLen > PI_MAX_BUSY_DELAY) || (!pulseLen)) SOFT_ERROR(PI_BAD_PULSELEN, "gpio %d, bad pulseLen (%d)", gpio, pulseLen); if (level == PI_OFF) *(gpioReg + GPCLR0 + BANK) = BIT; else *(gpioReg + GPSET0 + BANK) = BIT; myGpioDelay(pulseLen); if (level != PI_OFF) *(gpioReg + GPCLR0 + BANK) = BIT; else *(gpioReg + GPSET0 + BANK) = BIT; return 0; } /* ----------------------------------------------------------------------- */ int gpioSetWatchdog(unsigned gpio, unsigned timeout) { DBG(DBG_USER, "gpio=%d timeout=%d", gpio, timeout); CHECK_INITED; if (gpio > PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); if (timeout > PI_MAX_WDOG_TIMEOUT) SOFT_ERROR(PI_BAD_WDOG_TIMEOUT, "gpio %d, bad timeout (%d)", gpio, timeout); gpioAlert[gpio].wdTick = systReg[SYST_CLO]; gpioAlert[gpio].wdSteadyUs = timeout*1000; if (timeout) wdogBits |= (1< PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); if (steady > PI_MAX_STEADY) SOFT_ERROR(PI_BAD_FILTER, "bad steady (%d)", steady); if (active > PI_MAX_ACTIVE) SOFT_ERROR(PI_BAD_FILTER, "bad active (%d)", active); gpioAlert[gpio].nfTick1 = systReg[SYST_CLO]; gpioAlert[gpio].nfTick2 = gpioAlert[gpio].nfTick1; gpioAlert[gpio].nfSteadyUs = steady; gpioAlert[gpio].nfActiveUs = active; gpioAlert[gpio].nfActive = 0; if (steady) nFilterBits |= (1< PI_MAX_USER_GPIO) SOFT_ERROR(PI_BAD_USER_GPIO, "bad gpio (%d)", gpio); if (steady > PI_MAX_STEADY) SOFT_ERROR(PI_BAD_FILTER, "bad steady (%d)", steady); if (steady) { /* Initialise values next time we process alerts */ gpioAlert[gpio].gfInitialised = 0; } gpioAlert[gpio].gfSteadyUs = steady; if (steady) gFilterBits |= (1< PI_MAX_TIMER) SOFT_ERROR(PI_BAD_TIMER, "bad timer id (%d)", id); if ((millis < PI_MIN_MS) || (millis > PI_MAX_MS)) SOFT_ERROR(PI_BAD_MS, "timer %d, bad millis (%d)", id, millis); intGpioSetTimerFunc(id, millis, f, 0, NULL); return 0; } /* ----------------------------------------------------------------------- */ int gpioSetTimerFuncEx(unsigned id, unsigned millis, gpioTimerFuncEx_t f, void * userdata) { DBG(DBG_USER, "id=%d millis=%d function=%08"PRIXPTR", userdata=%08"PRIXPTR, id, millis, (uintptr_t)f, (uintptr_t)userdata); CHECK_INITED; if (id > PI_MAX_TIMER) SOFT_ERROR(PI_BAD_TIMER, "bad timer id (%d)", id); if ((millis < PI_MIN_MS) || (millis > PI_MAX_MS)) SOFT_ERROR(PI_BAD_MS, "timer %d, bad millis (%d)", id, millis); intGpioSetTimerFunc(id, millis, f, 1, userdata); return 0; } /* ----------------------------------------------------------------------- */ pthread_t *gpioStartThread(gpioThreadFunc_t f, void *userdata) { pthread_t *pth; pthread_attr_t pthAttr; DBG(DBG_USER, "f=%08"PRIXPTR", userdata=%08"PRIXPTR, (uintptr_t)f, (uintptr_t)userdata); CHECK_INITED_RET_NULL_PTR; pth = malloc(sizeof(pthread_t)); if (pth) { if (pthread_attr_init(&pthAttr)) { free(pth); SOFT_ERROR(NULL, "pthread_attr_init failed"); } if (pthread_attr_setstacksize(&pthAttr, STACK_SIZE)) { free(pth); SOFT_ERROR(NULL, "pthread_attr_setstacksize failed"); } if (pthread_create(pth, &pthAttr, f, userdata)) { free(pth); SOFT_ERROR(NULL, "pthread_create failed"); } } return pth; } /* ----------------------------------------------------------------------- */ void gpioStopThread(pthread_t *pth) { DBG(DBG_USER, "pth=%08"PRIXPTR, (uintptr_t)pth); CHECK_INITED_RET_NIL; if (pth) { if (pthread_self() == *pth) { free(pth); pthread_exit(NULL); } else { pthread_cancel(*pth); pthread_join(*pth, NULL); free(pth); } } } /* ----------------------------------------------------------------------- */ int gpioStoreScript(char *script) { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; gpioScript_t *s; int status, slot, i; DBG(DBG_USER, "script=[%s]", script); CHECK_INITED; slot = -1; pthread_mutex_lock(&mutex); for (i=0; iscript, 0); if (status == 0) { s->request = PI_SCRIPT_HALT; s->run_state = PI_SCRIPT_INITING; pthread_cond_init(&s->pthCond, NULL); pthread_mutex_init(&s->pthMutex, NULL); s->id = slot; gpioScript[slot].state = PI_SCRIPT_IN_USE; s->pthIdp = gpioStartThread(pthScript, s); status = slot; } else { if (s->script.par) free(s->script.par); s->script.par = NULL; gpioScript[slot].state = PI_SCRIPT_FREE; } return status; } /* ----------------------------------------------------------------------- */ int gpioRunScript(unsigned script_id, unsigned numParam, uint32_t *param) { int status = 0; DBG(DBG_USER, "script_id=%d numParam=%d param=%08"PRIXPTR, script_id, numParam, (uintptr_t)param); CHECK_INITED; if (script_id >= PI_MAX_SCRIPTS) SOFT_ERROR(PI_BAD_SCRIPT_ID, "bad script id(%d)", script_id); if (numParam > PI_MAX_SCRIPT_PARAMS) SOFT_ERROR(PI_TOO_MANY_PARAM, "bad number of parameters(%d)", numParam); if (gpioScript[script_id].state == PI_SCRIPT_IN_USE) { pthread_mutex_lock(&gpioScript[script_id].pthMutex); if (gpioScript[script_id].run_state != PI_SCRIPT_INITING) { if ((numParam > 0) && (param != 0)) { memcpy(gpioScript[script_id].script.par, param, sizeof(uint32_t) * numParam); } gpioScript[script_id].request = PI_SCRIPT_RUN; pthread_cond_signal(&gpioScript[script_id].pthCond); } else { status = PI_SCRIPT_NOT_READY; } pthread_mutex_unlock(&gpioScript[script_id].pthMutex); return status; } else { return PI_BAD_SCRIPT_ID; } } /* ----------------------------------------------------------------------- */ int gpioUpdateScript(unsigned script_id, unsigned numParam, uint32_t *param) { DBG(DBG_USER, "script_id=%d numParam=%d param=%08"PRIXPTR, script_id, numParam, (uintptr_t)param); CHECK_INITED; if (script_id >= PI_MAX_SCRIPTS) SOFT_ERROR(PI_BAD_SCRIPT_ID, "bad script id(%d)", script_id); if (numParam > PI_MAX_SCRIPT_PARAMS) SOFT_ERROR(PI_TOO_MANY_PARAM, "bad number of parameters(%d)", numParam); if (gpioScript[script_id].state == PI_SCRIPT_IN_USE) { if ((numParam > 0) && (param != 0)) { memcpy(gpioScript[script_id].script.par, param, sizeof(uint32_t) * numParam); } } else { return PI_BAD_SCRIPT_ID; } return 0; } /* ----------------------------------------------------------------------- */ int gpioScriptStatus(unsigned script_id, uint32_t *param) { DBG(DBG_USER, "script_id=%d param=%08"PRIXPTR, script_id, (uintptr_t)param); CHECK_INITED; if (script_id >= PI_MAX_SCRIPTS) SOFT_ERROR(PI_BAD_SCRIPT_ID, "bad script id(%d)", script_id); if (gpioScript[script_id].state == PI_SCRIPT_IN_USE) { if (param != NULL) { memcpy(param, gpioScript[script_id].script.par, sizeof(uint32_t) * PI_MAX_SCRIPT_PARAMS); } return gpioScript[script_id].run_state; } else return PI_BAD_SCRIPT_ID; } /* ----------------------------------------------------------------------- */ int gpioStopScript(unsigned script_id) { DBG(DBG_USER, "script_id=%d", script_id); CHECK_INITED; if (script_id >= PI_MAX_SCRIPTS) SOFT_ERROR(PI_BAD_SCRIPT_ID, "bad script id(%d)", script_id); if (gpioScript[script_id].state == PI_SCRIPT_IN_USE) { pthread_mutex_lock(&gpioScript[script_id].pthMutex); gpioScript[script_id].request = PI_SCRIPT_HALT; if (gpioScript[script_id].run_state == PI_SCRIPT_WAITING) { pthread_cond_signal(&gpioScript[script_id].pthCond); } pthread_mutex_unlock(&gpioScript[script_id].pthMutex); return 0; } else return PI_BAD_SCRIPT_ID; } /* ----------------------------------------------------------------------- */ int gpioDeleteScript(unsigned script_id) { DBG(DBG_USER, "script_id=%d", script_id); CHECK_INITED; if (script_id >= PI_MAX_SCRIPTS) SOFT_ERROR(PI_BAD_SCRIPT_ID, "bad script id(%d)", script_id); if (gpioScript[script_id].state == PI_SCRIPT_IN_USE) { gpioScript[script_id].state = PI_SCRIPT_DYING; pthread_mutex_lock(&gpioScript[script_id].pthMutex); gpioScript[script_id].request = PI_SCRIPT_HALT; if (gpioScript[script_id].run_state == PI_SCRIPT_WAITING) { pthread_cond_signal(&gpioScript[script_id].pthCond); } pthread_mutex_unlock(&gpioScript[script_id].pthMutex); while (gpioScript[script_id].run_state == PI_SCRIPT_RUNNING) { myGpioSleep(0, 5000); /* give script time to halt */ } gpioStopThread(gpioScript[script_id].pthIdp); if (gpioScript[script_id].script.par) free(gpioScript[script_id].script.par); gpioScript[script_id].script.par = NULL; gpioScript[script_id].state = PI_SCRIPT_FREE; return 0; } else return PI_BAD_SCRIPT_ID; } /* ----------------------------------------------------------------------- */ int gpioSetSignalFunc(unsigned signum, gpioSignalFunc_t f) { DBG(DBG_USER, "signum=%d function=%08"PRIXPTR, signum, (uintptr_t)f); CHECK_INITED; if (signum > PI_MAX_SIGNUM) SOFT_ERROR(PI_BAD_SIGNUM, "bad signum (%d)", signum); gpioSignal[signum].ex = 0; gpioSignal[signum].userdata = NULL; gpioSignal[signum].func = f; return 0; } /* ----------------------------------------------------------------------- */ int gpioSetSignalFuncEx(unsigned signum, gpioSignalFuncEx_t f, void *userdata) { DBG(DBG_USER, "signum=%d function=%08"PRIXPTR" userdata=%08"PRIXPTR, signum, (uintptr_t)f, (uintptr_t)userdata); CHECK_INITED; if (signum > PI_MAX_SIGNUM) SOFT_ERROR(PI_BAD_SIGNUM, "bad signum (%d)", signum); gpioSignal[signum].ex = 1; gpioSignal[signum].userdata = userdata; gpioSignal[signum].func = f; return 0; } /* ----------------------------------------------------------------------- */ uint32_t gpioRead_Bits_0_31(void) { DBG(DBG_USER, ""); CHECK_INITED; return (*(gpioReg + GPLEV0)); } /* ----------------------------------------------------------------------- */ uint32_t gpioRead_Bits_32_53(void) { DBG(DBG_USER, ""); CHECK_INITED; return (*(gpioReg + GPLEV1)); } /* ----------------------------------------------------------------------- */ int gpioWrite_Bits_0_31_Clear(uint32_t bits) { DBG(DBG_USER, "bits=%08X", bits); CHECK_INITED; *(gpioReg + GPCLR0) = bits; return 0; } /* ----------------------------------------------------------------------- */ int gpioWrite_Bits_32_53_Clear(uint32_t bits) { DBG(DBG_USER, "bits=%08X", bits); CHECK_INITED; *(gpioReg + GPCLR1) = bits; return 0; } /* ----------------------------------------------------------------------- */ int gpioWrite_Bits_0_31_Set(uint32_t bits) { DBG(DBG_USER, "bits=%08X", bits); CHECK_INITED; *(gpioReg + GPSET0) = bits; return 0; } /* ----------------------------------------------------------------------- */ int gpioWrite_Bits_32_53_Set(uint32_t bits) { DBG(DBG_USER, "bits=%08X", bits); CHECK_INITED; *(gpioReg + GPSET1) = bits; return 0; } /* ----------------------------------------------------------------------- */ int gpioHardwareClock(unsigned gpio, unsigned frequency) { int cctl[] = {CLK_GP0_CTL, CLK_GP1_CTL, CLK_GP2_CTL}; int cdiv[] = {CLK_GP0_DIV, CLK_GP1_DIV, CLK_GP2_DIV}; int csrc[CLK_SRCS] = {CLK_CTL_SRC_OSC, CLK_CTL_SRC_PLLD}; uint32_t cfreq[CLK_SRCS]={clk_osc_freq, clk_plld_freq}; unsigned clock, mode, mash; int password = 0; double f; clkInf_t clkInf={0,0,0}; DBG(DBG_USER, "gpio=%d frequency=%d", gpio, frequency); CHECK_INITED; if ((gpio >> 24) == 0x5A) password = 1; gpio &= 0xFFFFFF; if (gpio > PI_MAX_GPIO) SOFT_ERROR(PI_BAD_GPIO, "bad gpio (%d)", gpio); if (!clkDef[gpio]) SOFT_ERROR(PI_NOT_HCLK_GPIO, "bad gpio for clock (%d)", gpio); if (((frequency < hw_clk_min_freq) || (frequency > hw_clk_max_freq)) && (frequency)) SOFT_ERROR(PI_BAD_HCLK_FREQ, "bad hardware clock frequency %d-%d: (%d)", hw_clk_min_freq, hw_clk_max_freq, frequency); clock = (clkDef[gpio] >> 4) & 3; if ((clock == 1) && (!password)) SOFT_ERROR(PI_BAD_HCLK_PASS, "Need password to use clock 1 (%d)", gpio); mode = clkDef[gpio] & 7; mash = frequency < PI_MASH_MAX_FREQ ? 1 : 0; if (frequency) { if (chooseBestClock(&clkInf, frequency, CLK_SRCS, cfreq)) { if (clkInf.frac == 0) mash = 0; initHWClk(cctl[clock], cdiv[clock], csrc[clkInf.clock], clkInf.div, clkInf.frac, mash); myGpioSetMode(gpio, mode); gpioInfo[gpio].is = GPIO_HW_CLK; f = (double) cfreq[clkInf.clock] / ((double)clkInf.div + ((double)clkInf.frac / 4096.0)); hw_clk_freq[clock] = (f + 0.5); DBG(DBG_USER, "cf=%d div=%d frac=%d mash=%d", cfreq[clkInf.clock], clkInf.div, clkInf.frac, mash); } else { SOFT_ERROR(PI_BAD_HCLK_FREQ, "bad hardware clock frequency %d-%d: (%d)", hw_clk_min_freq, hw_clk_max_freq, frequency); } } else { /* frequency 0, stop clock */ clkReg[cctl[clock]] = BCM_PASSWD | CLK_CTL_KILL; if (gpioInfo[gpio].is == GPIO_HW_CLK) gpioInfo[gpio].is = GPIO_UNDEFINED; } return 0; } /* ----------------------------------------------------------------------- */ int gpioHardwarePWM( unsigned gpio, unsigned frequency, unsigned dutycycle) { uint32_t old_PWM_CTL; unsigned pwm, mode; uint32_t real_range, real_dutycycle; DBG(DBG_USER, "gpio=%d frequency=%d dutycycle=%d", gpio, frequency, dutycycle); CHECK_INITED; if (gpio > PI_MAX_GPIO) SOFT_ERROR(PI_BAD_GPIO, "bad gpio (%d)", gpio); if (!PWMDef[gpio]) SOFT_ERROR(PI_NOT_HPWM_GPIO, "bad gpio for PWM (%d)", gpio); if (dutycycle > PI_HW_PWM_RANGE) SOFT_ERROR(PI_BAD_HPWM_DUTY, "bad PWM dutycycle (%d)", dutycycle); if (((frequency < PI_HW_PWM_MIN_FREQ) || (frequency > hw_pwm_max_freq)) && (frequency)) SOFT_ERROR(PI_BAD_HPWM_FREQ, "bad hardware PWM frequency %d-%d: (%d)", PI_HW_PWM_MIN_FREQ, hw_pwm_max_freq, frequency); if (gpioCfg.clockPeriph == PI_CLOCK_PWM) SOFT_ERROR(PI_HPWM_ILLEGAL, "illegal, PWM in use for main clock"); pwm = (PWMDef[gpio] >> 4) & 3; mode = PWMDef[gpio] & 7; if (frequency) { real_range = ((double)clk_plld_freq / (2.0 * frequency)) + 0.5; real_dutycycle = ((uint64_t)dutycycle * real_range) / PI_HW_PWM_RANGE; /* record the set PWM frequency and dutycycle */ hw_pwm_freq[pwm] = ((double)clk_plld_freq / ( 2.0 * real_range)) + 0.5; hw_pwm_duty[pwm] = dutycycle; hw_pwm_real_range[pwm] = real_range; /* Abort any waveform transmission in progress */ if (gpioWaveTxBusy()) gpioWaveTxStop(); waveClockInited = 0; /* preserve channel enable only and mark space mode */ old_PWM_CTL = pwmReg[PWM_CTL] & (PWM_CTL_PWEN1 | PWM_CTL_MSEN1 | PWM_CTL_PWEN2 | PWM_CTL_MSEN2); if (!PWMClockInited) { pwmReg[PWM_CTL] = 0; myGpioDelay(10); initHWClk(CLK_PWMCTL, CLK_PWMDIV, CLK_CTL_SRC_PLLD, 2, 0, 0); PWMClockInited = 1; } if (pwm == 0) { pwmReg[PWM_RNG1] = real_range; myGpioDelay(10); pwmReg[PWM_DAT1] = real_dutycycle; myGpioDelay(10); pwmReg[PWM_CTL] = (old_PWM_CTL | PWM_CTL_PWEN1 | PWM_CTL_MSEN1); } else { pwmReg[PWM_RNG2] = real_range; myGpioDelay(10); pwmReg[PWM_DAT2] = real_dutycycle; myGpioDelay(10); pwmReg[PWM_CTL] = (old_PWM_CTL | PWM_CTL_PWEN2 | PWM_CTL_MSEN2); } if (gpioInfo[gpio].is != GPIO_HW_PWM) { switchFunctionOff(gpio); myGpioSetMode(gpio, mode); gpioInfo[gpio].is = GPIO_HW_PWM; } } else { /* frequency 0, stop PWM */ if (gpioInfo[gpio].is == GPIO_HW_PWM) { if (pwm == 0) pwmReg[PWM_CTL] &= (~PWM_CTL_PWEN1); else pwmReg[PWM_CTL] &= (~PWM_CTL_PWEN2); gpioInfo[gpio].is = GPIO_UNDEFINED; } } return 0; } int gpioSetPad(unsigned pad, unsigned padStrength) { DBG(DBG_USER, "pad=%d padStrength=%d", pad, padStrength); CHECK_INITED; if (pad > PI_MAX_PAD) SOFT_ERROR(PI_BAD_PAD, "bad pad number (%d)", pad); if ((padStrength < PI_MIN_PAD_STRENGTH) || (padStrength > PI_MAX_PAD_STRENGTH)) SOFT_ERROR(PI_BAD_STRENGTH, "bad pad drive strength (%d)", pad); /* 1-16 -> 0-7 */ padStrength += 1; padStrength /= 2; padStrength -= 1; padsReg[11+pad] = BCM_PASSWD | 0x18 | (padStrength & 7) ; return 0; } int gpioGetPad(unsigned pad) { int strength; DBG(DBG_USER, "pad=%d", pad); CHECK_INITED; if (pad > PI_MAX_PAD) SOFT_ERROR(PI_BAD_PAD, "bad pad (%d)", pad); strength = padsReg[11+pad] & 7; strength *= 2; strength += 2; return strength; } int shell(char *scriptName, char *scriptString) { int status; char buf[4096]; DBG(DBG_USER, "name=%s string=%s", scriptName, scriptString); CHECK_INITED; if (!myScriptNameValid(scriptName)) SOFT_ERROR(PI_BAD_SCRIPT_NAME, "bad script name (%s)", scriptName); snprintf(buf, sizeof(buf), "/opt/pigpio/cgi/%s %s", scriptName, scriptString); DBG(DBG_USER, "%s", buf); status = system(buf); if (status < 0) status = PI_BAD_SHELL_STATUS; return status; } int fileApprove(char *filename) { char match[PI_MAX_PATH]; char buffer[PI_MAX_PATH]; char line[PI_MAX_PATH]; char mperm=0; char perm; char term; FILE *f; buffer[0] = 0; match[0] = 0; if (myPathBad(filename)) return PI_FILE_NONE; f = fopen("/opt/pigpio/access", "r"); if (!f) return PI_FILE_NONE; while (!feof(f)) { buffer[0] = 0; perm = 0; term = 0; if (fgets(line, sizeof(line), f)) { sscanf(line, " %511s %c%c", buffer, &perm, &term); if (term == 10) { if (myPathBad(buffer)) continue; /* disallow risky lines */ if (fnmatch(buffer, filename, 0) == 0) { if (match[0]) { if (fnmatch(match, buffer, 0) == 0) { strcpy(match, buffer); mperm = perm; } } else { strcpy(match, buffer); mperm = perm; } } } } } fclose(f); if (match[0]) { switch (toupper(mperm)) { case 'R': return PI_FILE_READ; case 'W': return PI_FILE_WRITE; case 'U': return PI_FILE_RW; default : return PI_FILE_NONE; } } return PI_FILE_NONE; } int fileOpen(char *file, unsigned mode) { static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; int fd=-1; int i, slot, oflag, omode, pmode, rmode; struct stat statbuf; DBG(DBG_USER, "file=%s mode=%d", file, mode); CHECK_INITED; if ( (mode < PI_FILE_MIN) || (mode > PI_FILE_MAX) || ((mode & PI_FILE_RW) == 0) ) SOFT_ERROR(PI_BAD_FILE_MODE, "bad mode (%d)", mode); pmode = fileApprove(file); // 0=NONE, 1=READ, 2=WRITE, 3=RW rmode = mode & PI_FILE_RW; // 0=NONE, 1=READ, 2=WRITE, 3=RW if (((pmode & rmode) != rmode) || (rmode == PI_FILE_NONE)) SOFT_ERROR(PI_NO_FILE_ACCESS, "no permission to access file (%s)", file); if ((mode > 3) && ((mode & PI_FILE_WRITE) == 0)) SOFT_ERROR(PI_NO_FILE_ACCESS, "no permission to write file (%s)", file); slot = -1; pthread_mutex_lock(&mutex); for (i=0; i= PI_FILE_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (fileInfo[handle].state != PI_FILE_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (fileInfo[handle].fd >= 0) close(fileInfo[handle].fd); fileInfo[handle].fd = -1; fileInfo[handle].state = PI_FILE_CLOSED; return 0; } int fileWrite(unsigned handle, char *buf, unsigned count) { int w; DBG(DBG_USER, "handle=%d count=%d [%s]", handle, count, myBuf2Str(count, buf)); CHECK_INITED; if (handle >= PI_FILE_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (fileInfo[handle].state != PI_FILE_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (!count) SOFT_ERROR(PI_BAD_PARAM, "bad count (%d)", count); if (!(fileInfo[handle].mode & PI_FILE_WRITE)) SOFT_ERROR(PI_FILE_NOT_WOPEN, "file not opened for write"); w = write(fileInfo[handle].fd, buf, count); if (w != count) { if (w == -1) DBG(DBG_USER, "write failed with errno %d", errno); return PI_BAD_FILE_WRITE; } return 0; } int fileRead(unsigned handle, char *buf, unsigned count) { int r; DBG(DBG_USER, "handle=%d count=%d buf=0x%"PRIXPTR, handle, count, (uintptr_t)buf); CHECK_INITED; if (handle >= PI_FILE_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (fileInfo[handle].state != PI_FILE_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (!count) SOFT_ERROR(PI_BAD_PARAM, "bad count (%d)", count); if (!(fileInfo[handle].mode & PI_FILE_READ)) SOFT_ERROR(PI_FILE_NOT_ROPEN, "file not opened for read"); r = read(fileInfo[handle].fd, buf, count); if (r == -1) { DBG(DBG_USER, "read failed with errno %d", errno); return PI_BAD_FILE_READ; } else { buf[r] = 0; return r; } } int fileSeek(unsigned handle, int32_t seekOffset, int seekFrom) { int whence, s; DBG(DBG_USER, "handle=%d offset=%d from=%d", handle, seekOffset, seekFrom); CHECK_INITED; if (handle >= PI_FILE_SLOTS) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); if (fileInfo[handle].state != PI_FILE_OPENED) SOFT_ERROR(PI_BAD_HANDLE, "bad handle (%d)", handle); switch (seekFrom) { case PI_FROM_START: whence = SEEK_SET; break; case PI_FROM_CURRENT: whence = SEEK_CUR; break; case PI_FROM_END: whence = SEEK_END; break; default: SOFT_ERROR(PI_BAD_FILE_SEEK, "bad seek from (%d)", seekFrom); } s = lseek(fileInfo[handle].fd, seekOffset, whence); if (s == -1) { DBG(DBG_USER, "seek failed with errno %d", errno); return PI_BAD_FILE_SEEK; } return s; } int fileList(char *fpat, char *buf, unsigned count) { int len, bufpos; glob_t pglob; int i; DBG(DBG_USER, "fpat=%s count=%d buf=%"PRIxPTR, fpat, count, (uintptr_t)buf); CHECK_INITED; if ((fileApprove(fpat) & PI_FILE_READ) != PI_FILE_READ) SOFT_ERROR(PI_NO_FILE_ACCESS, "no permission to access file (%s)", fpat); bufpos = 0; if (glob(fpat, GLOB_MARK, NULL, &pglob) == 0) { for (i=0; i PI_TIME_ABSOLUTE) SOFT_ERROR(PI_BAD_TIMETYPE, "bad timetype (%d)", timetype); if (timetype == PI_TIME_ABSOLUTE) { clock_gettime(CLOCK_REALTIME, &ts); *seconds = ts.tv_sec; *micros = ts.tv_nsec/1000; } else { clock_gettime(CLOCK_REALTIME, &ts); TIMER_SUB(&ts, &libStarted, &ts); *seconds = ts.tv_sec; *micros = ts.tv_nsec/1000; } return 0; } /* ----------------------------------------------------------------------- */ int gpioSleep(unsigned timetype, int seconds, int micros) { struct timespec ts, rem; DBG(DBG_USER, "timetype=%d seconds=%d micros=%d", timetype, seconds, micros); CHECK_INITED; if (timetype > PI_TIME_ABSOLUTE) SOFT_ERROR(PI_BAD_TIMETYPE, "bad timetype (%d)", timetype); if (seconds < 0) SOFT_ERROR(PI_BAD_SECONDS, "bad seconds (%d)", seconds); if ((micros < 0) || (micros > 999999)) SOFT_ERROR(PI_BAD_MICROS, "bad micros (%d)", micros); ts.tv_sec = seconds; ts.tv_nsec = micros * 1000; if (timetype == PI_TIME_ABSOLUTE) { while (clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &ts, &rem)); } else { while (clock_nanosleep(CLOCK_REALTIME, 0, &ts, &rem)) { /* copy remaining time to ts */ ts.tv_sec = rem.tv_sec; ts.tv_nsec = rem.tv_nsec; } } return 0; } /* ----------------------------------------------------------------------- */ uint32_t gpioDelay(uint32_t micros) { uint32_t start; DBG(DBG_USER, "microseconds=%u", micros); CHECK_INITED; start = systReg[SYST_CLO]; if (micros <= PI_MAX_BUSY_DELAY) while ((systReg[SYST_CLO] - start) <= micros); else gpioSleep(PI_TIME_RELATIVE, (micros/MILLION), (micros%MILLION)); return (systReg[SYST_CLO] - start); } /* ----------------------------------------------------------------------- */ uint32_t gpioTick(void) { CHECK_INITED; return systReg[SYST_CLO]; } /* ----------------------------------------------------------------------- */ unsigned gpioVersion(void) { DBG(DBG_USER, ""); return PIGPIO_VERSION; } /* ----------------------------------------------------------------------- */ /* 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 W W S M M M B B B B P P P P T T T T T T T T R R R R W warranty void if either bit is set S 0=old (bits 0-22 are revision number) 1=new (following fields apply) M 0=256 1=512 2=1024 3=2GB 4=4GB B 0=Sony 1=Egoman 2=Embest 3=Sony Japan 4=Embest 5=Stadium P 0=2835, 1=2836, 2=2837 3=2711 T 0=A 1=B 2=A+ 3=B+ 4=Pi2B 5=Alpha 6=CM1 8=Pi3B 9=Zero a=CM3 c=Zero W d=3B+ e=3A+ 10=CM3+ 11=4B R PCB board revision */ unsigned gpioHardwareRevision(void) { static unsigned rev = 0; FILE * filp; char buf[512]; char term; DBG(DBG_USER, ""); if (rev) return rev; filp = fopen ("/proc/cpuinfo", "r"); if (filp != NULL) { while (fgets(buf, sizeof(buf), filp) != NULL) { if (!strncasecmp("revision\t:", buf, 10)) { if (sscanf(buf+10, "%x%c", &rev, &term) == 2) { if (term != '\n') rev = 0; } } } fclose(filp); } /* (some) arm64 operating systems get revision number here */ if (rev == 0) { DBG(DBG_USER, "searching /proc/device-tree for revision"); filp = fopen ("/proc/device-tree/system/linux,revision", "r"); if (filp != NULL) { uint32_t tmp; if (fread(&tmp,1 , 4, filp) == 4) { /* for some reason the value returned by reading this /proc entry seems to be big endian, convert it. */ rev = ntohl(tmp); rev &= 0xFFFFFF; /* mask out warranty bit */ } fclose(filp); } } piCores = 0; pi_ispi = 0; rev &= 0xFFFFFF; /* mask out warranty bit */ /* Decode revision code */ if ((rev & 0x800000) == 0) /* old rev code */ { if (rev < 0x0016) /* all BCM2835 */ { pi_ispi = 1; piCores = 1; pi_peri_phys = 0x20000000; pi_dram_bus = 0x40000000; pi_mem_flag = 0x0C; } else { DBG(DBG_ALWAYS, "unknown revision=%x", rev); rev = 0; } } else /* new rev code */ { switch ((rev >> 12) & 0xF) /* just interested in BCM model */ { case 0x0: /* BCM2835 */ pi_ispi = 1; piCores = 1; pi_peri_phys = 0x20000000; pi_dram_bus = 0x40000000; pi_mem_flag = 0x0C; break; case 0x1: /* BCM2836 */ case 0x2: /* BCM2837 */ pi_ispi = 1; piCores = 4; pi_peri_phys = 0x3F000000; pi_dram_bus = 0xC0000000; pi_mem_flag = 0x04; break; case 0x3: /* BCM2711 */ pi_ispi = 1; piCores = 4; pi_peri_phys = 0xFE000000; pi_dram_bus = 0xC0000000; pi_mem_flag = 0x04; pi_is_2711 = 1; clk_osc_freq = CLK_OSC_FREQ_2711; clk_plld_freq = CLK_PLLD_FREQ_2711; hw_pwm_max_freq = PI_HW_PWM_MAX_FREQ_2711; hw_clk_min_freq = PI_HW_CLK_MIN_FREQ_2711; hw_clk_max_freq = PI_HW_CLK_MAX_FREQ_2711; break; default: DBG(DBG_ALWAYS, "unknown rev code (%x)", rev); rev=0; pi_ispi = 0; break; } } DBG(DBG_USER, "revision=%x", rev); DBG(DBG_USER, "pi_peri_phys=%x", pi_peri_phys); DBG(DBG_USER, "pi_dram_bus=%x", pi_dram_bus); DBG(DBG_USER, "pi_mem_flag=%x", pi_mem_flag); return rev; } /* ----------------------------------------------------------------------- */ int gpioCfgBufferSize(unsigned millis) { DBG(DBG_USER, "millis=%d", millis); CHECK_NOT_INITED; if ((millis < PI_BUF_MILLIS_MIN) || (millis > PI_BUF_MILLIS_MAX)) SOFT_ERROR(PI_BAD_BUF_MILLIS, "bad millis (%d)", millis); gpioCfg.bufferMilliseconds = millis; return 0; } /* ----------------------------------------------------------------------- */ int gpioCfgClock(unsigned micros, unsigned peripheral, unsigned source) { DBG(DBG_USER, "micros=%d peripheral=%d", micros, peripheral); CHECK_NOT_INITED; if ((micros < 1) || (micros > 10)) SOFT_ERROR(PI_BAD_CLK_MICROS, "bad micros (%d)", micros); if (!clkCfg[micros].valid) SOFT_ERROR(PI_BAD_CLK_MICROS, "bad micros (%d)", micros); if (peripheral > PI_CLOCK_PCM) SOFT_ERROR(PI_BAD_CLK_PERIPH, "bad peripheral (%d)", peripheral); gpioCfg.clockMicros = micros; gpioCfg.clockPeriph = peripheral; return 0; } /* ----------------------------------------------------------------------- */ int gpioCfgDMAchannel(unsigned DMAchannel) { DBG(DBG_USER, "channel=%d", DMAchannel); CHECK_NOT_INITED; if ((DMAchannel < PI_MIN_DMA_CHANNEL) || (DMAchannel > PI_MAX_DMA_CHANNEL)) SOFT_ERROR(PI_BAD_CHANNEL, "bad channel (%d)", DMAchannel); gpioCfg.DMAprimaryChannel = DMAchannel; return 0; } /* ----------------------------------------------------------------------- */ int gpioCfgDMAchannels(unsigned primaryChannel, unsigned secondaryChannel) { DBG(DBG_USER, "primary channel=%d, secondary channel=%d", primaryChannel, secondaryChannel); CHECK_NOT_INITED; if (primaryChannel > PI_MAX_DMA_CHANNEL) SOFT_ERROR(PI_BAD_PRIM_CHANNEL, "bad primary channel (%d)", primaryChannel); if ((secondaryChannel > PI_MAX_DMA_CHANNEL) || ((secondaryChannel == primaryChannel) && (secondaryChannel != PI_DEFAULT_DMA_NOT_SET))) SOFT_ERROR(PI_BAD_SECO_CHANNEL, "bad secondary channel (%d)", secondaryChannel); gpioCfg.DMAprimaryChannel = primaryChannel; gpioCfg.DMAsecondaryChannel = secondaryChannel; return 0; } /*-------------------------------------------------------------------------*/ int gpioCfgPermissions(uint64_t updateMask) { DBG(DBG_USER, "gpio update mask=%"PRIX64, updateMask); CHECK_NOT_INITED; gpioMask = updateMask; gpioMaskSet = 1; return 0; } /* ----------------------------------------------------------------------- */ int gpioCfgInterfaces(unsigned ifFlags) { DBG(DBG_USER, "ifFlags=%X", ifFlags); CHECK_NOT_INITED; if (ifFlags > 15) SOFT_ERROR(PI_BAD_IF_FLAGS, "bad ifFlags (%X)", ifFlags); gpioCfg.ifFlags = ifFlags; return 0; } /* ----------------------------------------------------------------------- */ int gpioCfgSocketPort(unsigned port) { DBG(DBG_USER, "port=%d", port); CHECK_NOT_INITED; if ((port < PI_MIN_SOCKET_PORT) || (port > PI_MAX_SOCKET_PORT)) SOFT_ERROR(PI_BAD_SOCKET_PORT, "bad port (%d)", port); gpioCfg.socketPort = port; return 0; } /* ----------------------------------------------------------------------- */ int gpioCfgMemAlloc(unsigned memAllocMode) { DBG(DBG_USER, "memAllocMode=%d", memAllocMode); CHECK_NOT_INITED; if (memAllocMode > PI_MEM_ALLOC_MAILBOX) SOFT_ERROR( PI_BAD_MALLOC_MODE, "bad mem alloc mode (%d)", memAllocMode); gpioCfg.memAllocMode = memAllocMode; return 0; } /* ----------------------------------------------------------------------- */ int gpioCfgNetAddr(int numSockAddr, uint32_t *sockAddr) { int i; DBG(DBG_USER, "numSockAddr=%d sockAddr=%08"PRIXPTR, numSockAddr, (uintptr_t)sockAddr); CHECK_NOT_INITED; if (numSockAddr <= 0) numSockNetAddr = 0; else { if (numSockAddr >= MAX_CONNECT_ADDRESSES) numSockAddr = MAX_CONNECT_ADDRESSES; for (i=0; i>4) & 0xF; return 0; } /* include any user customisations */ #include "custom.cext" pigpio-78/pigpio.h000066400000000000000000004634631373465704200142740ustar00rootroot00000000000000/* This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to */ #ifndef PIGPIO_H #define PIGPIO_H #include #include #define PIGPIO_VERSION 78 /*TEXT pigpio is a C library for the Raspberry which allows control of the GPIO. *Features* o hardware timed PWM on any of GPIO 0-31 o hardware timed servo pulses on any of GPIO 0-31 o callbacks when any of GPIO 0-31 change state o callbacks at timed intervals o reading/writing all of the GPIO in a bank as one operation o individually setting GPIO modes, reading and writing o notifications when any of GPIO 0-31 change state o the construction of output waveforms with microsecond timing o rudimentary permission control over GPIO o a simple interface to start and stop new threads o I2C, SPI, and serial link wrappers o creating and running scripts *GPIO* ALL GPIO are identified by their Broadcom number. *Credits* The PWM and servo pulses are timed using the DMA and PWM peripherals. This use was inspired by Richard Hirst's servoblaster kernel module. *Usage* Include in your source files. Assuming your source is in prog.c use the following command to build and run the executable. . . gcc -Wall -pthread -o prog prog.c -lpigpio -lrt sudo ./prog . . For examples of usage see the C programs within the pigpio archive file. *Notes* All the functions which return an int return < 0 on error. [*gpioInitialise*] must be called before all other library functions with the following exceptions: . . [*gpioCfg**] [*gpioVersion*] [*gpioHardwareRevision*] . . If the library is not initialised all but the [*gpioCfg**], [*gpioVersion*], and [*gpioHardwareRevision*] functions will return error PI_NOT_INITIALISED. If the library is initialised the [*gpioCfg**] functions will return error PI_INITIALISED. If you intend to rely on signals sent to your application, you should turn off the internal signal handling as shown in this example: . . int cfg = gpioCfgGetInternals(); cfg |= PI_CFG_NOSIGHANDLER; // (1<<10) gpioCfgSetInternals(cfg); int status = gpioInitialise(); . . TEXT*/ /*OVERVIEW ESSENTIAL gpioInitialise Initialise library gpioTerminate Stop library BASIC gpioSetMode Set a GPIO mode gpioGetMode Get a GPIO mode gpioSetPullUpDown Set/clear GPIO pull up/down resistor gpioRead Read a GPIO gpioWrite Write a GPIO PWM_(overrides_servo_commands_on_same_GPIO) gpioPWM Start/stop PWM pulses on a GPIO gpioSetPWMfrequency Configure PWM frequency for a GPIO gpioSetPWMrange Configure PWM range for a GPIO gpioGetPWMdutycycle Get dutycycle setting on a GPIO gpioGetPWMfrequency Get configured PWM frequency for a GPIO gpioGetPWMrange Get configured PWM range for a GPIO gpioGetPWMrealRange Get underlying PWM range for a GPIO Servo_(overrides_PWM_commands_on_same_GPIO) gpioServo Start/stop servo pulses on a GPIO gpioGetServoPulsewidth Get pulsewidth setting on a GPIO INTERMEDIATE gpioTrigger Send a trigger pulse to a GPIO gpioSetWatchdog Set a watchdog on a GPIO gpioRead_Bits_0_31 Read all GPIO in bank 1 gpioRead_Bits_32_53 Read all GPIO in bank 2 gpioWrite_Bits_0_31_Clear Clear selected GPIO in bank 1 gpioWrite_Bits_32_53_Clear Clear selected GPIO in bank 2 gpioWrite_Bits_0_31_Set Set selected GPIO in bank 1 gpioWrite_Bits_32_53_Set Set selected GPIO in bank 2 gpioSetAlertFunc Request a GPIO level change callback gpioSetAlertFuncEx Request a GPIO change callback, extended gpioSetTimerFunc Request a regular timed callback gpioSetTimerFuncEx Request a regular timed callback, extended gpioStartThread Start a new thread gpioStopThread Stop a previously started thread ADVANCED gpioNotifyOpen Request a notification handle gpioNotifyClose Close a notification gpioNotifyOpenWithSize Request a notification with sized pipe gpioNotifyBegin Start notifications for selected GPIO gpioNotifyPause Pause notifications gpioHardwareClock Start hardware clock on supported GPIO gpioHardwarePWM Start hardware PWM on supported GPIO gpioGlitchFilter Set a glitch filter on a GPIO gpioNoiseFilter Set a noise filter on a GPIO gpioSetPad Sets a pads drive strength gpioGetPad Gets a pads drive strength shell Executes a shell command gpioSetISRFunc Request a GPIO interrupt callback gpioSetISRFuncEx Request a GPIO interrupt callback, extended gpioSetSignalFunc Request a signal callback gpioSetSignalFuncEx Request a signal callback, extended gpioSetGetSamplesFunc Requests a GPIO samples callback gpioSetGetSamplesFuncEx Requests a GPIO samples callback, extended Custom gpioCustom1 User custom function 1 gpioCustom2 User custom function 2 Events eventMonitor Sets the events to monitor eventSetFunc Request an event callback eventSetFuncEx Request an event callback, extended eventTrigger Trigger an event Scripts gpioStoreScript Store a script gpioRunScript Run a stored script gpioUpdateScript Set a scripts parameters gpioScriptStatus Get script status and parameters gpioStopScript Stop a running script gpioDeleteScript Delete a stored script I2C i2cOpen Opens an I2C device i2cClose Closes an I2C device i2cWriteQuick SMBus write quick i2cReadByte SMBus read byte i2cWriteByte SMBus write byte i2cReadByteData SMBus read byte data i2cWriteByteData SMBus write byte data i2cReadWordData SMBus read word data i2cWriteWordData SMBus write word data i2cReadBlockData SMBus read block data i2cWriteBlockData SMBus write block data i2cReadI2CBlockData SMBus read I2C block data i2cWriteI2CBlockData SMBus write I2C block data i2cReadDevice Reads the raw I2C device i2cWriteDevice Writes the raw I2C device i2cProcessCall SMBus process call i2cBlockProcessCall SMBus block process call i2cSwitchCombined Sets or clears the combined flag i2cSegments Performs multiple I2C transactions i2cZip Performs multiple I2C transactions I2C_BIT_BANG bbI2COpen Opens GPIO for bit banging I2C bbI2CClose Closes GPIO for bit banging I2C bbI2CZip Performs bit banged I2C transactions I2C/SPI_SLAVE bscXfer I2C/SPI as slave transfer SERIAL serOpen Opens a serial device serClose Closes a serial device serReadByte Reads a byte from a serial device serWriteByte Writes a byte to a serial device serRead Reads bytes from a serial device serWrite Writes bytes to a serial device serDataAvailable Returns number of bytes ready to be read SERIAL_BIT_BANG_(read_only) gpioSerialReadOpen Opens a GPIO for bit bang serial reads gpioSerialReadClose Closes a GPIO for bit bang serial reads gpioSerialReadInvert Configures normal/inverted for serial reads gpioSerialRead Reads bit bang serial data from a GPIO SPI spiOpen Opens a SPI device spiClose Closes a SPI device spiRead Reads bytes from a SPI device spiWrite Writes bytes to a SPI device spiXfer Transfers bytes with a SPI device SPI_BIT_BANG bbSPIOpen Opens GPIO for bit banging SPI bbSPIClose Closes GPIO for bit banging SPI bbSPIXfer Performs bit banged SPI transactions FILES fileOpen Opens a file fileClose Closes a file fileRead Reads bytes from a file fileWrite Writes bytes to a file fileSeek Seeks to a position within a file fileList List files which match a pattern WAVES gpioWaveClear Deletes all waveforms gpioWaveAddNew Starts a new waveform gpioWaveAddGeneric Adds a series of pulses to the waveform gpioWaveAddSerial Adds serial data to the waveform gpioWaveCreate Creates a waveform from added data gpioWaveCreatePad Creates a waveform of fixed size from added data gpioWaveDelete Deletes a waveform gpioWaveTxSend Transmits a waveform gpioWaveChain Transmits a chain of waveforms gpioWaveTxAt Returns the current transmitting waveform gpioWaveTxBusy Checks to see if the waveform has ended gpioWaveTxStop Aborts the current waveform gpioWaveGetCbs Length in CBs of the current waveform gpioWaveGetHighCbs Length of longest waveform so far gpioWaveGetMaxCbs Absolute maximum allowed CBs gpioWaveGetMicros Length in micros of the current waveform gpioWaveGetHighMicros Length of longest waveform so far gpioWaveGetMaxMicros Absolute maximum allowed micros gpioWaveGetPulses Length in pulses of the current waveform gpioWaveGetHighPulses Length of longest waveform so far gpioWaveGetMaxPulses Absolute maximum allowed pulses UTILITIES gpioDelay Delay for a number of microseconds gpioTick Get current tick (microseconds) gpioHardwareRevision Get hardware revision gpioVersion Get the pigpio version getBitInBytes Get the value of a bit putBitInBytes Set the value of a bit gpioTime Get current time gpioSleep Sleep for specified time time_sleep Sleeps for a float number of seconds time_time Float number of seconds since the epoch CONFIGURATION gpioCfgBufferSize Configure the GPIO sample buffer size gpioCfgClock Configure the GPIO sample rate gpioCfgDMAchannel Configure the DMA channel (DEPRECATED) gpioCfgDMAchannels Configure the DMA channels gpioCfgPermissions Configure the GPIO access permissions gpioCfgInterfaces Configure user interfaces gpioCfgSocketPort Configure socket port gpioCfgMemAlloc Configure DMA memory allocation mode gpioCfgNetAddr Configure allowed network addresses gpioCfgGetInternals Get internal configuration settings gpioCfgSetInternals Set internal configuration settings EXPERT rawWaveAddSPI Not intended for general use rawWaveAddGeneric Not intended for general use rawWaveCB Not intended for general use rawWaveCBAdr Not intended for general use rawWaveGetOOL Not intended for general use rawWaveSetOOL Not intended for general use rawWaveGetOut Not intended for general use rawWaveSetOut Not intended for general use rawWaveGetIn Not intended for general use rawWaveSetIn Not intended for general use rawWaveInfo Not intended for general use rawDumpWave Not intended for general use rawDumpScript Not intended for general use OVERVIEW*/ #define PI_INPFIFO "/dev/pigpio" #define PI_OUTFIFO "/dev/pigout" #define PI_ERRFIFO "/dev/pigerr" #define PI_ENVPORT "PIGPIO_PORT" #define PI_ENVADDR "PIGPIO_ADDR" #define PI_LOCKFILE "/var/run/pigpio.pid" #define PI_I2C_COMBINED "/sys/module/i2c_bcm2708/parameters/combined" #ifdef __cplusplus extern "C" { #endif typedef struct { uint16_t func; uint16_t size; } gpioHeader_t; typedef struct { size_t size; void *ptr; uint32_t data; } gpioExtent_t; typedef struct { uint32_t tick; uint32_t level; } gpioSample_t; typedef struct { uint16_t seqno; uint16_t flags; uint32_t tick; uint32_t level; } gpioReport_t; typedef struct { uint32_t gpioOn; uint32_t gpioOff; uint32_t usDelay; } gpioPulse_t; #define WAVE_FLAG_READ 1 #define WAVE_FLAG_TICK 2 typedef struct { uint32_t gpioOn; uint32_t gpioOff; uint32_t usDelay; uint32_t flags; } rawWave_t; /* CBs are used in order from the lowest numbered CB up to the maximum NUM_WAVE_CBS. OOLS are used from the bottom climbing up and from the top climbing down. The GPIO on and off settings climb up from the bottom (botOOL/numBOOL). The level and tick read values are stored in descending locations from the top (topOOL/numTOOL). */ typedef struct { uint16_t botCB; /* first CB used by wave */ uint16_t topCB; /* last CB used by wave */ uint16_t botOOL; /* first bottom OOL used by wave */ /* botOOL to botOOL + numBOOL - 1 are in use */ uint16_t topOOL; /* last top OOL used by wave */ /* topOOL - numTOOL to topOOL are in use.*/ uint16_t deleted; uint16_t numCB; uint16_t numBOOL; uint16_t numTOOL; } rawWaveInfo_t; typedef struct { int clk; /* GPIO for clock */ int mosi; /* GPIO for MOSI */ int miso; /* GPIO for MISO */ int ss_pol; /* slave select off state */ int ss_us; /* delay after slave select */ int clk_pol; /* clock off state */ int clk_pha; /* clock phase */ int clk_us; /* clock micros */ } rawSPI_t; typedef struct { /* linux/arch/arm/mach-bcm2708/include/mach/dma.h */ uint32_t info; uint32_t src; uint32_t dst; uint32_t length; uint32_t stride; uint32_t next; uint32_t pad[2]; } rawCbs_t; typedef struct { uint16_t addr; /* slave address */ uint16_t flags; uint16_t len; /* msg length */ uint8_t *buf; /* pointer to msg data */ } pi_i2c_msg_t; /* BSC FIFO size */ #define BSC_FIFO_SIZE 512 typedef struct { uint32_t control; /* Write */ int rxCnt; /* Read only */ char rxBuf[BSC_FIFO_SIZE]; /* Read only */ int txCnt; /* Write */ char txBuf[BSC_FIFO_SIZE]; /* Write */ } bsc_xfer_t; typedef void (*gpioAlertFunc_t) (int gpio, int level, uint32_t tick); typedef void (*gpioAlertFuncEx_t) (int gpio, int level, uint32_t tick, void *userdata); typedef void (*eventFunc_t) (int event, uint32_t tick); typedef void (*eventFuncEx_t) (int event, uint32_t tick, void *userdata); typedef void (*gpioISRFunc_t) (int gpio, int level, uint32_t tick); typedef void (*gpioISRFuncEx_t) (int gpio, int level, uint32_t tick, void *userdata); typedef void (*gpioTimerFunc_t) (void); typedef void (*gpioTimerFuncEx_t) (void *userdata); typedef void (*gpioSignalFunc_t) (int signum); typedef void (*gpioSignalFuncEx_t) (int signum, void *userdata); typedef void (*gpioGetSamplesFunc_t) (const gpioSample_t *samples, int numSamples); typedef void (*gpioGetSamplesFuncEx_t) (const gpioSample_t *samples, int numSamples, void *userdata); typedef void *(gpioThreadFunc_t) (void *); /* gpio: 0-53 */ #define PI_MIN_GPIO 0 #define PI_MAX_GPIO 53 /* user_gpio: 0-31 */ #define PI_MAX_USER_GPIO 31 /* level: 0-1 */ #define PI_OFF 0 #define PI_ON 1 #define PI_CLEAR 0 #define PI_SET 1 #define PI_LOW 0 #define PI_HIGH 1 /* level: only reported for GPIO time-out, see gpioSetWatchdog */ #define PI_TIMEOUT 2 /* mode: 0-7 */ #define PI_INPUT 0 #define PI_OUTPUT 1 #define PI_ALT0 4 #define PI_ALT1 5 #define PI_ALT2 6 #define PI_ALT3 7 #define PI_ALT4 3 #define PI_ALT5 2 /* pud: 0-2 */ #define PI_PUD_OFF 0 #define PI_PUD_DOWN 1 #define PI_PUD_UP 2 /* dutycycle: 0-range */ #define PI_DEFAULT_DUTYCYCLE_RANGE 255 /* range: 25-40000 */ #define PI_MIN_DUTYCYCLE_RANGE 25 #define PI_MAX_DUTYCYCLE_RANGE 40000 /* pulsewidth: 0, 500-2500 */ #define PI_SERVO_OFF 0 #define PI_MIN_SERVO_PULSEWIDTH 500 #define PI_MAX_SERVO_PULSEWIDTH 2500 /* hardware PWM */ #define PI_HW_PWM_MIN_FREQ 1 #define PI_HW_PWM_MAX_FREQ 125000000 #define PI_HW_PWM_MAX_FREQ_2711 187500000 #define PI_HW_PWM_RANGE 1000000 /* hardware clock */ #define PI_HW_CLK_MIN_FREQ 4689 #define PI_HW_CLK_MIN_FREQ_2711 13184 #define PI_HW_CLK_MAX_FREQ 250000000 #define PI_HW_CLK_MAX_FREQ_2711 375000000 #define PI_NOTIFY_SLOTS 32 #define PI_NTFY_FLAGS_EVENT (1 <<7) #define PI_NTFY_FLAGS_ALIVE (1 <<6) #define PI_NTFY_FLAGS_WDOG (1 <<5) #define PI_NTFY_FLAGS_BIT(x) (((x)<<0)&31) #define PI_WAVE_BLOCKS 4 #define PI_WAVE_MAX_PULSES (PI_WAVE_BLOCKS * 3000) #define PI_WAVE_MAX_CHARS (PI_WAVE_BLOCKS * 300) #define PI_BB_I2C_MIN_BAUD 50 #define PI_BB_I2C_MAX_BAUD 500000 #define PI_BB_SPI_MIN_BAUD 50 #define PI_BB_SPI_MAX_BAUD 250000 #define PI_BB_SER_MIN_BAUD 50 #define PI_BB_SER_MAX_BAUD 250000 #define PI_BB_SER_NORMAL 0 #define PI_BB_SER_INVERT 1 #define PI_WAVE_MIN_BAUD 50 #define PI_WAVE_MAX_BAUD 1000000 #define PI_SPI_MIN_BAUD 32000 #define PI_SPI_MAX_BAUD 125000000 #define PI_MIN_WAVE_DATABITS 1 #define PI_MAX_WAVE_DATABITS 32 #define PI_MIN_WAVE_HALFSTOPBITS 2 #define PI_MAX_WAVE_HALFSTOPBITS 8 #define PI_WAVE_MAX_MICROS (30 * 60 * 1000000) /* half an hour */ #define PI_MAX_WAVES 250 #define PI_MAX_WAVE_CYCLES 65535 #define PI_MAX_WAVE_DELAY 65535 #define PI_WAVE_COUNT_PAGES 10 /* wave tx mode */ #define PI_WAVE_MODE_ONE_SHOT 0 #define PI_WAVE_MODE_REPEAT 1 #define PI_WAVE_MODE_ONE_SHOT_SYNC 2 #define PI_WAVE_MODE_REPEAT_SYNC 3 /* special wave at return values */ #define PI_WAVE_NOT_FOUND 9998 /* Transmitted wave not found. */ #define PI_NO_TX_WAVE 9999 /* No wave being transmitted. */ /* Files, I2C, SPI, SER */ #define PI_FILE_SLOTS 16 #define PI_I2C_SLOTS 512 #define PI_SPI_SLOTS 32 #define PI_SER_SLOTS 16 #define PI_MAX_I2C_ADDR 0x7F #define PI_NUM_AUX_SPI_CHANNEL 3 #define PI_NUM_STD_SPI_CHANNEL 2 #define PI_MAX_I2C_DEVICE_COUNT (1<<16) #define PI_MAX_SPI_DEVICE_COUNT (1<<16) /* max pi_i2c_msg_t per transaction */ #define PI_I2C_RDRW_IOCTL_MAX_MSGS 42 /* flags for i2cTransaction, pi_i2c_msg_t */ #define PI_I2C_M_WR 0x0000 /* write data */ #define PI_I2C_M_RD 0x0001 /* read data */ #define PI_I2C_M_TEN 0x0010 /* ten bit chip address */ #define PI_I2C_M_RECV_LEN 0x0400 /* length will be first received byte */ #define PI_I2C_M_NO_RD_ACK 0x0800 /* if I2C_FUNC_PROTOCOL_MANGLING */ #define PI_I2C_M_IGNORE_NAK 0x1000 /* if I2C_FUNC_PROTOCOL_MANGLING */ #define PI_I2C_M_REV_DIR_ADDR 0x2000 /* if I2C_FUNC_PROTOCOL_MANGLING */ #define PI_I2C_M_NOSTART 0x4000 /* if I2C_FUNC_PROTOCOL_MANGLING */ /* bbI2CZip and i2cZip commands */ #define PI_I2C_END 0 #define PI_I2C_ESC 1 #define PI_I2C_START 2 #define PI_I2C_COMBINED_ON 2 #define PI_I2C_STOP 3 #define PI_I2C_COMBINED_OFF 3 #define PI_I2C_ADDR 4 #define PI_I2C_FLAGS 5 #define PI_I2C_READ 6 #define PI_I2C_WRITE 7 /* SPI */ #define PI_SPI_FLAGS_BITLEN(x) ((x&63)<<16) #define PI_SPI_FLAGS_RX_LSB(x) ((x&1)<<15) #define PI_SPI_FLAGS_TX_LSB(x) ((x&1)<<14) #define PI_SPI_FLAGS_3WREN(x) ((x&15)<<10) #define PI_SPI_FLAGS_3WIRE(x) ((x&1)<<9) #define PI_SPI_FLAGS_AUX_SPI(x) ((x&1)<<8) #define PI_SPI_FLAGS_RESVD(x) ((x&7)<<5) #define PI_SPI_FLAGS_CSPOLS(x) ((x&7)<<2) #define PI_SPI_FLAGS_MODE(x) ((x&3)) /* BSC registers */ #define BSC_DR 0 #define BSC_RSR 1 #define BSC_SLV 2 #define BSC_CR 3 #define BSC_FR 4 #define BSC_IFLS 5 #define BSC_IMSC 6 #define BSC_RIS 7 #define BSC_MIS 8 #define BSC_ICR 9 #define BSC_DMACR 10 #define BSC_TDR 11 #define BSC_GPUSTAT 12 #define BSC_HCTRL 13 #define BSC_DEBUG_I2C 14 #define BSC_DEBUG_SPI 15 #define BSC_CR_TESTFIFO 2048 #define BSC_CR_RXE 512 #define BSC_CR_TXE 256 #define BSC_CR_BRK 128 #define BSC_CR_CPOL 16 #define BSC_CR_CPHA 8 #define BSC_CR_I2C 4 #define BSC_CR_SPI 2 #define BSC_CR_EN 1 #define BSC_FR_RXBUSY 32 #define BSC_FR_TXFE 16 #define BSC_FR_RXFF 8 #define BSC_FR_TXFF 4 #define BSC_FR_RXFE 2 #define BSC_FR_TXBUSY 1 /* BSC GPIO */ #define BSC_SDA_MOSI 18 #define BSC_SCL_SCLK 19 #define BSC_MISO 20 #define BSC_CE_N 21 #define BSC_SDA_MOSI_2711 10 #define BSC_SCL_SCLK_2711 11 #define BSC_MISO_2711 9 #define BSC_CE_N_2711 8 /* Longest busy delay */ #define PI_MAX_BUSY_DELAY 100 /* timeout: 0-60000 */ #define PI_MIN_WDOG_TIMEOUT 0 #define PI_MAX_WDOG_TIMEOUT 60000 /* timer: 0-9 */ #define PI_MIN_TIMER 0 #define PI_MAX_TIMER 9 /* millis: 10-60000 */ #define PI_MIN_MS 10 #define PI_MAX_MS 60000 #define PI_MAX_SCRIPTS 32 #define PI_MAX_SCRIPT_TAGS 50 #define PI_MAX_SCRIPT_VARS 150 #define PI_MAX_SCRIPT_PARAMS 10 /* script status */ #define PI_SCRIPT_INITING 0 #define PI_SCRIPT_HALTED 1 #define PI_SCRIPT_RUNNING 2 #define PI_SCRIPT_WAITING 3 #define PI_SCRIPT_FAILED 4 /* signum: 0-63 */ #define PI_MIN_SIGNUM 0 #define PI_MAX_SIGNUM 63 /* timetype: 0-1 */ #define PI_TIME_RELATIVE 0 #define PI_TIME_ABSOLUTE 1 #define PI_MAX_MICS_DELAY 1000000 /* 1 second */ #define PI_MAX_MILS_DELAY 60000 /* 60 seconds */ /* cfgMillis */ #define PI_BUF_MILLIS_MIN 100 #define PI_BUF_MILLIS_MAX 10000 /* cfgMicros: 1, 2, 4, 5, 8, or 10 */ /* cfgPeripheral: 0-1 */ #define PI_CLOCK_PWM 0 #define PI_CLOCK_PCM 1 /* DMA channel: 0-15, 15 is unset */ #define PI_MIN_DMA_CHANNEL 0 #define PI_MAX_DMA_CHANNEL 15 /* port */ #define PI_MIN_SOCKET_PORT 1024 #define PI_MAX_SOCKET_PORT 32000 /* ifFlags: */ #define PI_DISABLE_FIFO_IF 1 #define PI_DISABLE_SOCK_IF 2 #define PI_LOCALHOST_SOCK_IF 4 #define PI_DISABLE_ALERT 8 /* memAllocMode */ #define PI_MEM_ALLOC_AUTO 0 #define PI_MEM_ALLOC_PAGEMAP 1 #define PI_MEM_ALLOC_MAILBOX 2 /* filters */ #define PI_MAX_STEADY 300000 #define PI_MAX_ACTIVE 1000000 /* gpioCfgInternals */ #define PI_CFG_DBG_LEVEL 0 /* bits 0-3 */ #define PI_CFG_ALERT_FREQ 4 /* bits 4-7 */ #define PI_CFG_RT_PRIORITY (1<<8) #define PI_CFG_STATS (1<<9) #define PI_CFG_NOSIGHANDLER (1<<10) #define PI_CFG_ILLEGAL_VAL (1<<11) /* gpioISR */ #define RISING_EDGE 0 #define FALLING_EDGE 1 #define EITHER_EDGE 2 /* pads */ #define PI_MAX_PAD 2 #define PI_MIN_PAD_STRENGTH 1 #define PI_MAX_PAD_STRENGTH 16 /* files */ #define PI_FILE_NONE 0 #define PI_FILE_MIN 1 #define PI_FILE_READ 1 #define PI_FILE_WRITE 2 #define PI_FILE_RW 3 #define PI_FILE_APPEND 4 #define PI_FILE_CREATE 8 #define PI_FILE_TRUNC 16 #define PI_FILE_MAX 31 #define PI_FROM_START 0 #define PI_FROM_CURRENT 1 #define PI_FROM_END 2 /* Allowed socket connect addresses */ #define MAX_CONNECT_ADDRESSES 256 /* events */ #define PI_MAX_EVENT 31 /* Event auto generated on BSC slave activity */ #define PI_EVENT_BSC 31 /*F*/ int gpioInitialise(void); /*D Initialises the library. Returns the pigpio version number if OK, otherwise PI_INIT_FAILED. gpioInitialise must be called before using the other library functions with the following exceptions: . . [*gpioCfg**] [*gpioVersion*] [*gpioHardwareRevision*] . . ... if (gpioInitialise() < 0) { // pigpio initialisation failed. } else { // pigpio initialised okay. } ... D*/ /*F*/ void gpioTerminate(void); /*D Terminates the library. Returns nothing. Call before program exit. This function resets the used DMA channels, releases memory, and terminates any running threads. ... gpioTerminate(); ... D*/ /*F*/ int gpioSetMode(unsigned gpio, unsigned mode); /*D Sets the GPIO mode, typically input or output. . . gpio: 0-53 mode: 0-7 . . Returns 0 if OK, otherwise PI_BAD_GPIO or PI_BAD_MODE. Arduino style: pinMode. ... gpioSetMode(17, PI_INPUT); // Set GPIO17 as input. gpioSetMode(18, PI_OUTPUT); // Set GPIO18 as output. gpioSetMode(22,PI_ALT0); // Set GPIO22 to alternative mode 0. ... See [[http://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf]] page 102 for an overview of the modes. D*/ /*F*/ int gpioGetMode(unsigned gpio); /*D Gets the GPIO mode. . . gpio: 0-53 . . Returns the GPIO mode if OK, otherwise PI_BAD_GPIO. ... if (gpioGetMode(17) != PI_ALT0) { gpioSetMode(17, PI_ALT0); // set GPIO17 to ALT0 } ... D*/ /*F*/ int gpioSetPullUpDown(unsigned gpio, unsigned pud); /*D Sets or clears resistor pull ups or downs on the GPIO. . . gpio: 0-53 pud: 0-2 . . Returns 0 if OK, otherwise PI_BAD_GPIO or PI_BAD_PUD. ... gpioSetPullUpDown(17, PI_PUD_UP); // Sets a pull-up. gpioSetPullUpDown(18, PI_PUD_DOWN); // Sets a pull-down. gpioSetPullUpDown(23, PI_PUD_OFF); // Clear any pull-ups/downs. ... D*/ /*F*/ int gpioRead (unsigned gpio); /*D Reads the GPIO level, on or off. . . gpio: 0-53 . . Returns the GPIO level if OK, otherwise PI_BAD_GPIO. Arduino style: digitalRead. ... printf("GPIO24 is level %d", gpioRead(24)); ... D*/ /*F*/ int gpioWrite(unsigned gpio, unsigned level); /*D Sets the GPIO level, on or off. . . gpio: 0-53 level: 0-1 . . Returns 0 if OK, otherwise PI_BAD_GPIO or PI_BAD_LEVEL. If PWM or servo pulses are active on the GPIO they are switched off. Arduino style: digitalWrite ... gpioWrite(24, 1); // Set GPIO24 high. ... D*/ /*F*/ int gpioPWM(unsigned user_gpio, unsigned dutycycle); /*D Starts PWM on the GPIO, dutycycle between 0 (off) and range (fully on). Range defaults to 255. . . user_gpio: 0-31 dutycycle: 0-range . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_BAD_DUTYCYCLE. Arduino style: analogWrite This and the servo functionality use the DMA and PWM or PCM peripherals to control and schedule the pulse lengths and dutycycles. The [*gpioSetPWMrange*] function may be used to change the default range of 255. ... gpioPWM(17, 255); // Sets GPIO17 full on. gpioPWM(18, 128); // Sets GPIO18 half on. gpioPWM(23, 0); // Sets GPIO23 full off. ... D*/ /*F*/ int gpioGetPWMdutycycle(unsigned user_gpio); /*D Returns the PWM dutycycle setting for the GPIO. . . user_gpio: 0-31 . . Returns between 0 (off) and range (fully on) if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_PWM_GPIO. For normal PWM the dutycycle will be out of the defined range for the GPIO (see [*gpioGetPWMrange*]). If a hardware clock is active on the GPIO the reported dutycycle will be 500000 (500k) out of 1000000 (1M). If hardware PWM is active on the GPIO the reported dutycycle will be out of a 1000000 (1M). Normal PWM range defaults to 255. D*/ /*F*/ int gpioSetPWMrange(unsigned user_gpio, unsigned range); /*D Selects the dutycycle range to be used for the GPIO. Subsequent calls to gpioPWM will use a dutycycle between 0 (off) and range (fully on). . . user_gpio: 0-31 range: 25-40000 . . Returns the real range for the given GPIO's frequency if OK, otherwise PI_BAD_USER_GPIO or PI_BAD_DUTYRANGE. If PWM is currently active on the GPIO its dutycycle will be scaled to reflect the new range. The real range, the number of steps between fully off and fully on for each frequency, is given in the following table. . . 25, 50, 100, 125, 200, 250, 400, 500, 625, 800, 1000, 1250, 2000, 2500, 4000, 5000, 10000, 20000 . . The real value set by [*gpioPWM*] is (dutycycle * real range) / range. ... gpioSetPWMrange(24, 2000); // Now 2000 is fully on // 1000 is half on // 500 is quarter on, etc. ... D*/ /*F*/ int gpioGetPWMrange(unsigned user_gpio); /*D Returns the dutycycle range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. . . user_gpio: 0-31 . . If a hardware clock or hardware PWM is active on the GPIO the reported range will be 1000000 (1M). ... r = gpioGetPWMrange(23); ... D*/ /*F*/ int gpioGetPWMrealRange(unsigned user_gpio); /*D Returns the real range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. . . user_gpio: 0-31 . . If a hardware clock is active on the GPIO the reported real range will be 1000000 (1M). If hardware PWM is active on the GPIO the reported real range will be approximately 250M divided by the set PWM frequency. ... rr = gpioGetPWMrealRange(17); ... D*/ /*F*/ int gpioSetPWMfrequency(unsigned user_gpio, unsigned frequency); /*D Sets the frequency in hertz to be used for the GPIO. . . user_gpio: 0-31 frequency: >=0 . . Returns the numerically closest frequency if OK, otherwise PI_BAD_USER_GPIO. If PWM is currently active on the GPIO it will be switched off and then back on at the new frequency. Each GPIO can be independently set to one of 18 different PWM frequencies. The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5, 8, or 10 microseconds (default 5). The frequencies for each sample rate are: . . Hertz 1: 40000 20000 10000 8000 5000 4000 2500 2000 1600 1250 1000 800 500 400 250 200 100 50 2: 20000 10000 5000 4000 2500 2000 1250 1000 800 625 500 400 250 200 125 100 50 25 4: 10000 5000 2500 2000 1250 1000 625 500 400 313 250 200 125 100 63 50 25 13 sample rate (us) 5: 8000 4000 2000 1600 1000 800 500 400 320 250 200 160 100 80 50 40 20 10 8: 5000 2500 1250 1000 625 500 313 250 200 156 125 100 63 50 31 25 13 6 10: 4000 2000 1000 800 500 400 250 200 160 125 100 80 50 40 25 20 10 5 . . ... gpioSetPWMfrequency(23, 0); // Set GPIO23 to lowest frequency. gpioSetPWMfrequency(24, 500); // Set GPIO24 to 500Hz. gpioSetPWMfrequency(25, 100000); // Set GPIO25 to highest frequency. ... D*/ /*F*/ int gpioGetPWMfrequency(unsigned user_gpio); /*D Returns the frequency (in hertz) used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. . . user_gpio: 0-31 . . For normal PWM the frequency will be that defined for the GPIO by [*gpioSetPWMfrequency*]. If a hardware clock is active on the GPIO the reported frequency will be that set by [*gpioHardwareClock*]. If hardware PWM is active on the GPIO the reported frequency will be that set by [*gpioHardwarePWM*]. ... f = gpioGetPWMfrequency(23); // Get frequency used for GPIO23. ... D*/ /*F*/ int gpioServo(unsigned user_gpio, unsigned pulsewidth); /*D Starts servo pulses on the GPIO, 0 (off), 500 (most anti-clockwise) to 2500 (most clockwise). . . user_gpio: 0-31 pulsewidth: 0, 500-2500 . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_BAD_PULSEWIDTH. The range supported by servos varies and should probably be determined by experiment. A value of 1500 should always be safe and represents the mid-point of rotation. You can DAMAGE a servo if you command it to move beyond its limits. The following causes an on pulse of 1500 microseconds duration to be transmitted on GPIO 17 at a rate of 50 times per second. This will command a servo connected to GPIO 17 to rotate to its mid-point. ... gpioServo(17, 1000); // Move servo to safe position anti-clockwise. gpioServo(23, 1500); // Move servo to centre position. gpioServo(25, 2000); // Move servo to safe position clockwise. ... OTHER UPDATE RATES: This function updates servos at 50Hz. If you wish to use a different update frequency you will have to use the PWM functions. . . PWM Hz 50 100 200 400 500 1E6/Hz 20000 10000 5000 2500 2000 . . Firstly set the desired PWM frequency using [*gpioSetPWMfrequency*]. Then set the PWM range using [*gpioSetPWMrange*] to 1E6/frequency. Doing this allows you to use units of microseconds when setting the servo pulsewidth. E.g. If you want to update a servo connected to GPIO25 at 400Hz . . gpioSetPWMfrequency(25, 400); gpioSetPWMrange(25, 2500); . . Thereafter use the PWM command to move the servo, e.g. gpioPWM(25, 1500) will set a 1500 us pulse. D*/ /*F*/ int gpioGetServoPulsewidth(unsigned user_gpio); /*D Returns the servo pulsewidth setting for the GPIO. . . user_gpio: 0-31 . . Returns 0 (off), 500 (most anti-clockwise) to 2500 (most clockwise) if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERVO_GPIO. D*/ /*F*/ int gpioSetAlertFunc(unsigned user_gpio, gpioAlertFunc_t f); /*D Registers a function to be called (a callback) when the specified GPIO changes state. . . user_gpio: 0-31 f: the callback function . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO. One callback may be registered per GPIO. The callback is passed the GPIO, the new level, and the tick. . . Parameter Value Meaning GPIO 0-31 The GPIO which has changed state level 0-2 0 = change to low (a falling edge) 1 = change to high (a rising edge) 2 = no level change (a watchdog timeout) tick 32 bit The number of microseconds since boot WARNING: this wraps around from 4294967295 to 0 roughly every 72 minutes . . The alert may be cancelled by passing NULL as the function. The GPIO are sampled at a rate set when the library is started. If a value isn't specifically set the default of 5 us is used. The number of samples per second is given in the following table. . . samples per sec 1 1,000,000 2 500,000 sample 4 250,000 rate 5 200,000 (us) 8 125,000 10 100,000 . . Level changes shorter than the sample rate may be missed. The thread which calls the alert functions is triggered nominally 1000 times per second. The active alert functions will be called once per level change since the last time the thread was activated. i.e. The active alert functions will get all level changes but there will be a latency. If you want to track the level of more than one GPIO do so by maintaining the state in the callback. Do not use [*gpioRead*]. Remember the event that triggered the callback may have happened several milliseconds before and the GPIO may have changed level many times since then. The tick value is the time stamp of the sample in microseconds, see [*gpioTick*] for more details. ... void aFunction(int gpio, int level, uint32_t tick) { printf("GPIO %d became %d at %d", gpio, level, tick); } // call aFunction whenever GPIO 4 changes state gpioSetAlertFunc(4, aFunction); ... D*/ /*F*/ int gpioSetAlertFuncEx( unsigned user_gpio, gpioAlertFuncEx_t f, void *userdata); /*D Registers a function to be called (a callback) when the specified GPIO changes state. . . user_gpio: 0-31 f: the callback function userdata: pointer to arbitrary user data . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO. One callback may be registered per GPIO. The callback is passed the GPIO, the new level, the tick, and the userdata pointer. . . Parameter Value Meaning GPIO 0-31 The GPIO which has changed state level 0-2 0 = change to low (a falling edge) 1 = change to high (a rising edge) 2 = no level change (a watchdog timeout) tick 32 bit The number of microseconds since boot WARNING: this wraps around from 4294967295 to 0 roughly every 72 minutes userdata pointer Pointer to an arbitrary object . . See [*gpioSetAlertFunc*] for further details. Only one of [*gpioSetAlertFunc*] or [*gpioSetAlertFuncEx*] can be registered per GPIO. D*/ /*F*/ int gpioSetISRFunc( unsigned gpio, unsigned edge, int timeout, gpioISRFunc_t f); /*D Registers a function to be called (a callback) whenever the specified GPIO interrupt occurs. . . gpio: 0-53 edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE timeout: interrupt timeout in milliseconds (<=0 to cancel) f: the callback function . . Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_EDGE, or PI_BAD_ISR_INIT. One function may be registered per GPIO. The function is passed the GPIO, the current level, and the current tick. The level will be PI_TIMEOUT if the optional interrupt timeout expires. . . Parameter Value Meaning GPIO 0-53 The GPIO which has changed state level 0-2 0 = change to low (a falling edge) 1 = change to high (a rising edge) 2 = no level change (interrupt timeout) tick 32 bit The number of microseconds since boot WARNING: this wraps around from 4294967295 to 0 roughly every 72 minutes . . The underlying Linux sysfs GPIO interface is used to provide the interrupt services. The first time the function is called, with a non-NULL f, the GPIO is exported, set to be an input, and set to interrupt on the given edge and timeout. Subsequent calls, with a non-NULL f, can vary one or more of the edge, timeout, or function. The ISR may be cancelled by passing a NULL f, in which case the GPIO is unexported. The tick is that read at the time the process was informed of the interrupt. This will be a variable number of microseconds after the interrupt occurred. Typically the latency will be of the order of 50 microseconds. The latency is not guaranteed and will vary with system load. The level is that read at the time the process was informed of the interrupt, or PI_TIMEOUT if the optional interrupt timeout expired. It may not be the same as the expected edge as interrupts happening in rapid succession may be missed by the kernel (i.e. this mechanism can not be used to capture several interrupts only a few microseconds apart). D*/ /*F*/ int gpioSetISRFuncEx( unsigned gpio, unsigned edge, int timeout, gpioISRFuncEx_t f, void *userdata); /*D Registers a function to be called (a callback) whenever the specified GPIO interrupt occurs. . . gpio: 0-53 edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE timeout: interrupt timeout in milliseconds (<=0 to cancel) f: the callback function userdata: pointer to arbitrary user data . . Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_EDGE, or PI_BAD_ISR_INIT. The function is passed the GPIO, the current level, the current tick, and the userdata pointer. . . Parameter Value Meaning GPIO 0-53 The GPIO which has changed state level 0-2 0 = change to low (a falling edge) 1 = change to high (a rising edge) 2 = no level change (interrupt timeout) tick 32 bit The number of microseconds since boot WARNING: this wraps around from 4294967295 to 0 roughly every 72 minutes userdata pointer Pointer to an arbitrary object . . Only one of [*gpioSetISRFunc*] or [*gpioSetISRFuncEx*] can be registered per GPIO. See [*gpioSetISRFunc*] for further details. D*/ /*F*/ int gpioNotifyOpen(void); /*D This function requests a free notification handle. Returns a handle greater than or equal to zero if OK, otherwise PI_NO_HANDLE. A notification is a method for being notified of GPIO state changes via a pipe or socket. Pipe notifications for handle x will be available at the pipe named /dev/pigpiox (where x is the handle number). E.g. if the function returns 15 then the notifications must be read from /dev/pigpio15. Socket notifications are returned to the socket which requested the handle. ... h = gpioNotifyOpen(); if (h >= 0) { sprintf(str, "/dev/pigpio%d", h); fd = open(str, O_RDONLY); if (fd >= 0) { // Okay. } else { // Error. } } else { // Error. } ... D*/ /*F*/ int gpioNotifyOpenWithSize(int bufSize); /*D This function requests a free notification handle. It differs from [*gpioNotifyOpen*] in that the pipe size may be specified, whereas [*gpioNotifyOpen*] uses the default pipe size. See [*gpioNotifyOpen*] for further details. D*/ /*F*/ int gpioNotifyBegin(unsigned handle, uint32_t bits); /*D This function starts notifications on a previously opened handle. . . handle: >=0, as returned by [*gpioNotifyOpen*] bits: a bit mask indicating the GPIO of interest . . Returns 0 if OK, otherwise PI_BAD_HANDLE. The notification sends state changes for each GPIO whose corresponding bit in bits is set. Each notification occupies 12 bytes in the fifo and has the following structure. . . typedef struct { uint16_t seqno; uint16_t flags; uint32_t tick; uint32_t level; } gpioReport_t; . . seqno: starts at 0 each time the handle is opened and then increments by one for each report. flags: three flags are defined, PI_NTFY_FLAGS_WDOG, PI_NTFY_FLAGS_ALIVE, and PI_NTFY_FLAGS_EVENT. If bit 5 is set (PI_NTFY_FLAGS_WDOG) then bits 0-4 of the flags indicate a GPIO which has had a watchdog timeout. If bit 6 is set (PI_NTFY_FLAGS_ALIVE) this indicates a keep alive signal on the pipe/socket and is sent once a minute in the absence of other notification activity. If bit 7 is set (PI_NTFY_FLAGS_EVENT) then bits 0-4 of the flags indicate an event which has been triggered. tick: the number of microseconds since system boot. It wraps around after 1h12m. level: indicates the level of each GPIO. If bit 1<=0, as returned by [*gpioNotifyOpen*] . . Returns 0 if OK, otherwise PI_BAD_HANDLE. Notifications for the handle are suspended until [*gpioNotifyBegin*] is called again. ... gpioNotifyPause(h); ... D*/ /*F*/ int gpioNotifyClose(unsigned handle); /*D This function stops notifications on a previously opened handle and releases the handle for reuse. . . handle: >=0, as returned by [*gpioNotifyOpen*] . . Returns 0 if OK, otherwise PI_BAD_HANDLE. ... gpioNotifyClose(h); ... D*/ /*F*/ int gpioWaveClear(void); /*D This function clears all waveforms and any data added by calls to the [*gpioWaveAdd**] functions. Returns 0 if OK. ... gpioWaveClear(); ... D*/ /*F*/ int gpioWaveAddNew(void); /*D This function starts a new empty waveform. You wouldn't normally need to call this function as it is automatically called after a waveform is created with the [*gpioWaveCreate*] function. Returns 0 if OK. ... gpioWaveAddNew(); ... D*/ /*F*/ int gpioWaveAddGeneric(unsigned numPulses, gpioPulse_t *pulses); /*D This function adds a number of pulses to the current waveform. . . numPulses: the number of pulses pulses: an array of pulses . . Returns the new total number of pulses in the current waveform if OK, otherwise PI_TOO_MANY_PULSES. The pulses are interleaved in time order within the existing waveform (if any). Merging allows the waveform to be built in parts, that is the settings for GPIO#1 can be added, and then GPIO#2 etc. If the added waveform is intended to start after or within the existing waveform then the first pulse should consist of a delay. ... // Construct and send a 30 microsecond square wave. gpioSetMode(gpio, PI_OUTPUT); pulse[0].gpioOn = (1<= 0) { gpioWaveTxSend(wave_id, PI_WAVE_MODE_REPEAT); // Transmit for 30 seconds. sleep(30); gpioWaveTxStop(); } else { // Wave create failed. } ... D*/ /*F*/ int gpioWaveAddSerial (unsigned user_gpio, unsigned baud, unsigned data_bits, unsigned stop_bits, unsigned offset, unsigned numBytes, char *str); /*D This function adds a waveform representing serial data to the existing waveform (if any). The serial data starts offset microseconds from the start of the waveform. . . user_gpio: 0-31 baud: 50-1000000 data_bits: 1-32 stop_bits: 2-8 offset: >=0 numBytes: >=1 str: an array of chars (which may contain nulls) . . Returns the new total number of pulses in the current waveform if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_WAVE_BAUD, PI_BAD_DATABITS, PI_BAD_STOPBITS, PI_TOO_MANY_CHARS, PI_BAD_SER_OFFSET, or PI_TOO_MANY_PULSES. NOTES: The serial data is formatted as one start bit, data_bits data bits, and stop_bits/2 stop bits. It is legal to add serial data streams with different baud rates to the same waveform. numBytes is the number of bytes of data in str. The bytes required for each character depend upon data_bits. For data_bits 1-8 there will be one byte per character. For data_bits 9-16 there will be two bytes per character. For data_bits 17-32 there will be four bytes per character. ... #define MSG_LEN 8 int i; char *str; char data[MSG_LEN]; str = "Hello world!"; gpioWaveAddSerial(4, 9600, 8, 2, 0, strlen(str), str); for (i=0; i=0, as returned by [*gpioWaveCreate*] . . Wave ids are allocated in order, 0, 1, 2, etc. Returns 0 if OK, otherwise PI_BAD_WAVE_ID. D*/ /*F*/ int gpioWaveTxSend(unsigned wave_id, unsigned wave_mode); /*D This function transmits the waveform with id wave_id. The mode determines whether the waveform is sent once or cycles endlessly. The SYNC variants wait for the current waveform to reach the end of a cycle or finish before starting the new waveform. WARNING: bad things may happen if you delete the previous waveform before it has been synced to the new waveform. NOTE: Any hardware PWM started by [*gpioHardwarePWM*] will be cancelled. . . wave_id: >=0, as returned by [*gpioWaveCreate*] wave_mode: PI_WAVE_MODE_ONE_SHOT, PI_WAVE_MODE_REPEAT, PI_WAVE_MODE_ONE_SHOT_SYNC, PI_WAVE_MODE_REPEAT_SYNC . . Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE. D*/ /*F*/ int gpioWaveChain(char *buf, unsigned bufSize); /*D This function transmits a chain of waveforms. NOTE: Any hardware PWM started by [*gpioHardwarePWM*] will be cancelled. The waves to be transmitted are specified by the contents of buf which contains an ordered list of [*wave_id*]s and optional command codes and related data. . . buf: pointer to the wave_ids and optional command codes bufSize: the number of bytes in buf . . Returns 0 if OK, otherwise PI_CHAIN_NESTING, PI_CHAIN_LOOP_CNT, PI_BAD_CHAIN_LOOP, PI_BAD_CHAIN_CMD, PI_CHAIN_COUNTER, PI_BAD_CHAIN_DELAY, PI_CHAIN_TOO_BIG, or PI_BAD_WAVE_ID. Each wave is transmitted in the order specified. A wave may occur multiple times per chain. A blocks of waves may be transmitted multiple times by using the loop commands. The block is bracketed by loop start and end commands. Loops may be nested. Delays between waves may be added with the delay command. The following command codes are supported: Name @ Cmd & Data @ Meaning Loop Start @ 255 0 @ Identify start of a wave block Loop Repeat @ 255 1 x y @ loop x + y*256 times Delay @ 255 2 x y @ delay x + y*256 microseconds Loop Forever @ 255 3 @ loop forever If present Loop Forever must be the last entry in the chain. The code is currently dimensioned to support a chain with roughly 600 entries and 20 loop counters. ... #include #include #define WAVES 5 #define GPIO 4 int main(int argc, char *argv[]) { int i, wid[WAVES]; if (gpioInitialise()<0) return -1; gpioSetMode(GPIO, PI_OUTPUT); printf("start piscope, press return"); getchar(); for (i=0; i=0 . . Returns the number of bytes copied if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERIAL_GPIO. The bytes returned for each character depend upon the number of data bits [*data_bits*] specified in the [*gpioSerialReadOpen*] command. For [*data_bits*] 1-8 there will be one byte per character. For [*data_bits*] 9-16 there will be two bytes per character. For [*data_bits*] 17-32 there will be four bytes per character. D*/ /*F*/ int gpioSerialReadClose(unsigned user_gpio); /*D This function closes a GPIO for bit bang reading of serial data. . . user_gpio: 0-31, previously opened with [*gpioSerialReadOpen*] . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_SERIAL_GPIO. D*/ /*F*/ int i2cOpen(unsigned i2cBus, unsigned i2cAddr, unsigned i2cFlags); /*D This returns a handle for the device at the address on the I2C bus. . . i2cBus: >=0 i2cAddr: 0-0x7F i2cFlags: 0 . . No flags are currently defined. This parameter should be set to zero. Physically buses 0 and 1 are available on the Pi. Higher numbered buses will be available if a kernel supported bus multiplexor is being used. The GPIO used are given in the following table. @ SDA @ SCL I2C 0 @ 0 @ 1 I2C 1 @ 2 @ 3 Returns a handle (>=0) if OK, otherwise PI_BAD_I2C_BUS, PI_BAD_I2C_ADDR, PI_BAD_FLAGS, PI_NO_HANDLE, or PI_I2C_OPEN_FAILED. For the SMBus commands the low level transactions are shown at the end of the function description. The following abbreviations are used. . . S (1 bit) : Start bit P (1 bit) : Stop bit Rd/Wr (1 bit) : Read/Write bit. Rd equals 1, Wr equals 0. A, NA (1 bit) : Accept and not accept bit. Addr (7 bits): I2C 7 bit address. i2cReg (8 bits): Command byte, a byte which often selects a register. Data (8 bits): A data byte. Count (8 bits): A byte defining the length of a block operation. [..]: Data sent by the device. . . D*/ /*F*/ int i2cClose(unsigned handle); /*D This closes the I2C device associated with the handle. . . handle: >=0, as returned by a call to [*i2cOpen*] . . Returns 0 if OK, otherwise PI_BAD_HANDLE. D*/ /*F*/ int i2cWriteQuick(unsigned handle, unsigned bit); /*D This sends a single bit (in the Rd/Wr bit) to the device associated with handle. . . handle: >=0, as returned by a call to [*i2cOpen*] bit: 0-1, the value to write . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. Quick command. SMBus 2.0 5.5.1 . . S Addr bit [A] P . . D*/ /*F*/ int i2cWriteByte(unsigned handle, unsigned bVal); /*D This sends a single byte to the device associated with handle. . . handle: >=0, as returned by a call to [*i2cOpen*] bVal: 0-0xFF, the value to write . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. Send byte. SMBus 2.0 5.5.2 . . S Addr Wr [A] bVal [A] P . . D*/ /*F*/ int i2cReadByte(unsigned handle); /*D This reads a single byte from the device associated with handle. . . handle: >=0, as returned by a call to [*i2cOpen*] . . Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, or PI_I2C_READ_FAILED. Receive byte. SMBus 2.0 5.5.3 . . S Addr Rd [A] [Data] NA P . . D*/ /*F*/ int i2cWriteByteData(unsigned handle, unsigned i2cReg, unsigned bVal); /*D This writes a single byte to the specified register of the device associated with handle. . . handle: >=0, as returned by a call to [*i2cOpen*] i2cReg: 0-255, the register to write bVal: 0-0xFF, the value to write . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. Write byte. SMBus 2.0 5.5.4 . . S Addr Wr [A] i2cReg [A] bVal [A] P . . D*/ /*F*/ int i2cWriteWordData(unsigned handle, unsigned i2cReg, unsigned wVal); /*D This writes a single 16 bit word to the specified register of the device associated with handle. . . handle: >=0, as returned by a call to [*i2cOpen*] i2cReg: 0-255, the register to write wVal: 0-0xFFFF, the value to write . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. Write word. SMBus 2.0 5.5.4 . . S Addr Wr [A] i2cReg [A] wValLow [A] wValHigh [A] P . . D*/ /*F*/ int i2cReadByteData(unsigned handle, unsigned i2cReg); /*D This reads a single byte from the specified register of the device associated with handle. . . handle: >=0, as returned by a call to [*i2cOpen*] i2cReg: 0-255, the register to read . . Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. Read byte. SMBus 2.0 5.5.5 . . S Addr Wr [A] i2cReg [A] S Addr Rd [A] [Data] NA P . . D*/ /*F*/ int i2cReadWordData(unsigned handle, unsigned i2cReg); /*D This reads a single 16 bit word from the specified register of the device associated with handle. . . handle: >=0, as returned by a call to [*i2cOpen*] i2cReg: 0-255, the register to read . . Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. Read word. SMBus 2.0 5.5.5 . . S Addr Wr [A] i2cReg [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P . . D*/ /*F*/ int i2cProcessCall(unsigned handle, unsigned i2cReg, unsigned wVal); /*D This writes 16 bits of data to the specified register of the device associated with handle and reads 16 bits of data in return. . . handle: >=0, as returned by a call to [*i2cOpen*] i2cReg: 0-255, the register to write/read wVal: 0-0xFFFF, the value to write . . Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. Process call. SMBus 2.0 5.5.6 . . S Addr Wr [A] i2cReg [A] wValLow [A] wValHigh [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P . . D*/ /*F*/ int i2cWriteBlockData( unsigned handle, unsigned i2cReg, char *buf, unsigned count); /*D This writes up to 32 bytes to the specified register of the device associated with handle. . . handle: >=0, as returned by a call to [*i2cOpen*] i2cReg: 0-255, the register to write buf: an array with the data to send count: 1-32, the number of bytes to write . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. Block write. SMBus 2.0 5.5.7 . . S Addr Wr [A] i2cReg [A] count [A] buf0 [A] buf1 [A] ... [A] bufn [A] P . . D*/ /*F*/ int i2cReadBlockData(unsigned handle, unsigned i2cReg, char *buf); /*D This reads a block of up to 32 bytes from the specified register of the device associated with handle. . . handle: >=0, as returned by a call to [*i2cOpen*] i2cReg: 0-255, the register to read buf: an array to receive the read data . . The amount of returned data is set by the device. Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. Block read. SMBus 2.0 5.5.7 . . S Addr Wr [A] i2cReg [A] S Addr Rd [A] [Count] A [buf0] A [buf1] A ... A [bufn] NA P . . D*/ /*F*/ int i2cBlockProcessCall( unsigned handle, unsigned i2cReg, char *buf, unsigned count); /*D This writes data bytes to the specified register of the device associated with handle and reads a device specified number of bytes of data in return. . . handle: >=0, as returned by a call to [*i2cOpen*] i2cReg: 0-255, the register to write/read buf: an array with the data to send and to receive the read data count: 1-32, the number of bytes to write . . Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received. The total number of bytes sent/received must be 32 or less. Block write-block read. SMBus 2.0 5.5.8 . . S Addr Wr [A] i2cReg [A] count [A] buf0 [A] ... bufn [A] S Addr Rd [A] [Count] A [buf0] A ... [bufn] A P . . D*/ /*F*/ int i2cReadI2CBlockData( unsigned handle, unsigned i2cReg, char *buf, unsigned count); /*D This reads count bytes from the specified register of the device associated with handle . The count may be 1-32. . . handle: >=0, as returned by a call to [*i2cOpen*] i2cReg: 0-255, the register to read buf: an array to receive the read data count: 1-32, the number of bytes to read . . Returns the number of bytes read (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. . . S Addr Wr [A] i2cReg [A] S Addr Rd [A] [buf0] A [buf1] A ... A [bufn] NA P . . D*/ /*F*/ int i2cWriteI2CBlockData( unsigned handle, unsigned i2cReg, char *buf, unsigned count); /*D This writes 1 to 32 bytes to the specified register of the device associated with handle. . . handle: >=0, as returned by a call to [*i2cOpen*] i2cReg: 0-255, the register to write buf: the data to write count: 1-32, the number of bytes to write . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. . . S Addr Wr [A] i2cReg [A] buf0 [A] buf1 [A] ... [A] bufn [A] P . . D*/ /*F*/ int i2cReadDevice(unsigned handle, char *buf, unsigned count); /*D This reads count bytes from the raw device into buf. . . handle: >=0, as returned by a call to [*i2cOpen*] buf: an array to receive the read data bytes count: >0, the number of bytes to read . . Returns count (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. . . S Addr Rd [A] [buf0] A [buf1] A ... A [bufn] NA P . . D*/ /*F*/ int i2cWriteDevice(unsigned handle, char *buf, unsigned count); /*D This writes count bytes from buf to the raw device. . . handle: >=0, as returned by a call to [*i2cOpen*] buf: an array containing the data bytes to write count: >0, the number of bytes to write . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. . . S Addr Wr [A] buf0 [A] buf1 [A] ... [A] bufn [A] P . . D*/ /*F*/ void i2cSwitchCombined(int setting); /*D This sets the I2C (i2c-bcm2708) module "use combined transactions" parameter on or off. . . setting: 0 to set the parameter off, non-zero to set it on . . NOTE: when the flag is on a write followed by a read to the same slave address will use a repeated start (rather than a stop/start). D*/ /*F*/ int i2cSegments(unsigned handle, pi_i2c_msg_t *segs, unsigned numSegs); /*D This function executes multiple I2C segments in one transaction by calling the I2C_RDWR ioctl. . . handle: >=0, as returned by a call to [*i2cOpen*] segs: an array of I2C segments numSegs: >0, the number of I2C segments . . Returns the number of segments if OK, otherwise PI_BAD_I2C_SEG. D*/ /*F*/ int i2cZip( unsigned handle, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen); /*D This function executes a sequence of I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenated command codes and associated data. . . handle: >=0, as returned by a call to [*i2cOpen*] inBuf: pointer to the concatenated I2C commands, see below inLen: size of command buffer outBuf: pointer to buffer to hold returned data outLen: size of output buffer . . Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_HANDLE, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN. PI_BAD_I2C_WLEN, or PI_BAD_I2C_SEG. The following command codes are supported: Name @ Cmd & Data @ Meaning End @ 0 @ No more commands Escape @ 1 @ Next P is two bytes On @ 2 @ Switch combined flag on Off @ 3 @ Switch combined flag off Address @ 4 P @ Set I2C address to P Flags @ 5 lsb msb @ Set I2C flags to lsb + (msb << 8) Read @ 6 P @ Read P bytes of data Write @ 7 P ... @ Write P bytes of data The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). The address defaults to that associated with the handle. The flags default to 0. The address and flags maintain their previous value until updated. The returned I2C data is stored in consecutive locations of outBuf. ... Set address 0x53, write 0x32, read 6 bytes Set address 0x1E, write 0x03, read 6 bytes Set address 0x68, write 0x1B, read 8 bytes End 0x04 0x53 0x07 0x01 0x32 0x06 0x06 0x04 0x1E 0x07 0x01 0x03 0x06 0x06 0x04 0x68 0x07 0x01 0x1B 0x06 0x08 0x00 ... D*/ /*F*/ int bbI2COpen(unsigned SDA, unsigned SCL, unsigned baud); /*D This function selects a pair of GPIO for bit banging I2C at a specified baud rate. Bit banging I2C allows for certain operations which are not possible with the standard I2C driver. o baud rates as low as 50 o repeated starts o clock stretching o I2C on any pair of spare GPIO . . SDA: 0-31 SCL: 0-31 baud: 50-500000 . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_I2C_BAUD, or PI_GPIO_IN_USE. NOTE: The GPIO used for SDA and SCL must have pull-ups to 3V3 connected. As a guide the hardware pull-ups on pins 3 and 5 are 1k8 in value. D*/ /*F*/ int bbI2CClose(unsigned SDA); /*D This function stops bit banging I2C on a pair of GPIO previously opened with [*bbI2COpen*]. . . SDA: 0-31, the SDA GPIO used in a prior call to [*bbI2COpen*] . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_I2C_GPIO. D*/ /*F*/ int bbI2CZip( unsigned SDA, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen); /*D This function executes a sequence of bit banged I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenated command codes and associated data. . . SDA: 0-31 (as used in a prior call to [*bbI2COpen*]) inBuf: pointer to the concatenated I2C commands, see below inLen: size of command buffer outBuf: pointer to buffer to hold returned data outLen: size of output buffer . . Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_USER_GPIO, PI_NOT_I2C_GPIO, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN, PI_BAD_I2C_WLEN, PI_I2C_READ_FAILED, or PI_I2C_WRITE_FAILED. The following command codes are supported: Name @ Cmd & Data @ Meaning End @ 0 @ No more commands Escape @ 1 @ Next P is two bytes Start @ 2 @ Start condition Stop @ 3 @ Stop condition Address @ 4 P @ Set I2C address to P Flags @ 5 lsb msb @ Set I2C flags to lsb + (msb << 8) Read @ 6 P @ Read P bytes of data Write @ 7 P ... @ Write P bytes of data The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). The address and flags default to 0. The address and flags maintain their previous value until updated. No flags are currently defined. The returned I2C data is stored in consecutive locations of outBuf. ... Set address 0x53 start, write 0x32, (re)start, read 6 bytes, stop Set address 0x1E start, write 0x03, (re)start, read 6 bytes, stop Set address 0x68 start, write 0x1B, (re)start, read 8 bytes, stop End 0x04 0x53 0x02 0x07 0x01 0x32 0x02 0x06 0x06 0x03 0x04 0x1E 0x02 0x07 0x01 0x03 0x02 0x06 0x06 0x03 0x04 0x68 0x02 0x07 0x01 0x1B 0x02 0x06 0x08 0x03 0x00 ... D*/ /*F*/ int bscXfer(bsc_xfer_t *bsc_xfer); /*D This function provides a low-level interface to the SPI/I2C Slave peripheral on the BCM chip. This peripheral allows the Pi to act as a hardware slave device on an I2C or SPI bus. This is not a bit bang version and as such is OS timing independent. The bus timing is handled directly by the chip. The output process is simple. You simply append data to the FIFO buffer on the chip. This works like a queue, you add data to the queue and the master removes it. I can't get SPI to work properly. I tried with a control word of 0x303 and swapped MISO and MOSI. The function sets the BSC mode, writes any data in the transmit buffer to the BSC transmit FIFO, and copies any data in the BSC receive FIFO to the receive buffer. . . bsc_xfer:= a structure defining the transfer typedef struct { uint32_t control; // Write int rxCnt; // Read only char rxBuf[BSC_FIFO_SIZE]; // Read only int txCnt; // Write char txBuf[BSC_FIFO_SIZE]; // Write } bsc_xfer_t; . . To start a transfer set control (see below), copy the bytes to be added to the transmit FIFO (if any) to txBuf and set txCnt to the number of copied bytes. Upon return rxCnt will be set to the number of received bytes placed in rxBuf. Note that the control word sets the BSC mode. The BSC will stay in that mode until a different control word is sent. GPIO used for models other than those based on the BCM2711. @ SDA @ SCL @ MOSI @ SCLK @ MISO @ CE I2C @ 18 @ 19 @ - @ - @ - @ - SPI @ - @ - @ 18 @ 19 @ 20 @ 21 GPIO used for models based on the BCM2711 (e.g. the Pi4B). @ SDA @ SCL @ MOSI @ SCLK @ MISO @ CE I2C @ 10 @ 11 @ - @ - @ - @ - SPI @ - @ - @ 10 @ 11 @ 9 @ 8 When a zero control word is received the used GPIO will be reset to INPUT mode. The returned function value is the status of the transfer (see below). If there was an error the status will be less than zero (and will contain the error code). The most significant word of the returned status contains the number of bytes actually copied from txBuf to the BSC transmit FIFO (may be less than requested if the FIFO already contained untransmitted data). control consists of the following bits. . . 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 a a a a a a a - - IT HC TF IR RE TE BK EC ES PL PH I2 SP EN . . Bits 0-13 are copied unchanged to the BSC CR register. See pages 163-165 of the Broadcom peripherals document for full details. aaaaaaa @ defines the I2C slave address (only relevant in I2C mode) IT @ invert transmit status flags HC @ enable host control TF @ enable test FIFO IR @ invert receive status flags RE @ enable receive TE @ enable transmit BK @ abort operation and clear FIFOs EC @ send control register as first I2C byte ES @ send status register as first I2C byte PL @ set SPI polarity high PH @ set SPI phase high I2 @ enable I2C mode SP @ enable SPI mode EN @ enable BSC peripheral The returned status has the following format . . 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 S S S S S R R R R R T T T T T RB TE RF TF RE TB . . Bits 0-15 are copied unchanged from the BSC FR register. See pages 165-166 of the Broadcom peripherals document for full details. SSSSS @ number of bytes successfully copied to transmit FIFO RRRRR @ number of bytes in receieve FIFO TTTTT @ number of bytes in transmit FIFO RB @ receive busy TE @ transmit FIFO empty RF @ receive FIFO full TF @ transmit FIFO full RE @ receive FIFO empty TB @ transmit busy The following example shows how to configure the BSC peripheral as an I2C slave with address 0x13 and send four bytes. ... bsc_xfer_t xfer; xfer.control = (0x13<<16) | 0x305; memcpy(xfer.txBuf, "ABCD", 4); xfer.txCnt = 4; status = bscXfer(&xfer); if (status >= 0) { // process transfer } ... D*/ /*F*/ int bbSPIOpen( unsigned CS, unsigned MISO, unsigned MOSI, unsigned SCLK, unsigned baud, unsigned spiFlags); /*D This function selects a set of GPIO for bit banging SPI with a specified baud rate and mode. . . CS: 0-31 MISO: 0-31 MOSI: 0-31 SCLK: 0-31 baud: 50-250000 spiFlags: see below . . spiFlags consists of the least significant 22 bits. . . 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 R T 0 0 0 0 0 0 0 0 0 0 0 p m m . . mm defines the SPI mode, defaults to 0 . . Mode CPOL CPHA 0 0 0 1 0 1 2 1 0 3 1 1 . . p is 0 if CS is active low (default) and 1 for active high. T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. The other bits in flags should be set to zero. Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_SPI_BAUD, or PI_GPIO_IN_USE. If more than one device is connected to the SPI bus (defined by SCLK, MOSI, and MISO) each must have its own CS. ... bbSPIOpen(10, MISO, MOSI, SCLK, 10000, 0); // device 1 bbSPIOpen(11, MISO, MOSI, SCLK, 20000, 3); // device 2 ... D*/ /*F*/ int bbSPIClose(unsigned CS); /*D This function stops bit banging SPI on a set of GPIO opened with [*bbSPIOpen*]. . . CS: 0-31, the CS GPIO used in a prior call to [*bbSPIOpen*] . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_SPI_GPIO. D*/ /*F*/ int bbSPIXfer( unsigned CS, char *inBuf, char *outBuf, unsigned count); /*D This function executes a bit banged SPI transfer. . . CS: 0-31 (as used in a prior call to [*bbSPIOpen*]) inBuf: pointer to buffer to hold data to be sent outBuf: pointer to buffer to hold returned data count: size of data transfer . . Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_USER_GPIO, PI_NOT_SPI_GPIO or PI_BAD_POINTER. ... // gcc -Wall -pthread -o bbSPIx_test bbSPIx_test.c -lpigpio // sudo ./bbSPIx_test #include #include "pigpio.h" #define CE0 5 #define CE1 6 #define MISO 13 #define MOSI 19 #define SCLK 12 int main(int argc, char *argv[]) { int i, count, set_val, read_val; unsigned char inBuf[3]; char cmd1[] = {0, 0}; char cmd2[] = {12, 0}; char cmd3[] = {1, 128, 0}; if (gpioInitialise() < 0) { fprintf(stderr, "pigpio initialisation failed.\n"); return 1; } bbSPIOpen(CE0, MISO, MOSI, SCLK, 10000, 0); // MCP4251 DAC bbSPIOpen(CE1, MISO, MOSI, SCLK, 20000, 3); // MCP3008 ADC for (i=0; i<256; i++) { cmd1[1] = i; count = bbSPIXfer(CE0, cmd1, (char *)inBuf, 2); // > DAC if (count == 2) { count = bbSPIXfer(CE0, cmd2, (char *)inBuf, 2); // < DAC if (count == 2) { set_val = inBuf[1]; count = bbSPIXfer(CE1, cmd3, (char *)inBuf, 3); // < ADC if (count == 3) { read_val = ((inBuf[1]&3)<<8) | inBuf[2]; printf("%d %d\n", set_val, read_val); } } } } bbSPIClose(CE0); bbSPIClose(CE1); gpioTerminate(); return 0; } ... D*/ /*F*/ int spiOpen(unsigned spiChan, unsigned baud, unsigned spiFlags); /*D This function returns a handle for the SPI device on the channel. Data will be transferred at baud bits per second. The flags may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select. The Pi has two SPI peripherals: main and auxiliary. The main SPI has two chip selects (channels), the auxiliary has three. The auxiliary SPI is available on all models but the A and B. The GPIO used are given in the following table. @ MISO @ MOSI @ SCLK @ CE0 @ CE1 @ CE2 Main SPI @ 9 @ 10 @ 11 @ 8 @ 7 @ - Aux SPI @ 19 @ 20 @ 21 @ 18 @ 17 @ 16 . . spiChan: 0-1 (0-2 for the auxiliary SPI) baud: 32K-125M (values above 30M are unlikely to work) spiFlags: see below . . Returns a handle (>=0) if OK, otherwise PI_BAD_SPI_CHANNEL, PI_BAD_SPI_SPEED, PI_BAD_FLAGS, PI_NO_AUX_SPI, or PI_SPI_OPEN_FAILED. spiFlags consists of the least significant 22 bits. . . 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 b b b b b b R T n n n n W A u2 u1 u0 p2 p1 p0 m m . . mm defines the SPI mode. Warning: modes 1 and 3 do not appear to work on the auxiliary SPI. . . Mode POL PHA 0 0 0 1 0 1 2 1 0 3 1 1 . . px is 0 if CEx is active low (default) and 1 for active high. ux is 0 if the CEx GPIO is reserved for SPI (default) and 1 otherwise. A is 0 for the main SPI, 1 for the auxiliary SPI. W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Main SPI only. nnnn defines the number of bytes (0-15) to write before switching the MOSI line to MISO to read data. This field is ignored if W is not set. Main SPI only. T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. Auxiliary SPI only. R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. Auxiliary SPI only. bbbbbb defines the word size in bits (0-32). The default (0) sets 8 bits per word. Auxiliary SPI only. The [*spiRead*], [*spiWrite*], and [*spiXfer*] functions transfer data packed into 1, 2, or 4 bytes according to the word size in bits. For bits 1-8 there will be one byte per word. For bits 9-16 there will be two bytes per word. For bits 17-32 there will be four bytes per word. Multi-byte transfers are made in least significant byte first order. E.g. to transfer 32 11-bit words buf should contain 64 bytes and count should be 64. E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A. The other bits in flags should be set to zero. D*/ /*F*/ int spiClose(unsigned handle); /*D This functions closes the SPI device identified by the handle. . . handle: >=0, as returned by a call to [*spiOpen*] . . Returns 0 if OK, otherwise PI_BAD_HANDLE. D*/ /*F*/ int spiRead(unsigned handle, char *buf, unsigned count); /*D This function reads count bytes of data from the SPI device associated with the handle. . . handle: >=0, as returned by a call to [*spiOpen*] buf: an array to receive the read data bytes count: the number of bytes to read . . Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. D*/ /*F*/ int spiWrite(unsigned handle, char *buf, unsigned count); /*D This function writes count bytes of data from buf to the SPI device associated with the handle. . . handle: >=0, as returned by a call to [*spiOpen*] buf: the data bytes to write count: the number of bytes to write . . Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. D*/ /*F*/ int spiXfer(unsigned handle, char *txBuf, char *rxBuf, unsigned count); /*D This function transfers count bytes of data from txBuf to the SPI device associated with the handle. Simultaneously count bytes of data are read from the device and placed in rxBuf. . . handle: >=0, as returned by a call to [*spiOpen*] txBuf: the data bytes to write rxBuf: the received data bytes count: the number of bytes to transfer . . Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. D*/ /*F*/ int serOpen(char *sertty, unsigned baud, unsigned serFlags); /*D This function opens a serial device at a specified baud rate and with specified flags. The device name must start with /dev/tty or /dev/serial. . . sertty: the serial device to open baud: the baud rate in bits per second, see below serFlags: 0 . . Returns a handle (>=0) if OK, otherwise PI_NO_HANDLE, or PI_SER_OPEN_FAILED. The baud rate must be one of 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, or 230400. No flags are currently defined. This parameter should be set to zero. D*/ /*F*/ int serClose(unsigned handle); /*D This function closes the serial device associated with handle. . . handle: >=0, as returned by a call to [*serOpen*] . . Returns 0 if OK, otherwise PI_BAD_HANDLE. D*/ /*F*/ int serWriteByte(unsigned handle, unsigned bVal); /*D This function writes bVal to the serial port associated with handle. . . handle: >=0, as returned by a call to [*serOpen*] . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED. D*/ /*F*/ int serReadByte(unsigned handle); /*D This function reads a byte from the serial port associated with handle. . . handle: >=0, as returned by a call to [*serOpen*] . . Returns the read byte (>=0) if OK, otherwise PI_BAD_HANDLE, PI_SER_READ_NO_DATA, or PI_SER_READ_FAILED. If no data is ready PI_SER_READ_NO_DATA is returned. D*/ /*F*/ int serWrite(unsigned handle, char *buf, unsigned count); /*D This function writes count bytes from buf to the the serial port associated with handle. . . handle: >=0, as returned by a call to [*serOpen*] buf: the array of bytes to write count: the number of bytes to write . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED. D*/ /*F*/ int serRead(unsigned handle, char *buf, unsigned count); /*D This function reads up count bytes from the the serial port associated with handle and writes them to buf. . . handle: >=0, as returned by a call to [*serOpen*] buf: an array to receive the read data count: the maximum number of bytes to read . . Returns the number of bytes read (>0=) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_READ_NO_DATA. If no data is ready zero is returned. D*/ /*F*/ int serDataAvailable(unsigned handle); /*D This function returns the number of bytes available to be read from the device associated with handle. . . handle: >=0, as returned by a call to [*serOpen*] . . Returns the number of bytes of data available (>=0) if OK, otherwise PI_BAD_HANDLE. D*/ /*F*/ int gpioTrigger(unsigned user_gpio, unsigned pulseLen, unsigned level); /*D This function sends a trigger pulse to a GPIO. The GPIO is set to level for pulseLen microseconds and then reset to not level. . . user_gpio: 0-31 pulseLen: 1-100 level: 0,1 . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_LEVEL, or PI_BAD_PULSELEN. D*/ /*F*/ int gpioSetWatchdog(unsigned user_gpio, unsigned timeout); /*D Sets a watchdog for a GPIO. . . user_gpio: 0-31 timeout: 0-60000 . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_BAD_WDOG_TIMEOUT. The watchdog is nominally in milliseconds. One watchdog may be registered per GPIO. The watchdog may be cancelled by setting timeout to 0. Until cancelled a timeout will be reported every timeout milliseconds after the last GPIO activity. In particular: 1) any registered alert function for the GPIO will be called with the level set to PI_TIMEOUT. 2) any notification for the GPIO will have a report written to the fifo with the flags set to indicate a watchdog timeout. ... void aFunction(int gpio, int level, uint32_t tick) { printf("GPIO %d became %d at %d", gpio, level, tick); } // call aFunction whenever GPIO 4 changes state gpioSetAlertFunc(4, aFunction); // or approximately every 5 millis gpioSetWatchdog(4, 5); ... D*/ /*F*/ int gpioNoiseFilter(unsigned user_gpio, unsigned steady, unsigned active); /*D Sets a noise filter on a GPIO. Level changes on the GPIO are ignored until a level which has been stable for [*steady*] microseconds is detected. Level changes on the GPIO are then reported for [*active*] microseconds after which the process repeats. . . user_gpio: 0-31 steady: 0-300000 active: 0-1000000 . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER. This filter affects the GPIO samples returned to callbacks set up with [*gpioSetAlertFunc*], [*gpioSetAlertFuncEx*], [*gpioSetGetSamplesFunc*], and [*gpioSetGetSamplesFuncEx*]. It does not affect interrupts set up with [*gpioSetISRFunc*], [*gpioSetISRFuncEx*], or levels read by [*gpioRead*], [*gpioRead_Bits_0_31*], or [*gpioRead_Bits_32_53*]. Level changes before and after the active period may be reported. Your software must be designed to cope with such reports. D*/ /*F*/ int gpioGlitchFilter(unsigned user_gpio, unsigned steady); /*D Sets a glitch filter on a GPIO. Level changes on the GPIO are not reported unless the level has been stable for at least [*steady*] microseconds. The level is then reported. Level changes of less than [*steady*] microseconds are ignored. . . user_gpio: 0-31 steady: 0-300000 . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER. This filter affects the GPIO samples returned to callbacks set up with [*gpioSetAlertFunc*], [*gpioSetAlertFuncEx*], [*gpioSetGetSamplesFunc*], and [*gpioSetGetSamplesFuncEx*]. It does not affect interrupts set up with [*gpioSetISRFunc*], [*gpioSetISRFuncEx*], or levels read by [*gpioRead*], [*gpioRead_Bits_0_31*], or [*gpioRead_Bits_32_53*]. Each (stable) edge will be timestamped [*steady*] microseconds after it was first detected. D*/ /*F*/ int gpioSetGetSamplesFunc(gpioGetSamplesFunc_t f, uint32_t bits); /*D Registers a function to be called (a callback) every millisecond with the latest GPIO samples. . . f: the function to call bits: the GPIO of interest . . Returns 0 if OK. The function is passed a pointer to the samples (an array of [*gpioSample_t*]), and the number of samples. Only one function can be registered. The callback may be cancelled by passing NULL as the function. The samples returned will be the union of bits, plus any active alerts, plus any active notifications. e.g. if there are alerts for GPIO 7, 8, and 9, notifications for GPIO 8, 10, 23, 24, and bits is (1<<23)|(1<<17) then samples for GPIO 7, 8, 9, 10, 17, 23, and 24 will be reported. D*/ /*F*/ int gpioSetGetSamplesFuncEx( gpioGetSamplesFuncEx_t f, uint32_t bits, void *userdata); /*D Registers a function to be called (a callback) every millisecond with the latest GPIO samples. . . f: the function to call bits: the GPIO of interest userdata: a pointer to arbitrary user data . . Returns 0 if OK. The function is passed a pointer to the samples (an array of [*gpioSample_t*]), the number of samples, and the userdata pointer. Only one of [*gpioGetSamplesFunc*] or [*gpioGetSamplesFuncEx*] can be registered. See [*gpioSetGetSamplesFunc*] for further details. D*/ /*F*/ int gpioSetTimerFunc(unsigned timer, unsigned millis, gpioTimerFunc_t f); /*D Registers a function to be called (a callback) every millis milliseconds. . . timer: 0-9 millis: 10-60000 f: the function to call . . Returns 0 if OK, otherwise PI_BAD_TIMER, PI_BAD_MS, or PI_TIMER_FAILED. 10 timers are supported numbered 0 to 9. One function may be registered per timer. The timer may be cancelled by passing NULL as the function. ... void bFunction(void) { printf("two seconds have elapsed"); } // call bFunction every 2000 milliseconds gpioSetTimerFunc(0, 2000, bFunction); ... D*/ /*F*/ int gpioSetTimerFuncEx( unsigned timer, unsigned millis, gpioTimerFuncEx_t f, void *userdata); /*D Registers a function to be called (a callback) every millis milliseconds. . . timer: 0-9. millis: 10-60000 f: the function to call userdata: a pointer to arbitrary user data . . Returns 0 if OK, otherwise PI_BAD_TIMER, PI_BAD_MS, or PI_TIMER_FAILED. The function is passed the userdata pointer. Only one of [*gpioSetTimerFunc*] or [*gpioSetTimerFuncEx*] can be registered per timer. See [*gpioSetTimerFunc*] for further details. D*/ /*F*/ pthread_t *gpioStartThread(gpioThreadFunc_t f, void *userdata); /*D Starts a new thread of execution with f as the main routine. . . f: the main function for the new thread userdata: a pointer to arbitrary user data . . Returns a pointer to pthread_t if OK, otherwise NULL. The function is passed the single argument arg. The thread can be cancelled by passing the pointer to pthread_t to [*gpioStopThread*]. ... #include #include void *myfunc(void *arg) { while (1) { printf("%s", arg); sleep(1); } } int main(int argc, char *argv[]) { pthread_t *p1, *p2, *p3; if (gpioInitialise() < 0) return 1; p1 = gpioStartThread(myfunc, "thread 1"); sleep(3); p2 = gpioStartThread(myfunc, "thread 2"); sleep(3); p3 = gpioStartThread(myfunc, "thread 3"); sleep(3); gpioStopThread(p3); sleep(3); gpioStopThread(p2); sleep(3); gpioStopThread(p1); sleep(3); gpioTerminate(); } ... D*/ /*F*/ void gpioStopThread(pthread_t *pth); /*D Cancels the thread pointed at by pth. . . pth: a thread pointer returned by [*gpioStartThread*] . . No value is returned. The thread to be stopped should have been started with [*gpioStartThread*]. D*/ /*F*/ int gpioStoreScript(char *script); /*D This function stores a null terminated script for later execution. See [[http://abyz.me.uk/rpi/pigpio/pigs.html#Scripts]] for details. . . script: the text of the script . . The function returns a script id if the script is valid, otherwise PI_BAD_SCRIPT. D*/ /*F*/ int gpioRunScript(unsigned script_id, unsigned numPar, uint32_t *param); /*D This function runs a stored script. . . script_id: >=0, as returned by [*gpioStoreScript*] numPar: 0-10, the number of parameters param: an array of parameters . . The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM. param is an array of up to 10 parameters which may be referenced in the script as p0 to p9. D*/ /*F*/ int gpioRunScript(unsigned script_id, unsigned numPar, uint32_t *param); /*D This function runs a stored script. . . script_id: >=0, as returned by [*gpioStoreScript*] numPar: 0-10, the number of parameters param: an array of parameters . . The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM. param is an array of up to 10 parameters which may be referenced in the script as p0 to p9. D*/ /*F*/ int gpioUpdateScript(unsigned script_id, unsigned numPar, uint32_t *param); /*D This function sets the parameters of a script. The script may or may not be running. The first numPar parameters of the script are overwritten with the new values. . . script_id: >=0, as returned by [*gpioStoreScript*] numPar: 0-10, the number of parameters param: an array of parameters . . The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM. param is an array of up to 10 parameters which may be referenced in the script as p0 to p9. D*/ /*F*/ int gpioScriptStatus(unsigned script_id, uint32_t *param); /*D This function returns the run status of a stored script as well as the current values of parameters 0 to 9. . . script_id: >=0, as returned by [*gpioStoreScript*] param: an array to hold the returned 10 parameters . . The function returns greater than or equal to 0 if OK, otherwise PI_BAD_SCRIPT_ID. The run status may be . . PI_SCRIPT_INITING PI_SCRIPT_HALTED PI_SCRIPT_RUNNING PI_SCRIPT_WAITING PI_SCRIPT_FAILED . . The current value of script parameters 0 to 9 are returned in param. D*/ /*F*/ int gpioStopScript(unsigned script_id); /*D This function stops a running script. . . script_id: >=0, as returned by [*gpioStoreScript*] . . The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID. D*/ /*F*/ int gpioDeleteScript(unsigned script_id); /*D This function deletes a stored script. . . script_id: >=0, as returned by [*gpioStoreScript*] . . The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID. D*/ /*F*/ int gpioSetSignalFunc(unsigned signum, gpioSignalFunc_t f); /*D Registers a function to be called (a callback) when a signal occurs. . . signum: 0-63 f: the callback function . . Returns 0 if OK, otherwise PI_BAD_SIGNUM. The function is passed the signal number. One function may be registered per signal. The callback may be cancelled by passing NULL. By default all signals are treated as fatal and cause the library to call gpioTerminate and then exit. D*/ /*F*/ int gpioSetSignalFuncEx( unsigned signum, gpioSignalFuncEx_t f, void *userdata); /*D Registers a function to be called (a callback) when a signal occurs. . . signum: 0-63 f: the callback function userdata: a pointer to arbitrary user data . . Returns 0 if OK, otherwise PI_BAD_SIGNUM. The function is passed the signal number and the userdata pointer. Only one of gpioSetSignalFunc or gpioSetSignalFuncEx can be registered per signal. See gpioSetSignalFunc for further details. D*/ /*F*/ uint32_t gpioRead_Bits_0_31(void); /*D Returns the current level of GPIO 0-31. D*/ /*F*/ uint32_t gpioRead_Bits_32_53(void); /*D Returns the current level of GPIO 32-53. D*/ /*F*/ int gpioWrite_Bits_0_31_Clear(uint32_t bits); /*D Clears GPIO 0-31 if the corresponding bit in bits is set. . . bits: a bit mask of GPIO to clear . . Returns 0 if OK. ... // To clear (set to 0) GPIO 4, 7, and 15 gpioWrite_Bits_0_31_Clear( (1<<4) | (1<<7) | (1<<15) ); ... D*/ /*F*/ int gpioWrite_Bits_32_53_Clear(uint32_t bits); /*D Clears GPIO 32-53 if the corresponding bit (0-21) in bits is set. . . bits: a bit mask of GPIO to clear . . Returns 0 if OK. D*/ /*F*/ int gpioWrite_Bits_0_31_Set(uint32_t bits); /*D Sets GPIO 0-31 if the corresponding bit in bits is set. . . bits: a bit mask of GPIO to set . . Returns 0 if OK. D*/ /*F*/ int gpioWrite_Bits_32_53_Set(uint32_t bits); /*D Sets GPIO 32-53 if the corresponding bit (0-21) in bits is set. . . bits: a bit mask of GPIO to set . . Returns 0 if OK. ... // To set (set to 1) GPIO 32, 40, and 53 gpioWrite_Bits_32_53_Set((1<<(32-32)) | (1<<(40-32)) | (1<<(53-32))); ... D*/ /*F*/ int gpioHardwareClock(unsigned gpio, unsigned clkfreq); /*D Starts a hardware clock on a GPIO at the specified frequency. Frequencies above 30MHz are unlikely to work. . . gpio: see description clkfreq: 0 (off) or 4689-250M (13184-375M for the BCM2711) . . Returns 0 if OK, otherwise PI_BAD_GPIO, PI_NOT_HCLK_GPIO, PI_BAD_HCLK_FREQ,or PI_BAD_HCLK_PASS. The same clock is available on multiple GPIO. The latest frequency setting will be used by all GPIO which share a clock. The GPIO must be one of the following. . . 4 clock 0 All models 5 clock 1 All models but A and B (reserved for system use) 6 clock 2 All models but A and B 20 clock 0 All models but A and B 21 clock 1 All models but A and Rev.2 B (reserved for system use) 32 clock 0 Compute module only 34 clock 0 Compute module only 42 clock 1 Compute module only (reserved for system use) 43 clock 2 Compute module only 44 clock 1 Compute module only (reserved for system use) . . Access to clock 1 is protected by a password as its use will likely crash the Pi. The password is given by or'ing 0x5A000000 with the GPIO number. D*/ /*F*/ int gpioHardwarePWM(unsigned gpio, unsigned PWMfreq, unsigned PWMduty); /*D Starts hardware PWM on a GPIO at the specified frequency and dutycycle. Frequencies above 30MHz are unlikely to work. NOTE: Any waveform started by [*gpioWaveTxSend*], or [*gpioWaveChain*] will be cancelled. This function is only valid if the pigpio main clock is PCM. The main clock defaults to PCM but may be overridden by a call to [*gpioCfgClock*]. . . gpio: see description PWMfreq: 0 (off) or 1-125M (1-187.5M for the BCM2711) PWMduty: 0 (off) to 1000000 (1M)(fully on) . . Returns 0 if OK, otherwise PI_BAD_GPIO, PI_NOT_HPWM_GPIO, PI_BAD_HPWM_DUTY, PI_BAD_HPWM_FREQ, or PI_HPWM_ILLEGAL. The same PWM channel is available on multiple GPIO. The latest frequency and dutycycle setting will be used by all GPIO which share a PWM channel. The GPIO must be one of the following. . . 12 PWM channel 0 All models but A and B 13 PWM channel 1 All models but A and B 18 PWM channel 0 All models 19 PWM channel 1 All models but A and B 40 PWM channel 0 Compute module only 41 PWM channel 1 Compute module only 45 PWM channel 1 Compute module only 52 PWM channel 0 Compute module only 53 PWM channel 1 Compute module only . . The actual number of steps beween off and fully on is the integral part of 250M/PWMfreq (375M/PWMfreq for the BCM2711). The actual frequency set is 250M/steps (375M/steps for the BCM2711). There will only be a million steps for a PWMfreq of 250 (375 for the BCM2711). Lower frequencies will have more steps and higher frequencies will have fewer steps. PWMduty is automatically scaled to take this into account. D*/ /*F*/ int gpioTime(unsigned timetype, int *seconds, int *micros); /*D Updates the seconds and micros variables with the current time. . . timetype: 0 (relative), 1 (absolute) seconds: a pointer to an int to hold seconds micros: a pointer to an int to hold microseconds . . Returns 0 if OK, otherwise PI_BAD_TIMETYPE. If timetype is PI_TIME_ABSOLUTE updates seconds and micros with the number of seconds and microseconds since the epoch (1st January 1970). If timetype is PI_TIME_RELATIVE updates seconds and micros with the number of seconds and microseconds since the library was initialised. ... int secs, mics; // print the number of seconds since the library was started gpioTime(PI_TIME_RELATIVE, &secs, &mics); printf("library started %d.%03d seconds ago", secs, mics/1000); ... D*/ /*F*/ int gpioSleep(unsigned timetype, int seconds, int micros); /*D Sleeps for the number of seconds and microseconds specified by seconds and micros. . . timetype: 0 (relative), 1 (absolute) seconds: seconds to sleep micros: microseconds to sleep . . Returns 0 if OK, otherwise PI_BAD_TIMETYPE, PI_BAD_SECONDS, or PI_BAD_MICROS. If timetype is PI_TIME_ABSOLUTE the sleep ends when the number of seconds and microseconds since the epoch (1st January 1970) has elapsed. System clock changes are taken into account. If timetype is PI_TIME_RELATIVE the sleep is for the specified number of seconds and microseconds. System clock changes do not effect the sleep length. For short delays (say, 50 microseonds or less) use [*gpioDelay*]. ... gpioSleep(PI_TIME_RELATIVE, 2, 500000); // sleep for 2.5 seconds gpioSleep(PI_TIME_RELATIVE, 0, 100000); // sleep for 0.1 seconds gpioSleep(PI_TIME_RELATIVE, 60, 0); // sleep for one minute ... D*/ /*F*/ uint32_t gpioDelay(uint32_t micros); /*D Delays for at least the number of microseconds specified by micros. . . micros: the number of microseconds to sleep . . Returns the actual length of the delay in microseconds. Delays of 100 microseconds or less use busy waits. D*/ /*F*/ uint32_t gpioTick(void); /*D Returns the current system tick. Tick is the number of microseconds since system boot. As tick is an unsigned 32 bit quantity it wraps around after 2^32 microseconds, which is approximately 1 hour 12 minutes. You don't need to worry about the wrap around as long as you take a tick (uint32_t) from another tick, i.e. the following code will always provide the correct difference. ... uint32_t startTick, endTick; int diffTick; startTick = gpioTick(); // do some processing endTick = gpioTick(); diffTick = endTick - startTick; printf("some processing took %d microseconds", diffTick); ... D*/ /*F*/ unsigned gpioHardwareRevision(void); /*D Returns the hardware revision. If the hardware revision can not be found or is not a valid hexadecimal number the function returns 0. The hardware revision is the last few characters on the Revision line of /proc/cpuinfo. The revision number can be used to determine the assignment of GPIO to pins (see [*gpio*]). There are at least three types of board. Type 1 boards have hardware revision numbers of 2 and 3. Type 2 boards have hardware revision numbers of 4, 5, 6, and 15. Type 3 boards have hardware revision numbers of 16 or greater. for "Revision : 0002" the function returns 2. for "Revision : 000f" the function returns 15. for "Revision : 000g" the function returns 0. D*/ /*F*/ unsigned gpioVersion(void); /*D Returns the pigpio version. D*/ /*F*/ int gpioGetPad(unsigned pad); /*D This function returns the pad drive strength in mA. . . pad: 0-2, the pad to get . . Returns the pad drive strength if OK, otherwise PI_BAD_PAD. Pad @ GPIO 0 @ 0-27 1 @ 28-45 2 @ 46-53 ... strength = gpioGetPad(1); // get pad 1 strength ... D*/ /*F*/ int gpioSetPad(unsigned pad, unsigned padStrength); /*D This function sets the pad drive strength in mA. . . pad: 0-2, the pad to set padStrength: 1-16 mA . . Returns 0 if OK, otherwise PI_BAD_PAD, or PI_BAD_STRENGTH. Pad @ GPIO 0 @ 0-27 1 @ 28-45 2 @ 46-53 ... gpioSetPad(0, 16); // set pad 0 strength to 16 mA ... D*/ /*F*/ int eventMonitor(unsigned handle, uint32_t bits); /*D This function selects the events to be reported on a previously opened handle. . . handle: >=0, as returned by [*gpioNotifyOpen*] bits: a bit mask indicating the events of interest . . Returns 0 if OK, otherwise PI_BAD_HANDLE. A report is sent each time an event is triggered providing the corresponding bit in bits is set. See [*gpioNotifyBegin*] for the notification format. ... // Start reporting events 3, 6, and 7. // bit 76543210 // (0xC8 = 0b11001000) eventMonitor(h, 0xC8); ... D*/ /*F*/ int eventSetFunc(unsigned event, eventFunc_t f); /*D Registers a function to be called (a callback) when the specified event occurs. . . event: 0-31 f: the callback function . . Returns 0 if OK, otherwise PI_BAD_EVENT_ID. One function may be registered per event. The function is passed the event, and the tick. The callback may be cancelled by passing NULL as the function. D*/ /*F*/ int eventSetFuncEx(unsigned event, eventFuncEx_t f, void *userdata); /*D Registers a function to be called (a callback) when the specified event occurs. . . event: 0-31 f: the callback function userdata: pointer to arbitrary user data . . Returns 0 if OK, otherwise PI_BAD_EVENT_ID. One function may be registered per event. The function is passed the event, the tick, and the ueserdata pointer. The callback may be cancelled by passing NULL as the function. Only one of [*eventSetFunc*] or [*eventSetFuncEx*] can be registered per event. D*/ /*F*/ int eventTrigger(unsigned event); /*D This function signals the occurrence of an event. . . event: 0-31, the event . . Returns 0 if OK, otherwise PI_BAD_EVENT_ID. An event is a signal used to inform one or more consumers to start an action. Each consumer which has registered an interest in the event (e.g. by calling [*eventSetFunc*]) will be informed by a callback. One event, PI_EVENT_BSC (31) is predefined. This event is auto generated on BSC slave activity. The meaning of other events is arbitrary. Note that other than its id and its tick there is no data associated with an event. D*/ /*F*/ int shell(char *scriptName, char *scriptString); /*D This function uses the system call to execute a shell script with the given string as its parameter. . . scriptName: the name of the script, only alphanumeric characters, '-' and '_' are allowed in the name scriptString: the string to pass to the script . . The exit status of the system call is returned if OK, otherwise PI_BAD_SHELL_STATUS. scriptName must exist in /opt/pigpio/cgi and must be executable. The returned exit status is normally 256 times that set by the shell script exit function. If the script can't be found 32512 will be returned. The following table gives some example returned statuses. Script exit status @ Returned system call status 1 @ 256 5 @ 1280 10 @ 2560 200 @ 51200 script not found @ 32512 ... // pass two parameters, hello and world status = shell("scr1", "hello world"); // pass three parameters, hello, string with spaces, and world status = shell("scr1", "hello 'string with spaces' world"); // pass one parameter, hello string with spaces world status = shell("scr1", "\"hello string with spaces world\""); ... D*/ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcomment" /*F*/ int fileOpen(char *file, unsigned mode); /*D This function returns a handle to a file opened in a specified mode. . . file: the file to open mode: the file open mode . . Returns a handle (>=0) if OK, otherwise PI_NO_HANDLE, PI_NO_FILE_ACCESS, PI_BAD_FILE_MODE, PI_FILE_OPEN_FAILED, or PI_FILE_IS_A_DIR. File A file may only be opened if permission is granted by an entry in /opt/pigpio/access. This is intended to allow remote access to files in a more or less controlled manner. Each entry in /opt/pigpio/access takes the form of a file path which may contain wildcards followed by a single letter permission. The permission may be R for read, W for write, U for read/write, and N for no access. Where more than one entry matches a file the most specific rule applies. If no entry matches a file then access is denied. Suppose /opt/pigpio/access contains the following entries . . /home/* n /home/pi/shared/dir_1/* w /home/pi/shared/dir_2/* r /home/pi/shared/dir_3/* u /home/pi/shared/dir_1/file.txt n . . Files may be written in directory dir_1 with the exception of file.txt. Files may be read in directory dir_2. Files may be read and written in directory dir_3. If a directory allows read, write, or read/write access then files may be created in that directory. In an attempt to prevent risky permissions the following paths are ignored in /opt/pigpio/access. . . a path containing .. a path containing only wildcards (*?) a path containing less than two non-wildcard parts . . Mode The mode may have the following values. Macro @ Value @ Meaning PI_FILE_READ @ 1 @ open file for reading PI_FILE_WRITE @ 2 @ open file for writing PI_FILE_RW @ 3 @ open file for reading and writing The following values may be or'd into the mode. Macro @ Value @ Meaning PI_FILE_APPEND @ 4 @ Writes append data to the end of the file PI_FILE_CREATE @ 8 @ The file is created if it doesn't exist PI_FILE_TRUNC @ 16 @ The file is truncated Newly created files are owned by root with permissions owner read and write. ... #include #include int main(int argc, char *argv[]) { int handle, c; char buf[60000]; if (gpioInitialise() < 0) return 1; // assumes /opt/pigpio/access contains the following line // /ram/*.c r handle = fileOpen("/ram/pigpio.c", PI_FILE_READ); if (handle >= 0) { while ((c=fileRead(handle, buf, sizeof(buf)-1))) { buf[c] = 0; printf("%s", buf); } fileClose(handle); } gpioTerminate(); } ... D*/ #pragma GCC diagnostic pop /*F*/ int fileClose(unsigned handle); /*D This function closes the file associated with handle. . . handle: >=0, as returned by a call to [*fileOpen*] . . Returns 0 if OK, otherwise PI_BAD_HANDLE. ... fileClose(h); ... D*/ /*F*/ int fileWrite(unsigned handle, char *buf, unsigned count); /*D This function writes count bytes from buf to the the file associated with handle. . . handle: >=0, as returned by a call to [*fileOpen*] buf: the array of bytes to write count: the number of bytes to write . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_FILE_NOT_WOPEN, or PI_BAD_FILE_WRITE. ... status = fileWrite(h, buf, count); if (status == 0) { // okay } else { // error } ... D*/ /*F*/ int fileRead(unsigned handle, char *buf, unsigned count); /*D This function reads up to count bytes from the the file associated with handle and writes them to buf. . . handle: >=0, as returned by a call to [*fileOpen*] buf: an array to receive the read data count: the maximum number of bytes to read . . Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_FILE_NOT_ROPEN, or PI_BAD_FILE_WRITE. ... if (fileRead(h, buf, sizeof(buf)) > 0) { // process read data } ... D*/ /*F*/ int fileSeek(unsigned handle, int32_t seekOffset, int seekFrom); /*D This function seeks to a position within the file associated with handle. . . handle: >=0, as returned by a call to [*fileOpen*] seekOffset: the number of bytes to move. Positive offsets move forward, negative offsets backwards. seekFrom: one of PI_FROM_START (0), PI_FROM_CURRENT (1), or PI_FROM_END (2) . . Returns the new byte position within the file (>=0) if OK, otherwise PI_BAD_HANDLE, or PI_BAD_FILE_SEEK. ... fileSeek(0, 20, PI_FROM_START); // Seek to start plus 20 size = fileSeek(0, 0, PI_FROM_END); // Seek to end, return size pos = fileSeek(0, 0, PI_FROM_CURRENT); // Return current position ... D*/ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcomment" /*F*/ int fileList(char *fpat, char *buf, unsigned count); /*D This function returns a list of files which match a pattern. The pattern may contain wildcards. . . fpat: file pattern to match buf: an array to receive the matching file names count: the maximum number of bytes to read . . Returns the number of returned bytes if OK, otherwise PI_NO_FILE_ACCESS, or PI_NO_FILE_MATCH. The pattern must match an entry in /opt/pigpio/access. The pattern may contain wildcards. See [*fileOpen*]. NOTE The returned value is not the number of files, it is the number of bytes in the buffer. The file names are separated by newline characters. ... #include #include int main(int argc, char *argv[]) { int c; char buf[1000]; if (gpioInitialise() < 0) return 1; // assumes /opt/pigpio/access contains the following line // /ram/*.c r c = fileList("/ram/p*.c", buf, sizeof(buf)); if (c >= 0) { // terminate string buf[c] = 0; printf("%s", buf); } gpioTerminate(); } ... D*/ #pragma GCC diagnostic pop /*F*/ int gpioCfgBufferSize(unsigned cfgMillis); /*D Configures pigpio to buffer cfgMillis milliseconds of GPIO samples. This function is only effective if called before [*gpioInitialise*]. . . cfgMillis: 100-10000 . . The default setting is 120 milliseconds. The intention is to allow for bursts of data and protection against other processes hogging cpu time. I haven't seen a process locked out for more than 100 milliseconds. Making the buffer bigger uses a LOT of memory at the more frequent sampling rates as shown in the following table in MBs. . . buffer milliseconds 120 250 500 1sec 2sec 4sec 8sec 1 16 31 55 107 --- --- --- 2 10 18 31 55 107 --- --- sample 4 8 12 18 31 55 107 --- rate 5 8 10 14 24 45 87 --- (us) 8 6 8 12 18 31 55 107 10 6 8 10 14 24 45 87 . . D*/ /*F*/ int gpioCfgClock( unsigned cfgMicros, unsigned cfgPeripheral, unsigned cfgSource); /*D Configures pigpio to use a particular sample rate timed by a specified peripheral. This function is only effective if called before [*gpioInitialise*]. . . cfgMicros: 1, 2, 4, 5, 8, 10 cfgPeripheral: 0 (PWM), 1 (PCM) cfgSource: deprecated, value is ignored . . The timings are provided by the specified peripheral (PWM or PCM). The default setting is 5 microseconds using the PCM peripheral. The approximate CPU percentage used for each sample rate is: . . sample cpu rate % 1 25 2 16 4 11 5 10 8 15 10 14 . . A sample rate of 5 microseconds seeems to be the sweet spot. D*/ /*F*/ int gpioCfgDMAchannel(unsigned DMAchannel); /* DEPRECATED */ /*D Configures pigpio to use the specified DMA channel. This function is only effective if called before [*gpioInitialise*]. . . DMAchannel: 0-14 . . The default setting is to use channel 14. D*/ /*F*/ int gpioCfgDMAchannels(unsigned primaryChannel, unsigned secondaryChannel); /*D Configures pigpio to use the specified DMA channels. This function is only effective if called before [*gpioInitialise*]. . . primaryChannel: 0-14 secondaryChannel: 0-14 . . The default setting depends on whether the Pi has a BCM2711 chip or not (currently only the Pi4B has a BCM2711). The default setting for a non-BCM2711 is to use channel 14 for the primary channel and channel 6 for the secondary channel. The default setting for a BCM2711 is to use channel 7 for the primary channel and channel 6 for the secondary channel. The secondary channel is only used for the transmission of waves. If possible use one of channels 0 to 6 for the secondary channel (a full channel). A full channel only requires one DMA control block regardless of the length of a pulse delay. Channels 7 to 14 (lite channels) require one DMA control block for each 16383 microseconds of delay. I.e. a 10 second pulse delay requires one control block on a full channel and 611 control blocks on a lite channel. D*/ /*F*/ int gpioCfgPermissions(uint64_t updateMask); /*D Configures pigpio to restrict GPIO updates via the socket or pipe interfaces to the GPIO specified by the mask. Programs directly calling the pigpio library (i.e. linked with -lpigpio are not affected). A GPIO update is a write to a GPIO or a GPIO mode change or any function which would force such an action. This function is only effective if called before [*gpioInitialise*]. . . updateMask: bit (1<=0 arg2: >=0 argx: extra (byte) arguments argc: number of extra arguments . . Returns >= 0 if OK, less than 0 indicates a user defined error. D*/ /*F*/ int gpioCustom2(unsigned arg1, char *argx, unsigned argc, char *retBuf, unsigned retMax); /*D This function is available for user customisation. It differs from gpioCustom1 in that it returns an array of bytes rather than just an integer. The returned value is an integer indicating the number of returned bytes. . . arg1: >=0 argx: extra (byte) arguments argc: number of extra arguments retBuf: buffer for returned bytes retMax: maximum number of bytes to return . . Returns >= 0 if OK, less than 0 indicates a user defined error. The number of returned bytes must be retMax or less. D*/ /*F*/ int rawWaveAddSPI( rawSPI_t *spi, unsigned offset, unsigned spiSS, char *buf, unsigned spiTxBits, unsigned spiBitFirst, unsigned spiBitLast, unsigned spiBits); /*D This function adds a waveform representing SPI data to the existing waveform (if any). . . spi: a pointer to a spi object offset: microseconds from the start of the waveform spiSS: the slave select GPIO buf: the bits to transmit, most significant bit first spiTxBits: the number of bits to write spiBitFirst: the first bit to read spiBitLast: the last bit to read spiBits: the number of bits to transfer . . Returns the new total number of pulses in the current waveform if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_SER_OFFSET, or PI_TOO_MANY_PULSES. Not intended for general use. D*/ /*F*/ int rawWaveAddGeneric(unsigned numPulses, rawWave_t *pulses); /*D This function adds a number of pulses to the current waveform. . . numPulses: the number of pulses pulses: the array containing the pulses . . Returns the new total number of pulses in the current waveform if OK, otherwise PI_TOO_MANY_PULSES. The advantage of this function over gpioWaveAddGeneric is that it allows the setting of the flags field. The pulses are interleaved in time order within the existing waveform (if any). Merging allows the waveform to be built in parts, that is the settings for GPIO#1 can be added, and then GPIO#2 etc. If the added waveform is intended to start after or within the existing waveform then the first pulse should consist of a delay. Not intended for general use. D*/ /*F*/ unsigned rawWaveCB(void); /*D Returns the number of the cb being currently output. Not intended for general use. D*/ /*F*/ rawCbs_t *rawWaveCBAdr(int cbNum); /*D Return the (Linux) address of contol block cbNum. . . cbNum: the cb of interest . . Not intended for general use. D*/ /*F*/ uint32_t rawWaveGetOOL(int pos); /*D Gets the OOL parameter stored at pos. . . pos: the position of interest. . . Not intended for general use. D*/ /*F*/ void rawWaveSetOOL(int pos, uint32_t lVal); /*D Sets the OOL parameter stored at pos to value. . . pos: the position of interest lVal: the value to write . . Not intended for general use. D*/ /*F*/ uint32_t rawWaveGetOut(int pos); /*D Gets the wave output parameter stored at pos. DEPRECATED: use rawWaveGetOOL instead. . . pos: the position of interest. . . Not intended for general use. D*/ /*F*/ void rawWaveSetOut(int pos, uint32_t lVal); /*D Sets the wave output parameter stored at pos to value. DEPRECATED: use rawWaveSetOOL instead. . . pos: the position of interest lVal: the value to write . . Not intended for general use. D*/ /*F*/ uint32_t rawWaveGetIn(int pos); /*D Gets the wave input value parameter stored at pos. DEPRECATED: use rawWaveGetOOL instead. . . pos: the position of interest . . Not intended for general use. D*/ /*F*/ void rawWaveSetIn(int pos, uint32_t lVal); /*D Sets the wave input value stored at pos to value. DEPRECATED: use rawWaveSetOOL instead. . . pos: the position of interest lVal: the value to write . . Not intended for general use. D*/ /*F*/ rawWaveInfo_t rawWaveInfo(int wave_id); /*D Gets details about the wave with id wave_id. . . wave_id: the wave of interest . . Not intended for general use. D*/ /*F*/ int getBitInBytes(int bitPos, char *buf, int numBits); /*D Returns the value of the bit bitPos bits from the start of buf. Returns 0 if bitPos is greater than or equal to numBits. . . bitPos: bit index from the start of buf buf: array of bits numBits: number of valid bits in buf . . D*/ /*F*/ void putBitInBytes(int bitPos, char *buf, int bit); /*D Sets the bit bitPos bits from the start of buf to bit. . . bitPos: bit index from the start of buf buf: array of bits bit: 0-1, value to set . . D*/ /*F*/ double time_time(void); /*D Return the current time in seconds since the Epoch. D*/ /*F*/ void time_sleep(double seconds); /*D Delay execution for a given number of seconds . . seconds: the number of seconds to sleep . . D*/ /*F*/ void rawDumpWave(void); /*D Used to print a readable version of the current waveform to stderr. Not intended for general use. D*/ /*F*/ void rawDumpScript(unsigned script_id); /*D Used to print a readable version of a script to stderr. . . script_id: >=0, a script_id returned by [*gpioStoreScript*] . . Not intended for general use. D*/ #ifdef __cplusplus } #endif /*PARAMS active :: 0-1000000 The number of microseconds level changes are reported for once a noise filter has been triggered (by [*steady*] microseconds of a stable level). arg1:: An unsigned argument passed to a user customised function. Its meaning is defined by the customiser. arg2:: An unsigned argument passed to a user customised function. Its meaning is defined by the customiser. argc:: The count of bytes passed to a user customised function. *argx:: A pointer to an array of bytes passed to a user customised function. Its meaning and content is defined by the customiser. baud:: The speed of serial communication (I2C, SPI, serial link, waves) in bits per second. bit:: A value of 0 or 1. bitPos:: A bit position within a byte or word. The least significant bit is position 0. bits:: A value used to select GPIO. If bit n of bits is set then GPIO n is selected. A convenient way to set bit n is to or in (1<=0 The number of times a GPIO is swiched on and off per second. This can be set per GPIO and may be as little as 5Hz or as much as 40KHz. The GPIO will be on for a proportion of the time as defined by its dutycycle. gpio:: A Broadcom numbered GPIO, in the range 0-53. There are 54 General Purpose Input Outputs (GPIO) named GPIO0 through GPIO53. They are split into two banks. Bank 1 consists of GPIO0 through GPIO31. Bank 2 consists of GPIO32 through GPIO53. All the GPIO which are safe for the user to read and write are in bank 1. Not all GPIO in bank 1 are safe though. Type 1 boards have 17 safe GPIO. Type 2 boards have 21. Type 3 boards have 26. See [*gpioHardwareRevision*]. The user GPIO are marked with an X in the following table. . . 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Type 1 X X - - X - - X X X X X - - X X Type 2 - - X X X - - X X X X X - - X X Type 3 X X X X X X X X X X X X X X 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Type 1 - X X - - X X X X X - - - - - - Type 2 - X X - - - X X X X - X X X X X Type 3 X X X X X X X X X X X X - - - - . . gpioAlertFunc_t:: . . typedef void (*gpioAlertFunc_t) (int gpio, int level, uint32_t tick); . . gpioAlertFuncEx_t:: . . typedef void (*eventFuncEx_t) (int event, int level, uint32_t tick, void *userdata); . . gpioCfg*:: These functions are only effective if called before [*gpioInitialise*]. [*gpioCfgBufferSize*] [*gpioCfgClock*] [*gpioCfgDMAchannel*] [*gpioCfgDMAchannels*] [*gpioCfgPermissions*] [*gpioCfgInterfaces*] [*gpioCfgSocketPort*] [*gpioCfgMemAlloc*] gpioGetSamplesFunc_t:: . . typedef void (*gpioGetSamplesFunc_t) (const gpioSample_t *samples, int numSamples); . . gpioGetSamplesFuncEx_t:: . . typedef void (*gpioGetSamplesFuncEx_t) (const gpioSample_t *samples, int numSamples, void *userdata); . . gpioISRFunc_t:: . . typedef void (*gpioISRFunc_t) (int gpio, int level, uint32_t tick); . . gpioISRFuncEx_t:: . . typedef void (*gpioISRFuncEx_t) (int gpio, int level, uint32_t tick, void *userdata); . . gpioPulse_t:: . . typedef struct { uint32_t gpioOn; uint32_t gpioOff; uint32_t usDelay; } gpioPulse_t; . . gpioSample_t:: . . typedef struct { uint32_t tick; uint32_t level; } gpioSample_t; . . gpioSignalFunc_t:: . . typedef void (*gpioSignalFunc_t) (int signum); . . gpioSignalFuncEx_t:: . . typedef void (*gpioSignalFuncEx_t) (int signum, void *userdata); . . gpioThreadFunc_t:: . . typedef void *(gpioThreadFunc_t) (void *); . . gpioTimerFunc_t:: . . typedef void (*gpioTimerFunc_t) (void); . . gpioTimerFuncEx_t:: . . typedef void (*gpioTimerFuncEx_t) (void *userdata); . . gpioWaveAdd*:: One of [*gpioWaveAddNew*] [*gpioWaveAddGeneric*] [*gpioWaveAddSerial*] handle::>=0 A number referencing an object opened by one of [*fileOpen*] [*gpioNotifyOpen*] [*i2cOpen*] [*serOpen*] [*spiOpen*] i2cAddr:: 0-0x7F The address of a device on the I2C bus. i2cBus::>=0 An I2C bus number. i2cFlags::0 Flags which modify an I2C open command. None are currently defined. i2cReg:: 0-255 A register of an I2C device. ifFlags::0-3 . . PI_DISABLE_FIFO_IF 1 PI_DISABLE_SOCK_IF 2 . . *inBuf:: A buffer used to pass data to a function. inLen:: The number of bytes of data in a buffer. int:: A whole number, negative or positive. int32_t:: A 32-bit signed value. invert:: A flag used to set normal or inverted bit bang serial data level logic. level:: The level of a GPIO. Low or High. . . PI_OFF 0 PI_ON 1 PI_CLEAR 0 PI_SET 1 PI_LOW 0 PI_HIGH 1 . . There is one exception. If a watchdog expires on a GPIO the level will be reported as PI_TIMEOUT. See [*gpioSetWatchdog*]. . . PI_TIMEOUT 2 . . lVal::0-4294967295 (Hex 0x0-0xFFFFFFFF, Octal 0-37777777777) A 32-bit word value. memAllocMode:: 0-2 The DMA memory allocation mode. . . PI_MEM_ALLOC_AUTO 0 PI_MEM_ALLOC_PAGEMAP 1 PI_MEM_ALLOC_MAILBOX 2 . . *micros:: A value representing microseconds. micros:: A value representing microseconds. millis:: A value representing milliseconds. MISO:: The GPIO used for the MISO signal when bit banging SPI. mode:: 1. The operational mode of a GPIO, normally INPUT or OUTPUT. . . PI_INPUT 0 PI_OUTPUT 1 PI_ALT0 4 PI_ALT1 5 PI_ALT2 6 PI_ALT3 7 PI_ALT4 3 PI_ALT5 2 . . 2. A file open mode. . . PI_FILE_READ 1 PI_FILE_WRITE 2 PI_FILE_RW 3 . . The following values can be or'd into the mode. . . PI_FILE_APPEND 4 PI_FILE_CREATE 8 PI_FILE_TRUNC 16 . . MOSI:: The GPIO used for the MOSI signal when bit banging SPI. numBits:: The number of bits stored in a buffer. numBytes:: The number of bytes used to store characters in a string. Depending on the number of bits per character there may be 1, 2, or 4 bytes per character. numPar:: 0-10 The number of parameters passed to a script. numPulses:: The number of pulses to be added to a waveform. numSegs:: The number of segments in a combined I2C transaction. numSockAddr:: The number of network addresses allowed to use the socket interface. 0 means all addresses allowed. offset:: The associated data starts this number of microseconds from the start of the waveform. *outBuf:: A buffer used to return data from a function. outLen:: The size in bytes of an output buffer. pad:: 0-2 A set of GPIO which share common drivers. Pad @ GPIO 0 @ 0-27 1 @ 28-45 2 @ 46-53 padStrength:: 1-16 The mA which may be drawn from each GPIO whilst still guaranteeing the high and low levels. *param:: An array of script parameters. pctBOOL:: 0-100 percent On-Off-Level (OOL) buffer to consume for wave output. pctCB:: 0-100 the percent of all DMA control blocks to consume. pctTOOL:: 0-100 the percent of OOL buffer to consume for wave input (flags). pi_i2c_msg_t:: . . typedef struct { uint16_t addr; // slave address uint16_t flags; uint16_t len; // msg length uint8_t *buf; // pointer to msg data } pi_i2c_msg_t; . . port:: 1024-32000 The port used to bind to the pigpio socket. Defaults to 8888. pos:: The position of an item. primaryChannel:: 0-15 The DMA channel used to time the sampling of GPIO and to time servo and PWM pulses. *pth:: A thread identifier, returned by [*gpioStartThread*]. pthread_t:: A thread identifier. pud::0-2 The setting of the pull up/down resistor for a GPIO, which may be off, pull-up, or pull-down. . . PI_PUD_OFF 0 PI_PUD_DOWN 1 PI_PUD_UP 2 . . pulseLen:: 1-100, the length of a trigger pulse in microseconds. *pulses:: An array of pulses to be added to a waveform. pulsewidth::0, 500-2500 . . PI_SERVO_OFF 0 PI_MIN_SERVO_PULSEWIDTH 500 PI_MAX_SERVO_PULSEWIDTH 2500 . . PWMduty::0-1000000 (1M) The hardware PWM dutycycle. . . PI_HW_PWM_RANGE 1000000 . . PWMfreq::1-125M (1-187.5M for the BCM2711) The hardware PWM frequency. . . PI_HW_PWM_MIN_FREQ 1 PI_HW_PWM_MAX_FREQ 125000000 PI_HW_PWM_MAX_FREQ_2711 187500000 . . range::25-40000 . . PI_MIN_DUTYCYCLE_RANGE 25 PI_MAX_DUTYCYCLE_RANGE 40000 . . rawCbs_t:: . . typedef struct // linux/arch/arm/mach-bcm2708/include/mach/dma.h { unsigned long info; unsigned long src; unsigned long dst; unsigned long length; unsigned long stride; unsigned long next; unsigned long pad[2]; } rawCbs_t; . . rawSPI_t:: . . typedef struct { int clk; // GPIO for clock int mosi; // GPIO for MOSI int miso; // GPIO for MISO int ss_pol; // slave select off state int ss_us; // delay after slave select int clk_pol; // clock off state int clk_pha; // clock phase int clk_us; // clock micros } rawSPI_t; . . rawWave_t:: . . typedef struct { uint32_t gpioOn; uint32_t gpioOff; uint32_t usDelay; uint32_t flags; } rawWave_t; . . rawWaveInfo_t:: . . typedef struct { uint16_t botCB; // first CB used by wave uint16_t topCB; // last CB used by wave uint16_t botOOL; // last OOL used by wave uint16_t topOOL; // first OOL used by wave uint16_t deleted; uint16_t numCB; uint16_t numBOOL; uint16_t numTOOL; } rawWaveInfo_t; . . *retBuf:: A buffer to hold a number of bytes returned to a used customised function, retMax:: The maximum number of bytes a user customised function should return. *rxBuf:: A pointer to a buffer to receive data. SCL:: The user GPIO to use for the clock when bit banging I2C. SCLK:: The GPIO used for the SCLK signal when bit banging SPI. *script:: A pointer to the text of a script. script_id:: An id of a stored script as returned by [*gpioStoreScript*]. *scriptName:: The name of a [*shell*] script to be executed. The script must be present in /opt/pigpio/cgi and must have execute permission. *scriptString:: The string to be passed to a [*shell*] script to be executed. SDA:: The user GPIO to use for data when bit banging I2C. secondaryChannel:: 0-6 The DMA channel used to time output waveforms. *seconds:: A pointer to a uint32_t to store the second component of a returned time. seconds:: The number of seconds. seekFrom:: . . PI_FROM_START 0 PI_FROM_CURRENT 1 PI_FROM_END 2 . . seekOffset:: The number of bytes to move forward (positive) or backwards (negative) from the seek position (start, current, or end of file). *segs:: An array of segments which make up a combined I2C transaction. serFlags:: Flags which modify a serial open command. None are currently defined. *sertty:: The name of a serial tty device, e.g. /dev/ttyAMA0, /dev/ttyUSB0, /dev/tty1. setting:: A value used to set a flag, 0 for false, non-zero for true. signum::0-63 . . PI_MIN_SIGNUM 0 PI_MAX_SIGNUM 63 . . size_t:: A standard type used to indicate the size of an object in bytes. *sockAddr:: An array of network addresses allowed to use the socket interface encoded as 32 bit numbers. E.g. address 192.168.1.66 would be encoded as 0x4201a8c0. *spi:: A pointer to a [*rawSPI_t*] structure. spiBitFirst:: GPIO reads are made from spiBitFirst to spiBitLast. spiBitLast:: GPIO reads are made from spiBitFirst to spiBitLast. spiBits:: The number of bits to transfer in a raw SPI transaction. spiChan:: A SPI channel, 0-2. spiFlags:: See [*spiOpen*] and [*bbSPIOpen*]. spiSS:: The SPI slave select GPIO in a raw SPI transaction. spiTxBits:: The number of bits to transfer dring a raw SPI transaction steady :: 0-300000 The number of microseconds level changes must be stable for before reporting the level changed ([*gpioGlitchFilter*]) or triggering the active part of a noise filter ([*gpioNoiseFilter*]). stop_bits::2-8 The number of (half) stop bits to be used when adding serial data to a waveform. . . PI_MIN_WAVE_HALFSTOPBITS 2 PI_MAX_WAVE_HALFSTOPBITS 8 . . *str:: An array of characters. timeout:: A GPIO level change timeout in milliseconds. [*gpioSetWatchdog*] . . PI_MIN_WDOG_TIMEOUT 0 PI_MAX_WDOG_TIMEOUT 60000 . . [*gpioSetISRFunc*] and [*gpioSetISRFuncEx*] . . <=0 cancel timeout >0 timeout after specified milliseconds . . timer:: . . PI_MIN_TIMER 0 PI_MAX_TIMER 9 . . timetype:: . . PI_TIME_RELATIVE 0 PI_TIME_ABSOLUTE 1 . . *txBuf:: An array of bytes to transmit. uint32_t::0-0-4,294,967,295 (Hex 0x0-0xFFFFFFFF) A 32-bit unsigned value. uint64_t::0-(2^64)-1 A 64-bit unsigned value. unsigned:: A whole number >= 0. updateMask:: A 64 bit mask indicating which GPIO may be written to by the user. If GPIO#n may be written then bit (1< 4 #define PI_BAD_CHANNEL -27 // DMA channel not 0-15 #define PI_BAD_PRIM_CHANNEL -27 // DMA primary channel not 0-15 #define PI_BAD_SOCKET_PORT -28 // socket port not 1024-32000 #define PI_BAD_FIFO_COMMAND -29 // unrecognized fifo command #define PI_BAD_SECO_CHANNEL -30 // DMA secondary channel not 0-15 #define PI_NOT_INITIALISED -31 // function called before gpioInitialise #define PI_INITIALISED -32 // function called after gpioInitialise #define PI_BAD_WAVE_MODE -33 // waveform mode not 0-3 #define PI_BAD_CFG_INTERNAL -34 // bad parameter in gpioCfgInternals call #define PI_BAD_WAVE_BAUD -35 // baud rate not 50-250K(RX)/50-1M(TX) #define PI_TOO_MANY_PULSES -36 // waveform has too many pulses #define PI_TOO_MANY_CHARS -37 // waveform has too many chars #define PI_NOT_SERIAL_GPIO -38 // no bit bang serial read on GPIO #define PI_BAD_SERIAL_STRUC -39 // bad (null) serial structure parameter #define PI_BAD_SERIAL_BUF -40 // bad (null) serial buf parameter #define PI_NOT_PERMITTED -41 // GPIO operation not permitted #define PI_SOME_PERMITTED -42 // one or more GPIO not permitted #define PI_BAD_WVSC_COMMND -43 // bad WVSC subcommand #define PI_BAD_WVSM_COMMND -44 // bad WVSM subcommand #define PI_BAD_WVSP_COMMND -45 // bad WVSP subcommand #define PI_BAD_PULSELEN -46 // trigger pulse length not 1-100 #define PI_BAD_SCRIPT -47 // invalid script #define PI_BAD_SCRIPT_ID -48 // unknown script id #define PI_BAD_SER_OFFSET -49 // add serial data offset > 30 minutes #define PI_GPIO_IN_USE -50 // GPIO already in use #define PI_BAD_SERIAL_COUNT -51 // must read at least a byte at a time #define PI_BAD_PARAM_NUM -52 // script parameter id not 0-9 #define PI_DUP_TAG -53 // script has duplicate tag #define PI_TOO_MANY_TAGS -54 // script has too many tags #define PI_BAD_SCRIPT_CMD -55 // illegal script command #define PI_BAD_VAR_NUM -56 // script variable id not 0-149 #define PI_NO_SCRIPT_ROOM -57 // no more room for scripts #define PI_NO_MEMORY -58 // can't allocate temporary memory #define PI_SOCK_READ_FAILED -59 // socket read failed #define PI_SOCK_WRIT_FAILED -60 // socket write failed #define PI_TOO_MANY_PARAM -61 // too many script parameters (> 10) #define PI_NOT_HALTED -62 // DEPRECATED #define PI_SCRIPT_NOT_READY -62 // script initialising #define PI_BAD_TAG -63 // script has unresolved tag #define PI_BAD_MICS_DELAY -64 // bad MICS delay (too large) #define PI_BAD_MILS_DELAY -65 // bad MILS delay (too large) #define PI_BAD_WAVE_ID -66 // non existent wave id #define PI_TOO_MANY_CBS -67 // No more CBs for waveform #define PI_TOO_MANY_OOL -68 // No more OOL for waveform #define PI_EMPTY_WAVEFORM -69 // attempt to create an empty waveform #define PI_NO_WAVEFORM_ID -70 // no more waveforms #define PI_I2C_OPEN_FAILED -71 // can't open I2C device #define PI_SER_OPEN_FAILED -72 // can't open serial device #define PI_SPI_OPEN_FAILED -73 // can't open SPI device #define PI_BAD_I2C_BUS -74 // bad I2C bus #define PI_BAD_I2C_ADDR -75 // bad I2C address #define PI_BAD_SPI_CHANNEL -76 // bad SPI channel #define PI_BAD_FLAGS -77 // bad i2c/spi/ser open flags #define PI_BAD_SPI_SPEED -78 // bad SPI speed #define PI_BAD_SER_DEVICE -79 // bad serial device name #define PI_BAD_SER_SPEED -80 // bad serial baud rate #define PI_BAD_PARAM -81 // bad i2c/spi/ser parameter #define PI_I2C_WRITE_FAILED -82 // i2c write failed #define PI_I2C_READ_FAILED -83 // i2c read failed #define PI_BAD_SPI_COUNT -84 // bad SPI count #define PI_SER_WRITE_FAILED -85 // ser write failed #define PI_SER_READ_FAILED -86 // ser read failed #define PI_SER_READ_NO_DATA -87 // ser read no data available #define PI_UNKNOWN_COMMAND -88 // unknown command #define PI_SPI_XFER_FAILED -89 // spi xfer/read/write failed #define PI_BAD_POINTER -90 // bad (NULL) pointer #define PI_NO_AUX_SPI -91 // no auxiliary SPI on Pi A or B #define PI_NOT_PWM_GPIO -92 // GPIO is not in use for PWM #define PI_NOT_SERVO_GPIO -93 // GPIO is not in use for servo pulses #define PI_NOT_HCLK_GPIO -94 // GPIO has no hardware clock #define PI_NOT_HPWM_GPIO -95 // GPIO has no hardware PWM #define PI_BAD_HPWM_FREQ -96 // invalid hardware PWM frequency #define PI_BAD_HPWM_DUTY -97 // hardware PWM dutycycle not 0-1M #define PI_BAD_HCLK_FREQ -98 // invalid hardware clock frequency #define PI_BAD_HCLK_PASS -99 // need password to use hardware clock 1 #define PI_HPWM_ILLEGAL -100 // illegal, PWM in use for main clock #define PI_BAD_DATABITS -101 // serial data bits not 1-32 #define PI_BAD_STOPBITS -102 // serial (half) stop bits not 2-8 #define PI_MSG_TOOBIG -103 // socket/pipe message too big #define PI_BAD_MALLOC_MODE -104 // bad memory allocation mode #define PI_TOO_MANY_SEGS -105 // too many I2C transaction segments #define PI_BAD_I2C_SEG -106 // an I2C transaction segment failed #define PI_BAD_SMBUS_CMD -107 // SMBus command not supported by driver #define PI_NOT_I2C_GPIO -108 // no bit bang I2C in progress on GPIO #define PI_BAD_I2C_WLEN -109 // bad I2C write length #define PI_BAD_I2C_RLEN -110 // bad I2C read length #define PI_BAD_I2C_CMD -111 // bad I2C command #define PI_BAD_I2C_BAUD -112 // bad I2C baud rate, not 50-500k #define PI_CHAIN_LOOP_CNT -113 // bad chain loop count #define PI_BAD_CHAIN_LOOP -114 // empty chain loop #define PI_CHAIN_COUNTER -115 // too many chain counters #define PI_BAD_CHAIN_CMD -116 // bad chain command #define PI_BAD_CHAIN_DELAY -117 // bad chain delay micros #define PI_CHAIN_NESTING -118 // chain counters nested too deeply #define PI_CHAIN_TOO_BIG -119 // chain is too long #define PI_DEPRECATED -120 // deprecated function removed #define PI_BAD_SER_INVERT -121 // bit bang serial invert not 0 or 1 #define PI_BAD_EDGE -122 // bad ISR edge value, not 0-2 #define PI_BAD_ISR_INIT -123 // bad ISR initialisation #define PI_BAD_FOREVER -124 // loop forever must be last command #define PI_BAD_FILTER -125 // bad filter parameter #define PI_BAD_PAD -126 // bad pad number #define PI_BAD_STRENGTH -127 // bad pad drive strength #define PI_FIL_OPEN_FAILED -128 // file open failed #define PI_BAD_FILE_MODE -129 // bad file mode #define PI_BAD_FILE_FLAG -130 // bad file flag #define PI_BAD_FILE_READ -131 // bad file read #define PI_BAD_FILE_WRITE -132 // bad file write #define PI_FILE_NOT_ROPEN -133 // file not open for read #define PI_FILE_NOT_WOPEN -134 // file not open for write #define PI_BAD_FILE_SEEK -135 // bad file seek #define PI_NO_FILE_MATCH -136 // no files match pattern #define PI_NO_FILE_ACCESS -137 // no permission to access file #define PI_FILE_IS_A_DIR -138 // file is a directory #define PI_BAD_SHELL_STATUS -139 // bad shell return status #define PI_BAD_SCRIPT_NAME -140 // bad script name #define PI_BAD_SPI_BAUD -141 // bad SPI baud rate, not 50-500k #define PI_NOT_SPI_GPIO -142 // no bit bang SPI in progress on GPIO #define PI_BAD_EVENT_ID -143 // bad event id #define PI_CMD_INTERRUPTED -144 // Used by Python #define PI_NOT_ON_BCM2711 -145 // not available on BCM2711 #define PI_ONLY_ON_BCM2711 -146 // only available on BCM2711 #define PI_PIGIF_ERR_0 -2000 #define PI_PIGIF_ERR_99 -2099 #define PI_CUSTOM_ERR_0 -3000 #define PI_CUSTOM_ERR_999 -3999 /*DEF_E*/ /*DEF_S Defaults*/ #define PI_DEFAULT_BUFFER_MILLIS 120 #define PI_DEFAULT_CLK_MICROS 5 #define PI_DEFAULT_CLK_PERIPHERAL PI_CLOCK_PCM #define PI_DEFAULT_IF_FLAGS 0 #define PI_DEFAULT_FOREGROUND 0 #define PI_DEFAULT_DMA_CHANNEL 14 #define PI_DEFAULT_DMA_PRIMARY_CHANNEL 14 #define PI_DEFAULT_DMA_SECONDARY_CHANNEL 6 #define PI_DEFAULT_DMA_PRIMARY_CH_2711 7 #define PI_DEFAULT_DMA_SECONDARY_CH_2711 6 #define PI_DEFAULT_DMA_NOT_SET 15 #define PI_DEFAULT_SOCKET_PORT 8888 #define PI_DEFAULT_SOCKET_PORT_STR "8888" #define PI_DEFAULT_SOCKET_ADDR_STR "localhost" #define PI_DEFAULT_UPDATE_MASK_UNKNOWN 0x0000000FFFFFFCLL #define PI_DEFAULT_UPDATE_MASK_B1 0x03E7CF93 #define PI_DEFAULT_UPDATE_MASK_A_B2 0xFBC7CF9C #define PI_DEFAULT_UPDATE_MASK_APLUS_BPLUS 0x0080480FFFFFFCLL #define PI_DEFAULT_UPDATE_MASK_ZERO 0x0080000FFFFFFCLL #define PI_DEFAULT_UPDATE_MASK_PI2B 0x0080480FFFFFFCLL #define PI_DEFAULT_UPDATE_MASK_PI3B 0x0000000FFFFFFCLL #define PI_DEFAULT_UPDATE_MASK_PI4B 0x0000000FFFFFFCLL #define PI_DEFAULT_UPDATE_MASK_COMPUTE 0x00FFFFFFFFFFFFLL #define PI_DEFAULT_MEM_ALLOC_MODE PI_MEM_ALLOC_AUTO #define PI_DEFAULT_CFG_INTERNALS 0 /*DEF_E*/ #endif pigpio-78/pigpio.py000066400000000000000000004744621373465704200144760ustar00rootroot00000000000000""" pigpio is a Python module for the Raspberry which talks to the pigpio daemon to allow control of the general purpose input outputs (GPIO). [http://abyz.me.uk/rpi/pigpio/python.html] *Features* o the pigpio Python module can run on Windows, Macs, or Linux o controls one or more Pi's o hardware timed PWM on any of GPIO 0-31 o hardware timed servo pulses on any of GPIO 0-31 o callbacks when any of GPIO 0-31 change state o creating and transmitting precisely timed waveforms o reading/writing GPIO and setting their modes o wrappers for I2C, SPI, and serial links o creating and running scripts on the pigpio daemon *GPIO* ALL GPIO are identified by their Broadcom number. *Notes* Transmitted waveforms are accurate to a microsecond. Callback level changes are time-stamped and will be accurate to within a few microseconds. *Settings* A number of settings are determined when the pigpio daemon is started. o the sample rate (1, 2, 4, 5, 8, or 10 us, default 5 us). o the set of GPIO which may be updated (generally written to). The default set is those available on the Pi board revision. o the available PWM frequencies (see [*set_PWM_frequency*]). *Exceptions* By default a fatal exception is raised if you pass an invalid argument to a pigpio function. If you wish to handle the returned status yourself you should set pigpio.exceptions to False. You may prefer to check the returned status in only a few parts of your code. In that case do the following: ... pigpio.exceptions = False # Code where you want to test the error status. pigpio.exceptions = True ... *Usage* This module uses the services of the C pigpio library. pigpio must be running on the Pi(s) whose GPIO are to be manipulated. The normal way to start pigpio is as a daemon (during system start). sudo pigpiod Your Python program must import pigpio and create one or more instances of the pigpio.pi class. This class gives access to a specified Pi's GPIO. ... pi1 = pigpio.pi() # pi1 accesses the local Pi's GPIO pi2 = pigpio.pi('tom') # pi2 accesses tom's GPIO pi3 = pigpio.pi('dick') # pi3 accesses dick's GPIO pi1.write(4, 0) # set local Pi's GPIO 4 low pi2.write(4, 1) # set tom's GPIO 4 to high pi3.read(4) # get level of dick's GPIO 4 ... The later example code snippets assume that pi is an instance of the pigpio.pi class. OVERVIEW ESSENTIAL pigpio.pi Initialise Pi connection stop Stop a Pi connection BASIC set_mode Set a GPIO mode get_mode Get a GPIO mode set_pull_up_down Set/clear GPIO pull up/down resistor read Read a GPIO write Write a GPIO PWM_(overrides_servo_commands_on_same_GPIO) set_PWM_dutycycle Start/stop PWM pulses on a GPIO set_PWM_frequency Set PWM frequency of a GPIO set_PWM_range Configure PWM range of a GPIO get_PWM_dutycycle Get PWM dutycycle set on a GPIO get_PWM_frequency Get PWM frequency of a GPIO get_PWM_range Get configured PWM range of a GPIO get_PWM_real_range Get underlying PWM range for a GPIO Servo_(overrides_PWM_commands_on_same_GPIO) set_servo_pulsewidth Start/Stop servo pulses on a GPIO get_servo_pulsewidth Get servo pulsewidth set on a GPIO INTERMEDIATE gpio_trigger Send a trigger pulse to a GPIO set_watchdog Set a watchdog on a GPIO read_bank_1 Read all bank 1 GPIO read_bank_2 Read all bank 2 GPIO clear_bank_1 Clear selected GPIO in bank 1 clear_bank_2 Clear selected GPIO in bank 2 set_bank_1 Set selected GPIO in bank 1 set_bank_2 Set selected GPIO in bank 2 callback Create GPIO level change callback wait_for_edge Wait for GPIO level change ADVANCED notify_open Request a notification handle notify_begin Start notifications for selected GPIO notify_pause Pause notifications notify_close Close a notification hardware_clock Start hardware clock on supported GPIO hardware_PWM Start hardware PWM on supported GPIO set_glitch_filter Set a glitch filter on a GPIO set_noise_filter Set a noise filter on a GPIO set_pad_strength Sets a pads drive strength get_pad_strength Gets a pads drive strength shell Executes a shell command Custom custom_1 User custom function 1 custom_2 User custom function 2 Events event_callback Sets a callback for an event event_trigger Triggers an event wait_for_event Wait for an event Scripts store_script Store a script run_script Run a stored script update_script Set a scripts parameters script_status Get script status and parameters stop_script Stop a running script delete_script Delete a stored script I2C i2c_open Opens an I2C device i2c_close Closes an I2C device i2c_write_quick SMBus write quick i2c_read_byte SMBus read byte i2c_write_byte SMBus write byte i2c_read_byte_data SMBus read byte data i2c_write_byte_data SMBus write byte data i2c_read_word_data SMBus read word data i2c_write_word_data SMBus write word data i2c_read_block_data SMBus read block data i2c_write_block_data SMBus write block data i2c_read_i2c_block_data SMBus read I2C block data i2c_write_i2c_block_data SMBus write I2C block data i2c_read_device Reads the raw I2C device i2c_write_device Writes the raw I2C device i2c_process_call SMBus process call i2c_block_process_call SMBus block process call i2c_zip Performs multiple I2C transactions I2C_BIT_BANG bb_i2c_open Opens GPIO for bit banging I2C bb_i2c_close Closes GPIO for bit banging I2C bb_i2c_zip Performs multiple bit banged I2C transactions I2C/SPI_SLAVE bsc_xfer I2C/SPI as slave transfer bsc_i2c I2C as slave transfer SERIAL serial_open Opens a serial device serial_close Closes a serial device serial_read_byte Reads a byte from a serial device serial_write_byte Writes a byte to a serial device serial_read Reads bytes from a serial device serial_write Writes bytes to a serial device serial_data_available Returns number of bytes ready to be read SERIAL_BIT_BANG_(read_only) bb_serial_read_open Open a GPIO for bit bang serial reads bb_serial_read_close Close a GPIO for bit bang serial reads bb_serial_invert Invert serial logic (1 invert, 0 normal) bb_serial_read Read bit bang serial data from a GPIO SPI spi_open Opens a SPI device spi_close Closes a SPI device spi_read Reads bytes from a SPI device spi_write Writes bytes to a SPI device spi_xfer Transfers bytes with a SPI device SPI_BIT_BANG bb_spi_open Opens GPIO for bit banging SPI bb_spi_close Closes GPIO for bit banging SPI bb_spi_xfer Transfers bytes with bit banging SPI FILES file_open Opens a file file_close Closes a file file_read Reads bytes from a file file_write Writes bytes to a file file_seek Seeks to a position within a file file_list List files which match a pattern WAVES wave_clear Deletes all waveforms wave_add_new Starts a new waveform wave_add_generic Adds a series of pulses to the waveform wave_add_serial Adds serial data to the waveform wave_create Creates a waveform from added data wave_create_and_pad Creates a waveform of fixed size from added data wave_delete Deletes a waveform wave_send_once Transmits a waveform once wave_send_repeat Transmits a waveform repeatedly wave_send_using_mode Transmits a waveform in the chosen mode wave_chain Transmits a chain of waveforms wave_tx_at Returns the current transmitting waveform wave_tx_busy Checks to see if a waveform has ended wave_tx_stop Aborts the current waveform wave_get_cbs Length in cbs of the current waveform wave_get_max_cbs Absolute maximum allowed cbs wave_get_micros Length in microseconds of the current waveform wave_get_max_micros Absolute maximum allowed micros wave_get_pulses Length in pulses of the current waveform wave_get_max_pulses Absolute maximum allowed pulses UTILITIES get_current_tick Get current tick (microseconds) get_hardware_revision Get hardware revision get_pigpio_version Get the pigpio version pigpio.error_text Gets error text from error number pigpio.tickDiff Returns difference between two ticks """ import sys import socket import struct import time import threading import os import atexit VERSION = "1.78" # sync minor number to pigpio library version exceptions = True # GPIO levels OFF = 0 LOW = 0 CLEAR = 0 ON = 1 HIGH = 1 SET = 1 TIMEOUT = 2 # GPIO edges RISING_EDGE = 0 FALLING_EDGE = 1 EITHER_EDGE = 2 # GPIO modes INPUT = 0 OUTPUT = 1 ALT0 = 4 ALT1 = 5 ALT2 = 6 ALT3 = 7 ALT4 = 3 ALT5 = 2 # GPIO Pull Up Down PUD_OFF = 0 PUD_DOWN = 1 PUD_UP = 2 # script run status PI_SCRIPT_INITING=0 PI_SCRIPT_HALTED =1 PI_SCRIPT_RUNNING=2 PI_SCRIPT_WAITING=3 PI_SCRIPT_FAILED =4 # notification flags NTFY_FLAGS_EVENT = (1 << 7) NTFY_FLAGS_ALIVE = (1 << 6) NTFY_FLAGS_WDOG = (1 << 5) NTFY_FLAGS_GPIO = 31 # wave modes WAVE_MODE_ONE_SHOT =0 WAVE_MODE_REPEAT =1 WAVE_MODE_ONE_SHOT_SYNC=2 WAVE_MODE_REPEAT_SYNC =3 WAVE_NOT_FOUND = 9998 # Transmitted wave not found. NO_TX_WAVE = 9999 # No wave being transmitted. FILE_READ=1 FILE_WRITE=2 FILE_RW=3 FILE_APPEND=4 FILE_CREATE=8 FILE_TRUNC=16 FROM_START=0 FROM_CURRENT=1 FROM_END=2 SPI_MODE_0 = 0 SPI_MODE_1 = 1 SPI_MODE_2 = 2 SPI_MODE_3 = 3 SPI_CPHA = 1 << 0 SPI_CPOL = 1 << 1 SPI_CS_HIGH_ACTIVE = 1 << 2 SPI_TX_LSBFIRST = 1 << 14 SPI_RX_LSBFIRST = 1 << 15 EVENT_BSC = 31 _SOCK_CMD_LEN = 16 # pigpio command numbers _PI_CMD_MODES= 0 _PI_CMD_MODEG= 1 _PI_CMD_PUD= 2 _PI_CMD_READ= 3 _PI_CMD_WRITE= 4 _PI_CMD_PWM= 5 _PI_CMD_PRS= 6 _PI_CMD_PFS= 7 _PI_CMD_SERVO= 8 _PI_CMD_WDOG= 9 _PI_CMD_BR1= 10 _PI_CMD_BR2= 11 _PI_CMD_BC1= 12 _PI_CMD_BC2= 13 _PI_CMD_BS1= 14 _PI_CMD_BS2= 15 _PI_CMD_TICK= 16 _PI_CMD_HWVER=17 _PI_CMD_NO= 18 _PI_CMD_NB=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D_HP =86 _PI_CMD_CF1 =87 _PI_CMD_CF2 =88 _PI_CMD_NOIB =99 _PI_CMD_BI2CC=89 _PI_CMD_BI2CO=90 _PI_CMD_BI2CZ=91 _PI_CMD_I2CZ =92 _PI_CMD_WVCHA=93 _PI_CMD_SLRI =94 _PI_CMD_CGI =95 _PI_CMD_CSI =96 _PI_CMD_FG =97 _PI_CMD_FN =98 _PI_CMD_WVTXM=100 _PI_CMD_WVTAT=101 _PI_CMD_PADS =102 _PI_CMD_PADG =103 _PI_CMD_FO =104 _PI_CMD_FC =105 _PI_CMD_FR =106 _PI_CMD_FW =107 _PI_CMD_FS =108 _PI_CMD_FL =109 _PI_CMD_SHELL=110 _PI_CMD_BSPIC=111 _PI_CMD_BSPIO=112 _PI_CMD_BSPIX=113 _PI_CMD_BSCX =114 _PI_CMD_EVM =115 _PI_CMD_EVT =116 _PI_CMD_PROCU=117 _PI_CMD_WVCAP=118 # pigpio error numbers _PI_INIT_FAILED =-1 PI_BAD_USER_GPIO =-2 PI_BAD_GPIO =-3 PI_BAD_MODE =-4 PI_BAD_LEVEL =-5 PI_BAD_PUD =-6 PI_BAD_PULSEWIDTH =-7 PI_BAD_DUTYCYCLE =-8 _PI_BAD_TIMER =-9 _PI_BAD_MS =-10 _PI_BAD_TIMETYPE =-11 _PI_BAD_SECONDS =-12 _PI_BAD_MICROS =-13 _PI_TIMER_FAILED =-14 PI_BAD_WDOG_TIMEOUT =-15 _PI_NO_ALERT_FUNC =-16 _PI_BAD_CLK_PERIPH =-17 _PI_BAD_CLK_SOURCE =-18 _PI_BAD_CLK_MICROS =-19 _PI_BAD_BUF_MILLIS =-20 PI_BAD_DUTYRANGE =-21 _PI_BAD_SIGNUM =-22 _PI_BAD_PATHNAME =-23 PI_NO_HANDLE =-24 PI_BAD_HANDLE =-25 _PI_BAD_IF_FLAGS =-26 _PI_BAD_CHANNEL =-27 _PI_BAD_PRIM_CHANNEL=-27 _PI_BAD_SOCKET_PORT =-28 _PI_BAD_FIFO_COMMAND=-29 _PI_BAD_SECO_CHANNEL=-30 _PI_NOT_INITIALISED =-31 _PI_INITIALISED =-32 _PI_BAD_WAVE_MODE =-33 _PI_BAD_CFG_INTERNAL=-34 PI_BAD_WAVE_BAUD =-35 PI_TOO_MANY_PULSES =-36 PI_TOO_MANY_CHARS =-37 PI_NOT_SERIAL_GPIO =-38 _PI_BAD_SERIAL_STRUC=-39 _PI_BAD_SERIAL_BUF =-40 PI_NOT_PERMITTED =-41 PI_SOME_PERMITTED =-42 PI_BAD_WVSC_COMMND =-43 PI_BAD_WVSM_COMMND =-44 PI_BAD_WVSP_COMMND =-45 PI_BAD_PULSELEN =-46 PI_BAD_SCRIPT =-47 PI_BAD_SCRIPT_ID =-48 PI_BAD_SER_OFFSET =-49 PI_GPIO_IN_USE =-50 PI_BAD_SERIAL_COUNT =-51 PI_BAD_PARAM_NUM =-52 PI_DUP_TAG =-53 PI_TOO_MANY_TAGS =-54 PI_BAD_SCRIPT_CMD =-55 PI_BAD_VAR_NUM =-56 PI_NO_SCRIPT_ROOM =-57 PI_NO_MEMORY =-58 PI_SOCK_READ_FAILED =-59 PI_SOCK_WRIT_FAILED =-60 PI_TOO_MANY_PARAM =-61 PI_SCRIPT_NOT_READY =-62 PI_BAD_TAG =-63 PI_BAD_MICS_DELAY =-64 PI_BAD_MILS_DELAY =-65 PI_BAD_WAVE_ID =-66 PI_TOO_MANY_CBS =-67 PI_TOO_MANY_OOL =-68 PI_EMPTY_WAVEFORM =-69 PI_NO_WAVEFORM_ID =-70 PI_I2C_OPEN_FAILED =-71 PI_SER_OPEN_FAILED =-72 PI_SPI_OPEN_FAILED =-73 PI_BAD_I2C_BUS =-74 PI_BAD_I2C_ADDR =-75 PI_BAD_SPI_CHANNEL =-76 PI_BAD_FLAGS =-77 PI_BAD_SPI_SPEED =-78 PI_BAD_SER_DEVICE =-79 PI_BAD_SER_SPEED =-80 PI_BAD_PARAM =-81 PI_I2C_WRITE_FAILED =-82 PI_I2C_READ_FAILED =-83 PI_BAD_SPI_COUNT =-84 PI_SER_WRITE_FAILED =-85 PI_SER_READ_FAILED =-86 PI_SER_READ_NO_DATA =-87 PI_UNKNOWN_COMMAND =-88 PI_SPI_XFER_FAILED =-89 _PI_BAD_POINTER =-90 PI_NO_AUX_SPI =-91 PI_NOT_PWM_GPIO =-92 PI_NOT_SERVO_GPIO =-93 PI_NOT_HCLK_GPIO =-94 PI_NOT_HPWM_GPIO =-95 PI_BAD_HPWM_FREQ =-96 PI_BAD_HPWM_DUTY =-97 PI_BAD_HCLK_FREQ =-98 PI_BAD_HCLK_PASS =-99 PI_HPWM_ILLEGAL =-100 PI_BAD_DATABITS =-101 PI_BAD_STOPBITS =-102 PI_MSG_TOOBIG =-103 PI_BAD_MALLOC_MODE =-104 _PI_TOO_MANY_SEGS =-105 _PI_BAD_I2C_SEG =-106 PI_BAD_SMBUS_CMD =-107 PI_NOT_I2C_GPIO =-108 PI_BAD_I2C_WLEN =-109 PI_BAD_I2C_RLEN =-110 PI_BAD_I2C_CMD =-111 PI_BAD_I2C_BAUD =-112 PI_CHAIN_LOOP_CNT =-113 PI_BAD_CHAIN_LOOP =-114 PI_CHAIN_COUNTER =-115 PI_BAD_CHAIN_CMD =-116 PI_BAD_CHAIN_DELAY =-117 PI_CHAIN_NESTING =-118 PI_CHAIN_TOO_BIG =-119 PI_DEPRECATED =-120 PI_BAD_SER_INVERT =-121 _PI_BAD_EDGE =-122 _PI_BAD_ISR_INIT =-123 PI_BAD_FOREVER =-124 PI_BAD_FILTER =-125 PI_BAD_PAD =-126 PI_BAD_STRENGTH =-127 PI_FIL_OPEN_FAILED =-128 PI_BAD_FILE_MODE =-129 PI_BAD_FILE_FLAG =-130 PI_BAD_FILE_READ =-131 PI_BAD_FILE_WRITE =-132 PI_FILE_NOT_ROPEN =-133 PI_FILE_NOT_WOPEN =-134 PI_BAD_FILE_SEEK =-135 PI_NO_FILE_MATCH =-136 PI_NO_FILE_ACCESS =-137 PI_FILE_IS_A_DIR =-138 PI_BAD_SHELL_STATUS =-139 PI_BAD_SCRIPT_NAME =-140 PI_BAD_SPI_BAUD =-141 PI_NOT_SPI_GPIO =-142 PI_BAD_EVENT_ID =-143 PI_CMD_INTERRUPTED =-144 PI_NOT_ON_BCM2711 =-145 PI_ONLY_ON_BCM2711 =-146 # pigpio error text _errors=[ [_PI_INIT_FAILED , "pigpio initialisation failed"], [PI_BAD_USER_GPIO , "GPIO not 0-31"], [PI_BAD_GPIO , "GPIO not 0-53"], [PI_BAD_MODE , "mode not 0-7"], [PI_BAD_LEVEL , "level not 0-1"], [PI_BAD_PUD , "pud not 0-2"], [PI_BAD_PULSEWIDTH , "pulsewidth not 0 or 500-2500"], [PI_BAD_DUTYCYCLE , "dutycycle not 0-range (default 255)"], [_PI_BAD_TIMER , "timer not 0-9"], [_PI_BAD_MS , "ms not 10-60000"], [_PI_BAD_TIMETYPE , "timetype not 0-1"], [_PI_BAD_SECONDS , "seconds < 0"], [_PI_BAD_MICROS , "micros not 0-999999"], [_PI_TIMER_FAILED , "gpioSetTimerFunc failed"], [PI_BAD_WDOG_TIMEOUT , "timeout not 0-60000"], [_PI_NO_ALERT_FUNC , "DEPRECATED"], [_PI_BAD_CLK_PERIPH , "clock peripheral not 0-1"], [_PI_BAD_CLK_SOURCE , "DEPRECATED"], [_PI_BAD_CLK_MICROS , "clock micros not 1, 2, 4, 5, 8, or 10"], [_PI_BAD_BUF_MILLIS , "buf millis not 100-10000"], [PI_BAD_DUTYRANGE , "dutycycle range not 25-40000"], [_PI_BAD_SIGNUM , "signum not 0-63"], [_PI_BAD_PATHNAME , "can't open pathname"], [PI_NO_HANDLE , "no handle available"], [PI_BAD_HANDLE , "unknown handle"], [_PI_BAD_IF_FLAGS , "ifFlags > 4"], [_PI_BAD_CHANNEL , "DMA channel not 0-14"], [_PI_BAD_SOCKET_PORT , "socket port not 1024-30000"], [_PI_BAD_FIFO_COMMAND , "unknown fifo command"], [_PI_BAD_SECO_CHANNEL , "DMA secondary channel not 0-14"], [_PI_NOT_INITIALISED , "function called before gpioInitialise"], [_PI_INITIALISED , "function called after gpioInitialise"], [_PI_BAD_WAVE_MODE , "waveform mode not 0-1"], [_PI_BAD_CFG_INTERNAL , "bad parameter in gpioCfgInternals call"], [PI_BAD_WAVE_BAUD , "baud rate not 50-250000(RX)/1000000(TX)"], [PI_TOO_MANY_PULSES , "waveform has too many pulses"], [PI_TOO_MANY_CHARS , "waveform has too many chars"], [PI_NOT_SERIAL_GPIO , "no bit bang serial read in progress on GPIO"], [PI_NOT_PERMITTED , "no permission to update GPIO"], [PI_SOME_PERMITTED , "no permission to update one or more GPIO"], [PI_BAD_WVSC_COMMND , "bad WVSC subcommand"], [PI_BAD_WVSM_COMMND , "bad WVSM subcommand"], [PI_BAD_WVSP_COMMND , "bad WVSP subcommand"], [PI_BAD_PULSELEN , "trigger pulse length not 1-100"], [PI_BAD_SCRIPT , "invalid script"], [PI_BAD_SCRIPT_ID , "unknown script id"], [PI_BAD_SER_OFFSET , "add serial data offset > 30 minute"], [PI_GPIO_IN_USE , "GPIO already in use"], [PI_BAD_SERIAL_COUNT , "must read at least a byte at a time"], [PI_BAD_PARAM_NUM , "script parameter id not 0-9"], [PI_DUP_TAG , "script has duplicate tag"], [PI_TOO_MANY_TAGS , "script has too many tags"], [PI_BAD_SCRIPT_CMD , "illegal script command"], [PI_BAD_VAR_NUM , "script variable id not 0-149"], [PI_NO_SCRIPT_ROOM , "no more room for scripts"], [PI_NO_MEMORY , "can't allocate temporary memory"], [PI_SOCK_READ_FAILED , "socket read failed"], [PI_SOCK_WRIT_FAILED , "socket write failed"], [PI_TOO_MANY_PARAM , "too many script parameters (> 10)"], [PI_SCRIPT_NOT_READY , "script initialising"], [PI_BAD_TAG , "script has unresolved tag"], [PI_BAD_MICS_DELAY , "bad MICS delay (too large)"], [PI_BAD_MILS_DELAY , "bad MILS delay (too large)"], [PI_BAD_WAVE_ID , "non existent wave id"], [PI_TOO_MANY_CBS , "No more CBs for waveform"], [PI_TOO_MANY_OOL , "No more OOL for waveform"], [PI_EMPTY_WAVEFORM , "attempt to create an empty waveform"], [PI_NO_WAVEFORM_ID , "No more waveform ids"], [PI_I2C_OPEN_FAILED , "can't open I2C device"], [PI_SER_OPEN_FAILED , "can't open serial device"], [PI_SPI_OPEN_FAILED , "can't open SPI device"], [PI_BAD_I2C_BUS , "bad I2C bus"], [PI_BAD_I2C_ADDR , "bad I2C address"], [PI_BAD_SPI_CHANNEL , "bad SPI channel"], [PI_BAD_FLAGS , "bad i2c/spi/ser open flags"], [PI_BAD_SPI_SPEED , "bad SPI speed"], [PI_BAD_SER_DEVICE , "bad serial device name"], [PI_BAD_SER_SPEED , "bad serial baud rate"], [PI_BAD_PARAM , "bad i2c/spi/ser parameter"], [PI_I2C_WRITE_FAILED , "I2C write failed"], [PI_I2C_READ_FAILED , "I2C read failed"], [PI_BAD_SPI_COUNT , "bad SPI count"], [PI_SER_WRITE_FAILED , "ser write failed"], [PI_SER_READ_FAILED , "ser read failed"], [PI_SER_READ_NO_DATA , "ser read no data available"], [PI_UNKNOWN_COMMAND , "unknown command"], [PI_SPI_XFER_FAILED , "SPI xfer/read/write failed"], [_PI_BAD_POINTER , "bad (NULL) pointer"], [PI_NO_AUX_SPI , "no auxiliary SPI on Pi A or B"], [PI_NOT_PWM_GPIO , "GPIO is not in use for PWM"], [PI_NOT_SERVO_GPIO , "GPIO is not in use for servo pulses"], [PI_NOT_HCLK_GPIO , "GPIO has no hardware clock"], [PI_NOT_HPWM_GPIO , "GPIO has no hardware PWM"], [PI_BAD_HPWM_FREQ , "invalid hardware PWM frequency"], [PI_BAD_HPWM_DUTY , "hardware PWM dutycycle not 0-1M"], [PI_BAD_HCLK_FREQ , "invalid hardware clock frequency"], [PI_BAD_HCLK_PASS , "need password to use hardware clock 1"], [PI_HPWM_ILLEGAL , "illegal, PWM in use for main clock"], [PI_BAD_DATABITS , "serial data bits not 1-32"], [PI_BAD_STOPBITS , "serial (half) stop bits not 2-8"], [PI_MSG_TOOBIG , "socket/pipe message too big"], [PI_BAD_MALLOC_MODE , "bad memory allocation mode"], [_PI_TOO_MANY_SEGS , "too many I2C transaction segments"], [_PI_BAD_I2C_SEG , "an I2C transaction segment failed"], [PI_BAD_SMBUS_CMD , "SMBus command not supported"], [PI_NOT_I2C_GPIO , "no bit bang I2C in progress on GPIO"], [PI_BAD_I2C_WLEN , "bad I2C write length"], [PI_BAD_I2C_RLEN , "bad I2C read length"], [PI_BAD_I2C_CMD , "bad I2C command"], [PI_BAD_I2C_BAUD , "bad I2C baud rate, not 50-500k"], [PI_CHAIN_LOOP_CNT , "bad chain loop count"], [PI_BAD_CHAIN_LOOP , "empty chain loop"], [PI_CHAIN_COUNTER , "too many chain counters"], [PI_BAD_CHAIN_CMD , "bad chain command"], [PI_BAD_CHAIN_DELAY , "bad chain delay micros"], [PI_CHAIN_NESTING , "chain counters nested too deeply"], [PI_CHAIN_TOO_BIG , "chain is too long"], [PI_DEPRECATED , "deprecated function removed"], [PI_BAD_SER_INVERT , "bit bang serial invert not 0 or 1"], [_PI_BAD_EDGE , "bad ISR edge value, not 0-2"], [_PI_BAD_ISR_INIT , "bad ISR initialisation"], [PI_BAD_FOREVER , "loop forever must be last chain command"], [PI_BAD_FILTER , "bad filter parameter"], [PI_BAD_PAD , "bad pad number"], [PI_BAD_STRENGTH , "bad pad drive strength"], [PI_FIL_OPEN_FAILED , "file open failed"], [PI_BAD_FILE_MODE , "bad file mode"], [PI_BAD_FILE_FLAG , "bad file flag"], [PI_BAD_FILE_READ , "bad file read"], [PI_BAD_FILE_WRITE , "bad file write"], [PI_FILE_NOT_ROPEN , "file not open for read"], [PI_FILE_NOT_WOPEN , "file not open for write"], [PI_BAD_FILE_SEEK , "bad file seek"], [PI_NO_FILE_MATCH , "no files match pattern"], [PI_NO_FILE_ACCESS , "no permission to access file"], [PI_FILE_IS_A_DIR , "file is a directory"], [PI_BAD_SHELL_STATUS , "bad shell return status"], [PI_BAD_SCRIPT_NAME , "bad script name"], [PI_BAD_SPI_BAUD , "bad SPI baud rate, not 50-500k"], [PI_NOT_SPI_GPIO , "no bit bang SPI in progress on GPIO"], [PI_BAD_EVENT_ID , "bad event id"], [PI_CMD_INTERRUPTED , "pigpio command interrupted"], [PI_NOT_ON_BCM2711 , "not available on BCM2711"], [PI_ONLY_ON_BCM2711 , "only available on BCM2711"], ] _except_a = "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n{}" _except_z = "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" _except_1 = """ Did you start the pigpio daemon? E.g. sudo pigpiod Did you specify the correct Pi host/port in the environment variables PIGPIO_ADDR/PIGPIO_PORT? E.g. export PIGPIO_ADDR=soft, export PIGPIO_PORT=8888 Did you specify the correct Pi host/port in the pigpio.pi() function? E.g. pigpio.pi('soft', 8888)""" _except_2 = """ Do you have permission to access the pigpio daemon? Perhaps it was started with sudo pigpiod -nlocalhost""" _except_3 = """ Can't create callback thread. Perhaps too many simultaneous pigpio connections.""" class _socklock: """ A class to store socket and lock. """ def __init__(self): self.s = None self.l = threading.Lock() class error(Exception): """pigpio module exception""" def __init__(self, value): self.value = value def __str__(self): return repr(self.value) class pulse: """ A class to store pulse information. """ def __init__(self, gpio_on, gpio_off, delay): """ Initialises a pulse. gpio_on:= the GPIO to switch on at the start of the pulse. gpio_off:= the GPIO to switch off at the start of the pulse. delay:= the delay in microseconds before the next pulse. """ self.gpio_on = gpio_on self.gpio_off = gpio_off self.delay = delay def error_text(errnum): """ Returns a text description of a pigpio error. errnum:= <0, the error number ... print(pigpio.error_text(-5)) level not 0-1 ... """ for e in _errors: if e[0] == errnum: return e[1] return "unknown error ({})".format(errnum) def tickDiff(t1, t2): """ Returns the microsecond difference between two ticks. t1:= the earlier tick t2:= the later tick ... print(pigpio.tickDiff(4294967272, 12)) 36 ... """ tDiff = t2 - t1 if tDiff < 0: tDiff += (1 << 32) return tDiff # A couple of hacks to cope with different string handling # between various Python versions # 3 != 2.7.8 != 2.7.3 if sys.hexversion < 0x03000000: def _b(x): return x else: def _b(x): return x.encode('latin-1') if sys.hexversion < 0x02070800: def _str(x): return buffer(x) else: def _str(x): return x def u2i(uint32): """ Converts a 32 bit unsigned number to signed. uint32:= an unsigned 32 bit number ... print(u2i(4294967272)) -24 print(u2i(37)) 37 ... """ mask = (2 ** 32) - 1 if uint32 & (1 << 31): v = uint32 | ~mask else: v = uint32 & mask return v def _u2i(uint32): """ Converts a 32 bit unsigned number to signed. If the number is negative it indicates an error. On error a pigpio exception will be raised if exceptions is True. """ v = u2i(uint32) if v < 0: if exceptions: raise error(error_text(v)) return v def _pigpio_command(sl, cmd, p1, p2): """ Runs a pigpio socket command. sl:= command socket and lock. cmd:= the command to be executed. p1:= command parameter 1 (if applicable). p2:= command parameter 2 (if applicable). """ res = PI_CMD_INTERRUPTED with sl.l: sl.s.send(struct.pack('IIII', cmd, p1, p2, 0)) dummy, res = struct.unpack('12sI', sl.s.recv(_SOCK_CMD_LEN)) return res def _pigpio_command_nolock(sl, cmd, p1, p2): """ Runs a pigpio socket command. sl:= command socket and lock. cmd:= the command to be executed. p1:= command parameter 1 (if applicable). p2:= command parameter 2 (if applicable). """ res = PI_CMD_INTERRUPTED sl.s.send(struct.pack('IIII', cmd, p1, p2, 0)) dummy, res = struct.unpack('12sI', sl.s.recv(_SOCK_CMD_LEN)) return res def _pigpio_command_ext(sl, cmd, p1, p2, p3, extents): """ Runs an extended pigpio socket command. sl:= command socket and lock. cmd:= the command to be executed. p1:= command parameter 1 (if applicable). p2:= command parameter 2 (if applicable). p3:= total size in bytes of following extents extents:= additional data blocks """ ext = bytearray(struct.pack('IIII', cmd, p1, p2, p3)) for x in extents: if type(x) == type(""): ext.extend(_b(x)) else: ext.extend(x) res = PI_CMD_INTERRUPTED with sl.l: sl.s.sendall(ext) dummy, res = struct.unpack('12sI', sl.s.recv(_SOCK_CMD_LEN)) return res def _pigpio_command_ext_nolock(sl, cmd, p1, p2, p3, extents): """ Runs an extended pigpio socket command. sl:= command socket and lock. cmd:= the command to be executed. p1:= command parameter 1 (if applicable). p2:= command parameter 2 (if applicable). p3:= total size in bytes of following extents extents:= additional data blocks """ res = PI_CMD_INTERRUPTED ext = bytearray(struct.pack('IIII', cmd, p1, p2, p3)) for x in extents: if type(x) == type(""): ext.extend(_b(x)) else: ext.extend(x) sl.s.sendall(ext) dummy, res = struct.unpack('12sI', sl.s.recv(_SOCK_CMD_LEN)) return res class _event_ADT: """ An ADT class to hold event callback information. """ def __init__(self, event, func): """ Initialises an event callback ADT. event:= the event id. func:= a user function taking one argument, the event id. """ self.event = event self.func = func self.bit = 1<= MSG_SIZ: msgbuf = buf[offset:offset + MSG_SIZ] offset += MSG_SIZ seq, flags, tick, level = (struct.unpack('HHII', msgbuf)) if flags == 0: changed = level ^ lastLevel lastLevel = level for cb in self.callbacks: if cb.bit & changed: newLevel = 0 if cb.bit & level: newLevel = 1 if (cb.edge ^ newLevel): cb.func(cb.gpio, newLevel, tick) else: if flags & NTFY_FLAGS_WDOG: gpio = flags & NTFY_FLAGS_GPIO for cb in self.callbacks: if cb.gpio == gpio: cb.func(gpio, TIMEOUT, tick) elif flags & NTFY_FLAGS_EVENT: event = flags & NTFY_FLAGS_GPIO for cb in self.events: if cb.event == event: cb.func(event, tick) buf = buf[offset:] self.sl.s.close() class _callback: """A class to provide GPIO level change callbacks.""" def __init__(self, notify, user_gpio, edge=RISING_EDGE, func=None): """ Initialise a callback and adds it to the notification thread. """ self._notify = notify self.count=0 self._reset = False if func is None: func=self._tally self.callb = _callback_ADT(user_gpio, edge, func) self._notify.append(self.callb) def cancel(self): """Cancels a callback by removing it from the notification thread.""" self._notify.remove(self.callb) def _tally(self, user_gpio, level, tick): """Increment the callback called count.""" if self._reset: self._reset = False self.count = 0 self.count += 1 def tally(self): """ Provides a count of how many times the default tally callback has triggered. The count will be zero if the user has supplied their own callback function. """ return self.count def reset_tally(self): """ Resets the tally count to zero. """ self._reset = True self.count = 0 class _event: """A class to provide event callbacks.""" def __init__(self, notify, event, func=None): """ Initialise an event and adds it to the notification thread. """ self._notify = notify self.count=0 self._reset = False if func is None: func=self._tally self.callb = _event_ADT(event, func) self._notify.append_event(self.callb) def cancel(self): """ Cancels a event callback by removing it from the notification thread. """ self._notify.remove_event(self.callb) def _tally(self, event, tick): """Increment the event callback called count.""" if self._reset: self._reset = False self.count = 0 self.count += 1 def tally(self): """ Provides a count of how many times the default tally callback has triggered. The count will be zero if the user has supplied their own callback function. """ return self.count def reset_tally(self): """ Resets the tally count to zero. """ self._reset = True self.count = 0 class _wait_for_edge: """Encapsulates waiting for GPIO edges.""" def __init__(self, notify, gpio, edge, timeout): """Initialises a wait_for_edge.""" self._notify = notify self.callb = _callback_ADT(gpio, edge, self.func) self.trigger = False self._notify.append(self.callb) self.start = time.time() while (self.trigger == False) and ((time.time()-self.start) < timeout): time.sleep(0.05) self._notify.remove(self.callb) def func(self, gpio, level, tick): """Sets wait_for_edge triggered.""" self.trigger = True class _wait_for_event: """Encapsulates waiting for an event.""" def __init__(self, notify, event, timeout): """Initialises wait_for_event.""" self._notify = notify self.callb = _event_ADT(event, self.func) self.trigger = False self._notify.append_event(self.callb) self.start = time.time() while (self.trigger == False) and ((time.time()-self.start) < timeout): time.sleep(0.05) self._notify.remove_event(self.callb) def func(self, event, tick): """Sets wait_for_event triggered.""" self.trigger = True class pi(): def _rxbuf(self, count): """Returns count bytes from the command socket.""" ext = bytearray(self.sl.s.recv(count)) while len(ext) < count: ext.extend(self.sl.s.recv(count - len(ext))) return ext def set_mode(self, gpio, mode): """ Sets the GPIO mode. gpio:= 0-53. mode:= INPUT, OUTPUT, ALT0, ALT1, ALT2, ALT3, ALT4, ALT5. ... pi.set_mode( 4, pigpio.INPUT) # GPIO 4 as input pi.set_mode(17, pigpio.OUTPUT) # GPIO 17 as output pi.set_mode(24, pigpio.ALT2) # GPIO 24 as ALT2 ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_MODES, gpio, mode)) def get_mode(self, gpio): """ Returns the GPIO mode. gpio:= 0-53. Returns a value as follows . . 0 = INPUT 1 = OUTPUT 2 = ALT5 3 = ALT4 4 = ALT0 5 = ALT1 6 = ALT2 7 = ALT3 . . ... print(pi.get_mode(0)) 4 ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_MODEG, gpio, 0)) def set_pull_up_down(self, gpio, pud): """ Sets or clears the internal GPIO pull-up/down resistor. gpio:= 0-53. pud:= PUD_UP, PUD_DOWN, PUD_OFF. ... pi.set_pull_up_down(17, pigpio.PUD_OFF) pi.set_pull_up_down(23, pigpio.PUD_UP) pi.set_pull_up_down(24, pigpio.PUD_DOWN) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_PUD, gpio, pud)) def read(self, gpio): """ Returns the GPIO level. gpio:= 0-53. ... pi.set_mode(23, pigpio.INPUT) pi.set_pull_up_down(23, pigpio.PUD_DOWN) print(pi.read(23)) 0 pi.set_pull_up_down(23, pigpio.PUD_UP) print(pi.read(23)) 1 ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_READ, gpio, 0)) def write(self, gpio, level): """ Sets the GPIO level. GPIO:= 0-53. level:= 0, 1. If PWM or servo pulses are active on the GPIO they are switched off. ... pi.set_mode(17, pigpio.OUTPUT) pi.write(17,0) print(pi.read(17)) 0 pi.write(17,1) print(pi.read(17)) 1 ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_WRITE, gpio, level)) def set_PWM_dutycycle(self, user_gpio, dutycycle): """ Starts (non-zero dutycycle) or stops (0) PWM pulses on the GPIO. user_gpio:= 0-31. dutycycle:= 0-range (range defaults to 255). The [*set_PWM_range*] function can change the default range of 255. ... pi.set_PWM_dutycycle(4, 0) # PWM off pi.set_PWM_dutycycle(4, 64) # PWM 1/4 on pi.set_PWM_dutycycle(4, 128) # PWM 1/2 on pi.set_PWM_dutycycle(4, 192) # PWM 3/4 on pi.set_PWM_dutycycle(4, 255) # PWM full on ... """ return _u2i(_pigpio_command( self.sl, _PI_CMD_PWM, user_gpio, int(dutycycle))) def get_PWM_dutycycle(self, user_gpio): """ Returns the PWM dutycycle being used on the GPIO. user_gpio:= 0-31. Returns the PWM dutycycle. For normal PWM the dutycycle will be out of the defined range for the GPIO (see [*get_PWM_range*]). If a hardware clock is active on the GPIO the reported dutycycle will be 500000 (500k) out of 1000000 (1M). If hardware PWM is active on the GPIO the reported dutycycle will be out of a 1000000 (1M). ... pi.set_PWM_dutycycle(4, 25) print(pi.get_PWM_dutycycle(4)) 25 pi.set_PWM_dutycycle(4, 203) print(pi.get_PWM_dutycycle(4)) 203 ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_GDC, user_gpio, 0)) def set_PWM_range(self, user_gpio, range_): """ Sets the range of PWM values to be used on the GPIO. user_gpio:= 0-31. range_:= 25-40000. ... pi.set_PWM_range(9, 100) # now 25 1/4, 50 1/2, 75 3/4 on pi.set_PWM_range(9, 500) # now 125 1/4, 250 1/2, 375 3/4 on pi.set_PWM_range(9, 3000) # now 750 1/4, 1500 1/2, 2250 3/4 on ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_PRS, user_gpio, range_)) def get_PWM_range(self, user_gpio): """ Returns the range of PWM values being used on the GPIO. user_gpio:= 0-31. If a hardware clock or hardware PWM is active on the GPIO the reported range will be 1000000 (1M). ... pi.set_PWM_range(9, 500) print(pi.get_PWM_range(9)) 500 ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_PRG, user_gpio, 0)) def get_PWM_real_range(self, user_gpio): """ Returns the real (underlying) range of PWM values being used on the GPIO. user_gpio:= 0-31. If a hardware clock is active on the GPIO the reported real range will be 1000000 (1M). If hardware PWM is active on the GPIO the reported real range will be approximately 250M divided by the set PWM frequency. ... pi.set_PWM_frequency(4, 800) print(pi.get_PWM_real_range(4)) 250 ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_PRRG, user_gpio, 0)) def set_PWM_frequency(self, user_gpio, frequency): """ Sets the frequency (in Hz) of the PWM to be used on the GPIO. user_gpio:= 0-31. frequency:= >=0 Hz Returns the numerically closest frequency if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_PERMITTED. If PWM is currently active on the GPIO it will be switched off and then back on at the new frequency. Each GPIO can be independently set to one of 18 different PWM frequencies. The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5, 8, or 10 microseconds (default 5). The sample rate is set when the pigpio daemon is started. The frequencies for each sample rate are: . . Hertz 1: 40000 20000 10000 8000 5000 4000 2500 2000 1600 1250 1000 800 500 400 250 200 100 50 2: 20000 10000 5000 4000 2500 2000 1250 1000 800 625 500 400 250 200 125 100 50 25 4: 10000 5000 2500 2000 1250 1000 625 500 400 313 250 200 125 100 63 50 25 13 sample rate (us) 5: 8000 4000 2000 1600 1000 800 500 400 320 250 200 160 100 80 50 40 20 10 8: 5000 2500 1250 1000 625 500 313 250 200 156 125 100 63 50 31 25 13 6 10: 4000 2000 1000 800 500 400 250 200 160 125 100 80 50 40 25 20 10 5 . . ... pi.set_PWM_frequency(4,0) print(pi.get_PWM_frequency(4)) 10 pi.set_PWM_frequency(4,100000) print(pi.get_PWM_frequency(4)) 8000 ... """ return _u2i( _pigpio_command(self.sl, _PI_CMD_PFS, user_gpio, frequency)) def get_PWM_frequency(self, user_gpio): """ Returns the frequency of PWM being used on the GPIO. user_gpio:= 0-31. Returns the frequency (in Hz) used for the GPIO. For normal PWM the frequency will be that defined for the GPIO by [*set_PWM_frequency*]. If a hardware clock is active on the GPIO the reported frequency will be that set by [*hardware_clock*]. If hardware PWM is active on the GPIO the reported frequency will be that set by [*hardware_PWM*]. ... pi.set_PWM_frequency(4,0) print(pi.get_PWM_frequency(4)) 10 pi.set_PWM_frequency(4, 800) print(pi.get_PWM_frequency(4)) 800 ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_PFG, user_gpio, 0)) def set_servo_pulsewidth(self, user_gpio, pulsewidth): """ Starts (500-2500) or stops (0) servo pulses on the GPIO. user_gpio:= 0-31. pulsewidth:= 0 (off), 500 (most anti-clockwise) - 2500 (most clockwise). The selected pulsewidth will continue to be transmitted until changed by a subsequent call to set_servo_pulsewidth. The pulsewidths supported by servos varies and should probably be determined by experiment. A value of 1500 should always be safe and represents the mid-point of rotation. You can DAMAGE a servo if you command it to move beyond its limits. ... pi.set_servo_pulsewidth(17, 0) # off pi.set_servo_pulsewidth(17, 1000) # safe anti-clockwise pi.set_servo_pulsewidth(17, 1500) # centre pi.set_servo_pulsewidth(17, 2000) # safe clockwise ... """ return _u2i(_pigpio_command( self.sl, _PI_CMD_SERVO, user_gpio, int(pulsewidth))) def get_servo_pulsewidth(self, user_gpio): """ Returns the servo pulsewidth being used on the GPIO. user_gpio:= 0-31. Returns the servo pulsewidth. ... pi.set_servo_pulsewidth(4, 525) print(pi.get_servo_pulsewidth(4)) 525 pi.set_servo_pulsewidth(4, 2130) print(pi.get_servo_pulsewidth(4)) 2130 ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_GPW, user_gpio, 0)) def notify_open(self): """ Returns a notification handle (>=0). A notification is a method for being notified of GPIO state changes via a pipe. Pipes are only accessible from the local machine so this function serves no purpose if you are using Python from a remote machine. The in-built (socket) notifications provided by [*callback*] should be used instead. Notifications for handle x will be available at the pipe named /dev/pigpiox (where x is the handle number). E.g. if the function returns 15 then the notifications must be read from /dev/pigpio15. Notifications have the following structure: . . H seqno H flags I tick I level . . seqno: starts at 0 each time the handle is opened and then increments by one for each report. flags: three flags are defined, PI_NTFY_FLAGS_WDOG, PI_NTFY_FLAGS_ALIVE, and PI_NTFY_FLAGS_EVENT. If bit 5 is set (PI_NTFY_FLAGS_WDOG) then bits 0-4 of the flags indicate a GPIO which has had a watchdog timeout. If bit 6 is set (PI_NTFY_FLAGS_ALIVE) this indicates a keep alive signal on the pipe/socket and is sent once a minute in the absence of other notification activity. If bit 7 is set (PI_NTFY_FLAGS_EVENT) then bits 0-4 of the flags indicate an event which has been triggered. tick: the number of microseconds since system boot. It wraps around after 1h12m. level: indicates the level of each GPIO. If bit 1<= 0: pi.notify_begin(h, 1234) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_NO, 0, 0)) def notify_begin(self, handle, bits): """ Starts notifications on a handle. handle:= >=0 (as returned by a prior call to [*notify_open*]) bits:= a 32 bit mask indicating the GPIO to be notified. The notification sends state changes for each GPIO whose corresponding bit in bits is set. The following code starts notifications for GPIO 1, 4, 6, 7, and 10 (1234 = 0x04D2 = 0b0000010011010010). ... h = pi.notify_open() if h >= 0: pi.notify_begin(h, 1234) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_NB, handle, bits)) def notify_pause(self, handle): """ Pauses notifications on a handle. handle:= >=0 (as returned by a prior call to [*notify_open*]) Notifications for the handle are suspended until [*notify_begin*] is called again. ... h = pi.notify_open() if h >= 0: pi.notify_begin(h, 1234) ... pi.notify_pause(h) ... pi.notify_begin(h, 1234) ... ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_NB, handle, 0)) def notify_close(self, handle): """ Stops notifications on a handle and releases the handle for reuse. handle:= >=0 (as returned by a prior call to [*notify_open*]) ... h = pi.notify_open() if h >= 0: pi.notify_begin(h, 1234) ... pi.notify_close(h) ... ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_NC, handle, 0)) def set_watchdog(self, user_gpio, wdog_timeout): """ Sets a watchdog timeout for a GPIO. user_gpio:= 0-31. wdog_timeout:= 0-60000. The watchdog is nominally in milliseconds. Only one watchdog may be registered per GPIO. The watchdog may be cancelled by setting timeout to 0. Once a watchdog has been started callbacks for the GPIO will be triggered every timeout interval after the last GPIO activity. The callback will receive the special level TIMEOUT. ... pi.set_watchdog(23, 1000) # 1000 ms watchdog on GPIO 23 pi.set_watchdog(23, 0) # cancel watchdog on GPIO 23 ... """ return _u2i(_pigpio_command( self.sl, _PI_CMD_WDOG, user_gpio, int(wdog_timeout))) def read_bank_1(self): """ Returns the levels of the bank 1 GPIO (GPIO 0-31). The returned 32 bit integer has a bit set if the corresponding GPIO is high. GPIO n has bit value (1<=0) if OK, otherwise PI_EMPTY_WAVEFORM, PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID. The data provided by the [*wave_add_**] functions is consumed by this function. As many waveforms may be created as there is space available. The wave id is passed to [*wave_send_**] to specify the waveform to transmit. Normal usage would be Step 1. [*wave_clear*] to clear all waveforms and added data. Step 2. [*wave_add_**] calls to supply the waveform data. Step 3. [*wave_create*] to create the waveform and get a unique id Repeat steps 2 and 3 as needed. Step 4. [*wave_send_**] with the id of the waveform to transmit. A waveform comprises one or more pulses. A pulse specifies 1) the GPIO to be switched on at the start of the pulse. 2) the GPIO to be switched off at the start of the pulse. 3) the delay in microseconds before the next pulse. Any or all the fields can be zero. It doesn't make any sense to set all the fields to zero (the pulse will be ignored). When a waveform is started each pulse is executed in order with the specified delay between the pulse and the next. ... wid = pi.wave_create() ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_WVCRE, 0, 0)) def wave_create_and_pad(self, percent): """ This function creates a waveform like [*wave_create*] but pads the consumed resources. Where percent gives the percentage of the resources to use (in terms of the theoretical maximum, not the current amount free). This allows the reuse of deleted waves while a transmission is active. Upon success a wave id greater than or equal to 0 is returned, otherwise PI_EMPTY_WAVEFORM, PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID. . . percent: 0-100, size of waveform as percentage of maximum available. . . The data provided by the [*wave_add_**] functions are consumed by this function. As many waveforms may be created as there is space available. The wave id is passed to [*wave_send_**] to specify the waveform to transmit. A usage would be the creation of two waves where one is filled while the other is being transmitted. Each wave is assigned 50% of the resources. This buffer structure allows the transmission of infinite wave sequences. Normal usage: Step 1. [*wave_clear*] to clear all waveforms and added data. Step 2. [*wave_add_**] calls to supply the waveform data. Step 3. [*wave_create_and_pad*] to create a waveform of uniform size. Step 4. [*wave_send_**] with the id of the waveform to transmit. Repeat steps 2-4 as needed. Step 5. Any wave id can now be deleted and another wave of the same size can be created in its place. ... wid = pi.wave_create_and_pad(50) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_WVCAP, percent, 0)) def wave_delete(self, wave_id): """ This function deletes the waveform with id wave_id. wave_id:= >=0 (as returned by a prior call to [*wave_create*]). Wave ids are allocated in order, 0, 1, 2, etc. The wave is flagged for deletion. The resources used by the wave will only be reused when either of the following apply. - all waves with higher numbered wave ids have been deleted or have been flagged for deletion. - a new wave is created which uses exactly the same resources as the current wave (see the C source for gpioWaveCreate for details). ... pi.wave_delete(6) # delete waveform with id 6 pi.wave_delete(0) # delete waveform with id 0 ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_WVDEL, wave_id, 0)) def wave_tx_start(self): # DEPRECATED """ This function is deprecated and has been removed. Use [*wave_create*]/[*wave_send_**] instead. """ return _u2i(_pigpio_command(self.sl, _PI_CMD_WVGO, 0, 0)) def wave_tx_repeat(self): # DEPRECATED """ This function is deprecated and has beeen removed. Use [*wave_create*]/[*wave_send_**] instead. """ return _u2i(_pigpio_command(self.sl, _PI_CMD_WVGOR, 0, 0)) def wave_send_once(self, wave_id): """ Transmits the waveform with id wave_id. The waveform is sent once. NOTE: Any hardware PWM started by [*hardware_PWM*] will be cancelled. wave_id:= >=0 (as returned by a prior call to [*wave_create*]). Returns the number of DMA control blocks used in the waveform. ... cbs = pi.wave_send_once(wid) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_WVTX, wave_id, 0)) def wave_send_repeat(self, wave_id): """ Transmits the waveform with id wave_id. The waveform repeats until wave_tx_stop is called or another call to [*wave_send_**] is made. NOTE: Any hardware PWM started by [*hardware_PWM*] will be cancelled. wave_id:= >=0 (as returned by a prior call to [*wave_create*]). Returns the number of DMA control blocks used in the waveform. ... cbs = pi.wave_send_repeat(wid) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_WVTXR, wave_id, 0)) def wave_send_using_mode(self, wave_id, mode): """ Transmits the waveform with id wave_id using mode mode. wave_id:= >=0 (as returned by a prior call to [*wave_create*]). mode:= WAVE_MODE_ONE_SHOT, WAVE_MODE_REPEAT, WAVE_MODE_ONE_SHOT_SYNC, or WAVE_MODE_REPEAT_SYNC. WAVE_MODE_ONE_SHOT: same as [*wave_send_once*]. WAVE_MODE_REPEAT same as [*wave_send_repeat*]. WAVE_MODE_ONE_SHOT_SYNC same as [*wave_send_once*] but tries to sync with the previous waveform. WAVE_MODE_REPEAT_SYNC same as [*wave_send_repeat*] but tries to sync with the previous waveform. WARNING: bad things may happen if you delete the previous waveform before it has been synced to the new waveform. NOTE: Any hardware PWM started by [*hardware_PWM*] will be cancelled. wave_id:= >=0 (as returned by a prior call to [*wave_create*]). Returns the number of DMA control blocks used in the waveform. ... cbs = pi.wave_send_using_mode(wid, WAVE_MODE_REPEAT_SYNC) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_WVTXM, wave_id, mode)) def wave_tx_at(self): """ Returns the id of the waveform currently being transmitted using [*wave_send**]. Chained waves are not supported. Returns the waveform id or one of the following special values: WAVE_NOT_FOUND (9998) - transmitted wave not found. NO_TX_WAVE (9999) - no wave being transmitted. ... wid = pi.wave_tx_at() ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_WVTAT, 0, 0)) def wave_tx_busy(self): """ Returns 1 if a waveform is currently being transmitted, otherwise 0. ... pi.wave_send_once(0) # send first waveform while pi.wave_tx_busy(): # wait for waveform to be sent time.sleep(0.1) pi.wave_send_once(1) # send next waveform ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_WVBSY, 0, 0)) def wave_tx_stop(self): """ Stops the transmission of the current waveform. This function is intended to stop a waveform started with wave_send_repeat. ... pi.wave_send_repeat(3) time.sleep(5) pi.wave_tx_stop() ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_WVHLT, 0, 0)) def wave_chain(self, data): """ This function transmits a chain of waveforms. NOTE: Any hardware PWM started by [*hardware_PWM*] will be cancelled. The waves to be transmitted are specified by the contents of data which contains an ordered list of [*wave_id*]s and optional command codes and related data. Returns 0 if OK, otherwise PI_CHAIN_NESTING, PI_CHAIN_LOOP_CNT, PI_BAD_CHAIN_LOOP, PI_BAD_CHAIN_CMD, PI_CHAIN_COUNTER, PI_BAD_CHAIN_DELAY, PI_CHAIN_TOO_BIG, or PI_BAD_WAVE_ID. Each wave is transmitted in the order specified. A wave may occur multiple times per chain. A blocks of waves may be transmitted multiple times by using the loop commands. The block is bracketed by loop start and end commands. Loops may be nested. Delays between waves may be added with the delay command. The following command codes are supported: Name @ Cmd & Data @ Meaning Loop Start @ 255 0 @ Identify start of a wave block Loop Repeat @ 255 1 x y @ loop x + y*256 times Delay @ 255 2 x y @ delay x + y*256 microseconds Loop Forever @ 255 3 @ loop forever If present Loop Forever must be the last entry in the chain. The code is currently dimensioned to support a chain with roughly 600 entries and 20 loop counters. ... #!/usr/bin/env python import time import pigpio WAVES=5 GPIO=4 wid=[0]*WAVES pi = pigpio.pi() # Connect to local Pi. pi.set_mode(GPIO, pigpio.OUTPUT); for i in range(WAVES): pi.wave_add_generic([ pigpio.pulse(1<=0) for the device at the I2C bus address. i2c_bus:= >=0. i2c_address:= 0-0x7F. i2c_flags:= 0, no flags are currently defined. Physically buses 0 and 1 are available on the Pi. Higher numbered buses will be available if a kernel supported bus multiplexor is being used. The GPIO used are given in the following table. @ SDA @ SCL I2C 0 @ 0 @ 1 I2C 1 @ 2 @ 3 For the SMBus commands the low level transactions are shown at the end of the function description. The following abbreviations are used: . . S (1 bit) : Start bit P (1 bit) : Stop bit Rd/Wr (1 bit) : Read/Write bit. Rd equals 1, Wr equals 0. A, NA (1 bit) : Accept and not accept bit. Addr (7 bits): I2C 7 bit address. reg (8 bits): Command byte, which often selects a register. Data (8 bits): A data byte. Count (8 bits): A byte defining the length of a block operation. [..]: Data sent by the device. . . ... h = pi.i2c_open(1, 0x53) # open device at address 0x53 on bus 1 ... """ # I p1 i2c_bus # I p2 i2c_addr # I p3 4 ## extension ## # I i2c_flags extents = [struct.pack("I", i2c_flags)] return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_I2CO, i2c_bus, i2c_address, 4, extents)) def i2c_close(self, handle): """ Closes the I2C device associated with handle. handle:= >=0 (as returned by a prior call to [*i2c_open*]). ... pi.i2c_close(h) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_I2CC, handle, 0)) def i2c_write_quick(self, handle, bit): """ Sends a single bit to the device associated with handle. handle:= >=0 (as returned by a prior call to [*i2c_open*]). bit:= 0 or 1, the value to write. SMBus 2.0 5.5.1 - Quick command. . . S Addr bit [A] P . . ... pi.i2c_write_quick(0, 1) # send 1 to device 0 pi.i2c_write_quick(3, 0) # send 0 to device 3 ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_I2CWQ, handle, bit)) def i2c_write_byte(self, handle, byte_val): """ Sends a single byte to the device associated with handle. handle:= >=0 (as returned by a prior call to [*i2c_open*]). byte_val:= 0-255, the value to write. SMBus 2.0 5.5.2 - Send byte. . . S Addr Wr [A] byte_val [A] P . . ... pi.i2c_write_byte(1, 17) # send byte 17 to device 1 pi.i2c_write_byte(2, 0x23) # send byte 0x23 to device 2 ... """ return _u2i( _pigpio_command(self.sl, _PI_CMD_I2CWS, handle, byte_val)) def i2c_read_byte(self, handle): """ Reads a single byte from the device associated with handle. handle:= >=0 (as returned by a prior call to [*i2c_open*]). SMBus 2.0 5.5.3 - Receive byte. . . S Addr Rd [A] [Data] NA P . . ... b = pi.i2c_read_byte(2) # read a byte from device 2 ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_I2CRS, handle, 0)) def i2c_write_byte_data(self, handle, reg, byte_val): """ Writes a single byte to the specified register of the device associated with handle. handle:= >=0 (as returned by a prior call to [*i2c_open*]). reg:= >=0, the device register. byte_val:= 0-255, the value to write. SMBus 2.0 5.5.4 - Write byte. . . S Addr Wr [A] reg [A] byte_val [A] P . . ... # send byte 0xC5 to reg 2 of device 1 pi.i2c_write_byte_data(1, 2, 0xC5) # send byte 9 to reg 4 of device 2 pi.i2c_write_byte_data(2, 4, 9) ... """ # I p1 handle # I p2 reg # I p3 4 ## extension ## # I byte_val extents = [struct.pack("I", byte_val)] return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_I2CWB, handle, reg, 4, extents)) def i2c_write_word_data(self, handle, reg, word_val): """ Writes a single 16 bit word to the specified register of the device associated with handle. handle:= >=0 (as returned by a prior call to [*i2c_open*]). reg:= >=0, the device register. word_val:= 0-65535, the value to write. SMBus 2.0 5.5.4 - Write word. . . S Addr Wr [A] reg [A] word_val_Low [A] word_val_High [A] P . . ... # send word 0xA0C5 to reg 5 of device 4 pi.i2c_write_word_data(4, 5, 0xA0C5) # send word 2 to reg 2 of device 5 pi.i2c_write_word_data(5, 2, 23) ... """ # I p1 handle # I p2 reg # I p3 4 ## extension ## # I word_val extents = [struct.pack("I", word_val)] return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_I2CWW, handle, reg, 4, extents)) def i2c_read_byte_data(self, handle, reg): """ Reads a single byte from the specified register of the device associated with handle. handle:= >=0 (as returned by a prior call to [*i2c_open*]). reg:= >=0, the device register. SMBus 2.0 5.5.5 - Read byte. . . S Addr Wr [A] reg [A] S Addr Rd [A] [Data] NA P . . ... # read byte from reg 17 of device 2 b = pi.i2c_read_byte_data(2, 17) # read byte from reg 1 of device 0 b = pi.i2c_read_byte_data(0, 1) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_I2CRB, handle, reg)) def i2c_read_word_data(self, handle, reg): """ Reads a single 16 bit word from the specified register of the device associated with handle. handle:= >=0 (as returned by a prior call to [*i2c_open*]). reg:= >=0, the device register. SMBus 2.0 5.5.5 - Read word. . . S Addr Wr [A] reg [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P . . ... # read word from reg 2 of device 3 w = pi.i2c_read_word_data(3, 2) # read word from reg 7 of device 2 w = pi.i2c_read_word_data(2, 7) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_I2CRW, handle, reg)) def i2c_process_call(self, handle, reg, word_val): """ Writes 16 bits of data to the specified register of the device associated with handle and reads 16 bits of data in return. handle:= >=0 (as returned by a prior call to [*i2c_open*]). reg:= >=0, the device register. word_val:= 0-65535, the value to write. SMBus 2.0 5.5.6 - Process call. . . S Addr Wr [A] reg [A] word_val_Low [A] word_val_High [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P . . ... r = pi.i2c_process_call(h, 4, 0x1231) r = pi.i2c_process_call(h, 6, 0) ... """ # I p1 handle # I p2 reg # I p3 4 ## extension ## # I word_val extents = [struct.pack("I", word_val)] return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_I2CPC, handle, reg, 4, extents)) def i2c_write_block_data(self, handle, reg, data): """ Writes up to 32 bytes to the specified register of the device associated with handle. handle:= >=0 (as returned by a prior call to [*i2c_open*]). reg:= >=0, the device register. data:= the bytes to write. SMBus 2.0 5.5.7 - Block write. . . S Addr Wr [A] reg [A] len(data) [A] data0 [A] data1 [A] ... [A] datan [A] P . . ... pi.i2c_write_block_data(4, 5, b'hello') pi.i2c_write_block_data(4, 5, "data bytes") pi.i2c_write_block_data(5, 0, b'\\x00\\x01\\x22') pi.i2c_write_block_data(6, 2, [0, 1, 0x22]) ... """ # I p1 handle # I p2 reg # I p3 len ## extension ## # s len data bytes if len(data): return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_I2CWK, handle, reg, len(data), [data])) else: return 0 def i2c_read_block_data(self, handle, reg): """ Reads a block of up to 32 bytes from the specified register of the device associated with handle. handle:= >=0 (as returned by a prior call to [*i2c_open*]). reg:= >=0, the device register. SMBus 2.0 5.5.7 - Block read. . . S Addr Wr [A] reg [A] S Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P . . The amount of returned data is set by the device. The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code). ... (b, d) = pi.i2c_read_block_data(h, 10) if b >= 0: # process data else: # process read failure ... """ bytes = PI_CMD_INTERRUPTED rdata = "" with self.sl.l: bytes = u2i(_pigpio_command_nolock( self.sl, _PI_CMD_I2CRK, handle, reg)) if bytes > 0: rdata = self._rxbuf(bytes) return bytes, rdata def i2c_block_process_call(self, handle, reg, data): """ Writes data bytes to the specified register of the device associated with handle and reads a device specified number of bytes of data in return. handle:= >=0 (as returned by a prior call to [*i2c_open*]). reg:= >=0, the device register. data:= the bytes to write. The SMBus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received. The total number of bytes sent/received must be 32 or less. SMBus 2.0 5.5.8 - Block write-block read. . . S Addr Wr [A] reg [A] len(data) [A] data0 [A] ... datan [A] S Addr Rd [A] [Count] A [Data] ... A P . . The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code). ... (b, d) = pi.i2c_block_process_call(h, 10, b'\\x02\\x05\\x00') (b, d) = pi.i2c_block_process_call(h, 10, b'abcdr') (b, d) = pi.i2c_block_process_call(h, 10, "abracad") (b, d) = pi.i2c_block_process_call(h, 10, [2, 5, 16]) ... """ # I p1 handle # I p2 reg # I p3 len ## extension ## # s len data bytes bytes = PI_CMD_INTERRUPTED rdata = "" with self.sl.l: bytes = u2i(_pigpio_command_ext_nolock( self.sl, _PI_CMD_I2CPK, handle, reg, len(data), [data])) if bytes > 0: rdata = self._rxbuf(bytes) return bytes, rdata def i2c_write_i2c_block_data(self, handle, reg, data): """ Writes data bytes to the specified register of the device associated with handle . 1-32 bytes may be written. handle:= >=0 (as returned by a prior call to [*i2c_open*]). reg:= >=0, the device register. data:= the bytes to write. . . S Addr Wr [A] reg [A] data0 [A] data1 [A] ... [A] datan [NA] P . . ... pi.i2c_write_i2c_block_data(4, 5, 'hello') pi.i2c_write_i2c_block_data(4, 5, b'hello') pi.i2c_write_i2c_block_data(5, 0, b'\\x00\\x01\\x22') pi.i2c_write_i2c_block_data(6, 2, [0, 1, 0x22]) ... """ # I p1 handle # I p2 reg # I p3 len ## extension ## # s len data bytes if len(data): return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_I2CWI, handle, reg, len(data), [data])) else: return 0 def i2c_read_i2c_block_data(self, handle, reg, count): """ Reads count bytes from the specified register of the device associated with handle . The count may be 1-32. handle:= >=0 (as returned by a prior call to [*i2c_open*]). reg:= >=0, the device register. count:= >0, the number of bytes to read. . . S Addr Wr [A] reg [A] S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P . . The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code). ... (b, d) = pi.i2c_read_i2c_block_data(h, 4, 32) if b >= 0: # process data else: # process read failure ... """ # I p1 handle # I p2 reg # I p3 4 ## extension ## # I count extents = [struct.pack("I", count)] bytes = PI_CMD_INTERRUPTED rdata = "" with self.sl.l: bytes = u2i(_pigpio_command_ext_nolock( self.sl, _PI_CMD_I2CRI, handle, reg, 4, extents)) if bytes > 0: rdata = self._rxbuf(bytes) return bytes, rdata def i2c_read_device(self, handle, count): """ Returns count bytes read from the raw device associated with handle. handle:= >=0 (as returned by a prior call to [*i2c_open*]). count:= >0, the number of bytes to read. . . S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P . . The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code). ... (count, data) = pi.i2c_read_device(h, 12) ... """ bytes = PI_CMD_INTERRUPTED rdata = "" with self.sl.l: bytes = u2i( _pigpio_command_nolock(self.sl, _PI_CMD_I2CRD, handle, count)) if bytes > 0: rdata = self._rxbuf(bytes) return bytes, rdata def i2c_write_device(self, handle, data): """ Writes the data bytes to the raw device associated with handle. handle:= >=0 (as returned by a prior call to [*i2c_open*]). data:= the bytes to write. . . S Addr Wr [A] data0 [A] data1 [A] ... [A] datan [A] P . . ... pi.i2c_write_device(h, b"\\x12\\x34\\xA8") pi.i2c_write_device(h, b"help") pi.i2c_write_device(h, 'help') pi.i2c_write_device(h, [23, 56, 231]) ... """ # I p1 handle # I p2 0 # I p3 len ## extension ## # s len data bytes if len(data): return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_I2CWD, handle, 0, len(data), [data])) else: return 0 def i2c_zip(self, handle, data): """ This function executes a sequence of I2C operations. The operations to be performed are specified by the contents of data which contains the concatenated command codes and associated data. handle:= >=0 (as returned by a prior call to [*i2c_open*]). data:= the concatenated I2C commands, see below The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code). ... (count, data) = pi.i2c_zip(h, [4, 0x53, 7, 1, 0x32, 6, 6, 0]) ... The following command codes are supported: Name @ Cmd & Data @ Meaning End @ 0 @ No more commands Escape @ 1 @ Next P is two bytes On @ 2 @ Switch combined flag on Off @ 3 @ Switch combined flag off Address @ 4 P @ Set I2C address to P Flags @ 5 lsb msb @ Set I2C flags to lsb + (msb << 8) Read @ 6 P @ Read P bytes of data Write @ 7 P ... @ Write P bytes of data The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). The address defaults to that associated with the handle. The flags default to 0. The address and flags maintain their previous value until updated. Any read I2C data is concatenated in the returned bytearray. ... Set address 0x53, write 0x32, read 6 bytes Set address 0x1E, write 0x03, read 6 bytes Set address 0x68, write 0x1B, read 8 bytes End 0x04 0x53 0x07 0x01 0x32 0x06 0x06 0x04 0x1E 0x07 0x01 0x03 0x06 0x06 0x04 0x68 0x07 0x01 0x1B 0x06 0x08 0x00 ... """ # I p1 handle # I p2 0 # I p3 len ## extension ## # s len data bytes bytes = PI_CMD_INTERRUPTED rdata = "" with self.sl.l: bytes = u2i(_pigpio_command_ext_nolock( self.sl, _PI_CMD_I2CZ, handle, 0, len(data), [data])) if bytes > 0: rdata = self._rxbuf(bytes) return bytes, rdata def bb_spi_open(self, CS, MISO, MOSI, SCLK, baud=100000, spi_flags=0): """ This function selects a set of GPIO for bit banging SPI at a specified baud rate. CS := 0-31 MISO := 0-31 MOSI := 0-31 SCLK := 0-31 baud := 50-250000 spiFlags := see below spiFlags consists of the least significant 22 bits. . . 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 R T 0 0 0 0 0 0 0 0 0 0 0 p m m . . mm defines the SPI mode, defaults to 0 . . Mode CPOL CPHA 0 0 0 1 0 1 2 1 0 3 1 1 . . The following constants may be used to set the mode: . . pigpio.SPI_MODE_0 pigpio.SPI_MODE_1 pigpio.SPI_MODE_2 pigpio.SPI_MODE_3 . . Alternatively pigpio.SPI_CPOL and/or pigpio.SPI_CPHA may be used. p is 0 if CS is active low (default) and 1 for active high. pigpio.SPI_CS_HIGH_ACTIVE may be used to set this flag. T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. pigpio.SPI_TX_LSBFIRST may be used to set this flag. R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. pigpio.SPI_RX_LSBFIRST may be used to set this flag. The other bits in spiFlags should be set to zero. Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_SPI_BAUD, or PI_GPIO_IN_USE. If more than one device is connected to the SPI bus (defined by SCLK, MOSI, and MISO) each must have its own CS. ... bb_spi_open(10, MISO, MOSI, SCLK, 10000, 0); // device 1 bb_spi_open(11, MISO, MOSI, SCLK, 20000, 3); // device 2 ... """ # I p1 CS # I p2 0 # I p3 20 ## extension ## # I MISO # I MOSI # I SCLK # I baud # I spi_flags extents = [struct.pack("IIIII", MISO, MOSI, SCLK, baud, spi_flags)] return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_BSPIO, CS, 0, 20, extents)) def bb_spi_close(self, CS): """ This function stops bit banging SPI on a set of GPIO opened with [*bb_spi_open*]. CS:= 0-31, the CS GPIO used in a prior call to [*bb_spi_open*] Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_SPI_GPIO. ... pi.bb_spi_close(CS) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_BSPIC, CS, 0)) def bb_spi_xfer(self, CS, data): """ This function executes a bit banged SPI transfer. CS:= 0-31 (as used in a prior call to [*bb_spi_open*]) data:= data to be sent The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code). ... #!/usr/bin/env python import pigpio CE0=5 CE1=6 MISO=13 MOSI=19 SCLK=12 pi = pigpio.pi() if not pi.connected: exit() pi.bb_spi_open(CE0, MISO, MOSI, SCLK, 10000, 0) # MCP4251 DAC pi.bb_spi_open(CE1, MISO, MOSI, SCLK, 20000, 3) # MCP3008 ADC for i in range(256): count, data = pi.bb_spi_xfer(CE0, [0, i]) # Set DAC value if count == 2: count, data = pi.bb_spi_xfer(CE0, [12, 0]) # Read back DAC if count == 2: set_val = data[1] count, data = pi.bb_spi_xfer(CE1, [1, 128, 0]) # Read ADC if count == 3: read_val = ((data[1]&3)<<8) | data[2] print("{} {}".format(set_val, read_val)) pi.bb_spi_close(CE0) pi.bb_spi_close(CE1) pi.stop() ... """ # I p1 CS # I p2 0 # I p3 len ## extension ## # s len data bytes bytes = PI_CMD_INTERRUPTED rdata = "" with self.sl.l: bytes = u2i(_pigpio_command_ext_nolock( self.sl, _PI_CMD_BSPIX, CS, 0, len(data), [data])) if bytes > 0: rdata = self._rxbuf(bytes) return bytes, rdata def bb_i2c_open(self, SDA, SCL, baud=100000): """ This function selects a pair of GPIO for bit banging I2C at a specified baud rate. Bit banging I2C allows for certain operations which are not possible with the standard I2C driver. o baud rates as low as 50 o repeated starts o clock stretching o I2C on any pair of spare GPIO SDA:= 0-31 SCL:= 0-31 baud:= 50-500000 Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_I2C_BAUD, or PI_GPIO_IN_USE. NOTE: The GPIO used for SDA and SCL must have pull-ups to 3V3 connected. As a guide the hardware pull-ups on pins 3 and 5 are 1k8 in value. ... h = pi.bb_i2c_open(4, 5, 50000) # bit bang on GPIO 4/5 at 50kbps ... """ # I p1 SDA # I p2 SCL # I p3 4 ## extension ## # I baud extents = [struct.pack("I", baud)] return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_BI2CO, SDA, SCL, 4, extents)) def bb_i2c_close(self, SDA): """ This function stops bit banging I2C on a pair of GPIO previously opened with [*bb_i2c_open*]. SDA:= 0-31, the SDA GPIO used in a prior call to [*bb_i2c_open*] Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_I2C_GPIO. ... pi.bb_i2c_close(SDA) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_BI2CC, SDA, 0)) def bb_i2c_zip(self, SDA, data): """ This function executes a sequence of bit banged I2C operations. The operations to be performed are specified by the contents of data which contains the concatenated command codes and associated data. SDA:= 0-31 (as used in a prior call to [*bb_i2c_open*]) data:= the concatenated I2C commands, see below The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code). ... (count, data) = pi.bb_i2c_zip( SDA, [4, 0x53, 2, 7, 1, 0x32, 2, 6, 6, 3, 0]) ... The following command codes are supported: Name @ Cmd & Data @ Meaning End @ 0 @ No more commands Escape @ 1 @ Next P is two bytes Start @ 2 @ Start condition Stop @ 3 @ Stop condition Address @ 4 P @ Set I2C address to P Flags @ 5 lsb msb @ Set I2C flags to lsb + (msb << 8) Read @ 6 P @ Read P bytes of data Write @ 7 P ... @ Write P bytes of data The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). The address and flags default to 0. The address and flags maintain their previous value until updated. No flags are currently defined. Any read I2C data is concatenated in the returned bytearray. ... Set address 0x53 start, write 0x32, (re)start, read 6 bytes, stop Set address 0x1E start, write 0x03, (re)start, read 6 bytes, stop Set address 0x68 start, write 0x1B, (re)start, read 8 bytes, stop End 0x04 0x53 0x02 0x07 0x01 0x32 0x02 0x06 0x06 0x03 0x04 0x1E 0x02 0x07 0x01 0x03 0x02 0x06 0x06 0x03 0x04 0x68 0x02 0x07 0x01 0x1B 0x02 0x06 0x08 0x03 0x00 ... """ # I p1 SDA # I p2 0 # I p3 len ## extension ## # s len data bytes bytes = PI_CMD_INTERRUPTED rdata = "" with self.sl.l: bytes = u2i(_pigpio_command_ext_nolock( self.sl, _PI_CMD_BI2CZ, SDA, 0, len(data), [data])) if bytes > 0: rdata = self._rxbuf(bytes) return bytes, rdata def event_trigger(self, event): """ This function signals the occurrence of an event. event:= 0-31, the event Returns 0 if OK, otherwise PI_BAD_EVENT_ID. An event is a signal used to inform one or more consumers to start an action. Each consumer which has registered an interest in the event (e.g. by calling [*event_callback*]) will be informed by a callback. One event, EVENT_BSC (31) is predefined. This event is auto generated on BSC slave activity. The meaning of other events is arbitrary. Note that other than its id and its tick there is no data associated with an event. ... pi.event_trigger(23) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_EVT, event, 0)) def bsc_xfer(self, bsc_control, data): """ This function provides a low-level interface to the SPI/I2C Slave peripheral on the BCM chip. This peripheral allows the Pi to act as a hardware slave device on an I2C or SPI bus. This is not a bit bang version and as such is OS timing independent. The bus timing is handled directly by the chip. The output process is simple. You simply append data to the FIFO buffer on the chip. This works like a queue, you add data to the queue and the master removes it. I can't get SPI to work properly. I tried with a control word of 0x303 and swapped MISO and MOSI. The function sets the BSC mode, writes any data in the transmit buffer to the BSC transmit FIFO, and copies any data in the BSC receive FIFO to the receive buffer. bsc_control:= see below data:= the data bytes to place in the transmit FIFO. The returned value is a tuple of the status (see below), the number of bytes read, and a bytearray containing the read bytes. If there was an error the status will be less than zero (and will contain the error code). Note that the control word sets the BSC mode. The BSC will stay in that mode until a different control word is sent. GPIO used for models other than those based on the BCM2711. @ SDA @ SCL @ MOSI @ SCLK @ MISO @ CE I2C @ 18 @ 19 @ - @ - @ - @ - SPI @ - @ - @ 18 @ 19 @ 20 @ 21 GPIO used for models based on the BCM2711 (e.g. the Pi4B). @ SDA @ SCL @ MOSI @ SCLK @ MISO @ CE I2C @ 10 @ 11 @ - @ - @ - @ - SPI @ - @ - @ 10 @ 11 @ 9 @ 8 When a zero control word is received the used GPIO will be reset to INPUT mode. bsc_control consists of the following bits: . . 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 a a a a a a a - - IT HC TF IR RE TE BK EC ES PL PH I2 SP EN . . Bits 0-13 are copied unchanged to the BSC CR register. See pages 163-165 of the Broadcom peripherals document for full details. aaaaaaa @ defines the I2C slave address (only relevant in I2C mode) IT @ invert transmit status flags HC @ enable host control TF @ enable test FIFO IR @ invert receive status flags RE @ enable receive TE @ enable transmit BK @ abort operation and clear FIFOs EC @ send control register as first I2C byte ES @ send status register as first I2C byte PL @ set SPI polarity high PH @ set SPI phase high I2 @ enable I2C mode SP @ enable SPI mode EN @ enable BSC peripheral The status has the following format: . . 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 S S S S S R R R R R T T T T T RB TE RF TF RE TB . . Bits 0-15 are copied unchanged from the BSC FR register. See pages 165-166 of the Broadcom peripherals document for full details. SSSSS @ number of bytes successfully copied to transmit FIFO RRRRR @ number of bytes in receieve FIFO TTTTT @ number of bytes in transmit FIFO RB @ receive busy TE @ transmit FIFO empty RF @ receive FIFO full TF @ transmit FIFO full RE @ receive FIFO empty TB @ transmit busy ... (status, count, data) = pi.bsc_xfer(0x330305, "Hello!") ... """ # I p1 control # I p2 0 # I p3 len ## extension ## # s len data bytes status = PI_CMD_INTERRUPTED bytes = 0 rdata = bytearray(b'') with self.sl.l: bytes = u2i(_pigpio_command_ext_nolock( self.sl, _PI_CMD_BSCX, bsc_control, 0, len(data), [data])) if bytes > 0: rx = self._rxbuf(bytes) status = struct.unpack('I', rx[0:4])[0] bytes -= 4 rdata = rx[4:] else: status = bytes bytes = 0 return status, bytes, rdata def bsc_i2c(self, i2c_address, data=[]): """ This function allows the Pi to act as a slave I2C device. This function is not available on the BCM2711 (e.g. as used in the Pi4B). The data bytes (if any) are written to the BSC transmit FIFO and the bytes in the BSC receive FIFO are returned. i2c_address:= the I2C slave address. data:= the data bytes to transmit. The returned value is a tuple of the status, the number of bytes read, and a bytearray containing the read bytes. See [*bsc_xfer*] for details of the status value. If there was an error the status will be less than zero (and will contain the error code). Note that an i2c_address of 0 may be used to close the BSC device and reassign the used GPIO as inputs. This example assumes GPIO 2/3 are connected to GPIO 18/19 (GPIO 10/11 on the BCM2711). ... #!/usr/bin/env python import time import pigpio I2C_ADDR=0x13 def i2c(id, tick): global pi s, b, d = pi.bsc_i2c(I2C_ADDR) if b: if d[0] == ord('t'): # 116 send 'HH:MM:SS*' print("sent={} FR={} received={} [{}]". format(s>>16, s&0xfff,b,d)) s, b, d = pi.bsc_i2c(I2C_ADDR, "{}*".format(time.asctime()[11:19])) elif d[0] == ord('d'): # 100 send 'Sun Oct 30*' print("sent={} FR={} received={} [{}]". format(s>>16, s&0xfff,b,d)) s, b, d = pi.bsc_i2c(I2C_ADDR, "{}*".format(time.asctime()[:10])) pi = pigpio.pi() if not pi.connected: exit() # Respond to BSC slave activity e = pi.event_callback(pigpio.EVENT_BSC, i2c) pi.bsc_i2c(I2C_ADDR) # Configure BSC as I2C slave time.sleep(600) e.cancel() pi.bsc_i2c(0) # Disable BSC peripheral pi.stop() ... While running the above. . . $ i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- 13 -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- $ pigs i2co 1 0x13 0 0 $ pigs i2cwd 0 116 $ pigs i2crd 0 9 -a 9 10:13:58* $ pigs i2cwd 0 116 $ pigs i2crd 0 9 -a 9 10:14:29* $ pigs i2cwd 0 100 $ pigs i2crd 0 11 -a 11 Sun Oct 30* $ pigs i2cwd 0 100 $ pigs i2crd 0 11 -a 11 Sun Oct 30* $ pigs i2cwd 0 116 $ pigs i2crd 0 9 -a 9 10:23:16* $ pigs i2cwd 0 100 $ pigs i2crd 0 11 -a 11 Sun Oct 30* . . """ if i2c_address: control = (i2c_address<<16)|0x305 else: control = 0 return self.bsc_xfer(control, data) def spi_open(self, spi_channel, baud, spi_flags=0): """ Returns a handle for the SPI device on the channel. Data will be transferred at baud bits per second. The flags may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select. The Pi has two SPI peripherals: main and auxiliary. The main SPI has two chip selects (channels), the auxiliary has three. The auxiliary SPI is available on all models but the A and B. The GPIO used are given in the following table. @ MISO @ MOSI @ SCLK @ CE0 @ CE1 @ CE2 Main SPI @ 9 @ 10 @ 11 @ 8 @ 7 @ - Aux SPI @ 19 @ 20 @ 21 @ 18 @ 17 @ 16 spi_channel:= 0-1 (0-2 for the auxiliary SPI). baud:= 32K-125M (values above 30M are unlikely to work). spi_flags:= see below. spi_flags consists of the least significant 22 bits. . . 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 b b b b b b R T n n n n W A u2 u1 u0 p2 p1 p0 m m . . mm defines the SPI mode. WARNING: modes 1 and 3 do not appear to work on the auxiliary SPI. . . Mode POL PHA 0 0 0 1 0 1 2 1 0 3 1 1 . . px is 0 if CEx is active low (default) and 1 for active high. ux is 0 if the CEx GPIO is reserved for SPI (default) and 1 otherwise. A is 0 for the main SPI, 1 for the auxiliary SPI. W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Main SPI only. nnnn defines the number of bytes (0-15) to write before switching the MOSI line to MISO to read data. This field is ignored if W is not set. Main SPI only. T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. Auxiliary SPI only. R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. Auxiliary SPI only. bbbbbb defines the word size in bits (0-32). The default (0) sets 8 bits per word. Auxiliary SPI only. The [*spi_read*], [*spi_write*], and [*spi_xfer*] functions transfer data packed into 1, 2, or 4 bytes according to the word size in bits. For bits 1-8 there will be one byte per character. For bits 9-16 there will be two bytes per character. For bits 17-32 there will be four bytes per character. Multi-byte transfers are made in least significant byte first order. E.g. to transfer 32 11-bit words data should contain 64 bytes. E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A. The other bits in flags should be set to zero. ... # open SPI device on channel 1 in mode 3 at 50000 bits per second h = pi.spi_open(1, 50000, 3) ... """ # I p1 spi_channel # I p2 baud # I p3 4 ## extension ## # I spi_flags extents = [struct.pack("I", spi_flags)] return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_SPIO, spi_channel, baud, 4, extents)) def spi_close(self, handle): """ Closes the SPI device associated with handle. handle:= >=0 (as returned by a prior call to [*spi_open*]). ... pi.spi_close(h) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_SPIC, handle, 0)) def spi_read(self, handle, count): """ Reads count bytes from the SPI device associated with handle. handle:= >=0 (as returned by a prior call to [*spi_open*]). count:= >0, the number of bytes to read. The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code). ... (b, d) = pi.spi_read(h, 60) # read 60 bytes from device h if b == 60: # process read data else: # error path ... """ bytes = PI_CMD_INTERRUPTED rdata = "" with self.sl.l: bytes = u2i(_pigpio_command_nolock( self.sl, _PI_CMD_SPIR, handle, count)) if bytes > 0: rdata = self._rxbuf(bytes) return bytes, rdata def spi_write(self, handle, data): """ Writes the data bytes to the SPI device associated with handle. handle:= >=0 (as returned by a prior call to [*spi_open*]). data:= the bytes to write. ... pi.spi_write(0, b'\\x02\\xc0\\x80') # write 3 bytes to device 0 pi.spi_write(0, b'defgh') # write 5 bytes to device 0 pi.spi_write(0, "def") # write 3 bytes to device 0 pi.spi_write(1, [2, 192, 128]) # write 3 bytes to device 1 ... """ # I p1 handle # I p2 0 # I p3 len ## extension ## # s len data bytes return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_SPIW, handle, 0, len(data), [data])) def spi_xfer(self, handle, data): """ Writes the data bytes to the SPI device associated with handle, returning the data bytes read from the device. handle:= >=0 (as returned by a prior call to [*spi_open*]). data:= the bytes to write. The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code). ... (count, rx_data) = pi.spi_xfer(h, b'\\x01\\x80\\x00') (count, rx_data) = pi.spi_xfer(h, [1, 128, 0]) (count, rx_data) = pi.spi_xfer(h, b"hello") (count, rx_data) = pi.spi_xfer(h, "hello") ... """ # I p1 handle # I p2 0 # I p3 len ## extension ## # s len data bytes bytes = PI_CMD_INTERRUPTED rdata = "" with self.sl.l: bytes = u2i(_pigpio_command_ext_nolock( self.sl, _PI_CMD_SPIX, handle, 0, len(data), [data])) if bytes > 0: rdata = self._rxbuf(bytes) return bytes, rdata def serial_open(self, tty, baud, ser_flags=0): """ Returns a handle for the serial tty device opened at baud bits per second. The device name must start with /dev/tty or /dev/serial. tty:= the serial device to open. baud:= baud rate in bits per second, see below. ser_flags:= 0, no flags are currently defined. Normally you would only use the [*serial_**] functions if you are or will be connecting to the Pi over a network. If you will always run on the local Pi use the standard serial module instead. The baud rate must be one of 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, or 230400. ... h1 = pi.serial_open("/dev/ttyAMA0", 300) h2 = pi.serial_open("/dev/ttyUSB1", 19200, 0) h3 = pi.serial_open("/dev/serial0", 9600) ... """ # I p1 baud # I p2 ser_flags # I p3 len ## extension ## # s len data bytes return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_SERO, baud, ser_flags, len(tty), [tty])) def serial_close(self, handle): """ Closes the serial device associated with handle. handle:= >=0 (as returned by a prior call to [*serial_open*]). ... pi.serial_close(h1) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_SERC, handle, 0)) def serial_read_byte(self, handle): """ Returns a single byte from the device associated with handle. handle:= >=0 (as returned by a prior call to [*serial_open*]). If no data is ready a negative error code will be returned. ... b = pi.serial_read_byte(h1) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_SERRB, handle, 0)) def serial_write_byte(self, handle, byte_val): """ Writes a single byte to the device associated with handle. handle:= >=0 (as returned by a prior call to [*serial_open*]). byte_val:= 0-255, the value to write. ... pi.serial_write_byte(h1, 23) pi.serial_write_byte(h1, ord('Z')) ... """ return _u2i( _pigpio_command(self.sl, _PI_CMD_SERWB, handle, byte_val)) def serial_read(self, handle, count=1000): """ Reads up to count bytes from the device associated with handle. handle:= >=0 (as returned by a prior call to [*serial_open*]). count:= >0, the number of bytes to read (defaults to 1000). The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code). If no data is ready a bytes read of zero is returned. ... (b, d) = pi.serial_read(h2, 100) if b > 0: # process read data ... """ bytes = PI_CMD_INTERRUPTED rdata = "" with self.sl.l: bytes = u2i( _pigpio_command_nolock(self.sl, _PI_CMD_SERR, handle, count)) if bytes > 0: rdata = self._rxbuf(bytes) return bytes, rdata def serial_write(self, handle, data): """ Writes the data bytes to the device associated with handle. handle:= >=0 (as returned by a prior call to [*serial_open*]). data:= the bytes to write. ... pi.serial_write(h1, b'\\x02\\x03\\x04') pi.serial_write(h2, b'help') pi.serial_write(h2, "hello") pi.serial_write(h1, [2, 3, 4]) ... """ # I p1 handle # I p2 0 # I p3 len ## extension ## # s len data bytes return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_SERW, handle, 0, len(data), [data])) def serial_data_available(self, handle): """ Returns the number of bytes available to be read from the device associated with handle. handle:= >=0 (as returned by a prior call to [*serial_open*]). ... rdy = pi.serial_data_available(h1) if rdy > 0: (b, d) = pi.serial_read(h1, rdy) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_SERDA, handle, 0)) def gpio_trigger(self, user_gpio, pulse_len=10, level=1): """ Send a trigger pulse to a GPIO. The GPIO is set to level for pulse_len microseconds and then reset to not level. user_gpio:= 0-31 pulse_len:= 1-100 level:= 0-1 ... pi.gpio_trigger(23, 10, 1) ... """ # pigpio message format # I p1 user_gpio # I p2 pulse_len # I p3 4 ## extension ## # I level extents = [struct.pack("I", level)] return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_TRIG, user_gpio, pulse_len, 4, extents)) def set_glitch_filter(self, user_gpio, steady): """ Sets a glitch filter on a GPIO. Level changes on the GPIO are not reported unless the level has been stable for at least [*steady*] microseconds. The level is then reported. Level changes of less than [*steady*] microseconds are ignored. user_gpio:= 0-31 steady:= 0-300000 Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER. This filter affects the GPIO samples returned to callbacks set up with [*callback*] and [*wait_for_edge*]. It does not affect levels read by [*read*], [*read_bank_1*], or [*read_bank_2*]. Each (stable) edge will be timestamped [*steady*] microseconds after it was first detected. ... pi.set_glitch_filter(23, 100) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_FG, user_gpio, steady)) def set_noise_filter(self, user_gpio, steady, active): """ Sets a noise filter on a GPIO. Level changes on the GPIO are ignored until a level which has been stable for [*steady*] microseconds is detected. Level changes on the GPIO are then reported for [*active*] microseconds after which the process repeats. user_gpio:= 0-31 steady:= 0-300000 active:= 0-1000000 Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER. This filter affects the GPIO samples returned to callbacks set up with [*callback*] and [*wait_for_edge*]. It does not affect levels read by [*read*], [*read_bank_1*], or [*read_bank_2*]. Level changes before and after the active period may be reported. Your software must be designed to cope with such reports. ... pi.set_noise_filter(23, 1000, 5000) ... """ # pigpio message format # I p1 user_gpio # I p2 steady # I p3 4 ## extension ## # I active extents = [struct.pack("I", active)] return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_FN, user_gpio, steady, 4, extents)) def store_script(self, script): """ Store a script for later execution. See [[http://abyz.me.uk/rpi/pigpio/pigs.html#Scripts]] for details. script:= the script text as a series of bytes. Returns a >=0 script id if OK. ... sid = pi.store_script( b'tag 0 w 22 1 mils 100 w 22 0 mils 100 dcr p0 jp 0') ... """ # I p1 0 # I p2 0 # I p3 len ## extension ## # s len data bytes if len(script): return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_PROC, 0, 0, len(script), [script])) else: return 0 def run_script(self, script_id, params=None): """ Runs a stored script. script_id:= id of stored script. params:= up to 10 parameters required by the script. ... s = pi.run_script(sid, [par1, par2]) s = pi.run_script(sid) s = pi.run_script(sid, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) ... """ # I p1 script id # I p2 0 # I p3 params * 4 (0-10 params) ## (optional) extension ## # I[] params if params is not None: ext = bytearray() for p in params: ext.extend(struct.pack("I", p)) nump = len(params) extents = [ext] else: nump = 0 extents = [] return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_PROCR, script_id, 0, nump*4, extents)) def update_script(self, script_id, params=None): """ Sets the parameters of a script. The script may or may not be running. The first parameters of the script are overwritten with the new values. script_id:= id of stored script. params:= up to 10 parameters required by the script. ... s = pi.update_script(sid, [par1, par2]) s = pi.update_script(sid, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) ... """ # I p1 script id # I p2 0 # I p3 params * 4 (0-10 params) ## (optional) extension ## # I[] params if params is not None: ext = bytearray() for p in params: ext.extend(struct.pack("I", p)) nump = len(params) extents = [ext] else: nump = 0 extents = [] return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_PROCU, script_id, 0, nump*4, extents)) def script_status(self, script_id): """ Returns the run status of a stored script as well as the current values of parameters 0 to 9. script_id:= id of stored script. The run status may be . . PI_SCRIPT_INITING PI_SCRIPT_HALTED PI_SCRIPT_RUNNING PI_SCRIPT_WAITING PI_SCRIPT_FAILED . . The return value is a tuple of run status and a list of the 10 parameters. On error the run status will be negative and the parameter list will be empty. ... (s, pars) = pi.script_status(sid) ... """ status = PI_CMD_INTERRUPTED params = () with self.sl.l: bytes = u2i( _pigpio_command_nolock(self.sl, _PI_CMD_PROCP, script_id, 0)) if bytes > 0: data = self._rxbuf(bytes) pars = struct.unpack('11i', _str(data)) status = pars[0] params = pars[1:] else: status = bytes return status, params def stop_script(self, script_id): """ Stops a running script. script_id:= id of stored script. ... status = pi.stop_script(sid) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_PROCS, script_id, 0)) def delete_script(self, script_id): """ Deletes a stored script. script_id:= id of stored script. ... status = pi.delete_script(sid) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_PROCD, script_id, 0)) def bb_serial_read_open(self, user_gpio, baud, bb_bits=8): """ Opens a GPIO for bit bang reading of serial data. user_gpio:= 0-31, the GPIO to use. baud:= 50-250000, the baud rate. bb_bits:= 1-32, the number of bits per word, default 8. The serial data is held in a cyclic buffer and is read using [*bb_serial_read*]. It is the caller's responsibility to read data from the cyclic buffer in a timely fashion. ... status = pi.bb_serial_read_open(4, 19200) status = pi.bb_serial_read_open(17, 9600) ... """ # pigpio message format # I p1 user_gpio # I p2 baud # I p3 4 ## extension ## # I bb_bits extents = [struct.pack("I", bb_bits)] return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_SLRO, user_gpio, baud, 4, extents)) def bb_serial_read(self, user_gpio): """ Returns data from the bit bang serial cyclic buffer. user_gpio:= 0-31 (opened in a prior call to [*bb_serial_read_open*]) The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code). The bytes returned for each character depend upon the number of data bits [*bb_bits*] specified in the [*bb_serial_read_open*] command. For [*bb_bits*] 1-8 there will be one byte per character. For [*bb_bits*] 9-16 there will be two bytes per character. For [*bb_bits*] 17-32 there will be four bytes per character. ... (count, data) = pi.bb_serial_read(4) ... """ bytes = PI_CMD_INTERRUPTED rdata = "" with self.sl.l: bytes = u2i( _pigpio_command_nolock(self.sl, _PI_CMD_SLR, user_gpio, 10000)) if bytes > 0: rdata = self._rxbuf(bytes) return bytes, rdata def bb_serial_read_close(self, user_gpio): """ Closes a GPIO for bit bang reading of serial data. user_gpio:= 0-31 (opened in a prior call to [*bb_serial_read_open*]) ... status = pi.bb_serial_read_close(17) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_SLRC, user_gpio, 0)) def bb_serial_invert(self, user_gpio, invert): """ Invert serial logic. user_gpio:= 0-31 (opened in a prior call to [*bb_serial_read_open*]) invert:= 0-1 (1 invert, 0 normal) ... status = pi.bb_serial_invert(17, 1) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_SLRI, user_gpio, invert)) def custom_1(self, arg1=0, arg2=0, argx=[]): """ Calls a pigpio function customised by the user. arg1:= >=0, default 0. arg2:= >=0, default 0. argx:= extra arguments (each 0-255), default empty. The returned value is an integer which by convention should be >=0 for OK and <0 for error. ... value = pi.custom_1() value = pi.custom_1(23) value = pi.custom_1(0, 55) value = pi.custom_1(23, 56, [1, 5, 7]) value = pi.custom_1(23, 56, b"hello") value = pi.custom_1(23, 56, "hello") ... """ # I p1 arg1 # I p2 arg2 # I p3 len ## extension ## # s len argx bytes return u2i(_pigpio_command_ext( self.sl, _PI_CMD_CF1, arg1, arg2, len(argx), [argx])) def custom_2(self, arg1=0, argx=[], retMax=8192): """ Calls a pigpio function customised by the user. arg1:= >=0, default 0. argx:= extra arguments (each 0-255), default empty. retMax:= >=0, maximum number of bytes to return, default 8192. The returned value is a tuple of the number of bytes returned and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code). ... (count, data) = pi.custom_2() (count, data) = pi.custom_2(23) (count, data) = pi.custom_2(23, [1, 5, 7]) (count, data) = pi.custom_2(23, b"hello") (count, data) = pi.custom_2(23, "hello", 128) ... """ # I p1 arg1 # I p2 retMax # I p3 len ## extension ## # s len argx bytes bytes = PI_CMD_INTERRUPTED rdata = "" with self.sl.l: bytes = u2i(_pigpio_command_ext_nolock( self.sl, _PI_CMD_CF2, arg1, retMax, len(argx), [argx])) if bytes > 0: rdata = self._rxbuf(bytes) return bytes, rdata def get_pad_strength(self, pad): """ This function returns the pad drive strength in mA. pad:= 0-2, the pad to get. Returns the pad drive strength if OK, otherwise PI_BAD_PAD. Pad @ GPIO 0 @ 0-27 1 @ 28-45 2 @ 46-53 ... strength = pi.get_pad_strength(0) # Get pad 0 strength. ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_PADG, pad, 0)) def set_pad_strength(self, pad, pad_strength): """ This function sets the pad drive strength in mA. pad:= 0-2, the pad to set. pad_strength:= 1-16 mA. Returns 0 if OK, otherwise PI_BAD_PAD, or PI_BAD_STRENGTH. Pad @ GPIO 0 @ 0-27 1 @ 28-45 2 @ 46-53 ... pi.set_pad_strength(2, 14) # Set pad 2 to 14 mA. ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_PADS, pad, pad_strength)) def file_open(self, file_name, file_mode): """ This function returns a handle to a file opened in a specified mode. file_name:= the file to open. file_mode:= the file open mode. Returns a handle (>=0) if OK, otherwise PI_NO_HANDLE, PI_NO_FILE_ACCESS, PI_BAD_FILE_MODE, PI_FILE_OPEN_FAILED, or PI_FILE_IS_A_DIR. ... h = pi.file_open("/home/pi/shared/dir_3/file.txt", pigpio.FILE_WRITE | pigpio.FILE_CREATE) pi.file_write(h, "Hello world") pi.file_close(h) ... File A file may only be opened if permission is granted by an entry in /opt/pigpio/access. This is intended to allow remote access to files in a more or less controlled manner. Each entry in /opt/pigpio/access takes the form of a file path which may contain wildcards followed by a single letter permission. The permission may be R for read, W for write, U for read/write, and N for no access. Where more than one entry matches a file the most specific rule applies. If no entry matches a file then access is denied. Suppose /opt/pigpio/access contains the following entries: . . /home/* n /home/pi/shared/dir_1/* w /home/pi/shared/dir_2/* r /home/pi/shared/dir_3/* u /home/pi/shared/dir_1/file.txt n . . Files may be written in directory dir_1 with the exception of file.txt. Files may be read in directory dir_2. Files may be read and written in directory dir_3. If a directory allows read, write, or read/write access then files may be created in that directory. In an attempt to prevent risky permissions the following paths are ignored in /opt/pigpio/access: . . a path containing .. a path containing only wildcards (*?) a path containing less than two non-wildcard parts . . Mode The mode may have the following values: Constant @ Value @ Meaning FILE_READ @ 1 @ open file for reading FILE_WRITE @ 2 @ open file for writing FILE_RW @ 3 @ open file for reading and writing The following values may be or'd into the mode: Name @ Value @ Meaning FILE_APPEND @ 4 @ All writes append data to the end of the file FILE_CREATE @ 8 @ The file is created if it doesn't exist FILE_TRUNC @ 16 @ The file is truncated Newly created files are owned by root with permissions owner read and write. ... #!/usr/bin/env python import pigpio pi = pigpio.pi() if not pi.connected: exit() # Assumes /opt/pigpio/access contains the following line: # /ram/*.c r handle = pi.file_open("/ram/pigpio.c", pigpio.FILE_READ) done = False while not done: c, d = pi.file_read(handle, 60000) if c > 0: print(d) else: done = True pi.file_close(handle) pi.stop() ... """ # I p1 file_mode # I p2 0 # I p3 len ## extension ## # s len data bytes return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_FO, file_mode, 0, len(file_name), [file_name])) def file_close(self, handle): """ Closes the file associated with handle. handle:= >=0 (as returned by a prior call to [*file_open*]). ... pi.file_close(handle) ... """ return _u2i(_pigpio_command(self.sl, _PI_CMD_FC, handle, 0)) def file_read(self, handle, count): """ Reads up to count bytes from the file associated with handle. handle:= >=0 (as returned by a prior call to [*file_open*]). count:= >0, the number of bytes to read. The returned value is a tuple of the number of bytes read and a bytearray containing the bytes. If there was an error the number of bytes read will be less than zero (and will contain the error code). ... (b, d) = pi.file_read(h2, 100) if b > 0: # process read data ... """ bytes = PI_CMD_INTERRUPTED rdata = "" with self.sl.l: bytes = u2i( _pigpio_command_nolock(self.sl, _PI_CMD_FR, handle, count)) if bytes > 0: rdata = self._rxbuf(bytes) return bytes, rdata def file_write(self, handle, data): """ Writes the data bytes to the file associated with handle. handle:= >=0 (as returned by a prior call to [*file_open*]). data:= the bytes to write. ... pi.file_write(h1, b'\\x02\\x03\\x04') pi.file_write(h2, b'help') pi.file_write(h2, "hello") pi.file_write(h1, [2, 3, 4]) ... """ # I p1 handle # I p2 0 # I p3 len ## extension ## # s len data bytes return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_FW, handle, 0, len(data), [data])) def file_seek(self, handle, seek_offset, seek_from): """ Seeks to a position relative to the start, current position, or end of the file. Returns the new position. handle:= >=0 (as returned by a prior call to [*file_open*]). seek_offset:= byte offset. seek_from:= FROM_START, FROM_CURRENT, or FROM_END. ... new_pos = pi.file_seek(h, 100, pigpio.FROM_START) cur_pos = pi.file_seek(h, 0, pigpio.FROM_CURRENT) file_size = pi.file_seek(h, 0, pigpio.FROM_END) ... """ # I p1 handle # I p2 seek_offset # I p3 4 ## extension ## # I seek_from extents = [struct.pack("I", seek_from)] return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_FS, handle, seek_offset, 4, extents)) def file_list(self, fpattern): """ Returns a list of files which match a pattern. fpattern:= file pattern to match. Returns the number of returned bytes if OK, otherwise PI_NO_FILE_ACCESS, or PI_NO_FILE_MATCH. The pattern must match an entry in /opt/pigpio/access. The pattern may contain wildcards. See [*file_open*]. NOTE The returned value is not the number of files, it is the number of bytes in the buffer. The file names are separated by newline characters. ... #!/usr/bin/env python import pigpio pi = pigpio.pi() if not pi.connected: exit() # Assumes /opt/pigpio/access contains the following line: # /ram/*.c r c, d = pi.file_list("/ram/p*.c") if c > 0: print(d) pi.stop() ... """ # I p1 60000 # I p2 0 # I p3 len ## extension ## # s len data bytes bytes = PI_CMD_INTERRUPTED rdata = "" with self.sl.l: bytes = u2i(_pigpio_command_ext_nolock( self.sl, _PI_CMD_FL, 60000, 0, len(fpattern), [fpattern])) if bytes > 0: rdata = self._rxbuf(bytes) return bytes, rdata def shell(self, shellscr, pstring=""): """ This function uses the system call to execute a shell script with the given string as its parameter. shellscr:= the name of the script, only alphanumerics, '-' and '_' are allowed in the name pstring := the parameter string to pass to the script The exit status of the system call is returned if OK, otherwise PI_BAD_SHELL_STATUS. [*shellscr*] must exist in /opt/pigpio/cgi and must be executable. The returned exit status is normally 256 times that set by the shell script exit function. If the script can't be found 32512 will be returned. The following table gives some example returned statuses: Script exit status @ Returned system call status 1 @ 256 5 @ 1280 10 @ 2560 200 @ 51200 script not found @ 32512 ... // pass two parameters, hello and world status = pi.shell("scr1", "hello world"); // pass three parameters, hello, string with spaces, and world status = pi.shell("scr1", "hello 'string with spaces' world"); // pass one parameter, hello string with spaces world status = pi.shell("scr1", "\\"hello string with spaces world\\""); ... """ # I p1 len(shellscr) # I p2 0 # I p3 len(shellscr)+len(pstring)+1 ## extension ## # s len data bytes ls = len(shellscr) lp = len(pstring) return _u2i(_pigpio_command_ext( self.sl, _PI_CMD_SHELL, ls, 0, ls+lp+1, [shellscr+'\x00'+pstring])) def callback(self, user_gpio, edge=RISING_EDGE, func=None): """ Calls a user supplied function (a callback) whenever the specified GPIO edge is detected. user_gpio:= 0-31. edge:= EITHER_EDGE, RISING_EDGE (default), or FALLING_EDGE. func:= user supplied callback function. The user supplied callback receives three parameters, the GPIO, the level, and the tick. . . Parameter Value Meaning GPIO 0-31 The GPIO which has changed state level 0-2 0 = change to low (a falling edge) 1 = change to high (a rising edge) 2 = no level change (a watchdog timeout) tick 32 bit The number of microseconds since boot WARNING: this wraps around from 4294967295 to 0 roughly every 72 minutes . . If a user callback is not specified a default tally callback is provided which simply counts edges. The count may be retrieved by calling the tally function. The count may be reset to zero by calling the reset_tally function. The callback may be cancelled by calling the cancel function. A GPIO may have multiple callbacks (although I can't think of a reason to do so). The GPIO are sampled at a rate set when the pigpio daemon is started (default 5 us). The number of samples per second is given in the following table. . . samples per sec 1 1,000,000 2 500,000 sample 4 250,000 rate 5 200,000 (us) 8 125,000 10 100,000 . . GPIO level changes shorter than the sample rate may be missed. The daemon software which generates the callbacks is triggered 1000 times per second. The callbacks will be called once per level change since the last time they were called. i.e. The callbacks will get all level changes but there will be a latency. If you want to track the level of more than one GPIO do so by maintaining the state in the callback. Do not use [*read*]. Remember the event that triggered the callback may have happened several milliseconds before and the GPIO may have changed level many times since then. ... def cbf(gpio, level, tick): print(gpio, level, tick) cb1 = pi.callback(22, pigpio.EITHER_EDGE, cbf) cb2 = pi.callback(4, pigpio.EITHER_EDGE) cb3 = pi.callback(17) print(cb3.tally()) cb3.reset_tally() cb1.cancel() # To cancel callback cb1. ... """ return _callback(self._notify, user_gpio, edge, func) def event_callback(self, event, func=None): """ Calls a user supplied function (a callback) whenever the specified event is signalled. event:= 0-31. func:= user supplied callback function. The user supplied callback receives two parameters, the event id, and the tick. If a user callback is not specified a default tally callback is provided which simply counts events. The count may be retrieved by calling the tally function. The count may be reset to zero by calling the reset_tally function. The callback may be canceled by calling the cancel function. An event may have multiple callbacks (although I can't think of a reason to do so). ... def cbf(event, tick): print(event, tick) cb1 = pi.event_callback(22, cbf) cb2 = pi.event_callback(4) print(cb2.tally()) cb2.reset_tally() cb1.cancel() # To cancel callback cb1. ... """ return _event(self._notify, event, func) def wait_for_edge(self, user_gpio, edge=RISING_EDGE, wait_timeout=60.0): """ Wait for an edge event on a GPIO. user_gpio:= 0-31. edge:= EITHER_EDGE, RISING_EDGE (default), or FALLING_EDGE. wait_timeout:= >=0.0 (default 60.0). The function returns when the edge is detected or after the number of seconds specified by timeout has expired. Do not use this function for precise timing purposes, the edge is only checked 20 times a second. Whenever you need to know the accurate time of GPIO events use a [*callback*] function. The function returns True if the edge is detected, otherwise False. ... if pi.wait_for_edge(23): print("Rising edge detected") else: print("wait for edge timed out") if pi.wait_for_edge(23, pigpio.FALLING_EDGE, 5.0): print("Falling edge detected") else: print("wait for falling edge timed out") ... """ a = _wait_for_edge(self._notify, user_gpio, edge, wait_timeout) return a.trigger def wait_for_event(self, event, wait_timeout=60.0): """ Wait for an event. event:= 0-31. wait_timeout:= >=0.0 (default 60.0). The function returns when the event is signalled or after the number of seconds specified by timeout has expired. The function returns True if the event is detected, otherwise False. ... if pi.wait_for_event(23): print("event detected") else: print("wait for event timed out") ... """ a = _wait_for_event(self._notify, event, wait_timeout) return a.trigger def __init__(self, host = os.getenv("PIGPIO_ADDR", 'localhost'), port = os.getenv("PIGPIO_PORT", 8888), show_errors = True): """ Grants access to a Pi's GPIO. host:= the host name of the Pi on which the pigpio daemon is running. The default is localhost unless overridden by the PIGPIO_ADDR environment variable. port:= the port number on which the pigpio daemon is listening. The default is 8888 unless overridden by the PIGPIO_PORT environment variable. The pigpio daemon must have been started with the same port number. This connects to the pigpio daemon and reserves resources to be used for sending commands and receiving notifications. An instance attribute [*connected*] may be used to check the success of the connection. If the connection is established successfully [*connected*] will be True, otherwise False. ... pi = pigio.pi() # use defaults pi = pigpio.pi('mypi') # specify host, default port pi = pigpio.pi('mypi', 7777) # specify host and port pi = pigpio.pi() # exit script if no connection if not pi.connected: exit() ... """ self.connected = True self.sl = _socklock() self._notify = None port = int(port) if host == '': host = "localhost" self._host = host self._port = port try: self.sl.s = socket.create_connection((host, port), None) # Disable the Nagle algorithm. self.sl.s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) self._notify = _callback_thread(self.sl, host, port) except socket.error: exception = 1 except struct.error: exception = 2 except error: # assumed to be no handle available exception = 3 else: exception = 0 atexit.register(self.stop) if exception != 0: self.connected = False if self.sl.s is not None: self.sl.s = None if show_errors: s = "Can't connect to pigpio at {}({})".format(host, str(port)) print(_except_a.format(s)) if exception == 1: print(_except_1) elif exception == 2: print(_except_2) else: print(_except_3) print(_except_z) def __repr__(self): return "".format(self._host, self._port) def stop(self): """Release pigpio resources. ... pi.stop() ... """ self.connected = False if self._notify is not None: self._notify.stop() self._notify = None if self.sl.s is not None: self.sl.s.close() self.sl.s = None def xref(): """ active: 0-1000000 The number of microseconds level changes are reported for once a noise filter has been triggered (by [*steady*] microseconds of a stable level). arg1: An unsigned argument passed to a user customised function. Its meaning is defined by the customiser. arg2: An unsigned argument passed to a user customised function. Its meaning is defined by the customiser. argx: An array of bytes passed to a user customised function. Its meaning and content is defined by the customiser. baud: The speed of serial communication (I2C, SPI, serial link, waves) in bits per second. bb_bits: 1-32 The number of data bits to be used when adding serial data to a waveform. bb_stop: 2-8 The number of (half) stop bits to be used when adding serial data to a waveform. bit: 0-1 A value of 0 or 1. bits: 32 bit number A mask used to select GPIO to be operated on. If bit n is set then GPIO n is selected. A convenient way of setting bit n is to bit or in the value (1<=1 The length of a pulse in microseconds. dutycycle: 0-range_ A number between 0 and range_. The dutycycle sets the proportion of time on versus time off during each PWM cycle. Dutycycle @ On time 0 @ Off range_ * 0.25 @ 25% On range_ * 0.50 @ 50% On range_ * 0.75 @ 75% On range_ @ Fully On edge: 0-2 . . EITHER_EDGE = 2 FALLING_EDGE = 1 RISING_EDGE = 0 . . errnum: <0 . . PI_BAD_USER_GPIO = -2 PI_BAD_GPIO = -3 PI_BAD_MODE = -4 PI_BAD_LEVEL = -5 PI_BAD_PUD = -6 PI_BAD_PULSEWIDTH = -7 PI_BAD_DUTYCYCLE = -8 PI_BAD_WDOG_TIMEOUT = -15 PI_BAD_DUTYRANGE = -21 PI_NO_HANDLE = -24 PI_BAD_HANDLE = -25 PI_BAD_WAVE_BAUD = -35 PI_TOO_MANY_PULSES = -36 PI_TOO_MANY_CHARS = -37 PI_NOT_SERIAL_GPIO = -38 PI_NOT_PERMITTED = -41 PI_SOME_PERMITTED = -42 PI_BAD_WVSC_COMMND = -43 PI_BAD_WVSM_COMMND = -44 PI_BAD_WVSP_COMMND = -45 PI_BAD_PULSELEN = -46 PI_BAD_SCRIPT = -47 PI_BAD_SCRIPT_ID = -48 PI_BAD_SER_OFFSET = -49 PI_GPIO_IN_USE = -50 PI_BAD_SERIAL_COUNT = -51 PI_BAD_PARAM_NUM = -52 PI_DUP_TAG = -53 PI_TOO_MANY_TAGS = -54 PI_BAD_SCRIPT_CMD = -55 PI_BAD_VAR_NUM = -56 PI_NO_SCRIPT_ROOM = -57 PI_NO_MEMORY = -58 PI_SOCK_READ_FAILED = -59 PI_SOCK_WRIT_FAILED = -60 PI_TOO_MANY_PARAM = -61 PI_SCRIPT_NOT_READY = -62 PI_BAD_TAG = -63 PI_BAD_MICS_DELAY = -64 PI_BAD_MILS_DELAY = -65 PI_BAD_WAVE_ID = -66 PI_TOO_MANY_CBS = -67 PI_TOO_MANY_OOL = -68 PI_EMPTY_WAVEFORM = -69 PI_NO_WAVEFORM_ID = -70 PI_I2C_OPEN_FAILED = -71 PI_SER_OPEN_FAILED = -72 PI_SPI_OPEN_FAILED = -73 PI_BAD_I2C_BUS = -74 PI_BAD_I2C_ADDR = -75 PI_BAD_SPI_CHANNEL = -76 PI_BAD_FLAGS = -77 PI_BAD_SPI_SPEED = -78 PI_BAD_SER_DEVICE = -79 PI_BAD_SER_SPEED = -80 PI_BAD_PARAM = -81 PI_I2C_WRITE_FAILED = -82 PI_I2C_READ_FAILED = -83 PI_BAD_SPI_COUNT = -84 PI_SER_WRITE_FAILED = -85 PI_SER_READ_FAILED = -86 PI_SER_READ_NO_DATA = -87 PI_UNKNOWN_COMMAND = -88 PI_SPI_XFER_FAILED = -89 PI_NO_AUX_SPI = -91 PI_NOT_PWM_GPIO = -92 PI_NOT_SERVO_GPIO = -93 PI_NOT_HCLK_GPIO = -94 PI_NOT_HPWM_GPIO = -95 PI_BAD_HPWM_FREQ = -96 PI_BAD_HPWM_DUTY = -97 PI_BAD_HCLK_FREQ = -98 PI_BAD_HCLK_PASS = -99 PI_HPWM_ILLEGAL = -100 PI_BAD_DATABITS = -101 PI_BAD_STOPBITS = -102 PI_MSG_TOOBIG = -103 PI_BAD_MALLOC_MODE = -104 PI_BAD_SMBUS_CMD = -107 PI_NOT_I2C_GPIO = -108 PI_BAD_I2C_WLEN = -109 PI_BAD_I2C_RLEN = -110 PI_BAD_I2C_CMD = -111 PI_BAD_I2C_BAUD = -112 PI_CHAIN_LOOP_CNT = -113 PI_BAD_CHAIN_LOOP = -114 PI_CHAIN_COUNTER = -115 PI_BAD_CHAIN_CMD = -116 PI_BAD_CHAIN_DELAY = -117 PI_CHAIN_NESTING = -118 PI_CHAIN_TOO_BIG = -119 PI_DEPRECATED = -120 PI_BAD_SER_INVERT = -121 PI_BAD_FOREVER = -124 PI_BAD_FILTER = -125 PI_BAD_PAD = -126 PI_BAD_STRENGTH = -127 PI_FIL_OPEN_FAILED = -128 PI_BAD_FILE_MODE = -129 PI_BAD_FILE_FLAG = -130 PI_BAD_FILE_READ = -131 PI_BAD_FILE_WRITE = -132 PI_FILE_NOT_ROPEN = -133 PI_FILE_NOT_WOPEN = -134 PI_BAD_FILE_SEEK = -135 PI_NO_FILE_MATCH = -136 PI_NO_FILE_ACCESS = -137 PI_FILE_IS_A_DIR = -138 PI_BAD_SHELL_STATUS = -139 PI_BAD_SCRIPT_NAME = -140 PI_BAD_SPI_BAUD = -141 PI_NOT_SPI_GPIO = -142 PI_BAD_EVENT_ID = -143 PI_CMD_INTERRUPTED = -144 PI_NOT_ON_BCM2711 = -145 PI_ONLY_ON_BCM2711 = -146 . . event:0-31 An event is a signal used to inform one or more consumers to start an action. file_mode: The mode may have the following values . . FILE_READ 1 FILE_WRITE 2 FILE_RW 3 . . The following values can be or'd into the file open mode . . FILE_APPEND 4 FILE_CREATE 8 FILE_TRUNC 16 . . file_name: A full file path. To be accessible the path must match an entry in /opt/pigpio/access. fpattern: A file path which may contain wildcards. To be accessible the path must match an entry in /opt/pigpio/access. frequency: 0-40000 Defines the frequency to be used for PWM on a GPIO. The closest permitted frequency will be used. func: A user supplied callback function. gpio: 0-53 A Broadcom numbered GPIO. All the user GPIO are in the range 0-31. There are 54 General Purpose Input Outputs (GPIO) named GPIO0 through GPIO53. They are split into two banks. Bank 1 consists of GPIO0 through GPIO31. Bank 2 consists of GPIO32 through GPIO53. All the GPIO which are safe for the user to read and write are in bank 1. Not all GPIO in bank 1 are safe though. Type 1 boards have 17 safe GPIO. Type 2 boards have 21. Type 3 boards have 26. See [*get_hardware_revision*]. The user GPIO are marked with an X in the following table . . 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Type 1 X X - - X - - X X X X X - - X X Type 2 - - X X X - - X X X X X - - X X Type 3 X X X X X X X X X X X X X X 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Type 1 - X X - - X X X X X - - - - - - Type 2 - X X - - - X X X X - X X X X X Type 3 X X X X X X X X X X X X - - - - . . gpio_off: A mask used to select GPIO to be operated on. See [*bits*]. This mask selects the GPIO to be switched off at the start of a pulse. gpio_on: A mask used to select GPIO to be operated on. See [*bits*]. This mask selects the GPIO to be switched on at the start of a pulse. handle: >=0 A number referencing an object opened by one of the following [*file_open*] [*i2c_open*] [*notify_open*] [*serial_open*] [*spi_open*] host: The name or IP address of the Pi running the pigpio daemon. i2c_address: 0-0x7F The address of a device on the I2C bus. i2c_bus: >=0 An I2C bus number. i2c_flags: 0 No I2C flags are currently defined. invert: 0-1 A flag used to set normal or inverted bit bang serial data level logic. level: 0-1 (2) . . CLEAR = 0 HIGH = 1 LOW = 0 OFF = 0 ON = 1 SET = 1 TIMEOUT = 2 # only returned for a watchdog timeout . . MISO: The GPIO used for the MISO signal when bit banging SPI. mode: 1.The operational mode of a GPIO, normally INPUT or OUTPUT. . . ALT0 = 4 ALT1 = 5 ALT2 = 6 ALT3 = 7 ALT4 = 3 ALT5 = 2 INPUT = 0 OUTPUT = 1 . . 2. The mode of waveform transmission. . . WAVE_MODE_ONE_SHOT = 0 WAVE_MODE_REPEAT = 1 WAVE_MODE_ONE_SHOT_SYNC = 2 WAVE_MODE_REPEAT_SYNC = 3 . . MOSI: The GPIO used for the MOSI signal when bit banging SPI. offset: >=0 The offset wave data starts from the beginning of the waveform being currently defined. pad: 0-2 A set of GPIO which share common drivers. Pad @ GPIO 0 @ 0-27 1 @ 28-45 2 @ 46-53 pad_strength: 1-16 The mA which may be drawn from each GPIO whilst still guaranteeing the high and low levels. params: 32 bit number When scripts are started they can receive up to 10 parameters to define their operation. percent:: 0-100 The size of waveform as percentage of maximum available. port: The port used by the pigpio daemon, defaults to 8888. pstring: The string to be passed to a [*shell*] script to be executed. pud: 0-2 . . PUD_DOWN = 1 PUD_OFF = 0 PUD_UP = 2 . . pulse_len: 1-100 The length of the trigger pulse in microseconds. pulses: A list of class pulse objects defining the characteristics of a waveform. pulsewidth: The servo pulsewidth in microseconds. 0 switches pulses off. PWMduty: 0-1000000 (1M) The hardware PWM dutycycle. PWMfreq: 1-125M (1-187.5M for the BCM2711) The hardware PWM frequency. range_: 25-40000 Defines the limits for the [*dutycycle*] parameter. range_ defaults to 255. reg: 0-255 An I2C device register. The usable registers depend on the actual device. retMax: >=0 The maximum number of bytes a user customised function should return, default 8192. SCL: The user GPIO to use for the clock when bit banging I2C. SCLK:: The GPIO used for the SCLK signal when bit banging SPI. script: The text of a script to store on the pigpio daemon. script_id: >=0 A number referencing a script created by [*store_script*]. SDA: The user GPIO to use for data when bit banging I2C. seek_from: 0-2 Direction to seek for [*file_seek*]. . . FROM_START=0 FROM_CURRENT=1 FROM_END=2 . . seek_offset: The number of bytes to move forward (positive) or backwards (negative) from the seek position (start, current, or end of file). ser_flags: 32 bit No serial flags are currently defined. serial_*: One of the serial_ functions. shellscr: The name of a shell script. The script must exist in /opt/pigpio/cgi and must be executable. show_errors: Controls the display of pigpio daemon connection failures. The default of True prints the probable failure reasons to standard output. spi_channel: 0-2 A SPI channel. spi_flags: 32 bit See [*spi_open*]. steady: 0-300000 The number of microseconds level changes must be stable for before reporting the level changed ([*set_glitch_filter*]) or triggering the active part of a noise filter ([*set_noise_filter*]). t1: A tick (earlier). t2: A tick (later). tty: A Pi serial tty device, e.g. /dev/ttyAMA0, /dev/ttyUSB0 uint32: An unsigned 32 bit number. user_gpio: 0-31 A Broadcom numbered GPIO. All the user GPIO are in the range 0-31. Not all the GPIO within this range are usable, some are reserved for system use. See [*gpio*]. wait_timeout: 0.0 - The number of seconds to wait in [*wait_for_edge*] before timing out. wave_add_*: One of the following [*wave_add_new*] [*wave_add_generic*] [*wave_add_serial*] wave_id: >=0 A number referencing a wave created by [*wave_create*]. wave_send_*: One of the following [*wave_send_once*] [*wave_send_repeat*] wdog_timeout: 0-60000 Defines a GPIO watchdog timeout in milliseconds. If no level change is detected on the GPIO for timeout millisecond a watchdog timeout report is issued (with level TIMEOUT). word_val: 0-65535 A whole number. """ pass pigpio-78/pigpiod.1000066400000000000000000000113041373465704200143300ustar00rootroot00000000000000 ." Process this file with ." groff -man -Tascii pigpiod.1 ." .TH pigpiod 1 2012-2020 Linux "pigpio archive" .SH NAME pigpiod - A utility to start the pigpio library as a daemon. .SH SYNOPSIS sudo pigpiod [OPTION]... .SH DESCRIPTION .ad l .nh pigpiod is a utility which launches the pigpio library as a daemon. .br .br Once launched the pigpio library runs in the background accepting commands from the pipe and socket interfaces. .br .br The pigpiod utility requires sudo privileges to launch the library but thereafter the pipe and socket commands may be issued by normal users. .br .br pigpiod accepts the following configuration options .br .br .SH OPTIONS .IP "\fB-a value\fP" DMA memory allocation mode. 0=AUTO, 1=PMAP, 2=MBOX. Default AUTO . .IP "\fB-b value\fP" GPIO sample buffer size in milliseconds. 100-10000. Default 120 . .IP "\fB-c value\fP" Library internal settings. . Default 0 . .IP "\fB-d value\fP" Primary DMA channel. 0-14. Default 14 . .IP "\fB-e value\fP" Secondary DMA channel. 0-14. Default 6. Preferably use one of DMA channels 0 to 6 for the secondary channel . .IP "\fB-f\fP" Disable fifo interface. . Default enabled . .IP "\fB-g\fP" Run in foreground (do not fork). . Default disabled . .IP "\fB-k\fP" Disable local and remote socket interface. . Default enabled . .IP "\fB-l\fP" Disable remote socket interface. . Default enabled . .IP "\fB-m\fP" Disable alerts (sampling). . Default enabled . .IP "\fB-n IP address\fP" Allow IP address to use the socket interface. Name (e.g. paul) or dotted quad (e.g. 192.168.1.66). If the -n option is not used all addresses are allowed (unless overridden by the -k or -l options). Multiple -n options are allowed. If -k has been used -n has no effect. If -l has been used only -n localhost has any effect . .IP "\fB-p value\fP" Socket port. 1024-32000. Default 8888 . .IP "\fB-s value\fP" Sample rate. 1, 2, 4, 5, 8, or 10 microseconds. Default 5 . .IP "\fB-t value\fP" Clock peripheral. 0=PWM 1=PCM. Default PCM. pigpio uses one or both of PCM and PWM. If PCM is used then PWM is available for audio. If PWM is used then PCM is available for audio. If waves or hardware PWM are used neither PWM nor PCM will be available for audio. . .IP "\fB-v -V\fP" Display pigpio version and exit. . . .IP "\fB-x mask\fP" GPIO which may be updated. A 54 bit mask with (1< */ /* This version is for pigpio version 69+ */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "pigpio.h" /* This program starts the pigpio library as a daemon. */ static unsigned bufferSizeMilliseconds = PI_DEFAULT_BUFFER_MILLIS; static unsigned clockMicros = PI_DEFAULT_CLK_MICROS; static unsigned clockPeripheral = PI_DEFAULT_CLK_PERIPHERAL; static unsigned ifFlags = PI_DEFAULT_IF_FLAGS; static int foreground = PI_DEFAULT_FOREGROUND; static unsigned DMAprimaryChannel = PI_DEFAULT_DMA_NOT_SET; static unsigned DMAsecondaryChannel = PI_DEFAULT_DMA_NOT_SET; static unsigned socketPort = PI_DEFAULT_SOCKET_PORT; static unsigned memAllocMode = PI_DEFAULT_MEM_ALLOC_MODE; static uint64_t updateMask = -1; static uint32_t cfgInternals = PI_DEFAULT_CFG_INTERNALS; static int updateMaskSet = 0; static FILE * errFifo; static uint32_t sockNetAddr[MAX_CONNECT_ADDRESSES]; static int numSockNetAddr = 0; void fatal(char *fmt, ...) { char buf[128]; va_list ap; va_start(ap, fmt); vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); fprintf(stderr, "%s\n", buf); fflush(stderr); exit(EXIT_FAILURE); } void usage() { fprintf(stderr, "\n" \ "pigpio V%d\n" \ "Usage: sudo pigpiod [OPTION] ...\n" \ " -a value, DMA mode, 0=AUTO, 1=PMAP, 2=MBOX, default AUTO\n" \ " -b value, sample buffer size in ms, default 120\n" \ " -c value, library internal settings, default 0\n" \ " -d value, primary DMA channel, 0-14, default 14\n" \ " -e value, secondary DMA channel, 0-14, default 6\n" \ " -f, disable fifo interface, default enabled\n" \ " -g, run in foreground (do not fork), default disabled\n" \ " -k, disable socket interface, default enabled\n" \ " -l, localhost socket only default local+remote\n" \ " -m, disable alerts default enabled\n" \ " -n IP addr, allow address, name or dotted, default allow all\n" \ " -p value, socket port, 1024-32000, default 8888\n" \ " -s value, sample rate, 1, 2, 4, 5, 8, or 10, default 5\n" \ " -t value, clock peripheral, 0=PWM 1=PCM, default PCM\n" \ " -v, -V, display pigpio version and exit\n" \ " -x mask, GPIO which may be updated, default board GPIO\n" \ "EXAMPLE\n" \ "sudo pigpiod -s 2 -b 200 -f\n" \ " Set a sample rate of 2 microseconds with a 200 millisecond\n" \ " buffer. Disable the fifo interface.\n" \ "\n", PIGPIO_VERSION); } static uint64_t getNum(char *str, int *err) { uint64_t val; char *endptr; *err = 0; val = strtoll(str, &endptr, 0); if (*endptr) {*err = 1; val = -1;} return val; } static uint32_t checkAddr(char *addrStr) { int err; struct addrinfo hints, *res; struct sockaddr_in *sin; const char *portStr; uint32_t addr; portStr = getenv(PI_ENVPORT); if (!portStr) portStr = PI_DEFAULT_SOCKET_PORT_STR; memset (&hints, 0, sizeof (hints)); hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; hints.ai_flags |= AI_CANONNAME; err = getaddrinfo(addrStr, portStr, &hints, &res); if (err) return 0; sin = (struct sockaddr_in *)res->ai_addr; addr = sin->sin_addr.s_addr; freeaddrinfo(res); return addr; } static void initOpts(int argc, char *argv[]) { int opt, err, i; uint32_t addr; int64_t mask; while ((opt = getopt(argc, argv, "a:b:c:d:e:fgkln:mp:s:t:x:vV")) != -1) { switch (opt) { case 'a': i = getNum(optarg, &err); if ((i >= PI_MEM_ALLOC_AUTO) && (i <= PI_MEM_ALLOC_MAILBOX)) memAllocMode = i; else fatal("invalid -a option (%d)", i); break; case 'b': i = getNum(optarg, &err); if ((i >= PI_BUF_MILLIS_MIN) && (i <= PI_BUF_MILLIS_MAX)) bufferSizeMilliseconds = i; else fatal("invalid -b option (%d)", i); break; case 'c': i = getNum(optarg, &err); if ((i >= 0) && (i < PI_CFG_ILLEGAL_VAL)) cfgInternals = i; else fatal("invalid -c option (%x)", i); break; case 'd': i = getNum(optarg, &err); if ((i >= PI_MIN_DMA_CHANNEL) && (i <= PI_MAX_DMA_CHANNEL)) DMAprimaryChannel = i; else fatal("invalid -d option (%d)", i); break; case 'e': i = getNum(optarg, &err); if ((i >= PI_MIN_DMA_CHANNEL) && (i <= PI_MAX_DMA_CHANNEL)) DMAsecondaryChannel = i; else fatal("invalid -e option (%d)", i); break; case 'f': ifFlags |= PI_DISABLE_FIFO_IF; break; case 'g': foreground = 1; break; case 'k': ifFlags |= PI_DISABLE_SOCK_IF; break; case 'l': ifFlags |= PI_LOCALHOST_SOCK_IF; break; case 'm': ifFlags |= PI_DISABLE_ALERT; break; case 'n': addr = checkAddr(optarg); if (addr && (numSockNetAddr= PI_MIN_SOCKET_PORT) && (i <= PI_MAX_SOCKET_PORT)) socketPort = i; else fatal("invalid -p option (%d)", i); break; case 's': i = getNum(optarg, &err); switch(i) { case 1: case 2: case 4: case 5: case 8: case 10: clockMicros = i; break; default: fatal("invalid -s option (%d)", i); break; } break; case 't': i = getNum(optarg, &err); if ((i >= PI_CLOCK_PWM) && (i <= PI_CLOCK_PCM)) clockPeripheral = i; else fatal("invalid -t option (%d)", i); break; case 'v': case 'V': printf("%d\n", PIGPIO_VERSION); exit(EXIT_SUCCESS); break; case 'x': mask = getNum(optarg, &err); if (!err) { updateMask = mask; updateMaskSet = 1; } else fatal("invalid -x option (%s)", optarg); break; default: /* '?' */ usage(); exit(EXIT_FAILURE); } } } void terminate(int signum) { /* only registered for SIGHUP/SIGTERM */ gpioTerminate(); fprintf(errFifo, "SIGHUP/SIGTERM received\n"); fflush(NULL); fclose(errFifo); unlink(PI_ERRFIFO); exit(0); } int main(int argc, char **argv) { pid_t pid; int flags; /* check command line parameters */ initOpts(argc, argv); if (!foreground) { /* Fork off the parent process */ pid = fork(); if (pid < 0) { exit(EXIT_FAILURE); } /* If we got a good PID, then we can exit the parent process. */ if (pid > 0) { exit(EXIT_SUCCESS); } /* Change the file mode mask */ umask(0); /* Open any logs here */ /* NONE */ /* Create a new SID for the child process */ if (setsid() < 0) fatal("setsid failed (%m)"); /* Change the current working directory */ if ((chdir("/")) < 0) fatal("chdir failed (%m)"); /* Close out the standard file descriptors */ fclose(stdin); fclose(stdout); } /* configure library */ gpioCfgBufferSize(bufferSizeMilliseconds); gpioCfgClock(clockMicros, clockPeripheral, 0); gpioCfgInterfaces(ifFlags); gpioCfgDMAchannels(DMAprimaryChannel, DMAsecondaryChannel); gpioCfgSocketPort(socketPort); gpioCfgMemAlloc(memAllocMode); if (updateMaskSet) gpioCfgPermissions(updateMask); gpioCfgNetAddr(numSockNetAddr, sockNetAddr); gpioCfgSetInternals(cfgInternals); /* start library */ if (gpioInitialise()< 0) fatal("Can't initialise pigpio library"); /* create pipe for error reporting */ unlink(PI_ERRFIFO); mkfifo(PI_ERRFIFO, 0664); if (chmod(PI_ERRFIFO, 0664) < 0) fatal("chmod %s failed (%m)", PI_ERRFIFO); errFifo = freopen(PI_ERRFIFO, "w+", stderr); if (errFifo) { /* set stderr non-blocking */ flags = fcntl(fileno(errFifo), F_GETFL, 0); fcntl(fileno(errFifo), F_SETFL, flags | O_NONBLOCK); /* request SIGHUP/SIGTERM from libarary for termination */ gpioSetSignalFunc(SIGHUP, terminate); gpioSetSignalFunc(SIGTERM, terminate); /* sleep forever */ while (1) { /* cat /dev/pigerr to view daemon errors */ sleep(5); fflush(errFifo); } } else { fprintf(stderr, "freopen failed (%m)"); gpioTerminate(); } return 0; } pigpio-78/pigpiod_if.3000066400000000000000000002422341373465704200150200ustar00rootroot00000000000000 ." Process this file with ." groff -man -Tascii pigpiod_if.3 ." .TH pigpiod_if 3 2012-2020 Linux "pigpio archive" .SH NAME pigpiod_if - A C library to interface to the pigpio daemon. .SH SYNOPSIS #include gcc -Wall -pthread -o prog prog.c -lpigpiod_if -lrt ./prog .SH DESCRIPTION .ad l .nh .br .br THIS LIBRARY IS DEPRECATED. NEW CODE SHOULD BE WRITTEN TO USE THE MORE VERSATILE pigpiod_if2 LIBRARY. .br .br pigpiod_if is a C library for the Raspberry which allows control of the GPIO via the socket interface to the pigpio daemon. .br .br .br .SS Features .br .br o hardware timed PWM on any of GPIO 0-31 .br .br o hardware timed servo pulses on any of GPIO 0-31 .br .br o callbacks when any of GPIO 0-31 change state .br .br o callbacks at timed intervals .br .br o reading/writing all of the GPIO in a bank as one operation .br .br o individually setting GPIO modes, reading and writing .br .br o notifications when any of GPIO 0-31 change state .br .br o the construction of output waveforms with microsecond timing .br .br o rudimentary permission control over GPIO .br .br o a simple interface to start and stop new threads .br .br o I2C, SPI, and serial link wrappers .br .br o creating and running scripts on the pigpio daemon .br .br .SS GPIO .br .br ALL GPIO are identified by their Broadcom number. .br .br .SS Notes .br .br The PWM and servo pulses are timed using the DMA and PWM/PCM peripherals. .br .br .SS Usage .br .br Include in your source files. .br .br Assuming your source is in prog.c use the following command to build .br .br .EX gcc -Wall -pthread -o prog prog.c -lpigpiod_if -lrt .br .EE .br .br to run make sure the pigpio daemon is running .br .br .EX sudo pigpiod .br .br ./prog # sudo is not required to run programs linked to pigpiod_if .br .EE .br .br For examples see x_pigpiod_if.c within the pigpio archive file. .br .br .SS Notes .br .br All the functions which return an int return < 0 on error .br .br .SH OVERVIEW .br .SS ESSENTIAL .br .br pigpio_start Connects to the pigpio daemon .br pigpio_stop Disconnects from the pigpio daemon .br .SS BEGINNER .br .br set_mode Set a GPIO mode .br get_mode Get a GPIO mode .br .br set_pull_up_down Set/clear GPIO pull up/down resistor .br .br gpio_read Read a GPIO .br gpio_write Write a GPIO .br .br set_PWM_dutycycle Start/stop PWM pulses on a GPIO .br get_PWM_dutycycle Get the PWM dutycycle in use on a GPIO .br .br set_servo_pulsewidth Start/stop servo pulses on a GPIO .br get_servo_pulsewidth Get the servo pulsewidth in use on a GPIO .br .br callback Create GPIO level change callback .br callback_ex Create GPIO level change callback .br callback_cancel Cancel a callback .br wait_for_edge Wait for GPIO level change .br .SS INTERMEDIATE .br .br gpio_trigger Send a trigger pulse to a GPIO. .br .br set_watchdog Set a watchdog on a GPIO. .br .br set_PWM_range Configure PWM range for a GPIO .br get_PWM_range Get configured PWM range for a GPIO .br .br set_PWM_frequency Configure PWM frequency for a GPIO .br get_PWM_frequency Get configured PWM frequency for a GPIO .br .br read_bank_1 Read all GPIO in bank 1 .br read_bank_2 Read all GPIO in bank 2 .br .br clear_bank_1 Clear selected GPIO in bank 1 .br clear_bank_2 Clear selected GPIO in bank 2 .br .br set_bank_1 Set selected GPIO in bank 1 .br set_bank_2 Set selected GPIO in bank 2 .br .br start_thread Start a new thread .br stop_thread Stop a previously started thread .br .SS ADVANCED .br .br get_PWM_real_range Get underlying PWM range for a GPIO .br .br notify_open Request a notification handle .br notify_begin Start notifications for selected GPIO .br notify_pause Pause notifications .br notify_close Close a notification .br .br bb_serial_read_open Opens a GPIO for bit bang serial reads .br bb_serial_read Reads bit bang serial data from a GPIO .br bb_serial_read_close Closes a GPIO for bit bang serial reads .br bb_serial_invert Invert serial logic (1 invert, 0 normal) .br .br hardware_clock Start hardware clock on supported GPIO .br hardware_PWM Start hardware PWM on supported GPIO .br .br set_glitch_filter Set a glitch filter on a GPIO .br set_noise_filter Set a noise filter on a GPIO .br .SS SCRIPTS .br .br store_script Store a script .br run_script Run a stored script .br script_status Get script status and parameters .br stop_script Stop a running script .br delete_script Delete a stored script .br .SS WAVES .br .br wave_clear Deletes all waveforms .br .br wave_add_new Starts a new waveform .br wave_add_generic Adds a series of pulses to the waveform .br wave_add_serial Adds serial data to the waveform .br .br wave_create Creates a waveform from added data .br wave_delete Deletes one or more waveforms .br .br wave_send_once Transmits a waveform once .br wave_send_repeat Transmits a waveform repeatedly .br .br wave_chain Transmits a chain of waveforms .br .br wave_tx_busy Checks to see if the waveform has ended .br wave_tx_stop Aborts the current waveform .br .br wave_get_micros Length in microseconds of the current waveform .br wave_get_high_micros Length of longest waveform so far .br wave_get_max_micros Absolute maximum allowed micros .br .br wave_get_pulses Length in pulses of the current waveform .br wave_get_high_pulses Length of longest waveform so far .br wave_get_max_pulses Absolute maximum allowed pulses .br .br wave_get_cbs Length in cbs of the current waveform .br wave_get_high_cbs Length of longest waveform so far .br wave_get_max_cbs Absolute maximum allowed cbs .br .SS I2C .br .br i2c_open Opens an I2C device .br i2c_close Closes an I2C device .br .br i2c_write_quick smbus write quick .br i2c_write_byte smbus write byte .br i2c_read_byte smbus read byte .br i2c_write_byte_data smbus write byte data .br i2c_write_word_data smbus write word data .br i2c_read_byte_data smbus read byte data .br i2c_read_word_data smbus read word data .br i2c_process_call smbus process call .br i2c_write_block_data smbus write block data .br i2c_read_block_data smbus read block data .br i2c_block_process_call smbus block process call .br .br i2c_write_i2c_block_data smbus write I2C block data .br i2c_read_i2c_block_data smbus read I2C block data .br .br i2c_read_device Reads the raw I2C device .br i2c_write_device Writes the raw I2C device .br .br i2c_zip Performs multiple I2C transactions .br .br bb_i2c_open Opens GPIO for bit banging I2C .br bb_i2c_close Closes GPIO for bit banging I2C .br bb_i2c_zip Performs multiple bit banged I2C transactions .br .SS SPI .br .br spi_open Opens a SPI device .br spi_close Closes a SPI device .br .br spi_read Reads bytes from a SPI device .br spi_write Writes bytes to a SPI device .br spi_xfer Transfers bytes with a SPI device .br .SS SERIAL .br .br serial_open Opens a serial device .br serial_close Closes a serial device .br .br serial_write_byte Writes a byte to a serial device .br serial_read_byte Reads a byte from a serial device .br serial_write Writes bytes to a serial device .br serial_read Reads bytes from a serial device .br .br serial_data_available Returns number of bytes ready to be read .br .SS CUSTOM .br .br custom_1 User custom function 1 .br custom_2 User custom function 2 .br .SS UTILITIES .br .br get_current_tick Get current tick (microseconds) .br .br get_hardware_revision Get hardware revision .br get_pigpio_version Get the pigpio version .br pigpiod_if_version Get the pigpiod_if version .br .br pigpio_error Get a text description of an error code. .br .br time_sleep Sleeps for a float number of seconds .br time_time Float number of seconds since the epoch .br .SH FUNCTIONS .IP "\fBdouble time_time(void)\fP" .IP "" 4 Return the current time in seconds since the Epoch. .IP "\fBvoid time_sleep(double seconds)\fP" .IP "" 4 Delay execution for a given number of seconds. .br .br .EX seconds: the number of seconds to delay. .br .EE .IP "\fBchar *pigpio_error(int errnum)\fP" .IP "" 4 Return a text description for an error code. .br .br .EX errnum: the error code. .br .EE .IP "\fBunsigned pigpiod_if_version(void)\fP" .IP "" 4 Return the pigpiod_if version. .IP "\fBpthread_t *start_thread(gpioThreadFunc_t thread_func, void *userdata)\fP" .IP "" 4 Starts a new thread of execution with thread_func as the main routine. .br .br .EX thread_func: the main function for the new thread. .br userdata: a pointer to an arbitrary argument. .br .EE .br .br Returns a pointer to pthread_t if OK, otherwise NULL. .br .br The function is passed the single argument userdata. .br .br The thread can be cancelled by passing the pointer to pthread_t to \fBstop_thread\fP. .IP "\fBvoid stop_thread(pthread_t *pth)\fP" .IP "" 4 Cancels the thread pointed at by pth. .br .br .EX pth: the thread to be stopped. .br .EE .br .br No value is returned. .br .br The thread to be stopped should have been started with \fBstart_thread\fP. .IP "\fBint pigpio_start(char *addrStr, char *portStr)\fP" .IP "" 4 Connect to the pigpio daemon. Reserving command and notification streams. .br .br .EX addrStr: specifies the host or IP address of the Pi running the .br pigpio daemon. It may be NULL in which case localhost .br is used unless overridden by the PIGPIO_ADDR environment .br variable. .br .br portStr: specifies the port address used by the Pi running the .br pigpio daemon. It may be NULL in which case "8888" .br is used unless overridden by the PIGPIO_PORT environment .br variable. .br .EE .IP "\fBvoid pigpio_stop(void)\fP" .IP "" 4 Terminates the connection to the pigpio daemon and releases resources used by the library. .IP "\fBint set_mode(unsigned gpio, unsigned mode)\fP" .IP "" 4 Set the GPIO mode. .br .br .EX gpio: 0-53. .br mode: PI_INPUT, PI_OUTPUT, PI_ALT0, PI_ALT1, .br PI_ALT2, PI_ALT3, PI_ALT4, PI_ALT5. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_MODE, or PI_NOT_PERMITTED. .IP "\fBint get_mode(unsigned gpio)\fP" .IP "" 4 Get the GPIO mode. .br .br .EX gpio: 0-53. .br .EE .br .br Returns the GPIO mode if OK, otherwise PI_BAD_GPIO. .IP "\fBint set_pull_up_down(unsigned gpio, unsigned pud)\fP" .IP "" 4 Set or clear the GPIO pull-up/down resistor. .br .br .EX gpio: 0-53. .br pud: PI_PUD_UP, PI_PUD_DOWN, PI_PUD_OFF. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_PUD, or PI_NOT_PERMITTED. .IP "\fBint gpio_read(unsigned gpio)\fP" .IP "" 4 Read the GPIO level. .br .br .EX gpio:0-53. .br .EE .br .br Returns the GPIO level if OK, otherwise PI_BAD_GPIO. .IP "\fBint gpio_write(unsigned gpio, unsigned level)\fP" .IP "" 4 Write the GPIO level. .br .br .EX gpio: 0-53. .br level: 0, 1. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_LEVEL, or PI_NOT_PERMITTED. .br .br Notes .br .br If PWM or servo pulses are active on the GPIO they are switched off. .IP "\fBint set_PWM_dutycycle(unsigned user_gpio, unsigned dutycycle)\fP" .IP "" 4 Start (non-zero dutycycle) or stop (0) PWM pulses on the GPIO. .br .br .EX user_gpio: 0-31. .br dutycycle: 0-range (range defaults to 255). .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_DUTYCYCLE, or PI_NOT_PERMITTED. Notes .br .br The \fBset_PWM_range\fP function may be used to change the default range of 255. .IP "\fBint get_PWM_dutycycle(unsigned user_gpio)\fP" .IP "" 4 Return the PWM dutycycle in use on a GPIO. .br .br .EX user_gpio: 0-31. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_PWM_GPIO. .br .br For normal PWM the dutycycle will be out of the defined range for the GPIO (see \fBget_PWM_range\fP). .br .br If a hardware clock is active on the GPIO the reported dutycycle will be 500000 (500k) out of 1000000 (1M). .br .br If hardware PWM is active on the GPIO the reported dutycycle will be out of a 1000000 (1M). .IP "\fBint set_PWM_range(unsigned user_gpio, unsigned range)\fP" .IP "" 4 Set the range of PWM values to be used on the GPIO. .br .br .EX user_gpio: 0-31. .br range: 25-40000. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_DUTYRANGE, or PI_NOT_PERMITTED. .br .br Notes .br .br If PWM is currently active on the GPIO its dutycycle will be scaled to reflect the new range. .br .br The real range, the number of steps between fully off and fully on for each of the 18 available GPIO frequencies is .br .br .EX 25(#1), 50(#2), 100(#3), 125(#4), 200(#5), 250(#6), .br 400(#7), 500(#8), 625(#9), 800(#10), 1000(#11), 1250(#12), .br 2000(#13), 2500(#14), 4000(#15), 5000(#16), 10000(#17), 20000(#18) .br .EE .br .br The real value set by set_PWM_range is (dutycycle * real range) / range. .IP "\fBint get_PWM_range(unsigned user_gpio)\fP" .IP "" 4 Get the range of PWM values being used on the GPIO. .br .br .EX user_gpio: 0-31. .br .EE .br .br Returns the dutycycle range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. .br .br If a hardware clock or hardware PWM is active on the GPIO the reported range will be 1000000 (1M). .IP "\fBint get_PWM_real_range(unsigned user_gpio)\fP" .IP "" 4 Get the real underlying range of PWM values being used on the GPIO. .br .br .EX user_gpio: 0-31. .br .EE .br .br Returns the real range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. .br .br If a hardware clock is active on the GPIO the reported real range will be 1000000 (1M). .br .br If hardware PWM is active on the GPIO the reported real range will be approximately 250M divided by the set PWM frequency. .br .br .IP "\fBint set_PWM_frequency(unsigned user_gpio, unsigned frequency)\fP" .IP "" 4 Set the frequency (in Hz) of the PWM to be used on the GPIO. .br .br .EX user_gpio: 0-31. .br frequency: >=0 (Hz). .br .EE .br .br Returns the numerically closest frequency if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_PERMITTED. .br .br If PWM is currently active on the GPIO it will be switched off and then back on at the new frequency. .br .br Each GPIO can be independently set to one of 18 different PWM frequencies. .br .br The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5, 8, or 10 microseconds (default 5). The sample rate is set when the pigpio daemon is started. .br .br The frequencies for each sample rate are: .br .br .EX Hertz .br .br 1: 40000 20000 10000 8000 5000 4000 2500 2000 1600 .br 1250 1000 800 500 400 250 200 100 50 .br .br 2: 20000 10000 5000 4000 2500 2000 1250 1000 800 .br 625 500 400 250 200 125 100 50 25 .br .br 4: 10000 5000 2500 2000 1250 1000 625 500 400 .br 313 250 200 125 100 63 50 25 13 .br sample .br rate .br (us) 5: 8000 4000 2000 1600 1000 800 500 400 320 .br 250 200 160 100 80 50 40 20 10 .br .br 8: 5000 2500 1250 1000 625 500 313 250 200 .br 156 125 100 63 50 31 25 13 6 .br .br 10: 4000 2000 1000 800 500 400 250 200 160 .br 125 100 80 50 40 25 20 10 5 .br .EE .IP "\fBint get_PWM_frequency(unsigned user_gpio)\fP" .IP "" 4 Get the frequency of PWM being used on the GPIO. .br .br .EX user_gpio: 0-31. .br .EE .br .br For normal PWM the frequency will be that defined for the GPIO by \fBset_PWM_frequency\fP. .br .br If a hardware clock is active on the GPIO the reported frequency will be that set by \fBhardware_clock\fP. .br .br If hardware PWM is active on the GPIO the reported frequency will be that set by \fBhardware_PWM\fP. .br .br Returns the frequency (in hertz) used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. .IP "\fBint set_servo_pulsewidth(unsigned user_gpio, unsigned pulsewidth)\fP" .IP "" 4 Start (500-2500) or stop (0) servo pulses on the GPIO. .br .br .EX user_gpio: 0-31. .br pulsewidth: 0 (off), 500 (anti-clockwise) - 2500 (clockwise). .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_PULSEWIDTH or PI_NOT_PERMITTED. .br .br The selected pulsewidth will continue to be transmitted until changed by a subsequent call to set_servo_pulsewidth. .br .br The pulsewidths supported by servos varies and should probably be determined by experiment. A value of 1500 should always be safe and represents the mid-point of rotation. .br .br You can DAMAGE a servo if you command it to move beyond its limits. .br .br OTHER UPDATE RATES: .br .br This function updates servos at 50Hz. If you wish to use a different update frequency you will have to use the PWM functions. .br .br .EX Update Rate (Hz) 50 100 200 400 500 .br 1E6/Hz 20000 10000 5000 2500 2000 .br .EE .br .br Firstly set the desired PWM frequency using \fBset_PWM_frequency\fP. .br .br Then set the PWM range using \fBset_PWM_range\fP to 1E6/Hz. Doing this allows you to use units of microseconds when setting the servo pulsewidth. .br .br E.g. If you want to update a servo connected to GPIO 25 at 400Hz .br .br .EX set_PWM_frequency(25, 400); .br set_PWM_range(25, 2500); .br .EE .br .br Thereafter use the \fBset_PWM_dutycycle\fP function to move the servo, e.g. set_PWM_dutycycle(25, 1500) will set a 1500 us pulse. .br .IP "\fBint get_servo_pulsewidth(unsigned user_gpio)\fP" .IP "" 4 Return the servo pulsewidth in use on a GPIO. .br .br .EX user_gpio: 0-31. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERVO_GPIO. .IP "\fBint notify_open(void)\fP" .IP "" 4 Get a free notification handle. .br .br Returns a handle greater than or equal to zero if OK, otherwise PI_NO_HANDLE. .br .br A notification is a method for being notified of GPIO state changes via a pipe. .br .br Pipes are only accessible from the local machine so this function serves no purpose if you are using the library from a remote machine. The in-built (socket) notifications provided by \fBcallback\fP should be used instead. .br .br Notifications for handle x will be available at the pipe named /dev/pigpiox (where x is the handle number). E.g. if the function returns 15 then the notifications must be read from /dev/pigpio15. .IP "\fBint notify_begin(unsigned handle, uint32_t bits)\fP" .IP "" 4 Start notifications on a previously opened handle. .br .br .EX handle: 0-31 (as returned by \fBnotify_open\fP) .br bits: a mask indicating the GPIO to be notified. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .br .br The notification sends state changes for each GPIO whose corresponding bit in bits is set. .br .br Each notification occupies 12 bytes in the fifo as follows: .br .br .EX typedef struct .br { .br uint16_t seqno; .br uint16_t flags; .br uint32_t tick; .br uint32_t level; .br } gpioReport_t; .br .EE .br .br seqno: starts at 0 each time the handle is opened and then increments by one for each report. .br .br flags: two flags are defined, PI_NTFY_FLAGS_WDOG and PI_NTFY_FLAGS_ALIVE. .br .br PI_NTFY_FLAGS_WDOG, if bit 5 is set then bits 0-4 of the flags indicate a GPIO which has had a watchdog timeout. .br .br PI_NTFY_FLAGS_ALIVE, if bit 6 is set this indicates a keep alive signal on the pipe/socket and is sent once a minute in the absence of other notification activity. .br .br tick: the number of microseconds since system boot. It wraps around after 1h12m. .br .br level: indicates the level of each GPIO. If bit 1<=0 .br numBytes: >=1 .br str: an array of chars. .br .EE .br .br Returns the new total number of pulses in the current waveform if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_WAVE_BAUD, PI_BAD_DATABITS, PI_BAD_STOP_BITS, PI_TOO_MANY_CHARS, PI_BAD_SER_OFFSET, or PI_TOO_MANY_PULSES. .br .br NOTES: .br .br The serial data is formatted as one start bit, \fBdata_bits\fP data bits, and \fBstop_bits\fP/2 stop bits. .br .br It is legal to add serial data streams with different baud rates to the same waveform. .br .br \fBnumBytes\fP is the number of bytes of data in str. .br .br The bytes required for each character depend upon \fBdata_bits\fP. .br .br For \fBdata_bits\fP 1-8 there will be one byte per character. .br For \fBdata_bits\fP 9-16 there will be two bytes per character. .br For \fBdata_bits\fP 17-32 there will be four bytes per character. .IP "\fBint wave_create(void)\fP" .IP "" 4 This function creates a waveform from the data provided by the prior calls to the \fBwave_add_*\fP functions. Upon success a wave id greater than or equal to 0 is returned, otherwise PI_EMPTY_WAVEFORM, PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID. .br .br The data provided by the \fBwave_add_*\fP functions is consumed by this function. .br .br As many waveforms may be created as there is space available. The wave id is passed to \fBwave_send_*\fP to specify the waveform to transmit. .br .br Normal usage would be .br .br Step 1. \fBwave_clear\fP to clear all waveforms and added data. .br .br Step 2. \fBwave_add_*\fP calls to supply the waveform data. .br .br Step 3. \fBwave_create\fP to create the waveform and get a unique id .br .br Repeat steps 2 and 3 as needed. .br .br Step 4. \fBwave_send_*\fP with the id of the waveform to transmit. .br .br A waveform comprises one or more pulses. Each pulse consists of a \fBgpioPulse_t\fP structure. .br .br .EX typedef struct .br { .br uint32_t gpioOn; .br uint32_t gpioOff; .br uint32_t usDelay; .br } gpioPulse_t; .br .EE .br .br The fields specify .br .br 1) the GPIO to be switched on at the start of the pulse. .br 2) the GPIO to be switched off at the start of the pulse. .br 3) the delay in microseconds before the next pulse. .br .br .br Any or all the fields can be zero. It doesn't make any sense to set all the fields to zero (the pulse will be ignored). .br .br When a waveform is started each pulse is executed in order with the specified delay between the pulse and the next. .br .br Returns the new waveform id if OK, otherwise PI_EMPTY_WAVEFORM, PI_NO_WAVEFORM_ID, PI_TOO_MANY_CBS, or PI_TOO_MANY_OOL. .IP "\fBint wave_delete(unsigned wave_id)\fP" .IP "" 4 This function deletes the waveform with id wave_id. .br .br .EX wave_id: >=0, as returned by \fBwave_create\fP. .br .EE .br .br Wave ids are allocated in order, 0, 1, 2, etc. .br .br The wave is flagged for deletion. The resources used by the wave will only be reused when either of the following apply. .br .br - all waves with higher numbered wave ids have been deleted or have been flagged for deletion. .br .br - a new wave is created which uses exactly the same resources as the current wave (see the C source for gpioWaveCreate for details). .br .br Returns 0 if OK, otherwise PI_BAD_WAVE_ID. .IP "\fBint wave_send_once(unsigned wave_id)\fP" .IP "" 4 This function transmits the waveform with id wave_id. The waveform is sent once. .br .br NOTE: Any hardware PWM started by \fBhardware_PWM\fP will be cancelled. .br .br .EX wave_id: >=0, as returned by \fBwave_create\fP. .br .EE .br .br Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE. .IP "\fBint wave_send_repeat(unsigned wave_id)\fP" .IP "" 4 This function transmits the waveform with id wave_id. The waveform cycles until cancelled (either by the sending of a new waveform or by \fBwave_tx_stop\fP). .br .br NOTE: Any hardware PWM started by \fBhardware_PWM\fP will be cancelled. .br .br .EX wave_id: >=0, as returned by \fBwave_create\fP. .br .EE .br .br Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE. .IP "\fBint wave_chain(char *buf, unsigned bufSize)\fP" .IP "" 4 This function transmits a chain of waveforms. .br .br NOTE: Any hardware PWM started by \fBhardware_PWM\fP will be cancelled. .br .br The waves to be transmitted are specified by the contents of buf which contains an ordered list of \fBwave_id\fPs and optional command codes and related data. .br .br .EX buf: pointer to the wave_ids and optional command codes .br bufSize: the number of bytes in buf .br .EE .br .br Returns 0 if OK, otherwise PI_CHAIN_NESTING, PI_CHAIN_LOOP_CNT, PI_BAD_CHAIN_LOOP, PI_BAD_CHAIN_CMD, PI_CHAIN_COUNTER, PI_BAD_CHAIN_DELAY, PI_CHAIN_TOO_BIG, or PI_BAD_WAVE_ID. .br .br Each wave is transmitted in the order specified. A wave may occur multiple times per chain. .br .br A blocks of waves may be transmitted multiple times by using the loop commands. The block is bracketed by loop start and end commands. Loops may be nested. .br .br Delays between waves may be added with the delay command. .br .br The following command codes are supported: .br .br Name Cmd & Data Meaning .br Loop Start 255 0 Identify start of a wave block .br Loop Repeat 255 1 x y loop x + y*256 times .br Delay 255 2 x y delay x + y*256 microseconds .br Loop Forever 255 3 loop forever .br .br .br If present Loop Forever must be the last entry in the chain. .br .br The code is currently dimensioned to support a chain with roughly 600 entries and 20 loop counters. .br .br \fBExample\fP .br .EX #include .br #include .br .br #define WAVES 5 .br #define GPIO 4 .br .br int main(int argc, char *argv[]) .br { .br int i, wid[WAVES]; .br .br if (pigpio_start(0, 0)<0) return -1; .br .br set_mode(GPIO, PI_OUTPUT); .br .br for (i=0; i=0, as returned by \fBstore_script\fP. .br numPar: 0-10, the number of parameters. .br param: an array of parameters. .br .EE .br .br The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM .br .br param is an array of up to 10 parameters which may be referenced in the script as p0 to p9. .IP "\fBint script_status(unsigned script_id, uint32_t *param)\fP" .IP "" 4 This function returns the run status of a stored script as well as the current values of parameters 0 to 9. .br .br .EX script_id: >=0, as returned by \fBstore_script\fP. .br param: an array to hold the returned 10 parameters. .br .EE .br .br The function returns greater than or equal to 0 if OK, otherwise PI_BAD_SCRIPT_ID. .br .br The run status may be .br .br .EX PI_SCRIPT_INITING .br PI_SCRIPT_HALTED .br PI_SCRIPT_RUNNING .br PI_SCRIPT_WAITING .br PI_SCRIPT_FAILED .br .EE .br .br The current value of script parameters 0 to 9 are returned in param. .IP "\fBint stop_script(unsigned script_id)\fP" .IP "" 4 This function stops a running script. .br .br .EX script_id: >=0, as returned by \fBstore_script\fP. .br .EE .br .br The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID. .IP "\fBint delete_script(unsigned script_id)\fP" .IP "" 4 This function deletes a stored script. .br .br .EX script_id: >=0, as returned by \fBstore_script\fP. .br .EE .br .br The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID. .IP "\fBint bb_serial_read_open(unsigned user_gpio, unsigned baud, unsigned data_bits)\fP" .IP "" 4 This function opens a GPIO for bit bang reading of serial data. .br .br .EX user_gpio: 0-31. .br baud: 50-250000 .br data_bits: 1-32 .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_WAVE_BAUD, or PI_GPIO_IN_USE. .br .br The serial data is returned in a cyclic buffer and is read using bb_serial_read. .br .br It is the caller's responsibility to read data from the cyclic buffer in a timely fashion. .IP "\fBint bb_serial_read(unsigned user_gpio, void *buf, size_t bufSize)\fP" .IP "" 4 This function copies up to bufSize bytes of data read from the bit bang serial cyclic buffer to the buffer starting at buf. .br .br .EX user_gpio: 0-31, previously opened with \fBbb_serial_read_open\fP. .br buf: an array to receive the read bytes. .br bufSize: >=0 .br .EE .br .br Returns the number of bytes copied if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERIAL_GPIO. .br .br The bytes returned for each character depend upon the number of data bits \fBdata_bits\fP specified in the \fBbb_serial_read_open\fP command. .br .br For \fBdata_bits\fP 1-8 there will be one byte per character. .br For \fBdata_bits\fP 9-16 there will be two bytes per character. .br For \fBdata_bits\fP 17-32 there will be four bytes per character. .IP "\fBint bb_serial_read_close(unsigned user_gpio)\fP" .IP "" 4 This function closes a GPIO for bit bang reading of serial data. .br .br .EX user_gpio: 0-31, previously opened with \fBbb_serial_read_open\fP. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_SERIAL_GPIO. .IP "\fBint bb_serial_invert(unsigned user_gpio, unsigned invert)\fP" .IP "" 4 This function inverts serial logic for big bang serial reads. .br .br .EX user_gpio: 0-31, previously opened with \fBbb_serial_read_open\fP. .br invert: 0-1, 1 invert, 0 normal. .br .EE .br .br Returns 0 if OK, otherwise PI_NOT_SERIAL_GPIO or PI_BAD_SER_INVERT. .IP "\fBint i2c_open(unsigned i2c_bus, unsigned i2c_addr, unsigned i2c_flags)\fP" .IP "" 4 This returns a handle for the device at address i2c_addr on bus i2c_bus. .br .br .EX i2c_bus: >=0. .br i2c_addr: 0-0x7F. .br i2c_flags: 0. .br .EE .br .br No flags are currently defined. This parameter should be set to zero. .br .br Physically buses 0 and 1 are available on the Pi. Higher numbered buses will be available if a kernel supported bus multiplexor is being used. .br .br The GPIO used are given in the following table. .br .br SDA SCL .br I2C 0 0 1 .br I2C 1 2 3 .br .br .br Returns a handle (>=0) if OK, otherwise PI_BAD_I2C_BUS, PI_BAD_I2C_ADDR, PI_BAD_FLAGS, PI_NO_HANDLE, or PI_I2C_OPEN_FAILED. .br .br For the SMBus commands the low level transactions are shown at the end of the function description. The following abbreviations are used. .br .br .EX S (1 bit) : Start bit .br P (1 bit) : Stop bit .br Rd/Wr (1 bit) : Read/Write bit. Rd equals 1, Wr equals 0. .br A, NA (1 bit) : Accept and not accept bit. .br .br .br Addr (7 bits): I2C 7 bit address. .br Comm (8 bits): Command byte, a data byte which often selects a register. .br Data (8 bits): A data byte. .br Count (8 bits): A data byte containing the length of a block operation. .br .br [..]: Data sent by the device. .br .EE .IP "\fBint i2c_close(unsigned handle)\fP" .IP "" 4 This closes the I2C device associated with the handle. .br .br .EX handle: >=0, as returned by a call to \fBi2c_open\fP. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .IP "\fBint i2c_write_quick(unsigned handle, unsigned bit)\fP" .IP "" 4 This sends a single bit (in the Rd/Wr bit) to the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2c_open\fP. .br bit: 0-1, the value to write. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br Quick command. SMBus 2.0 5.5.1 .EX S Addr Rd/Wr [A] P .br .EE .IP "\fBint i2c_write_byte(unsigned handle, unsigned bVal)\fP" .IP "" 4 This sends a single byte to the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2c_open\fP. .br bVal: 0-0xFF, the value to write. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br Send byte. SMBus 2.0 5.5.2 .EX S Addr Wr [A] Data [A] P .br .EE .IP "\fBint i2c_read_byte(unsigned handle)\fP" .IP "" 4 This reads a single byte from the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2c_open\fP. .br .EE .br .br Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, or PI_I2C_READ_FAILED. .br .br Receive byte. SMBus 2.0 5.5.3 .EX S Addr Rd [A] [Data] NA P .br .EE .IP "\fBint i2c_write_byte_data(unsigned handle, unsigned i2c_reg, unsigned bVal)\fP" .IP "" 4 This writes a single byte to the specified register of the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to write. .br bVal: 0-0xFF, the value to write. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br Write byte. SMBus 2.0 5.5.4 .EX S Addr Wr [A] Comm [A] Data [A] P .br .EE .IP "\fBint i2c_write_word_data(unsigned handle, unsigned i2c_reg, unsigned wVal)\fP" .IP "" 4 This writes a single 16 bit word to the specified register of the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to write. .br wVal: 0-0xFFFF, the value to write. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br Write word. SMBus 2.0 5.5.4 .EX S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] P .br .EE .IP "\fBint i2c_read_byte_data(unsigned handle, unsigned i2c_reg)\fP" .IP "" 4 This reads a single byte from the specified register of the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to read. .br .EE .br .br Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br Read byte. SMBus 2.0 5.5.5 .EX S Addr Wr [A] Comm [A] S Addr Rd [A] [Data] NA P .br .EE .IP "\fBint i2c_read_word_data(unsigned handle, unsigned i2c_reg)\fP" .IP "" 4 This reads a single 16 bit word from the specified register of the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to read. .br .EE .br .br Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br Read word. SMBus 2.0 5.5.5 .EX S Addr Wr [A] Comm [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P .br .EE .IP "\fBint i2c_process_call(unsigned handle, unsigned i2c_reg, unsigned wVal)\fP" .IP "" 4 This writes 16 bits of data to the specified register of the device associated with handle and and reads 16 bits of data in return. .br .br .EX handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to write/read. .br wVal: 0-0xFFFF, the value to write. .br .EE .br .br Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br Process call. SMBus 2.0 5.5.6 .EX S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] .br S Addr Rd [A] [DataLow] A [DataHigh] NA P .br .EE .IP "\fBint i2c_write_block_data(unsigned handle, unsigned i2c_reg, char *buf, unsigned count)\fP" .IP "" 4 This writes up to 32 bytes to the specified register of the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to write. .br buf: an array with the data to send. .br count: 1-32, the number of bytes to write. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br Block write. SMBus 2.0 5.5.7 .EX S Addr Wr [A] Comm [A] Count [A] Data [A] Data [A] ... [A] Data [A] P .br .EE .IP "\fBint i2c_read_block_data(unsigned handle, unsigned i2c_reg, char *buf)\fP" .IP "" 4 This reads a block of up to 32 bytes from the specified register of the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to read. .br buf: an array to receive the read data. .br .EE .br .br The amount of returned data is set by the device. .br .br Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br Block read. SMBus 2.0 5.5.7 .EX S Addr Wr [A] Comm [A] .br S Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P .br .EE .IP "\fBint i2c_block_process_call(unsigned handle, unsigned i2c_reg, char *buf, unsigned count)\fP" .IP "" 4 This writes data bytes to the specified register of the device associated with handle and reads a device specified number of bytes of data in return. .br .br .EX handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to write/read. .br buf: an array with the data to send and to receive the read data. .br count: 1-32, the number of bytes to write. .br .EE .br .br .br .br Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br The smbus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received. The total number of bytes sent/received must be 32 or less. .br .br Block write-block read. SMBus 2.0 5.5.8 .EX S Addr Wr [A] Comm [A] Count [A] Data [A] ... .br S Addr Rd [A] [Count] A [Data] ... A P .br .EE .IP "\fBint i2c_read_i2c_block_data(unsigned handle, unsigned i2c_reg, char *buf, unsigned count)\fP" .IP "" 4 This reads count bytes from the specified register of the device associated with handle . The count may be 1-32. .br .br .EX handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to read. .br buf: an array to receive the read data. .br count: 1-32, the number of bytes to read. .br .EE .br .br Returns the number of bytes read (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br .EX S Addr Wr [A] Comm [A] .br S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P .br .EE .IP "\fBint i2c_write_i2c_block_data(unsigned handle, unsigned i2c_reg, char *buf, unsigned count)\fP" .IP "" 4 This writes 1 to 32 bytes to the specified register of the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to write. .br buf: the data to write. .br count: 1-32, the number of bytes to write. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br .EX S Addr Wr [A] Comm [A] Data [A] Data [A] ... [A] Data [A] P .br .EE .IP "\fBint i2c_read_device(unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This reads count bytes from the raw device into buf. .br .br .EX handle: >=0, as returned by a call to \fBi2c_open\fP. .br buf: an array to receive the read data bytes. .br count: >0, the number of bytes to read. .br .EE .br .br Returns count (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .IP "\fBint i2c_write_device(unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This writes count bytes from buf to the raw device. .br .br .EX handle: >=0, as returned by a call to \fBi2c_open\fP. .br buf: an array containing the data bytes to write. .br count: >0, the number of bytes to write. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .IP "\fBint i2c_zip(unsigned handle, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen)\fP" .IP "" 4 This function executes a sequence of I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenated command codes and associated data. .br .br .EX handle: >=0, as returned by a call to \fBi2cOpen\fP .br inBuf: pointer to the concatenated I2C commands, see below .br inLen: size of command buffer .br outBuf: pointer to buffer to hold returned data .br outLen: size of output buffer .br .EE .br .br Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_HANDLE, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN. PI_BAD_I2C_WLEN, or PI_BAD_I2C_SEG. .br .br The following command codes are supported: .br .br Name Cmd & Data Meaning .br End 0 No more commands .br Escape 1 Next P is two bytes .br On 2 Switch combined flag on .br Off 3 Switch combined flag off .br Address 4 P Set I2C address to P .br Flags 5 lsb msb Set I2C flags to lsb + (msb << 8) .br Read 6 P Read P bytes of data .br Write 7 P ... Write P bytes of data .br .br .br The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). .br .br The address defaults to that associated with the handle. The flags default to 0. The address and flags maintain their previous value until updated. .br .br The returned I2C data is stored in consecutive locations of outBuf. .br .br \fBExample\fP .br .EX Set address 0x53, write 0x32, read 6 bytes .br Set address 0x1E, write 0x03, read 6 bytes .br Set address 0x68, write 0x1B, read 8 bytes .br End .br .br 0x04 0x53 0x07 0x01 0x32 0x06 0x06 .br 0x04 0x1E 0x07 0x01 0x03 0x06 0x06 .br 0x04 0x68 0x07 0x01 0x1B 0x06 0x08 .br 0x00 .br .EE .br .br .IP "\fBint bb_i2c_open(unsigned SDA, unsigned SCL, unsigned baud)\fP" .IP "" 4 This function selects a pair of GPIO for bit banging I2C at a specified baud rate. .br .br Bit banging I2C allows for certain operations which are not possible with the standard I2C driver. .br .br o baud rates as low as 50 .br o repeated starts .br o clock stretching .br o I2C on any pair of spare GPIO .br .br .EX SDA: 0-31 .br SCL: 0-31 .br baud: 50-500000 .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_I2C_BAUD, or PI_GPIO_IN_USE. .br .br NOTE: .br .br The GPIO used for SDA and SCL must have pull-ups to 3V3 connected. As a guide the hardware pull-ups on pins 3 and 5 are 1k8 in value. .IP "\fBint bb_i2c_close(unsigned SDA)\fP" .IP "" 4 This function stops bit banging I2C on a pair of GPIO previously opened with \fBbb_i2c_open\fP. .br .br .EX SDA: 0-31, the SDA GPIO used in a prior call to \fBbb_i2c_open\fP .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_I2C_GPIO. .IP "\fBint bb_i2c_zip(unsigned SDA, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen)\fP" .IP "" 4 This function executes a sequence of bit banged I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenated command codes and associated data. .br .br .EX SDA: 0-31 (as used in a prior call to \fBbb_i2c_open\fP) .br inBuf: pointer to the concatenated I2C commands, see below .br inLen: size of command buffer .br outBuf: pointer to buffer to hold returned data .br outLen: size of output buffer .br .EE .br .br Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_USER_GPIO, PI_NOT_I2C_GPIO, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN, PI_BAD_I2C_WLEN, PI_I2C_READ_FAILED, or PI_I2C_WRITE_FAILED. .br .br The following command codes are supported: .br .br Name Cmd & Data Meaning .br End 0 No more commands .br Escape 1 Next P is two bytes .br Start 2 Start condition .br Stop 3 Stop condition .br Address 4 P Set I2C address to P .br Flags 5 lsb msb Set I2C flags to lsb + (msb << 8) .br Read 6 P Read P bytes of data .br Write 7 P ... Write P bytes of data .br .br .br The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). .br .br The address and flags default to 0. The address and flags maintain their previous value until updated. .br .br No flags are currently defined. .br .br The returned I2C data is stored in consecutive locations of outBuf. .br .br \fBExample\fP .br .EX Set address 0x53 .br start, write 0x32, (re)start, read 6 bytes, stop .br Set address 0x1E .br start, write 0x03, (re)start, read 6 bytes, stop .br Set address 0x68 .br start, write 0x1B, (re)start, read 8 bytes, stop .br End .br .br 0x04 0x53 .br 0x02 0x07 0x01 0x32 0x02 0x06 0x06 0x03 .br .br 0x04 0x1E .br 0x02 0x07 0x01 0x03 0x02 0x06 0x06 0x03 .br .br 0x04 0x68 .br 0x02 0x07 0x01 0x1B 0x02 0x06 0x08 0x03 .br .br 0x00 .br .EE .IP "\fBint spi_open(unsigned spi_channel, unsigned baud, unsigned spi_flags)\fP" .IP "" 4 This function returns a handle for the SPI device on the channel. Data will be transferred at baud bits per second. The flags may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select. .br .br The Pi has two SPI peripherals: main and auxiliary. .br .br The main SPI has two chip selects (channels), the auxiliary has three. .br .br The auxiliary SPI is available on all models but the A and B. .br .br The GPIO used are given in the following table. .br .br MISO MOSI SCLK CE0 CE1 CE2 .br Main SPI 9 10 11 8 7 - .br Aux SPI 19 20 21 18 17 16 .br .br .br .EX spi_channel: 0-1 (0-2 for the auxiliary SPI). .br baud: 32K-125M (values above 30M are unlikely to work). .br spi_flags: see below. .br .EE .br .br Returns a handle (>=0) if OK, otherwise PI_BAD_SPI_CHANNEL, PI_BAD_SPI_SPEED, PI_BAD_FLAGS, PI_NO_AUX_SPI, or PI_SPI_OPEN_FAILED. .br .br spi_flags consists of the least significant 22 bits. .br .br .EX 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 .br b b b b b b R T n n n n W A u2 u1 u0 p2 p1 p0 m m .br .EE .br .br mm defines the SPI mode. .br .br Warning: modes 1 and 3 do not appear to work on the auxiliary SPI. .br .br .EX Mode POL PHA .br 0 0 0 .br 1 0 1 .br 2 1 0 .br 3 1 1 .br .EE .br .br px is 0 if CEx is active low (default) and 1 for active high. .br .br ux is 0 if the CEx GPIO is reserved for SPI (default) and 1 otherwise. .br .br A is 0 for the main SPI, 1 for the auxiliary SPI. .br .br W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Main SPI only. .br .br nnnn defines the number of bytes (0-15) to write before switching the MOSI line to MISO to read data. This field is ignored if W is not set. Main SPI only. .br .br T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. Auxiliary SPI only. .br .br R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. Auxiliary SPI only. .br .br bbbbbb defines the word size in bits (0-32). The default (0) sets 8 bits per word. Auxiliary SPI only. .br .br The \fBspi_read\fP, \fBspi_write\fP, and \fBspi_xfer\fP functions transfer data packed into 1, 2, or 4 bytes according to the word size in bits. .br .br For bits 1-8 there will be one byte per word. .br For bits 9-16 there will be two bytes per word. .br For bits 17-32 there will be four bytes per word. .br .br Multi-byte transfers are made in least significant byte first order. .br .br E.g. to transfer 32 11-bit words buf should contain 64 bytes and count should be 64. .br .br E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A. .br .br The other bits in flags should be set to zero. .IP "\fBint spi_close(unsigned handle)\fP" .IP "" 4 This functions closes the SPI device identified by the handle. .br .br .EX handle: >=0, as returned by a call to \fBspi_open\fP. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .IP "\fBint spi_read(unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This function reads count bytes of data from the SPI device associated with the handle. .br .br .EX handle: >=0, as returned by a call to \fBspi_open\fP. .br buf: an array to receive the read data bytes. .br count: the number of bytes to read. .br .EE .br .br Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. .IP "\fBint spi_write(unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This function writes count bytes of data from buf to the SPI device associated with the handle. .br .br .EX handle: >=0, as returned by a call to \fBspi_open\fP. .br buf: the data bytes to write. .br count: the number of bytes to write. .br .EE .br .br Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. .IP "\fBint spi_xfer(unsigned handle, char *txBuf, char *rxBuf, unsigned count)\fP" .IP "" 4 This function transfers count bytes of data from txBuf to the SPI device associated with the handle. Simultaneously count bytes of data are read from the device and placed in rxBuf. .br .br .EX handle: >=0, as returned by a call to \fBspi_open\fP. .br txBuf: the data bytes to write. .br rxBuf: the received data bytes. .br count: the number of bytes to transfer. .br .EE .br .br Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. .IP "\fBint serial_open(char *ser_tty, unsigned baud, unsigned ser_flags)\fP" .IP "" 4 This function opens a serial device at a specified baud rate with specified flags. The device name must start with /dev/tty or /dev/serial. .br .br .EX ser_tty: the serial device to open. .br baud: the baud rate in bits per second, see below. .br ser_flags: 0. .br .EE .br .br Returns a handle (>=0) if OK, otherwise PI_NO_HANDLE, or PI_SER_OPEN_FAILED. .br .br The baud rate must be one of 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, or 230400. .br .br No flags are currently defined. This parameter should be set to zero. .IP "\fBint serial_close(unsigned handle)\fP" .IP "" 4 This function closes the serial device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBserial_open\fP. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .IP "\fBint serial_write_byte(unsigned handle, unsigned bVal)\fP" .IP "" 4 This function writes bVal to the serial port associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBserial_open\fP. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED. .IP "\fBint serial_read_byte(unsigned handle)\fP" .IP "" 4 This function reads a byte from the serial port associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBserial_open\fP. .br .EE .br .br Returns the read byte (>=0) if OK, otherwise PI_BAD_HANDLE, PI_SER_READ_NO_DATA, or PI_SER_READ_FAILED. .br .br If no data is ready PI_SER_READ_NO_DATA is returned. .IP "\fBint serial_write(unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This function writes count bytes from buf to the the serial port associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBserial_open\fP. .br buf: the array of bytes to write. .br count: the number of bytes to write. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED. .IP "\fBint serial_read(unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This function reads up to count bytes from the the serial port associated with handle and writes them to buf. .br .br .EX handle: >=0, as returned by a call to \fBserial_open\fP. .br buf: an array to receive the read data. .br count: the maximum number of bytes to read. .br .EE .br .br Returns the number of bytes read (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_SER_READ_NO_DATA, or PI_SER_WRITE_FAILED. .br .br If no data is ready zero is returned. .IP "\fBint serial_data_available(unsigned handle)\fP" .IP "" 4 Returns the number of bytes available to be read from the device associated with handle. .br .br .EX handle: >=0, as returned by a call to \fBserial_open\fP. .br .EE .br .br Returns the number of bytes of data available (>=0) if OK, otherwise PI_BAD_HANDLE. .IP "\fBint custom_1(unsigned arg1, unsigned arg2, char *argx, unsigned argc)\fP" .IP "" 4 This function is available for user customisation. .br .br It returns a single integer value. .br .br .EX arg1: >=0 .br arg2: >=0 .br argx: extra (byte) arguments .br argc: number of extra arguments .br .EE .br .br Returns >= 0 if OK, less than 0 indicates a user defined error. .IP "\fBint custom_2(unsigned arg1, char *argx, unsigned argc, char *retBuf, unsigned retMax)\fP" .IP "" 4 This function is available for user customisation. .br .br It differs from custom_1 in that it returns an array of bytes rather than just an integer. .br .br The return value is an integer indicating the number of returned bytes. .EX arg1: >=0 .br argc: extra (byte) arguments .br count: number of extra arguments .br retBuf: buffer for returned data .br retMax: maximum number of bytes to return .br .EE .br .br Returns >= 0 if OK, less than 0 indicates a user defined error. .br .br Note, the number of returned bytes will be retMax or less. .IP "\fBint callback(unsigned user_gpio, unsigned edge, CBFunc_t f)\fP" .IP "" 4 This function initialises a new callback. .br .br .EX user_gpio: 0-31. .br edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE. .br f: the callback function. .br .EE .br .br The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback. .br .br The callback is called with the GPIO, edge, and tick, whenever the GPIO has the identified edge. .br .br .EX Parameter Value Meaning .br .br GPIO 0-31 The GPIO which has changed state .br .br edge 0-2 0 = change to low (a falling edge) .br 1 = change to high (a rising edge) .br 2 = no level change (a watchdog timeout) .br .br tick 32 bit The number of microseconds since boot .br WARNING: this wraps around from .br 4294967295 to 0 roughly every 72 minutes .br .EE .IP "\fBint callback_ex(unsigned user_gpio, unsigned edge, CBFuncEx_t f, void *userdata)\fP" .IP "" 4 This function initialises a new callback. .br .br .EX user_gpio: 0-31. .br edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE. .br f: the callback function. .br userdata: a pointer to arbitrary user data. .br .EE .br .br The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback. .br .br The callback is called with the GPIO, edge, tick, and user, whenever the GPIO has the identified edge. .br .br .EX Parameter Value Meaning .br .br GPIO 0-31 The GPIO which has changed state .br .br edge 0-2 0 = change to low (a falling edge) .br 1 = change to high (a rising edge) .br 2 = no level change (a watchdog timeout) .br .br tick 32 bit The number of microseconds since boot .br WARNING: this wraps around from .br 4294967295 to 0 roughly every 72 minutes .br .br userdata pointer Pointer to an arbitrary object .br .EE .IP "\fBint callback_cancel(unsigned callback_id)\fP" .IP "" 4 This function cancels a callback identified by its id. .br .br .EX callback_id: >=0, as returned by a call to \fBcallback\fP or \fBcallback_ex\fP. .br .EE .br .br The function returns 0 if OK, otherwise pigif_callback_not_found. .IP "\fBint wait_for_edge(unsigned user_gpio, unsigned edge, double timeout)\fP" .IP "" 4 This function waits for edge on the GPIO for up to timeout seconds. .br .br .EX user_gpio: 0-31. .br edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE. .br timeout: >=0. .br .EE .br .br The function returns 1 if the edge occurred, otherwise 0. .br .br The function returns when the edge occurs or after the timeout. .SH PARAMETERS .br .br .IP "\fBactive\fP: 0-1000000" 0 .br .br The number of microseconds level changes are reported for once a noise filter has been triggered (by \fBsteady\fP microseconds of a stable level). .br .br .IP "\fB*addrStr\fP" 0 A string specifying the host or IP address of the Pi running the pigpio daemon. It may be NULL in which case localhost is used unless overridden by the PIGPIO_ADDR environment variable. .br .br .IP "\fBarg1\fP" 0 An unsigned argument passed to a user customised function. Its meaning is defined by the customiser. .br .br .IP "\fBarg2\fP" 0 An unsigned argument passed to a user customised function. Its meaning is defined by the customiser. .br .br .IP "\fBargc\fP" 0 The count of bytes passed to a user customised function. .br .br .IP "\fB*argx\fP" 0 A pointer to an array of bytes passed to a user customised function. Its meaning and content is defined by the customiser. .br .br .IP "\fBbaud\fP" 0 The speed of serial communication (I2C, SPI, serial link, waves) in bits per second. .br .br .IP "\fBbit\fP" 0 A value of 0 or 1. .br .br .IP "\fBbits\fP" 0 A value used to select GPIO. If bit n of bits is set then GPIO n is selected. .br .br A convenient way to set bit n is to or in (1<=0, as returned by a call to \fBcallback\fP or \fBcallback_ex\fP. This is passed to \fBcallback_cancel\fP to cancel the callback. .br .br .IP "\fBCBFunc_t\fP" 0 .EX typedef void (*CBFunc_t) .br (unsigned user_gpio, unsigned level, uint32_t tick); .br .EE .br .br .IP "\fBCBFuncEx_t\fP" 0 .EX typedef void (*CBFuncEx_t) .br (unsigned user_gpio, unsigned level, uint32_t tick, void * user); .br .EE .br .br .IP "\fBchar\fP" 0 A single character, an 8 bit quantity able to store 0-255. .br .br .IP "\fBclkfreq\fP: 4689-250000000 (250M)" 0 The hardware clock frequency. .br .br .IP "\fBcount\fP" 0 The number of bytes to be transferred in an I2C, SPI, or Serial command. .br .br .IP "\fBdata_bits\fP: 1-32" 0 The number of data bits in each character of serial data. .br .br .EX #define PI_MIN_WAVE_DATABITS 1 .br #define PI_MAX_WAVE_DATABITS 32 .br .EE .br .br .IP "\fBdouble\fP" 0 A floating point number. .br .br .IP "\fBdutycycle\fP: 0-range" 0 A number representing the ratio of on time to off time for PWM. .br .br The number may vary between 0 and range (default 255) where 0 is off and range is fully on. .br .br .IP "\fBedge\fP" 0 Used to identify a GPIO level transition of interest. A rising edge is a level change from 0 to 1. A falling edge is a level change from 1 to 0. .br .br .EX RISING_EDGE 0 .br FALLING_EDGE 1 .br EITHER_EDGE. 2 .br .EE .br .br .IP "\fBerrnum\fP" 0 A negative number indicating a function call failed and the nature of the error. .br .br .IP "\fBf\fP" 0 A function. .br .br .IP "\fBfrequency\fP: >=0" 0 The number of times a GPIO is swiched on and off per second. This can be set per GPIO and may be as little as 5Hz or as much as 40KHz. The GPIO will be on for a proportion of the time as defined by its dutycycle. .br .br .br .br .IP "\fBgpio\fP" 0 A Broadcom numbered GPIO, in the range 0-53. .br .br There are 54 General Purpose Input Outputs (GPIO) named gpio0 through gpio53. .br .br They are split into two banks. Bank 1 consists of gpio0 through gpio31. Bank 2 consists of gpio32 through gpio53. .br .br All the GPIO which are safe for the user to read and write are in bank 1. Not all GPIO in bank 1 are safe though. Type 1 boards have 17 safe GPIO. Type 2 boards have 21. Type 3 boards have 26. .br .br See \fBget_hardware_revision\fP. .br .br The user GPIO are marked with an X in the following table. .br .br .EX 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 .br Type 1 X X - - X - - X X X X X - - X X .br Type 2 - - X X X - - X X X X X - - X X .br Type 3 X X X X X X X X X X X X X X .br .br 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 .br Type 1 - X X - - X X X X X - - - - - - .br Type 2 - X X - - - X X X X - X X X X X .br Type 3 X X X X X X X X X X X X - - - - .br .EE .br .br .IP "\fBgpioPulse_t\fP" 0 .EX typedef struct .br { .br uint32_t gpioOn; .br uint32_t gpioOff; .br uint32_t usDelay; .br } gpioPulse_t; .br .EE .br .br .IP "\fBgpioThreadFunc_t\fP" 0 .EX typedef void *(gpioThreadFunc_t) (void *); .br .EE .br .br .IP "\fBhandle\fP: >=0" 0 A number referencing an object opened by one of \fBi2c_open\fP, \fBnotify_open\fP, \fBserial_open\fP, and \fBspi_open\fP. .br .br .IP "\fBi2c_addr\fP: 0-0x7F" 0 The address of a device on the I2C bus. .br .br .IP "\fBi2c_bus\fP: >=0" 0 An I2C bus number. .br .br .IP "\fBi2c_flags\fP: 0" 0 Flags which modify an I2C open command. None are currently defined. .br .br .IP "\fBi2c_reg\fP: 0-255" 0 A register of an I2C device. .br .br .IP "\fB*inBuf\fP" 0 A buffer used to pass data to a function. .br .br .IP "\fBinLen\fP" 0 The number of bytes of data in a buffer. .br .br .IP "\fBint\fP" 0 A whole number, negative or positive. .br .br .IP "\fBinvert\fP" 0 A flag used to set normal or inverted bit bang serial data level logic. .br .br .IP "\fBlevel\fP" 0 The level of a GPIO. Low or High. .br .br .EX PI_OFF 0 .br PI_ON 1 .br .br PI_CLEAR 0 .br PI_SET 1 .br .br PI_LOW 0 .br PI_HIGH 1 .br .EE .br .br There is one exception. If a watchdog expires on a GPIO the level will be reported as PI_TIMEOUT. See \fBset_watchdog\fP. .br .br .EX PI_TIMEOUT 2 .br .EE .br .br .IP "\fBmode\fP: 0-7" 0 The operational mode of a GPIO, normally INPUT or OUTPUT. .br .br .EX PI_INPUT 0 .br PI_OUTPUT 1 .br PI_ALT0 4 .br PI_ALT1 5 .br PI_ALT2 6 .br PI_ALT3 7 .br PI_ALT4 3 .br PI_ALT5 2 .br .EE .br .br .IP "\fBnumBytes\fP" 0 The number of bytes used to store characters in a string. Depending on the number of bits per character there may be 1, 2, or 4 bytes per character. .br .br .IP "\fBnumPar\fP: 0-10" 0 The number of parameters passed to a script. .br .br .IP "\fBnumPulses\fP" 0 The number of pulses to be added to a waveform. .br .br .IP "\fBoffset\fP" 0 The associated data starts this number of microseconds from the start of the waveform. .br .br .IP "\fB*outBuf\fP" 0 A buffer used to return data from a function. .br .br .IP "\fBoutLen\fP" 0 The size in bytes of an output buffer. .br .br .IP "\fB*param\fP" 0 An array of script parameters. .br .br .IP "\fB*portStr\fP" 0 A string specifying the port address used by the Pi running the pigpio daemon. It may be NULL in which case "8888" is used unless overridden by the PIGPIO_PORT environment variable. .br .br .IP "\fB*pth\fP" 0 A thread identifier, returned by \fBstart_thread\fP. .br .br .br .br .IP "\fBpthread_t\fP" 0 A thread identifier. .br .br .IP "\fBpud\fP: 0-2" 0 The setting of the pull up/down resistor for a GPIO, which may be off, pull-up, or pull-down. .EX PI_PUD_OFF 0 .br PI_PUD_DOWN 1 .br PI_PUD_UP 2 .br .EE .br .br .IP "\fBpulseLen\fP" 0 1-100, the length of a trigger pulse in microseconds. .br .br .IP "\fB*pulses\fP" 0 An array of pulses to be added to a waveform. .br .br .IP "\fBpulsewidth\fP: 0, 500-2500" 0 .EX PI_SERVO_OFF 0 .br PI_MIN_SERVO_PULSEWIDTH 500 .br PI_MAX_SERVO_PULSEWIDTH 2500 .br .EE .br .br .IP "\fBPWMduty\fP: 0-1000000 (1M)" 0 The hardware PWM dutycycle. .br .br .EX #define PI_HW_PWM_RANGE 1000000 .br .EE .br .br .IP "\fBPWMfreq\fP: 1-125000000 (125M)" 0 The hardware PWM frequency. .br .br .EX #define PI_HW_PWM_MIN_FREQ 1 .br #define PI_HW_PWM_MAX_FREQ 125000000 .br .EE .br .br .IP "\fBrange\fP: 25-40000" 0 The permissible dutycycle values are 0-range. .EX PI_MIN_DUTYCYCLE_RANGE 25 .br PI_MAX_DUTYCYCLE_RANGE 40000 .br .EE .br .br .IP "\fB*retBuf\fP" 0 A buffer to hold a number of bytes returned to a used customised function, .br .br .IP "\fBretMax\fP" 0 The maximum number of bytes a user customised function should return. .br .br .br .br .IP "\fB*rxBuf\fP" 0 A pointer to a buffer to receive data. .br .br .IP "\fBSCL\fP" 0 The user GPIO to use for the clock when bit banging I2C. .br .br .IP "\fB*script\fP" 0 A pointer to the text of a script. .br .br .IP "\fBscript_id\fP" 0 An id of a stored script as returned by \fBstore_script\fP. .br .br .IP "\fBSDA\fP" 0 The user GPIO to use for data when bit banging I2C. .br .br .IP "\fBseconds\fP" 0 The number of seconds. .br .br .IP "\fBser_flags\fP" 0 Flags which modify a serial open command. None are currently defined. .br .br .IP "\fB*ser_tty\fP" 0 The name of a serial tty device, e.g. /dev/ttyAMA0, /dev/ttyUSB0, /dev/tty1. .br .br .IP "\fBsize_t\fP" 0 A standard type used to indicate the size of an object in bytes. .br .br .IP "\fBspi_channel\fP" 0 A SPI channel, 0-2. .br .br .IP "\fBspi_flags\fP" 0 See \fBspi_open\fP. .br .br .IP "\fBsteady\fP: 0-300000" 0 .br .br The number of microseconds level changes must be stable for before reporting the level changed (\fBset_glitch_filter\fP) or triggering the active part of a noise filter (\fBset_noise_filter\fP). .br .br .IP "\fBstop_bits\fP: 2-8" 0 The number of (half) stop bits to be used when adding serial data to a waveform. .br .br .EX #define PI_MIN_WAVE_HALFSTOPBITS 2 .br #define PI_MAX_WAVE_HALFSTOPBITS 8 .br .EE .br .br .IP "\fB*str\fP" 0 An array of characters. .br .br .IP "\fBthread_func\fP" 0 A function of type gpioThreadFunc_t used as the main function of a thread. .br .br .IP "\fBtimeout\fP" 0 A GPIO watchdog timeout in milliseconds. .EX PI_MIN_WDOG_TIMEOUT 0 .br PI_MAX_WDOG_TIMEOUT 60000 .br .EE .br .br .IP "\fB*txBuf\fP" 0 An array of bytes to transmit. .br .br .IP "\fBuint32_t\fP: 0-0-4,294,967,295 (Hex 0x0-0xFFFFFFFF)" 0 A 32-bit unsigned value. .br .br .IP "\fBunsigned\fP" 0 A whole number >= 0. .br .br .IP "\fBuser_gpio\fP" 0 0-31, a Broadcom numbered GPIO. .br .br See \fBgpio\fP. .br .br .IP "\fB*userdata\fP" 0 A pointer to arbitrary user data. This may be used to identify the instance. .br .br .IP "\fBvoid\fP" 0 Denoting no parameter is required .br .br .IP "\fBwave_add_*\fP" 0 One of \fBwave_add_new\fP, \fBwave_add_generic\fP, \fBwave_add_serial\fP. .br .br .IP "\fBwave_id\fP" 0 A number representing a waveform created by \fBwave_create\fP. .br .br .IP "\fBwave_send_*\fP" 0 One of \fBwave_send_once\fP, \fBwave_send_repeat\fP. .br .br .IP "\fBwVal\fP: 0-65535 (Hex 0x0-0xFFFF, Octal 0-0177777)" 0 A 16-bit word value. .br .br .SH pigpiod_if Error Codes .EX .br typedef enum .br { .br pigif_bad_send = -2000, .br pigif_bad_recv = -2001, .br pigif_bad_getaddrinfo = -2002, .br pigif_bad_connect = -2003, .br pigif_bad_socket = -2004, .br pigif_bad_noib = -2005, .br pigif_duplicate_callback = -2006, .br pigif_bad_malloc = -2007, .br pigif_bad_callback = -2008, .br pigif_notify_failed = -2009, .br pigif_callback_not_found = -2010, .br } pigifError_t; .br .br .EE .SH SEE ALSO pigpiod(1), pig2vcd(1), pigs(1), pigpio(3), pigpiod_if2(3) .SH AUTHOR joan@abyz.me.uk pigpio-78/pigpiod_if.c000066400000000000000000001006251373465704200150750ustar00rootroot00000000000000/* This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to */ /* PIGPIOD_IF_VERSION 27 */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "pigpio.h" #include "command.h" #include "pigpiod_if.h" #define PISCOPE_MAX_REPORTS_PER_READ 4096 #define STACK_SIZE (256*1024) typedef void (*CBF_t) (); struct callback_s { int id; int gpio; int edge; CBF_t f; void * user; int ex; callback_t *prev; callback_t *next; }; /* GLOBALS ---------------------------------------------------------------- */ static gpioReport_t gReport[PISCOPE_MAX_REPORTS_PER_READ]; static int gPigCommand = -1; static int gPigHandle = -1; static int gPigNotify = -1; static uint32_t gNotifyBits; static uint32_t gLastLevel; callback_t *gCallBackFirst = 0; callback_t *gCallBackLast = 0; static int gPigStarted = 0; static pthread_t *pthNotify; static pthread_mutex_t command_mutex = PTHREAD_MUTEX_INITIALIZER; /* PRIVATE ---------------------------------------------------------------- */ static int pigpio_command(int fd, int command, int p1, int p2, int rl) { cmdCmd_t cmd; cmd.cmd = command; cmd.p1 = p1; cmd.p2 = p2; cmd.res = 0; pthread_mutex_lock(&command_mutex); if (send(fd, &cmd, sizeof(cmd), 0) != sizeof(cmd)) { pthread_mutex_unlock(&command_mutex); return pigif_bad_send; } if (recv(fd, &cmd, sizeof(cmd), MSG_WAITALL) != sizeof(cmd)) { pthread_mutex_unlock(&command_mutex); return pigif_bad_recv; } if (rl) pthread_mutex_unlock(&command_mutex); return cmd.res; } static int pigpio_command_ext (int fd, int command, int p1, int p2, int p3, int extents, gpioExtent_t *ext, int rl) { int i; cmdCmd_t cmd; cmd.cmd = command; cmd.p1 = p1; cmd.p2 = p2; cmd.p3 = p3; pthread_mutex_lock(&command_mutex); if (send(fd, &cmd, sizeof(cmd), 0) != sizeof(cmd)) { pthread_mutex_unlock(&command_mutex); return pigif_bad_send; } for (i=0; iai_next) { sock = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); if (sock == -1) continue; /* Disable the Nagle algorithm. */ opt = 1; setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char*)&opt, sizeof(int)); if (connect(sock, rp->ai_addr, rp->ai_addrlen) != -1) break; } freeaddrinfo(res); if (rp == NULL) return pigif_bad_connect; return sock; } static void dispatch_notification(gpioReport_t *r) { callback_t *p; uint32_t changed; int l, g; /* printf("s=%d f=%d l=%8X, t=%10u\n", r->seqno, r->flags, r->level, r->tick); */ if (r->flags == 0) { changed = (r->level ^ gLastLevel) & gNotifyBits; gLastLevel = r->level; p = gCallBackFirst; while (p) { if (changed & (1<<(p->gpio))) { if ((r->level) & (1<<(p->gpio))) l = 1; else l = 0; if ((p->edge) ^ l) { if (p->ex) (p->f)(p->gpio, l, r->tick, p->user); else (p->f)(p->gpio, l, r->tick); } } p = p->next; } } else { g = (r->flags) & 31; p = gCallBackFirst; while (p) { if ((p->gpio) == g) { if (p->ex) (p->f)(g, PI_TIMEOUT, r->tick, p->user); else (p->f)(g, PI_TIMEOUT, r->tick); } p = p->next; } } } static void *pthNotifyThread(void *x) { static int got = 0; int bytes, r; while (1) { bytes = read(gPigNotify, (char*)&gReport+got, sizeof(gReport)-got); if (bytes > 0) got += bytes; else break; r = 0; while (got >= sizeof(gpioReport_t)) { dispatch_notification(&gReport[r]); r++; got -= sizeof(gpioReport_t); } /* copy any partial report to start of array */ if (got && r) gReport[0] = gReport[r]; } return 0; } static void findNotifyBits(void) { callback_t *p; uint32_t bits = 0; p = gCallBackFirst; while (p) { bits |= (1<<(p->gpio)); p = p->next; } if (bits != gNotifyBits) { gNotifyBits = bits; pigpio_command(gPigCommand, PI_CMD_NB, gPigHandle, gNotifyBits, 1); } } static void _wfe(unsigned user_gpio, unsigned level, uint32_t tick, void *user) { *(int *)user = 1; } static int intCallback(unsigned user_gpio, unsigned edge, void *f, void *user, int ex) { static int id = 0; callback_t *p; if ((user_gpio >=0) && (user_gpio < 32) && (edge >=0) && (edge <= 2) && f) { /* prevent duplicates */ p = gCallBackFirst; while (p) { if ((p->gpio == user_gpio) && (p->edge == edge) && (p->f == f)) { return pigif_duplicate_callback; } p = p->next; } p = malloc(sizeof(callback_t)); if (p) { if (!gCallBackFirst) gCallBackFirst = p; p->id = id++; p->gpio = user_gpio; p->edge = edge; p->f = f; p->user = user; p->ex = ex; p->next = 0; p->prev = gCallBackLast; if (p->prev) (p->prev)->next = p; gCallBackLast = p; findNotifyBits(); return p->id; } return pigif_bad_malloc; } return pigif_bad_callback; } /* PUBLIC ----------------------------------------------------------------- */ double time_time(void) { struct timeval tv; double t; gettimeofday(&tv, 0); t = (double)tv.tv_sec + ((double)tv.tv_usec / 1E6); return t; } void time_sleep(double seconds) { struct timespec ts, rem; if (seconds > 0.0) { ts.tv_sec = seconds; ts.tv_nsec = (seconds-(double)ts.tv_sec) * 1E9; while (clock_nanosleep(CLOCK_REALTIME, 0, &ts, &rem)) { /* copy remaining time to ts */ ts.tv_sec = rem.tv_sec; ts.tv_nsec = rem.tv_nsec; } } } char *pigpio_error(int errnum) { if (errnum > -1000) return cmdErrStr(errnum); else { switch(errnum) { case pigif_bad_send: return "failed to send to pigpiod"; case pigif_bad_recv: return "failed to receive from pigpiod"; case pigif_bad_getaddrinfo: return "failed to find address of pigpiod"; case pigif_bad_connect: return "failed to connect to pigpiod"; case pigif_bad_socket: return "failed to create socket"; case pigif_bad_noib: return "failed to open noib"; case pigif_duplicate_callback: return "identical callback exists"; case pigif_bad_malloc: return "failed to malloc"; case pigif_bad_callback: return "bad callback parameter"; case pigif_notify_failed: return "failed to create notification thread"; case pigif_callback_not_found: return "callback not found"; default: return "unknown error"; } } } unsigned pigpiod_if_version(void) { return PIGPIOD_IF_VERSION; } pthread_t *start_thread(gpioThreadFunc_t thread_func, void *arg) { pthread_t *pth; pthread_attr_t pthAttr; pth = malloc(sizeof(pthread_t)); if (pth) { if (pthread_attr_init(&pthAttr)) { perror("pthread_attr_init failed"); free(pth); return NULL; } if (pthread_attr_setstacksize(&pthAttr, STACK_SIZE)) { perror("pthread_attr_setstacksize failed"); free(pth); return NULL; } if (pthread_create(pth, &pthAttr, thread_func, arg)) { perror("pthread_create socket failed"); free(pth); return NULL; } } return pth; } void stop_thread(pthread_t *pth) { if (pth) { pthread_cancel(*pth); pthread_join(*pth, NULL); free(pth); } } int pigpio_start(char *addrStr, char *portStr) { if ((!addrStr) || (strlen(addrStr) == 0)) { addrStr = "localhost"; } if (!gPigStarted) { gPigCommand = pigpioOpenSocket(addrStr, portStr); if (gPigCommand >= 0) { gPigNotify = pigpioOpenSocket(addrStr, portStr); if (gPigNotify >= 0) { gPigHandle = pigpio_command(gPigNotify, PI_CMD_NOIB, 0, 0, 1); if (gPigHandle < 0) return pigif_bad_noib; else { gLastLevel = read_bank_1(); pthNotify = start_thread(pthNotifyThread, 0); if (pthNotify) { gPigStarted = 1; return 0; } else return pigif_notify_failed; } } else return gPigNotify; } else return gPigCommand; } return 0; } void pigpio_stop(void) { gPigStarted = 0; if (pthNotify) { stop_thread(pthNotify); pthNotify = 0; } if (gPigNotify >= 0) { if (gPigHandle >= 0) { pigpio_command(gPigNotify, PI_CMD_NC, gPigHandle, 0, 1); gPigHandle = -1; } close(gPigNotify); gPigNotify = -1; } if (gPigCommand >= 0) { if (gPigHandle >= 0) { pigpio_command(gPigCommand, PI_CMD_NC, gPigHandle, 0, 1); gPigHandle = -1; } close(gPigCommand); gPigCommand = -1; } } int set_mode(unsigned gpio, unsigned mode) {return pigpio_command(gPigCommand, PI_CMD_MODES, gpio, mode, 1);} int get_mode(unsigned gpio) {return pigpio_command(gPigCommand, PI_CMD_MODEG, gpio, 0, 1);} int set_pull_up_down(unsigned gpio, unsigned pud) {return pigpio_command(gPigCommand, PI_CMD_PUD, gpio, pud, 1);} int gpio_read(unsigned gpio) {return pigpio_command(gPigCommand, PI_CMD_READ, gpio, 0, 1);} int gpio_write(unsigned gpio, unsigned level) {return pigpio_command(gPigCommand, PI_CMD_WRITE, gpio, level, 1);} int set_PWM_dutycycle(unsigned user_gpio, unsigned dutycycle) {return pigpio_command(gPigCommand, PI_CMD_PWM, user_gpio, dutycycle, 1);} int get_PWM_dutycycle(unsigned user_gpio) {return pigpio_command(gPigCommand, PI_CMD_GDC, user_gpio, 0, 1);} int set_PWM_range(unsigned user_gpio, unsigned range) {return pigpio_command(gPigCommand, PI_CMD_PRS, user_gpio, range, 1);} int get_PWM_range(unsigned user_gpio) {return pigpio_command(gPigCommand, PI_CMD_PRG, user_gpio, 0, 1);} int get_PWM_real_range(unsigned user_gpio) {return pigpio_command(gPigCommand, PI_CMD_PRRG, user_gpio, 0, 1);} int set_PWM_frequency(unsigned user_gpio, unsigned frequency) {return pigpio_command(gPigCommand, PI_CMD_PFS, user_gpio, frequency, 1);} int get_PWM_frequency(unsigned user_gpio) {return pigpio_command(gPigCommand, PI_CMD_PFG, user_gpio, 0, 1);} int set_servo_pulsewidth(unsigned user_gpio, unsigned pulsewidth) {return pigpio_command(gPigCommand, PI_CMD_SERVO, user_gpio, pulsewidth, 1);} int get_servo_pulsewidth(unsigned user_gpio) {return pigpio_command(gPigCommand, PI_CMD_GPW, user_gpio, 0, 1);} int notify_open(void) {return pigpio_command(gPigCommand, PI_CMD_NO, 0, 0, 1);} int notify_begin(unsigned handle, uint32_t bits) {return pigpio_command(gPigCommand, PI_CMD_NB, handle, bits, 1);} int notify_pause(unsigned handle) {return pigpio_command(gPigCommand, PI_CMD_NB, handle, 0, 1);} int notify_close(unsigned handle) {return pigpio_command(gPigCommand, PI_CMD_NC, handle, 0, 1);} int set_watchdog(unsigned user_gpio, unsigned timeout) {return pigpio_command(gPigCommand, PI_CMD_WDOG, user_gpio, timeout, 1);} uint32_t read_bank_1(void) {return pigpio_command(gPigCommand, PI_CMD_BR1, 0, 0, 1);} uint32_t read_bank_2(void) {return pigpio_command(gPigCommand, PI_CMD_BR2, 0, 0, 1);} int clear_bank_1(uint32_t levels) {return pigpio_command(gPigCommand, PI_CMD_BC1, levels, 0, 1);} int clear_bank_2(uint32_t levels) {return pigpio_command(gPigCommand, PI_CMD_BC2, levels, 0, 1);} int set_bank_1(uint32_t levels) {return pigpio_command(gPigCommand, PI_CMD_BS1, levels, 0, 1);} int set_bank_2(uint32_t levels) {return pigpio_command(gPigCommand, PI_CMD_BS2, levels, 0, 1);} int hardware_clock(unsigned gpio, unsigned frequency) {return pigpio_command(gPigCommand, PI_CMD_HC, gpio, frequency, 1);} int hardware_PWM(unsigned gpio, unsigned frequency, uint32_t dutycycle) { gpioExtent_t ext[1]; /* p1=gpio p2=frequency p3=4 ## extension ## uint32_t dutycycle */ ext[0].size = sizeof(dutycycle); ext[0].ptr = &dutycycle; return pigpio_command_ext( gPigCommand, PI_CMD_HP, gpio, frequency, sizeof(dutycycle), 1, ext, 1); } uint32_t get_current_tick(void) {return pigpio_command(gPigCommand, PI_CMD_TICK, 0, 0, 1);} uint32_t get_hardware_revision(void) {return pigpio_command(gPigCommand, PI_CMD_HWVER, 0, 0, 1);} uint32_t get_pigpio_version(void) {return pigpio_command(gPigCommand, PI_CMD_PIGPV, 0, 0, 1);} int wave_clear(void) {return pigpio_command(gPigCommand, PI_CMD_WVCLR, 0, 0, 1);} int wave_add_new(void) {return pigpio_command(gPigCommand, PI_CMD_WVNEW, 0, 0, 1);} int wave_add_generic(unsigned numPulses, gpioPulse_t *pulses) { gpioExtent_t ext[1]; /* p1=0 p2=0 p3=pulses*sizeof(gpioPulse_t) ## extension ## gpioPulse_t[] pulses */ if (!numPulses) return 0; ext[0].size = numPulses * sizeof(gpioPulse_t); ext[0].ptr = pulses; return pigpio_command_ext( gPigCommand, PI_CMD_WVAG, 0, 0, ext[0].size, 1, ext, 1); } int wave_add_serial( unsigned user_gpio, unsigned baud, uint32_t databits, uint32_t stophalfbits, uint32_t offset, unsigned numChar, char *str) { uint8_t buf[12]; gpioExtent_t ext[2]; /* p1=user_gpio p2=baud p3=len+12 ## extension ## uint32_t databits uint32_t stophalfbits uint32_t offset char[len] str */ if (!numChar) return 0; memcpy(buf, &databits, 4); memcpy(buf+4, &stophalfbits, 4); memcpy(buf+8, &offset, 4); ext[0].size = sizeof(buf); ext[0].ptr = buf; ext[1].size = numChar; ext[1].ptr = str; return pigpio_command_ext(gPigCommand, PI_CMD_WVAS, user_gpio, baud, numChar+sizeof(buf), 2, ext, 1); } int wave_create(void) {return pigpio_command(gPigCommand, PI_CMD_WVCRE, 0, 0, 1);} int wave_delete(unsigned wave_id) {return pigpio_command(gPigCommand, PI_CMD_WVDEL, wave_id, 0, 1);} int wave_tx_start(void) /* DEPRECATED */ {return pigpio_command(gPigCommand, PI_CMD_WVGO, 0, 0, 1);} int wave_tx_repeat(void) /* DEPRECATED */ {return pigpio_command(gPigCommand, PI_CMD_WVGOR, 0, 0, 1);} int wave_send_once(unsigned wave_id) {return pigpio_command(gPigCommand, PI_CMD_WVTX, wave_id, 0, 1);} int wave_send_repeat(unsigned wave_id) {return pigpio_command(gPigCommand, PI_CMD_WVTXR, wave_id, 0, 1);} int wave_chain(char *buf, unsigned bufSize) { gpioExtent_t ext[1]; /* p1=0 p2=0 p3=bufSize ## extension ## char buf[bufSize] */ ext[0].size = bufSize; ext[0].ptr = buf; return pigpio_command_ext (gPigCommand, PI_CMD_WVCHA, 0, 0, bufSize, 1, ext, 1); } int wave_tx_busy(void) {return pigpio_command(gPigCommand, PI_CMD_WVBSY, 0, 0, 1);} int wave_tx_stop(void) {return pigpio_command(gPigCommand, PI_CMD_WVHLT, 0, 0, 1);} int wave_get_micros(void) {return pigpio_command(gPigCommand, PI_CMD_WVSM, 0, 0, 1);} int wave_get_high_micros(void) {return pigpio_command(gPigCommand, PI_CMD_WVSM, 1, 0, 1);} int wave_get_max_micros(void) {return pigpio_command(gPigCommand, PI_CMD_WVSM, 2, 0, 1);} int wave_get_pulses(void) {return pigpio_command(gPigCommand, PI_CMD_WVSP, 0, 0, 1);} int wave_get_high_pulses(void) {return pigpio_command(gPigCommand, PI_CMD_WVSP, 1, 0, 1);} int wave_get_max_pulses(void) {return pigpio_command(gPigCommand, PI_CMD_WVSP, 2, 0, 1);} int wave_get_cbs(void) {return pigpio_command(gPigCommand, PI_CMD_WVSC, 0, 0, 1);} int wave_get_high_cbs(void) {return pigpio_command(gPigCommand, PI_CMD_WVSC, 1, 0, 1);} int wave_get_max_cbs(void) {return pigpio_command(gPigCommand, PI_CMD_WVSC, 2, 0, 1);} int gpio_trigger(unsigned user_gpio, unsigned pulseLen, uint32_t level) { gpioExtent_t ext[1]; /* p1=user_gpio p2=pulseLen p3=4 ## extension ## unsigned level */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &level; return pigpio_command_ext( gPigCommand, PI_CMD_TRIG, user_gpio, pulseLen, 4, 1, ext, 1); } int set_glitch_filter(unsigned user_gpio, unsigned steady) {return pigpio_command(gPigCommand, PI_CMD_FG, user_gpio, steady, 1);} int set_noise_filter(unsigned user_gpio, unsigned steady, unsigned active) { gpioExtent_t ext[1]; /* p1=user_gpio p2=steady p3=4 ## extension ## unsigned active */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &active; return pigpio_command_ext( gPigCommand, PI_CMD_FN, user_gpio, steady, 4, 1, ext, 1); } int store_script(char *script) { unsigned len; gpioExtent_t ext[1]; /* p1=0 p2=0 p3=len ## extension ## char[len] script */ len = strlen(script); if (!len) return 0; ext[0].size = len; ext[0].ptr = script; return pigpio_command_ext(gPigCommand, PI_CMD_PROC, 0, 0, len, 1, ext, 1); } int run_script(unsigned script_id, unsigned numPar, uint32_t *param) { gpioExtent_t ext[1]; /* p1=script id p2=0 p3=numPar * 4 ## extension ## uint32_t[numPar] pars */ ext[0].size = 4 * numPar; ext[0].ptr = param; return pigpio_command_ext (gPigCommand, PI_CMD_PROCR, script_id, 0, numPar*4, 1, ext, 1); } int recvMax(void *buf, int bufsize, int sent) { uint8_t scratch[4096]; int remaining, fetch, count; if (sent < bufsize) count = sent; else count = bufsize; if (count) recv(gPigCommand, buf, count, MSG_WAITALL); remaining = sent - count; while (remaining) { fetch = remaining; if (fetch > sizeof(scratch)) fetch = sizeof(scratch); recv(gPigCommand, scratch, fetch, MSG_WAITALL); remaining -= fetch; } return count; } int script_status(unsigned script_id, uint32_t *param) { int status; uint32_t p[PI_MAX_SCRIPT_PARAMS+1]; /* space for script status */ status = pigpio_command(gPigCommand, PI_CMD_PROCP, script_id, 0, 0); if (status > 0) { recvMax(p, sizeof(p), status); status = p[0]; if (param) memcpy(param, p+1, sizeof(p)-4); } pthread_mutex_unlock(&command_mutex); return status; } int stop_script(unsigned script_id) {return pigpio_command(gPigCommand, PI_CMD_PROCS, script_id, 0, 1);} int delete_script(unsigned script_id) {return pigpio_command(gPigCommand, PI_CMD_PROCD, script_id, 0, 1);} int bb_serial_read_open(unsigned user_gpio, unsigned baud, uint32_t bbBits) { gpioExtent_t ext[1]; /* p1=user_gpio p2=baud p3=4 ## extension ## unsigned bbBits */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &bbBits; return pigpio_command_ext( gPigCommand, PI_CMD_SLRO, user_gpio, baud, 4, 1, ext, 1); } int bb_serial_read(unsigned user_gpio, void *buf, size_t bufSize) { int bytes; bytes = pigpio_command(gPigCommand, PI_CMD_SLR, user_gpio, bufSize, 0); if (bytes > 0) { bytes = recvMax(buf, bufSize, bytes); } pthread_mutex_unlock(&command_mutex); return bytes; } int bb_serial_read_close(unsigned user_gpio) {return pigpio_command(gPigCommand, PI_CMD_SLRC, user_gpio, 0, 1);} int bb_serial_invert(unsigned user_gpio, unsigned invert) {return pigpio_command(gPigCommand, PI_CMD_SLRI, user_gpio, invert, 1);} int i2c_open(unsigned i2c_bus, unsigned i2c_addr, uint32_t i2c_flags) { gpioExtent_t ext[1]; /* p1=i2c_bus p2=i2c_addr p3=4 ## extension ## uint32_t i2c_flags */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &i2c_flags; return pigpio_command_ext (gPigCommand, PI_CMD_I2CO, i2c_bus, i2c_addr, 4, 1, ext, 1); } int i2c_close(unsigned handle) {return pigpio_command(gPigCommand, PI_CMD_I2CC, handle, 0, 1);} int i2c_write_quick(unsigned handle, unsigned bit) {return pigpio_command(gPigCommand, PI_CMD_I2CWQ, handle, bit, 1);} int i2c_write_byte(unsigned handle, unsigned val) {return pigpio_command(gPigCommand, PI_CMD_I2CWS, handle, val, 1);} int i2c_read_byte(unsigned handle) {return pigpio_command(gPigCommand, PI_CMD_I2CRS, handle, 0, 1);} int i2c_write_byte_data(unsigned handle, unsigned reg, uint32_t val) { gpioExtent_t ext[1]; /* p1=handle p2=reg p3=4 ## extension ## uint32_t val */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &val; return pigpio_command_ext (gPigCommand, PI_CMD_I2CWB, handle, reg, 4, 1, ext, 1); } int i2c_write_word_data(unsigned handle, unsigned reg, uint32_t val) { gpioExtent_t ext[1]; /* p1=handle p2=reg p3=4 ## extension ## uint32_t val */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &val; return pigpio_command_ext (gPigCommand, PI_CMD_I2CWW, handle, reg, 4, 1, ext, 1); } int i2c_read_byte_data(unsigned handle, unsigned reg) {return pigpio_command(gPigCommand, PI_CMD_I2CRB, handle, reg, 1);} int i2c_read_word_data(unsigned handle, unsigned reg) {return pigpio_command(gPigCommand, PI_CMD_I2CRW, handle, reg, 1);} int i2c_process_call(unsigned handle, unsigned reg, uint32_t val) { gpioExtent_t ext[1]; /* p1=handle p2=reg p3=4 ## extension ## uint32_t val */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &val; return pigpio_command_ext (gPigCommand, PI_CMD_I2CPC, handle, reg, 4, 1, ext, 1); } int i2c_write_block_data( unsigned handle, unsigned reg, char *buf, unsigned count) { gpioExtent_t ext[1]; /* p1=handle p2=reg p3=count ## extension ## char buf[count] */ ext[0].size = count; ext[0].ptr = buf; return pigpio_command_ext (gPigCommand, PI_CMD_I2CWK, handle, reg, count, 1, ext, 1); } int i2c_read_block_data(unsigned handle, unsigned reg, char *buf) { int bytes; bytes = pigpio_command(gPigCommand, PI_CMD_I2CRK, handle, reg, 0); if (bytes > 0) { bytes = recvMax(buf, 32, bytes); } pthread_mutex_unlock(&command_mutex); return bytes; } int i2c_block_process_call( unsigned handle, unsigned reg, char *buf, unsigned count) { int bytes; gpioExtent_t ext[1]; /* p1=handle p2=reg p3=count ## extension ## char buf[count] */ ext[0].size = count; ext[0].ptr = buf; bytes = pigpio_command_ext (gPigCommand, PI_CMD_I2CPK, handle, reg, count, 1, ext, 0); if (bytes > 0) { bytes = recvMax(buf, 32, bytes); } pthread_mutex_unlock(&command_mutex); return bytes; } int i2c_read_i2c_block_data( unsigned handle, unsigned reg, char *buf, uint32_t count) { int bytes; gpioExtent_t ext[1]; /* p1=handle p2=reg p3=4 ## extension ## uint32_t count */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &count; bytes = pigpio_command_ext (gPigCommand, PI_CMD_I2CRI, handle, reg, 4, 1, ext, 0); if (bytes > 0) { bytes = recvMax(buf, count, bytes); } pthread_mutex_unlock(&command_mutex); return bytes; } int i2c_write_i2c_block_data( unsigned handle, unsigned reg, char *buf, unsigned count) { gpioExtent_t ext[1]; /* p1=handle p2=reg p3=count ## extension ## char buf[count] */ ext[0].size = count; ext[0].ptr = buf; return pigpio_command_ext (gPigCommand, PI_CMD_I2CWI, handle, reg, count, 1, ext, 1); } int i2c_read_device(unsigned handle, char *buf, unsigned count) { int bytes; bytes = pigpio_command(gPigCommand, PI_CMD_I2CRD, handle, count, 0); if (bytes > 0) { bytes = recvMax(buf, count, bytes); } pthread_mutex_unlock(&command_mutex); return bytes; } int i2c_write_device(unsigned handle, char *buf, unsigned count) { gpioExtent_t ext[1]; /* p1=handle p2=0 p3=count ## extension ## char buf[count] */ ext[0].size = count; ext[0].ptr = buf; return pigpio_command_ext (gPigCommand, PI_CMD_I2CWD, handle, 0, count, 1, ext, 1); } int i2c_zip( unsigned handle, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen) { int bytes; gpioExtent_t ext[1]; /* p1=handle p2=0 p3=inLen ## extension ## char inBuf[inLen] */ ext[0].size = inLen; ext[0].ptr = inBuf; bytes = pigpio_command_ext (gPigCommand, PI_CMD_I2CZ, handle, 0, inLen, 1, ext, 0); if (bytes > 0) { bytes = recvMax(outBuf, outLen, bytes); } pthread_mutex_unlock(&command_mutex); return bytes; } int bb_i2c_open(unsigned SDA, unsigned SCL, unsigned baud) { gpioExtent_t ext[1]; /* p1=SDA p2=SCL p3=4 ## extension ## uint32_t baud */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &baud; return pigpio_command_ext (gPigCommand, PI_CMD_BI2CO, SDA, SCL, 4, 1, ext, 1); } int bb_i2c_close(unsigned SDA) {return pigpio_command(gPigCommand, PI_CMD_BI2CC, SDA, 0, 1);} int bb_i2c_zip( unsigned SDA, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen) { int bytes; gpioExtent_t ext[1]; /* p1=SDA p2=0 p3=inLen ## extension ## char inBuf[inLen] */ ext[0].size = inLen; ext[0].ptr = inBuf; bytes = pigpio_command_ext (gPigCommand, PI_CMD_BI2CZ, SDA, 0, inLen, 1, ext, 0); if (bytes > 0) { bytes = recvMax(outBuf, outLen, bytes); } pthread_mutex_unlock(&command_mutex); return bytes; } int spi_open(unsigned channel, unsigned speed, uint32_t flags) { gpioExtent_t ext[1]; /* p1=channel p2=speed p3=4 ## extension ## uint32_t flags */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &flags; return pigpio_command_ext (gPigCommand, PI_CMD_SPIO, channel, speed, 4, 1, ext, 1); } int spi_close(unsigned handle) {return pigpio_command(gPigCommand, PI_CMD_SPIC, handle, 0, 1);} int spi_read(unsigned handle, char *buf, unsigned count) { int bytes; bytes = pigpio_command (gPigCommand, PI_CMD_SPIR, handle, count, 0); if (bytes > 0) { bytes = recvMax(buf, count, bytes); } pthread_mutex_unlock(&command_mutex); return bytes; } int spi_write(unsigned handle, char *buf, unsigned count) { gpioExtent_t ext[1]; /* p1=handle p2=0 p3=count ## extension ## char buf[count] */ ext[0].size = count; ext[0].ptr = buf; return pigpio_command_ext (gPigCommand, PI_CMD_SPIW, handle, 0, count, 1, ext, 1); } int spi_xfer(unsigned handle, char *txBuf, char *rxBuf, unsigned count) { int bytes; gpioExtent_t ext[1]; /* p1=handle p2=0 p3=count ## extension ## char buf[count] */ ext[0].size = count; ext[0].ptr = txBuf; bytes = pigpio_command_ext (gPigCommand, PI_CMD_SPIX, handle, 0, count, 1, ext, 0); if (bytes > 0) { bytes = recvMax(rxBuf, count, bytes); } pthread_mutex_unlock(&command_mutex); return bytes; } int serial_open(char *dev, unsigned baud, unsigned flags) { int len; gpioExtent_t ext[1]; len = strlen(dev); /* p1=baud p2=flags p3=len ## extension ## char dev[len] */ ext[0].size = len; ext[0].ptr = dev; return pigpio_command_ext (gPigCommand, PI_CMD_SERO, baud, flags, len, 1, ext, 1); } int serial_close(unsigned handle) {return pigpio_command(gPigCommand, PI_CMD_SERC, handle, 0, 1);} int serial_write_byte(unsigned handle, unsigned val) {return pigpio_command(gPigCommand, PI_CMD_SERWB, handle, val, 1);} int serial_read_byte(unsigned handle) {return pigpio_command(gPigCommand, PI_CMD_SERRB, handle, 0, 1);} int serial_write(unsigned handle, char *buf, unsigned count) { gpioExtent_t ext[1]; /* p1=handle p2=0 p3=count ## extension ## char buf[count] */ ext[0].size = count; ext[0].ptr = buf; return pigpio_command_ext (gPigCommand, PI_CMD_SERW, handle, 0, count, 1, ext, 1); } int serial_read(unsigned handle, char *buf, unsigned count) { int bytes; bytes = pigpio_command (gPigCommand, PI_CMD_SERR, handle, count, 0); if (bytes > 0) { bytes = recvMax(buf, count, bytes); } pthread_mutex_unlock(&command_mutex); return bytes; } int serial_data_available(unsigned handle) {return pigpio_command(gPigCommand, PI_CMD_SERDA, handle, 0, 1);} int custom_1(unsigned arg1, unsigned arg2, char *argx, unsigned count) { gpioExtent_t ext[1]; /* p1=arg1 p2=arg2 p3=count ## extension ## char argx[count] */ ext[0].size = count; ext[0].ptr = argx; return pigpio_command_ext( gPigCommand, PI_CMD_CF1, arg1, arg2, count, 1, ext, 1); } int custom_2(unsigned arg1, char *argx, unsigned count, char *retBuf, uint32_t retMax) { int bytes; gpioExtent_t ext[1]; /* p1=arg1 p2=retMax p3=count ## extension ## char argx[count] */ ext[0].size = count; ext[0].ptr = argx; bytes = pigpio_command_ext (gPigCommand, PI_CMD_CF2, arg1, retMax, count, 1, ext, 0); if (bytes > 0) { bytes = recvMax(retBuf, retMax, bytes); } pthread_mutex_unlock(&command_mutex); return bytes; } int callback(unsigned user_gpio, unsigned edge, CBFunc_t f) {return intCallback(user_gpio, edge, f, 0, 0);} int callback_ex(unsigned user_gpio, unsigned edge, CBFuncEx_t f, void *user) {return intCallback(user_gpio, edge, f, user, 1);} int callback_cancel(unsigned id) { callback_t *p; p = gCallBackFirst; while (p) { if (p->id == id) { if (p->prev) p->prev->next = p->next; else gCallBackFirst = p->next; if (p->next) p->next->prev = p->prev; else gCallBackLast = p->prev; free(p); findNotifyBits(); return 0; } p = p->next; } return pigif_callback_not_found; } int wait_for_edge(unsigned user_gpio, unsigned edge, double timeout) { int triggered = 0; int id; double due; if (timeout <= 0.0) return 0; due = time_time() + timeout; id = callback_ex(user_gpio, edge, _wfe, &triggered); while (!triggered && (time_time() < due)) time_sleep(0.1); callback_cancel(id); return triggered; } pigpio-78/pigpiod_if.h000066400000000000000000002214071373465704200151040ustar00rootroot00000000000000/* This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to */ #ifndef PIGPIOD_IF_H #define PIGPIOD_IF_H #include "pigpio.h" #define PIGPIOD_IF_VERSION 28 /*TEXT THIS LIBRARY IS DEPRECATED. NEW CODE SHOULD BE WRITTEN TO USE THE MORE VERSATILE pigpiod_if2 LIBRARY. pigpiod_if is a C library for the Raspberry which allows control of the GPIO via the socket interface to the pigpio daemon. *Features* o hardware timed PWM on any of GPIO 0-31 o hardware timed servo pulses on any of GPIO 0-31 o callbacks when any of GPIO 0-31 change state o callbacks at timed intervals o reading/writing all of the GPIO in a bank as one operation o individually setting GPIO modes, reading and writing o notifications when any of GPIO 0-31 change state o the construction of output waveforms with microsecond timing o rudimentary permission control over GPIO o a simple interface to start and stop new threads o I2C, SPI, and serial link wrappers o creating and running scripts on the pigpio daemon *GPIO* ALL GPIO are identified by their Broadcom number. *Notes* The PWM and servo pulses are timed using the DMA and PWM/PCM peripherals. *Usage* Include in your source files. Assuming your source is in prog.c use the following command to build . . gcc -Wall -pthread -o prog prog.c -lpigpiod_if -lrt . . to run make sure the pigpio daemon is running . . sudo pigpiod ./prog # sudo is not required to run programs linked to pigpiod_if . . For examples see x_pigpiod_if.c within the pigpio archive file. *Notes* All the functions which return an int return < 0 on error TEXT*/ /*OVERVIEW ESSENTIAL pigpio_start Connects to the pigpio daemon pigpio_stop Disconnects from the pigpio daemon BEGINNER set_mode Set a GPIO mode get_mode Get a GPIO mode set_pull_up_down Set/clear GPIO pull up/down resistor gpio_read Read a GPIO gpio_write Write a GPIO set_PWM_dutycycle Start/stop PWM pulses on a GPIO get_PWM_dutycycle Get the PWM dutycycle in use on a GPIO set_servo_pulsewidth Start/stop servo pulses on a GPIO get_servo_pulsewidth Get the servo pulsewidth in use on a GPIO callback Create GPIO level change callback callback_ex Create GPIO level change callback callback_cancel Cancel a callback wait_for_edge Wait for GPIO level change INTERMEDIATE gpio_trigger Send a trigger pulse to a GPIO. set_watchdog Set a watchdog on a GPIO. set_PWM_range Configure PWM range for a GPIO get_PWM_range Get configured PWM range for a GPIO set_PWM_frequency Configure PWM frequency for a GPIO get_PWM_frequency Get configured PWM frequency for a GPIO read_bank_1 Read all GPIO in bank 1 read_bank_2 Read all GPIO in bank 2 clear_bank_1 Clear selected GPIO in bank 1 clear_bank_2 Clear selected GPIO in bank 2 set_bank_1 Set selected GPIO in bank 1 set_bank_2 Set selected GPIO in bank 2 start_thread Start a new thread stop_thread Stop a previously started thread ADVANCED get_PWM_real_range Get underlying PWM range for a GPIO notify_open Request a notification handle notify_begin Start notifications for selected GPIO notify_pause Pause notifications notify_close Close a notification bb_serial_read_open Opens a GPIO for bit bang serial reads bb_serial_read Reads bit bang serial data from a GPIO bb_serial_read_close Closes a GPIO for bit bang serial reads bb_serial_invert Invert serial logic (1 invert, 0 normal) hardware_clock Start hardware clock on supported GPIO hardware_PWM Start hardware PWM on supported GPIO set_glitch_filter Set a glitch filter on a GPIO set_noise_filter Set a noise filter on a GPIO SCRIPTS store_script Store a script run_script Run a stored script script_status Get script status and parameters stop_script Stop a running script delete_script Delete a stored script WAVES wave_clear Deletes all waveforms wave_add_new Starts a new waveform wave_add_generic Adds a series of pulses to the waveform wave_add_serial Adds serial data to the waveform wave_create Creates a waveform from added data wave_delete Deletes one or more waveforms wave_send_once Transmits a waveform once wave_send_repeat Transmits a waveform repeatedly wave_chain Transmits a chain of waveforms wave_tx_busy Checks to see if the waveform has ended wave_tx_stop Aborts the current waveform wave_get_micros Length in microseconds of the current waveform wave_get_high_micros Length of longest waveform so far wave_get_max_micros Absolute maximum allowed micros wave_get_pulses Length in pulses of the current waveform wave_get_high_pulses Length of longest waveform so far wave_get_max_pulses Absolute maximum allowed pulses wave_get_cbs Length in cbs of the current waveform wave_get_high_cbs Length of longest waveform so far wave_get_max_cbs Absolute maximum allowed cbs I2C i2c_open Opens an I2C device i2c_close Closes an I2C device i2c_write_quick smbus write quick i2c_write_byte smbus write byte i2c_read_byte smbus read byte i2c_write_byte_data smbus write byte data i2c_write_word_data smbus write word data i2c_read_byte_data smbus read byte data i2c_read_word_data smbus read word data i2c_process_call smbus process call i2c_write_block_data smbus write block data i2c_read_block_data smbus read block data i2c_block_process_call smbus block process call i2c_write_i2c_block_data smbus write I2C block data i2c_read_i2c_block_data smbus read I2C block data i2c_read_device Reads the raw I2C device i2c_write_device Writes the raw I2C device i2c_zip Performs multiple I2C transactions bb_i2c_open Opens GPIO for bit banging I2C bb_i2c_close Closes GPIO for bit banging I2C bb_i2c_zip Performs multiple bit banged I2C transactions SPI spi_open Opens a SPI device spi_close Closes a SPI device spi_read Reads bytes from a SPI device spi_write Writes bytes to a SPI device spi_xfer Transfers bytes with a SPI device SERIAL serial_open Opens a serial device serial_close Closes a serial device serial_write_byte Writes a byte to a serial device serial_read_byte Reads a byte from a serial device serial_write Writes bytes to a serial device serial_read Reads bytes from a serial device serial_data_available Returns number of bytes ready to be read CUSTOM custom_1 User custom function 1 custom_2 User custom function 2 UTILITIES get_current_tick Get current tick (microseconds) get_hardware_revision Get hardware revision get_pigpio_version Get the pigpio version pigpiod_if_version Get the pigpiod_if version pigpio_error Get a text description of an error code. time_sleep Sleeps for a float number of seconds time_time Float number of seconds since the epoch OVERVIEW*/ #ifdef __cplusplus extern "C" { #endif typedef void (*CBFunc_t) (unsigned user_gpio, unsigned level, uint32_t tick); typedef void (*CBFuncEx_t) (unsigned user_gpio, unsigned level, uint32_t tick, void * user); typedef struct callback_s callback_t; /*F*/ double time_time(void); /*D Return the current time in seconds since the Epoch. D*/ /*F*/ void time_sleep(double seconds); /*D Delay execution for a given number of seconds. . . seconds: the number of seconds to delay. . . D*/ /*F*/ char *pigpio_error(int errnum); /*D Return a text description for an error code. . . errnum: the error code. . . D*/ /*F*/ unsigned pigpiod_if_version(void); /*D Return the pigpiod_if version. D*/ /*F*/ pthread_t *start_thread(gpioThreadFunc_t thread_func, void *userdata); /*D Starts a new thread of execution with thread_func as the main routine. . . thread_func: the main function for the new thread. userdata: a pointer to an arbitrary argument. . . Returns a pointer to pthread_t if OK, otherwise NULL. The function is passed the single argument userdata. The thread can be cancelled by passing the pointer to pthread_t to [*stop_thread*]. D*/ /*F*/ void stop_thread(pthread_t *pth); /*D Cancels the thread pointed at by pth. . . pth: the thread to be stopped. . . No value is returned. The thread to be stopped should have been started with [*start_thread*]. D*/ /*F*/ int pigpio_start(char *addrStr, char *portStr); /*D Connect to the pigpio daemon. Reserving command and notification streams. . . addrStr: specifies the host or IP address of the Pi running the pigpio daemon. It may be NULL in which case localhost is used unless overridden by the PIGPIO_ADDR environment variable. portStr: specifies the port address used by the Pi running the pigpio daemon. It may be NULL in which case "8888" is used unless overridden by the PIGPIO_PORT environment variable. . . D*/ /*F*/ void pigpio_stop(void); /*D Terminates the connection to the pigpio daemon and releases resources used by the library. D*/ /*F*/ int set_mode(unsigned gpio, unsigned mode); /*D Set the GPIO mode. . . gpio: 0-53. mode: PI_INPUT, PI_OUTPUT, PI_ALT0, PI_ALT1, PI_ALT2, PI_ALT3, PI_ALT4, PI_ALT5. . . Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_MODE, or PI_NOT_PERMITTED. D*/ /*F*/ int get_mode(unsigned gpio); /*D Get the GPIO mode. . . gpio: 0-53. . . Returns the GPIO mode if OK, otherwise PI_BAD_GPIO. D*/ /*F*/ int set_pull_up_down(unsigned gpio, unsigned pud); /*D Set or clear the GPIO pull-up/down resistor. . . gpio: 0-53. pud: PI_PUD_UP, PI_PUD_DOWN, PI_PUD_OFF. . . Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_PUD, or PI_NOT_PERMITTED. D*/ /*F*/ int gpio_read(unsigned gpio); /*D Read the GPIO level. . . gpio:0-53. . . Returns the GPIO level if OK, otherwise PI_BAD_GPIO. D*/ /*F*/ int gpio_write(unsigned gpio, unsigned level); /*D Write the GPIO level. . . gpio: 0-53. level: 0, 1. . . Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_LEVEL, or PI_NOT_PERMITTED. Notes If PWM or servo pulses are active on the GPIO they are switched off. D*/ /*F*/ int set_PWM_dutycycle(unsigned user_gpio, unsigned dutycycle); /*D Start (non-zero dutycycle) or stop (0) PWM pulses on the GPIO. . . user_gpio: 0-31. dutycycle: 0-range (range defaults to 255). . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_DUTYCYCLE, or PI_NOT_PERMITTED. Notes The [*set_PWM_range*] function may be used to change the default range of 255. D*/ /*F*/ int get_PWM_dutycycle(unsigned user_gpio); /*D Return the PWM dutycycle in use on a GPIO. . . user_gpio: 0-31. . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_PWM_GPIO. For normal PWM the dutycycle will be out of the defined range for the GPIO (see [*get_PWM_range*]). If a hardware clock is active on the GPIO the reported dutycycle will be 500000 (500k) out of 1000000 (1M). If hardware PWM is active on the GPIO the reported dutycycle will be out of a 1000000 (1M). D*/ /*F*/ int set_PWM_range(unsigned user_gpio, unsigned range); /*D Set the range of PWM values to be used on the GPIO. . . user_gpio: 0-31. range: 25-40000. . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_DUTYRANGE, or PI_NOT_PERMITTED. Notes If PWM is currently active on the GPIO its dutycycle will be scaled to reflect the new range. The real range, the number of steps between fully off and fully on for each of the 18 available GPIO frequencies is . . 25(#1), 50(#2), 100(#3), 125(#4), 200(#5), 250(#6), 400(#7), 500(#8), 625(#9), 800(#10), 1000(#11), 1250(#12), 2000(#13), 2500(#14), 4000(#15), 5000(#16), 10000(#17), 20000(#18) . . The real value set by set_PWM_range is (dutycycle * real range) / range. D*/ /*F*/ int get_PWM_range(unsigned user_gpio); /*D Get the range of PWM values being used on the GPIO. . . user_gpio: 0-31. . . Returns the dutycycle range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. If a hardware clock or hardware PWM is active on the GPIO the reported range will be 1000000 (1M). D*/ /*F*/ int get_PWM_real_range(unsigned user_gpio); /*D Get the real underlying range of PWM values being used on the GPIO. . . user_gpio: 0-31. . . Returns the real range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. If a hardware clock is active on the GPIO the reported real range will be 1000000 (1M). If hardware PWM is active on the GPIO the reported real range will be approximately 250M divided by the set PWM frequency. D*/ /*F*/ int set_PWM_frequency(unsigned user_gpio, unsigned frequency); /*D Set the frequency (in Hz) of the PWM to be used on the GPIO. . . user_gpio: 0-31. frequency: >=0 (Hz). . . Returns the numerically closest frequency if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_PERMITTED. If PWM is currently active on the GPIO it will be switched off and then back on at the new frequency. Each GPIO can be independently set to one of 18 different PWM frequencies. The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5, 8, or 10 microseconds (default 5). The sample rate is set when the pigpio daemon is started. The frequencies for each sample rate are: . . Hertz 1: 40000 20000 10000 8000 5000 4000 2500 2000 1600 1250 1000 800 500 400 250 200 100 50 2: 20000 10000 5000 4000 2500 2000 1250 1000 800 625 500 400 250 200 125 100 50 25 4: 10000 5000 2500 2000 1250 1000 625 500 400 313 250 200 125 100 63 50 25 13 sample rate (us) 5: 8000 4000 2000 1600 1000 800 500 400 320 250 200 160 100 80 50 40 20 10 8: 5000 2500 1250 1000 625 500 313 250 200 156 125 100 63 50 31 25 13 6 10: 4000 2000 1000 800 500 400 250 200 160 125 100 80 50 40 25 20 10 5 . . D*/ /*F*/ int get_PWM_frequency(unsigned user_gpio); /*D Get the frequency of PWM being used on the GPIO. . . user_gpio: 0-31. . . For normal PWM the frequency will be that defined for the GPIO by [*set_PWM_frequency*]. If a hardware clock is active on the GPIO the reported frequency will be that set by [*hardware_clock*]. If hardware PWM is active on the GPIO the reported frequency will be that set by [*hardware_PWM*]. Returns the frequency (in hertz) used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. D*/ /*F*/ int set_servo_pulsewidth(unsigned user_gpio, unsigned pulsewidth); /*D Start (500-2500) or stop (0) servo pulses on the GPIO. . . user_gpio: 0-31. pulsewidth: 0 (off), 500 (anti-clockwise) - 2500 (clockwise). . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_PULSEWIDTH or PI_NOT_PERMITTED. The selected pulsewidth will continue to be transmitted until changed by a subsequent call to set_servo_pulsewidth. The pulsewidths supported by servos varies and should probably be determined by experiment. A value of 1500 should always be safe and represents the mid-point of rotation. You can DAMAGE a servo if you command it to move beyond its limits. OTHER UPDATE RATES: This function updates servos at 50Hz. If you wish to use a different update frequency you will have to use the PWM functions. . . Update Rate (Hz) 50 100 200 400 500 1E6/Hz 20000 10000 5000 2500 2000 . . Firstly set the desired PWM frequency using [*set_PWM_frequency*]. Then set the PWM range using [*set_PWM_range*] to 1E6/Hz. Doing this allows you to use units of microseconds when setting the servo pulsewidth. E.g. If you want to update a servo connected to GPIO 25 at 400Hz . . set_PWM_frequency(25, 400); set_PWM_range(25, 2500); . . Thereafter use the [*set_PWM_dutycycle*] function to move the servo, e.g. set_PWM_dutycycle(25, 1500) will set a 1500 us pulse. D*/ /*F*/ int get_servo_pulsewidth(unsigned user_gpio); /*D Return the servo pulsewidth in use on a GPIO. . . user_gpio: 0-31. . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERVO_GPIO. D*/ /*F*/ int notify_open(void); /*D Get a free notification handle. Returns a handle greater than or equal to zero if OK, otherwise PI_NO_HANDLE. A notification is a method for being notified of GPIO state changes via a pipe. Pipes are only accessible from the local machine so this function serves no purpose if you are using the library from a remote machine. The in-built (socket) notifications provided by [*callback*] should be used instead. Notifications for handle x will be available at the pipe named /dev/pigpiox (where x is the handle number). E.g. if the function returns 15 then the notifications must be read from /dev/pigpio15. D*/ /*F*/ int notify_begin(unsigned handle, uint32_t bits); /*D Start notifications on a previously opened handle. . . handle: 0-31 (as returned by [*notify_open*]) bits: a mask indicating the GPIO to be notified. . . Returns 0 if OK, otherwise PI_BAD_HANDLE. The notification sends state changes for each GPIO whose corresponding bit in bits is set. Each notification occupies 12 bytes in the fifo as follows: . . typedef struct { uint16_t seqno; uint16_t flags; uint32_t tick; uint32_t level; } gpioReport_t; . . seqno: starts at 0 each time the handle is opened and then increments by one for each report. flags: two flags are defined, PI_NTFY_FLAGS_WDOG and PI_NTFY_FLAGS_ALIVE. PI_NTFY_FLAGS_WDOG, if bit 5 is set then bits 0-4 of the flags indicate a GPIO which has had a watchdog timeout. PI_NTFY_FLAGS_ALIVE, if bit 6 is set this indicates a keep alive signal on the pipe/socket and is sent once a minute in the absence of other notification activity. tick: the number of microseconds since system boot. It wraps around after 1h12m. level: indicates the level of each GPIO. If bit 1<=0 numBytes: >=1 str: an array of chars. . . Returns the new total number of pulses in the current waveform if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_WAVE_BAUD, PI_BAD_DATABITS, PI_BAD_STOP_BITS, PI_TOO_MANY_CHARS, PI_BAD_SER_OFFSET, or PI_TOO_MANY_PULSES. NOTES: The serial data is formatted as one start bit, [*data_bits*] data bits, and [*stop_bits*]/2 stop bits. It is legal to add serial data streams with different baud rates to the same waveform. [*numBytes*] is the number of bytes of data in str. The bytes required for each character depend upon [*data_bits*]. For [*data_bits*] 1-8 there will be one byte per character. For [*data_bits*] 9-16 there will be two bytes per character. For [*data_bits*] 17-32 there will be four bytes per character. D*/ /*F*/ int wave_create(void); /*D This function creates a waveform from the data provided by the prior calls to the [*wave_add_**] functions. Upon success a wave id greater than or equal to 0 is returned, otherwise PI_EMPTY_WAVEFORM, PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID. The data provided by the [*wave_add_**] functions is consumed by this function. As many waveforms may be created as there is space available. The wave id is passed to [*wave_send_**] to specify the waveform to transmit. Normal usage would be Step 1. [*wave_clear*] to clear all waveforms and added data. Step 2. [*wave_add_**] calls to supply the waveform data. Step 3. [*wave_create*] to create the waveform and get a unique id Repeat steps 2 and 3 as needed. Step 4. [*wave_send_**] with the id of the waveform to transmit. A waveform comprises one or more pulses. Each pulse consists of a [*gpioPulse_t*] structure. . . typedef struct { uint32_t gpioOn; uint32_t gpioOff; uint32_t usDelay; } gpioPulse_t; . . The fields specify 1) the GPIO to be switched on at the start of the pulse. 2) the GPIO to be switched off at the start of the pulse. 3) the delay in microseconds before the next pulse. Any or all the fields can be zero. It doesn't make any sense to set all the fields to zero (the pulse will be ignored). When a waveform is started each pulse is executed in order with the specified delay between the pulse and the next. Returns the new waveform id if OK, otherwise PI_EMPTY_WAVEFORM, PI_NO_WAVEFORM_ID, PI_TOO_MANY_CBS, or PI_TOO_MANY_OOL. D*/ /*F*/ int wave_delete(unsigned wave_id); /*D This function deletes the waveform with id wave_id. . . wave_id: >=0, as returned by [*wave_create*]. . . Wave ids are allocated in order, 0, 1, 2, etc. The wave is flagged for deletion. The resources used by the wave will only be reused when either of the following apply. - all waves with higher numbered wave ids have been deleted or have been flagged for deletion. - a new wave is created which uses exactly the same resources as the current wave (see the C source for gpioWaveCreate for details). Returns 0 if OK, otherwise PI_BAD_WAVE_ID. D*/ /*F*/ int wave_send_once(unsigned wave_id); /*D This function transmits the waveform with id wave_id. The waveform is sent once. NOTE: Any hardware PWM started by [*hardware_PWM*] will be cancelled. . . wave_id: >=0, as returned by [*wave_create*]. . . Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE. D*/ /*F*/ int wave_send_repeat(unsigned wave_id); /*D This function transmits the waveform with id wave_id. The waveform cycles until cancelled (either by the sending of a new waveform or by [*wave_tx_stop*]). NOTE: Any hardware PWM started by [*hardware_PWM*] will be cancelled. . . wave_id: >=0, as returned by [*wave_create*]. . . Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE. D*/ /*F*/ int wave_chain(char *buf, unsigned bufSize); /*D This function transmits a chain of waveforms. NOTE: Any hardware PWM started by [*hardware_PWM*] will be cancelled. The waves to be transmitted are specified by the contents of buf which contains an ordered list of [*wave_id*]s and optional command codes and related data. . . buf: pointer to the wave_ids and optional command codes bufSize: the number of bytes in buf . . Returns 0 if OK, otherwise PI_CHAIN_NESTING, PI_CHAIN_LOOP_CNT, PI_BAD_CHAIN_LOOP, PI_BAD_CHAIN_CMD, PI_CHAIN_COUNTER, PI_BAD_CHAIN_DELAY, PI_CHAIN_TOO_BIG, or PI_BAD_WAVE_ID. Each wave is transmitted in the order specified. A wave may occur multiple times per chain. A blocks of waves may be transmitted multiple times by using the loop commands. The block is bracketed by loop start and end commands. Loops may be nested. Delays between waves may be added with the delay command. The following command codes are supported: Name @ Cmd & Data @ Meaning Loop Start @ 255 0 @ Identify start of a wave block Loop Repeat @ 255 1 x y @ loop x + y*256 times Delay @ 255 2 x y @ delay x + y*256 microseconds Loop Forever @ 255 3 @ loop forever If present Loop Forever must be the last entry in the chain. The code is currently dimensioned to support a chain with roughly 600 entries and 20 loop counters. ... #include #include #define WAVES 5 #define GPIO 4 int main(int argc, char *argv[]) { int i, wid[WAVES]; if (pigpio_start(0, 0)<0) return -1; set_mode(GPIO, PI_OUTPUT); for (i=0; i=0, as returned by [*store_script*]. numPar: 0-10, the number of parameters. param: an array of parameters. . . The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM param is an array of up to 10 parameters which may be referenced in the script as p0 to p9. D*/ /*F*/ int script_status(unsigned script_id, uint32_t *param); /*D This function returns the run status of a stored script as well as the current values of parameters 0 to 9. . . script_id: >=0, as returned by [*store_script*]. param: an array to hold the returned 10 parameters. . . The function returns greater than or equal to 0 if OK, otherwise PI_BAD_SCRIPT_ID. The run status may be . . PI_SCRIPT_INITING PI_SCRIPT_HALTED PI_SCRIPT_RUNNING PI_SCRIPT_WAITING PI_SCRIPT_FAILED . . The current value of script parameters 0 to 9 are returned in param. D*/ /*F*/ int stop_script(unsigned script_id); /*D This function stops a running script. . . script_id: >=0, as returned by [*store_script*]. . . The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID. D*/ /*F*/ int delete_script(unsigned script_id); /*D This function deletes a stored script. . . script_id: >=0, as returned by [*store_script*]. . . The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID. D*/ /*F*/ int bb_serial_read_open(unsigned user_gpio, unsigned baud, unsigned data_bits); /*D This function opens a GPIO for bit bang reading of serial data. . . user_gpio: 0-31. baud: 50-250000 data_bits: 1-32 . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_WAVE_BAUD, or PI_GPIO_IN_USE. The serial data is returned in a cyclic buffer and is read using bb_serial_read. It is the caller's responsibility to read data from the cyclic buffer in a timely fashion. D*/ /*F*/ int bb_serial_read(unsigned user_gpio, void *buf, size_t bufSize); /*D This function copies up to bufSize bytes of data read from the bit bang serial cyclic buffer to the buffer starting at buf. . . user_gpio: 0-31, previously opened with [*bb_serial_read_open*]. buf: an array to receive the read bytes. bufSize: >=0 . . Returns the number of bytes copied if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERIAL_GPIO. The bytes returned for each character depend upon the number of data bits [*data_bits*] specified in the [*bb_serial_read_open*] command. For [*data_bits*] 1-8 there will be one byte per character. For [*data_bits*] 9-16 there will be two bytes per character. For [*data_bits*] 17-32 there will be four bytes per character. D*/ /*F*/ int bb_serial_read_close(unsigned user_gpio); /*D This function closes a GPIO for bit bang reading of serial data. . . user_gpio: 0-31, previously opened with [*bb_serial_read_open*]. . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_SERIAL_GPIO. D*/ /*F*/ int bb_serial_invert(unsigned user_gpio, unsigned invert); /*D This function inverts serial logic for big bang serial reads. . . user_gpio: 0-31, previously opened with [*bb_serial_read_open*]. invert: 0-1, 1 invert, 0 normal. . . Returns 0 if OK, otherwise PI_NOT_SERIAL_GPIO or PI_BAD_SER_INVERT. D*/ /*F*/ int i2c_open(unsigned i2c_bus, unsigned i2c_addr, unsigned i2c_flags); /*D This returns a handle for the device at address i2c_addr on bus i2c_bus. . . i2c_bus: >=0. i2c_addr: 0-0x7F. i2c_flags: 0. . . No flags are currently defined. This parameter should be set to zero. Physically buses 0 and 1 are available on the Pi. Higher numbered buses will be available if a kernel supported bus multiplexor is being used. The GPIO used are given in the following table. @ SDA @ SCL I2C 0 @ 0 @ 1 I2C 1 @ 2 @ 3 Returns a handle (>=0) if OK, otherwise PI_BAD_I2C_BUS, PI_BAD_I2C_ADDR, PI_BAD_FLAGS, PI_NO_HANDLE, or PI_I2C_OPEN_FAILED. For the SMBus commands the low level transactions are shown at the end of the function description. The following abbreviations are used. . . S (1 bit) : Start bit P (1 bit) : Stop bit Rd/Wr (1 bit) : Read/Write bit. Rd equals 1, Wr equals 0. A, NA (1 bit) : Accept and not accept bit. Addr (7 bits): I2C 7 bit address. Comm (8 bits): Command byte, a data byte which often selects a register. Data (8 bits): A data byte. Count (8 bits): A data byte containing the length of a block operation. [..]: Data sent by the device. . . D*/ /*F*/ int i2c_close(unsigned handle); /*D This closes the I2C device associated with the handle. . . handle: >=0, as returned by a call to [*i2c_open*]. . . Returns 0 if OK, otherwise PI_BAD_HANDLE. D*/ /*F*/ int i2c_write_quick(unsigned handle, unsigned bit); /*D This sends a single bit (in the Rd/Wr bit) to the device associated with handle. . . handle: >=0, as returned by a call to [*i2c_open*]. bit: 0-1, the value to write. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. Quick command. SMBus 2.0 5.5.1 . . S Addr Rd/Wr [A] P . . D*/ /*F*/ int i2c_write_byte(unsigned handle, unsigned bVal); /*D This sends a single byte to the device associated with handle. . . handle: >=0, as returned by a call to [*i2c_open*]. bVal: 0-0xFF, the value to write. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. Send byte. SMBus 2.0 5.5.2 . . S Addr Wr [A] Data [A] P . . D*/ /*F*/ int i2c_read_byte(unsigned handle); /*D This reads a single byte from the device associated with handle. . . handle: >=0, as returned by a call to [*i2c_open*]. . . Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, or PI_I2C_READ_FAILED. Receive byte. SMBus 2.0 5.5.3 . . S Addr Rd [A] [Data] NA P . . D*/ /*F*/ int i2c_write_byte_data(unsigned handle, unsigned i2c_reg, unsigned bVal); /*D This writes a single byte to the specified register of the device associated with handle. . . handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to write. bVal: 0-0xFF, the value to write. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. Write byte. SMBus 2.0 5.5.4 . . S Addr Wr [A] Comm [A] Data [A] P . . D*/ /*F*/ int i2c_write_word_data(unsigned handle, unsigned i2c_reg, unsigned wVal); /*D This writes a single 16 bit word to the specified register of the device associated with handle. . . handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to write. wVal: 0-0xFFFF, the value to write. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. Write word. SMBus 2.0 5.5.4 . . S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] P . . D*/ /*F*/ int i2c_read_byte_data(unsigned handle, unsigned i2c_reg); /*D This reads a single byte from the specified register of the device associated with handle. . . handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to read. . . Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. Read byte. SMBus 2.0 5.5.5 . . S Addr Wr [A] Comm [A] S Addr Rd [A] [Data] NA P . . D*/ /*F*/ int i2c_read_word_data(unsigned handle, unsigned i2c_reg); /*D This reads a single 16 bit word from the specified register of the device associated with handle. . . handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to read. . . Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. Read word. SMBus 2.0 5.5.5 . . S Addr Wr [A] Comm [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P . . D*/ /*F*/ int i2c_process_call(unsigned handle, unsigned i2c_reg, unsigned wVal); /*D This writes 16 bits of data to the specified register of the device associated with handle and and reads 16 bits of data in return. . . handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to write/read. wVal: 0-0xFFFF, the value to write. . . Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. Process call. SMBus 2.0 5.5.6 . . S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P . . D*/ /*F*/ int i2c_write_block_data( unsigned handle, unsigned i2c_reg, char *buf, unsigned count); /*D This writes up to 32 bytes to the specified register of the device associated with handle. . . handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to write. buf: an array with the data to send. count: 1-32, the number of bytes to write. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. Block write. SMBus 2.0 5.5.7 . . S Addr Wr [A] Comm [A] Count [A] Data [A] Data [A] ... [A] Data [A] P . . D*/ /*F*/ int i2c_read_block_data(unsigned handle, unsigned i2c_reg, char *buf); /*D This reads a block of up to 32 bytes from the specified register of the device associated with handle. . . handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to read. buf: an array to receive the read data. . . The amount of returned data is set by the device. Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. Block read. SMBus 2.0 5.5.7 . . S Addr Wr [A] Comm [A] S Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P . . D*/ /*F*/ int i2c_block_process_call( unsigned handle, unsigned i2c_reg, char *buf, unsigned count); /*D This writes data bytes to the specified register of the device associated with handle and reads a device specified number of bytes of data in return. . . handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to write/read. buf: an array with the data to send and to receive the read data. count: 1-32, the number of bytes to write. . . Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. The smbus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received. The total number of bytes sent/received must be 32 or less. Block write-block read. SMBus 2.0 5.5.8 . . S Addr Wr [A] Comm [A] Count [A] Data [A] ... S Addr Rd [A] [Count] A [Data] ... A P . . D*/ /*F*/ int i2c_read_i2c_block_data( unsigned handle, unsigned i2c_reg, char *buf, unsigned count); /*D This reads count bytes from the specified register of the device associated with handle . The count may be 1-32. . . handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to read. buf: an array to receive the read data. count: 1-32, the number of bytes to read. . . Returns the number of bytes read (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. . . S Addr Wr [A] Comm [A] S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P . . D*/ /*F*/ int i2c_write_i2c_block_data( unsigned handle, unsigned i2c_reg, char *buf, unsigned count); /*D This writes 1 to 32 bytes to the specified register of the device associated with handle. . . handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to write. buf: the data to write. count: 1-32, the number of bytes to write. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. . . S Addr Wr [A] Comm [A] Data [A] Data [A] ... [A] Data [A] P . . D*/ /*F*/ int i2c_read_device(unsigned handle, char *buf, unsigned count); /*D This reads count bytes from the raw device into buf. . . handle: >=0, as returned by a call to [*i2c_open*]. buf: an array to receive the read data bytes. count: >0, the number of bytes to read. . . Returns count (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. D*/ /*F*/ int i2c_write_device(unsigned handle, char *buf, unsigned count); /*D This writes count bytes from buf to the raw device. . . handle: >=0, as returned by a call to [*i2c_open*]. buf: an array containing the data bytes to write. count: >0, the number of bytes to write. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. D*/ /*F*/ int i2c_zip( unsigned handle, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen); /*D This function executes a sequence of I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenated command codes and associated data. . . handle: >=0, as returned by a call to [*i2cOpen*] inBuf: pointer to the concatenated I2C commands, see below inLen: size of command buffer outBuf: pointer to buffer to hold returned data outLen: size of output buffer . . Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_HANDLE, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN. PI_BAD_I2C_WLEN, or PI_BAD_I2C_SEG. The following command codes are supported: Name @ Cmd & Data @ Meaning End @ 0 @ No more commands Escape @ 1 @ Next P is two bytes On @ 2 @ Switch combined flag on Off @ 3 @ Switch combined flag off Address @ 4 P @ Set I2C address to P Flags @ 5 lsb msb @ Set I2C flags to lsb + (msb << 8) Read @ 6 P @ Read P bytes of data Write @ 7 P ... @ Write P bytes of data The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). The address defaults to that associated with the handle. The flags default to 0. The address and flags maintain their previous value until updated. The returned I2C data is stored in consecutive locations of outBuf. ... Set address 0x53, write 0x32, read 6 bytes Set address 0x1E, write 0x03, read 6 bytes Set address 0x68, write 0x1B, read 8 bytes End 0x04 0x53 0x07 0x01 0x32 0x06 0x06 0x04 0x1E 0x07 0x01 0x03 0x06 0x06 0x04 0x68 0x07 0x01 0x1B 0x06 0x08 0x00 ... D*/ /*F*/ int bb_i2c_open(unsigned SDA, unsigned SCL, unsigned baud); /*D This function selects a pair of GPIO for bit banging I2C at a specified baud rate. Bit banging I2C allows for certain operations which are not possible with the standard I2C driver. o baud rates as low as 50 o repeated starts o clock stretching o I2C on any pair of spare GPIO . . SDA: 0-31 SCL: 0-31 baud: 50-500000 . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_I2C_BAUD, or PI_GPIO_IN_USE. NOTE: The GPIO used for SDA and SCL must have pull-ups to 3V3 connected. As a guide the hardware pull-ups on pins 3 and 5 are 1k8 in value. D*/ /*F*/ int bb_i2c_close(unsigned SDA); /*D This function stops bit banging I2C on a pair of GPIO previously opened with [*bb_i2c_open*]. . . SDA: 0-31, the SDA GPIO used in a prior call to [*bb_i2c_open*] . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_I2C_GPIO. D*/ /*F*/ int bb_i2c_zip( unsigned SDA, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen); /*D This function executes a sequence of bit banged I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenated command codes and associated data. . . SDA: 0-31 (as used in a prior call to [*bb_i2c_open*]) inBuf: pointer to the concatenated I2C commands, see below inLen: size of command buffer outBuf: pointer to buffer to hold returned data outLen: size of output buffer . . Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_USER_GPIO, PI_NOT_I2C_GPIO, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN, PI_BAD_I2C_WLEN, PI_I2C_READ_FAILED, or PI_I2C_WRITE_FAILED. The following command codes are supported: Name @ Cmd & Data @ Meaning End @ 0 @ No more commands Escape @ 1 @ Next P is two bytes Start @ 2 @ Start condition Stop @ 3 @ Stop condition Address @ 4 P @ Set I2C address to P Flags @ 5 lsb msb @ Set I2C flags to lsb + (msb << 8) Read @ 6 P @ Read P bytes of data Write @ 7 P ... @ Write P bytes of data The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). The address and flags default to 0. The address and flags maintain their previous value until updated. No flags are currently defined. The returned I2C data is stored in consecutive locations of outBuf. ... Set address 0x53 start, write 0x32, (re)start, read 6 bytes, stop Set address 0x1E start, write 0x03, (re)start, read 6 bytes, stop Set address 0x68 start, write 0x1B, (re)start, read 8 bytes, stop End 0x04 0x53 0x02 0x07 0x01 0x32 0x02 0x06 0x06 0x03 0x04 0x1E 0x02 0x07 0x01 0x03 0x02 0x06 0x06 0x03 0x04 0x68 0x02 0x07 0x01 0x1B 0x02 0x06 0x08 0x03 0x00 ... D*/ /*F*/ int spi_open(unsigned spi_channel, unsigned baud, unsigned spi_flags); /*D This function returns a handle for the SPI device on the channel. Data will be transferred at baud bits per second. The flags may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select. The Pi has two SPI peripherals: main and auxiliary. The main SPI has two chip selects (channels), the auxiliary has three. The auxiliary SPI is available on all models but the A and B. The GPIO used are given in the following table. @ MISO @ MOSI @ SCLK @ CE0 @ CE1 @ CE2 Main SPI @ 9 @ 10 @ 11 @ 8 @ 7 @ - Aux SPI @ 19 @ 20 @ 21 @ 18 @ 17 @ 16 . . spi_channel: 0-1 (0-2 for the auxiliary SPI). baud: 32K-125M (values above 30M are unlikely to work). spi_flags: see below. . . Returns a handle (>=0) if OK, otherwise PI_BAD_SPI_CHANNEL, PI_BAD_SPI_SPEED, PI_BAD_FLAGS, PI_NO_AUX_SPI, or PI_SPI_OPEN_FAILED. spi_flags consists of the least significant 22 bits. . . 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 b b b b b b R T n n n n W A u2 u1 u0 p2 p1 p0 m m . . mm defines the SPI mode. Warning: modes 1 and 3 do not appear to work on the auxiliary SPI. . . Mode POL PHA 0 0 0 1 0 1 2 1 0 3 1 1 . . px is 0 if CEx is active low (default) and 1 for active high. ux is 0 if the CEx GPIO is reserved for SPI (default) and 1 otherwise. A is 0 for the main SPI, 1 for the auxiliary SPI. W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Main SPI only. nnnn defines the number of bytes (0-15) to write before switching the MOSI line to MISO to read data. This field is ignored if W is not set. Main SPI only. T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. Auxiliary SPI only. R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. Auxiliary SPI only. bbbbbb defines the word size in bits (0-32). The default (0) sets 8 bits per word. Auxiliary SPI only. The [*spi_read*], [*spi_write*], and [*spi_xfer*] functions transfer data packed into 1, 2, or 4 bytes according to the word size in bits. For bits 1-8 there will be one byte per word. For bits 9-16 there will be two bytes per word. For bits 17-32 there will be four bytes per word. Multi-byte transfers are made in least significant byte first order. E.g. to transfer 32 11-bit words buf should contain 64 bytes and count should be 64. E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A. The other bits in flags should be set to zero. D*/ /*F*/ int spi_close(unsigned handle); /*D This functions closes the SPI device identified by the handle. . . handle: >=0, as returned by a call to [*spi_open*]. . . Returns 0 if OK, otherwise PI_BAD_HANDLE. D*/ /*F*/ int spi_read(unsigned handle, char *buf, unsigned count); /*D This function reads count bytes of data from the SPI device associated with the handle. . . handle: >=0, as returned by a call to [*spi_open*]. buf: an array to receive the read data bytes. count: the number of bytes to read. . . Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. D*/ /*F*/ int spi_write(unsigned handle, char *buf, unsigned count); /*D This function writes count bytes of data from buf to the SPI device associated with the handle. . . handle: >=0, as returned by a call to [*spi_open*]. buf: the data bytes to write. count: the number of bytes to write. . . Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. D*/ /*F*/ int spi_xfer(unsigned handle, char *txBuf, char *rxBuf, unsigned count); /*D This function transfers count bytes of data from txBuf to the SPI device associated with the handle. Simultaneously count bytes of data are read from the device and placed in rxBuf. . . handle: >=0, as returned by a call to [*spi_open*]. txBuf: the data bytes to write. rxBuf: the received data bytes. count: the number of bytes to transfer. . . Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. D*/ /*F*/ int serial_open(char *ser_tty, unsigned baud, unsigned ser_flags); /*D This function opens a serial device at a specified baud rate with specified flags. The device name must start with /dev/tty or /dev/serial. . . ser_tty: the serial device to open. baud: the baud rate in bits per second, see below. ser_flags: 0. . . Returns a handle (>=0) if OK, otherwise PI_NO_HANDLE, or PI_SER_OPEN_FAILED. The baud rate must be one of 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, or 230400. No flags are currently defined. This parameter should be set to zero. D*/ /*F*/ int serial_close(unsigned handle); /*D This function closes the serial device associated with handle. . . handle: >=0, as returned by a call to [*serial_open*]. . . Returns 0 if OK, otherwise PI_BAD_HANDLE. D*/ /*F*/ int serial_write_byte(unsigned handle, unsigned bVal); /*D This function writes bVal to the serial port associated with handle. . . handle: >=0, as returned by a call to [*serial_open*]. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED. D*/ /*F*/ int serial_read_byte(unsigned handle); /*D This function reads a byte from the serial port associated with handle. . . handle: >=0, as returned by a call to [*serial_open*]. . . Returns the read byte (>=0) if OK, otherwise PI_BAD_HANDLE, PI_SER_READ_NO_DATA, or PI_SER_READ_FAILED. If no data is ready PI_SER_READ_NO_DATA is returned. D*/ /*F*/ int serial_write(unsigned handle, char *buf, unsigned count); /*D This function writes count bytes from buf to the the serial port associated with handle. . . handle: >=0, as returned by a call to [*serial_open*]. buf: the array of bytes to write. count: the number of bytes to write. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED. D*/ /*F*/ int serial_read(unsigned handle, char *buf, unsigned count); /*D This function reads up to count bytes from the the serial port associated with handle and writes them to buf. . . handle: >=0, as returned by a call to [*serial_open*]. buf: an array to receive the read data. count: the maximum number of bytes to read. . . Returns the number of bytes read (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_SER_READ_NO_DATA, or PI_SER_WRITE_FAILED. If no data is ready zero is returned. D*/ /*F*/ int serial_data_available(unsigned handle); /*D Returns the number of bytes available to be read from the device associated with handle. . . handle: >=0, as returned by a call to [*serial_open*]. . . Returns the number of bytes of data available (>=0) if OK, otherwise PI_BAD_HANDLE. D*/ /*F*/ int custom_1(unsigned arg1, unsigned arg2, char *argx, unsigned argc); /*D This function is available for user customisation. It returns a single integer value. . . arg1: >=0 arg2: >=0 argx: extra (byte) arguments argc: number of extra arguments . . Returns >= 0 if OK, less than 0 indicates a user defined error. D*/ /*F*/ int custom_2(unsigned arg1, char *argx, unsigned argc, char *retBuf, unsigned retMax); /*D This function is available for user customisation. It differs from custom_1 in that it returns an array of bytes rather than just an integer. The return value is an integer indicating the number of returned bytes. . . arg1: >=0 argc: extra (byte) arguments count: number of extra arguments retBuf: buffer for returned data retMax: maximum number of bytes to return . . Returns >= 0 if OK, less than 0 indicates a user defined error. Note, the number of returned bytes will be retMax or less. D*/ /*F*/ int callback(unsigned user_gpio, unsigned edge, CBFunc_t f); /*D This function initialises a new callback. . . user_gpio: 0-31. edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE. f: the callback function. . . The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback. The callback is called with the GPIO, edge, and tick, whenever the GPIO has the identified edge. . . Parameter Value Meaning GPIO 0-31 The GPIO which has changed state edge 0-2 0 = change to low (a falling edge) 1 = change to high (a rising edge) 2 = no level change (a watchdog timeout) tick 32 bit The number of microseconds since boot WARNING: this wraps around from 4294967295 to 0 roughly every 72 minutes . . D*/ /*F*/ int callback_ex (unsigned user_gpio, unsigned edge, CBFuncEx_t f, void *userdata); /*D This function initialises a new callback. . . user_gpio: 0-31. edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE. f: the callback function. userdata: a pointer to arbitrary user data. . . The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback. The callback is called with the GPIO, edge, tick, and user, whenever the GPIO has the identified edge. . . Parameter Value Meaning GPIO 0-31 The GPIO which has changed state edge 0-2 0 = change to low (a falling edge) 1 = change to high (a rising edge) 2 = no level change (a watchdog timeout) tick 32 bit The number of microseconds since boot WARNING: this wraps around from 4294967295 to 0 roughly every 72 minutes userdata pointer Pointer to an arbitrary object . . D*/ /*F*/ int callback_cancel(unsigned callback_id); /*D This function cancels a callback identified by its id. . . callback_id: >=0, as returned by a call to [*callback*] or [*callback_ex*]. . . The function returns 0 if OK, otherwise pigif_callback_not_found. D*/ /*F*/ int wait_for_edge(unsigned user_gpio, unsigned edge, double timeout); /*D This function waits for edge on the GPIO for up to timeout seconds. . . user_gpio: 0-31. edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE. timeout: >=0. . . The function returns 1 if the edge occurred, otherwise 0. The function returns when the edge occurs or after the timeout. D*/ /*PARAMS active :: 0-1000000 The number of microseconds level changes are reported for once a noise filter has been triggered (by [*steady*] microseconds of a stable level). *addrStr:: A string specifying the host or IP address of the Pi running the pigpio daemon. It may be NULL in which case localhost is used unless overridden by the PIGPIO_ADDR environment variable. arg1:: An unsigned argument passed to a user customised function. Its meaning is defined by the customiser. arg2:: An unsigned argument passed to a user customised function. Its meaning is defined by the customiser. argc:: The count of bytes passed to a user customised function. *argx:: A pointer to an array of bytes passed to a user customised function. Its meaning and content is defined by the customiser. baud:: The speed of serial communication (I2C, SPI, serial link, waves) in bits per second. bit:: A value of 0 or 1. bits:: A value used to select GPIO. If bit n of bits is set then GPIO n is selected. A convenient way to set bit n is to or in (1<=0, as returned by a call to [*callback*] or [*callback_ex*]. This is passed to [*callback_cancel*] to cancel the callback. CBFunc_t:: . . typedef void (*CBFunc_t) (unsigned user_gpio, unsigned level, uint32_t tick); . . CBFuncEx_t:: . . typedef void (*CBFuncEx_t) (unsigned user_gpio, unsigned level, uint32_t tick, void * user); . . char:: A single character, an 8 bit quantity able to store 0-255. clkfreq::4689-250000000 (250M) The hardware clock frequency. count:: The number of bytes to be transferred in an I2C, SPI, or Serial command. data_bits::1-32 The number of data bits in each character of serial data. . . #define PI_MIN_WAVE_DATABITS 1 #define PI_MAX_WAVE_DATABITS 32 . . double:: A floating point number. dutycycle::0-range A number representing the ratio of on time to off time for PWM. The number may vary between 0 and range (default 255) where 0 is off and range is fully on. edge:: Used to identify a GPIO level transition of interest. A rising edge is a level change from 0 to 1. A falling edge is a level change from 1 to 0. . . RISING_EDGE 0 FALLING_EDGE 1 EITHER_EDGE. 2 . . errnum:: A negative number indicating a function call failed and the nature of the error. f:: A function. frequency::>=0 The number of times a GPIO is swiched on and off per second. This can be set per GPIO and may be as little as 5Hz or as much as 40KHz. The GPIO will be on for a proportion of the time as defined by its dutycycle. gpio:: A Broadcom numbered GPIO, in the range 0-53. There are 54 General Purpose Input Outputs (GPIO) named gpio0 through gpio53. They are split into two banks. Bank 1 consists of gpio0 through gpio31. Bank 2 consists of gpio32 through gpio53. All the GPIO which are safe for the user to read and write are in bank 1. Not all GPIO in bank 1 are safe though. Type 1 boards have 17 safe GPIO. Type 2 boards have 21. Type 3 boards have 26. See [*get_hardware_revision*]. The user GPIO are marked with an X in the following table. . . 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Type 1 X X - - X - - X X X X X - - X X Type 2 - - X X X - - X X X X X - - X X Type 3 X X X X X X X X X X X X X X 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Type 1 - X X - - X X X X X - - - - - - Type 2 - X X - - - X X X X - X X X X X Type 3 X X X X X X X X X X X X - - - - . . gpioPulse_t:: . . typedef struct { uint32_t gpioOn; uint32_t gpioOff; uint32_t usDelay; } gpioPulse_t; . . gpioThreadFunc_t:: . . typedef void *(gpioThreadFunc_t) (void *); . . handle::>=0 A number referencing an object opened by one of [*i2c_open*], [*notify_open*], [*serial_open*], and [*spi_open*]. i2c_addr:: 0-0x7F The address of a device on the I2C bus. i2c_bus::>=0 An I2C bus number. i2c_flags::0 Flags which modify an I2C open command. None are currently defined. i2c_reg:: 0-255 A register of an I2C device. *inBuf:: A buffer used to pass data to a function. inLen:: The number of bytes of data in a buffer. int:: A whole number, negative or positive. invert:: A flag used to set normal or inverted bit bang serial data level logic. level:: The level of a GPIO. Low or High. . . PI_OFF 0 PI_ON 1 PI_CLEAR 0 PI_SET 1 PI_LOW 0 PI_HIGH 1 . . There is one exception. If a watchdog expires on a GPIO the level will be reported as PI_TIMEOUT. See [*set_watchdog*]. . . PI_TIMEOUT 2 . . mode::0-7 The operational mode of a GPIO, normally INPUT or OUTPUT. . . PI_INPUT 0 PI_OUTPUT 1 PI_ALT0 4 PI_ALT1 5 PI_ALT2 6 PI_ALT3 7 PI_ALT4 3 PI_ALT5 2 . . numBytes:: The number of bytes used to store characters in a string. Depending on the number of bits per character there may be 1, 2, or 4 bytes per character. numPar:: 0-10 The number of parameters passed to a script. numPulses:: The number of pulses to be added to a waveform. offset:: The associated data starts this number of microseconds from the start of the waveform. *outBuf:: A buffer used to return data from a function. outLen:: The size in bytes of an output buffer. *param:: An array of script parameters. *portStr:: A string specifying the port address used by the Pi running the pigpio daemon. It may be NULL in which case "8888" is used unless overridden by the PIGPIO_PORT environment variable. *pth:: A thread identifier, returned by [*start_thread*]. pthread_t:: A thread identifier. pud::0-2 The setting of the pull up/down resistor for a GPIO, which may be off, pull-up, or pull-down. . . PI_PUD_OFF 0 PI_PUD_DOWN 1 PI_PUD_UP 2 . . pulseLen:: 1-100, the length of a trigger pulse in microseconds. *pulses:: An array of pulses to be added to a waveform. pulsewidth::0, 500-2500 . . PI_SERVO_OFF 0 PI_MIN_SERVO_PULSEWIDTH 500 PI_MAX_SERVO_PULSEWIDTH 2500 . . PWMduty::0-1000000 (1M) The hardware PWM dutycycle. . . #define PI_HW_PWM_RANGE 1000000 . . PWMfreq::1-125000000 (125M) The hardware PWM frequency. . . #define PI_HW_PWM_MIN_FREQ 1 #define PI_HW_PWM_MAX_FREQ 125000000 . . range::25-40000 The permissible dutycycle values are 0-range. . . PI_MIN_DUTYCYCLE_RANGE 25 PI_MAX_DUTYCYCLE_RANGE 40000 . . *retBuf:: A buffer to hold a number of bytes returned to a used customised function, retMax:: The maximum number of bytes a user customised function should return. *rxBuf:: A pointer to a buffer to receive data. SCL:: The user GPIO to use for the clock when bit banging I2C. *script:: A pointer to the text of a script. script_id:: An id of a stored script as returned by [*store_script*]. SDA:: The user GPIO to use for data when bit banging I2C. seconds:: The number of seconds. ser_flags:: Flags which modify a serial open command. None are currently defined. *ser_tty:: The name of a serial tty device, e.g. /dev/ttyAMA0, /dev/ttyUSB0, /dev/tty1. size_t:: A standard type used to indicate the size of an object in bytes. spi_channel:: A SPI channel, 0-2. spi_flags:: See [*spi_open*]. steady :: 0-300000 The number of microseconds level changes must be stable for before reporting the level changed ([*set_glitch_filter*]) or triggering the active part of a noise filter ([*set_noise_filter*]). stop_bits::2-8 The number of (half) stop bits to be used when adding serial data to a waveform. . . #define PI_MIN_WAVE_HALFSTOPBITS 2 #define PI_MAX_WAVE_HALFSTOPBITS 8 . . *str:: An array of characters. thread_func:: A function of type gpioThreadFunc_t used as the main function of a thread. timeout:: A GPIO watchdog timeout in milliseconds. . . PI_MIN_WDOG_TIMEOUT 0 PI_MAX_WDOG_TIMEOUT 60000 . . *txBuf:: An array of bytes to transmit. uint32_t::0-0-4,294,967,295 (Hex 0x0-0xFFFFFFFF) A 32-bit unsigned value. unsigned:: A whole number >= 0. user_gpio:: 0-31, a Broadcom numbered GPIO. See [*gpio*]. *userdata:: A pointer to arbitrary user data. This may be used to identify the instance. void:: Denoting no parameter is required wave_add_*:: One of [*wave_add_new*], [*wave_add_generic*], [*wave_add_serial*]. wave_id:: A number representing a waveform created by [*wave_create*]. wave_send_*:: One of [*wave_send_once*], [*wave_send_repeat*]. wVal::0-65535 (Hex 0x0-0xFFFF, Octal 0-0177777) A 16-bit word value. PARAMS*/ /*DEF_S pigpiod_if Error Codes*/ typedef enum { pigif_bad_send = -2000, pigif_bad_recv = -2001, pigif_bad_getaddrinfo = -2002, pigif_bad_connect = -2003, pigif_bad_socket = -2004, pigif_bad_noib = -2005, pigif_duplicate_callback = -2006, pigif_bad_malloc = -2007, pigif_bad_callback = -2008, pigif_notify_failed = -2009, pigif_callback_not_found = -2010, } pigifError_t; /*DEF_E*/ #ifdef __cplusplus } #endif #endif pigpio-78/pigpiod_if2.3000066400000000000000000003602341373465704200151030ustar00rootroot00000000000000 ." Process this file with ." groff -man -Tascii pigpiod_if2.3 ." .TH pigpiod_if2 3 2012-2020 Linux "pigpio archive" .SH NAME pigpiod_if2 - A C library to interface to the pigpio daemon. .SH SYNOPSIS #include gcc -Wall -pthread -o prog prog.c -lpigpiod_if2 -lrt ./prog .SH DESCRIPTION .ad l .nh .br .br pigpiod_if2 is a C library for the Raspberry which allows control of the GPIO via the socket interface to the pigpio daemon. .br .br .br .SS Features .br .br o hardware timed PWM on any of GPIO 0-31 .br .br o hardware timed servo pulses on any of GPIO 0-31 .br .br o callbacks when any of GPIO 0-31 change state .br .br o callbacks at timed intervals .br .br o reading/writing all of the GPIO in a bank as one operation .br .br o individually setting GPIO modes, reading and writing .br .br o notifications when any of GPIO 0-31 change state .br .br o the construction of output waveforms with microsecond timing .br .br o rudimentary permission control over GPIO .br .br o a simple interface to start and stop new threads .br .br o I2C, SPI, and serial link wrappers .br .br o creating and running scripts on the pigpio daemon .br .br .SS GPIO .br .br ALL GPIO are identified by their Broadcom number. .br .br .SS Notes .br .br The PWM and servo pulses are timed using the DMA and PWM/PCM peripherals. .br .br .SS Usage .br .br Include in your source files. .br .br Assuming your source is in prog.c use the following command to build .br .br .EX gcc -Wall -pthread -o prog prog.c -lpigpiod_if2 -lrt .br .EE .br .br to run make sure the pigpio daemon is running .br .br .EX sudo pigpiod .br .br ./prog # sudo is not required to run programs linked to pigpiod_if2 .br .EE .br .br For examples see x_pigpiod_if2.c within the pigpio archive file. .br .br .SS Notes .br .br All the functions which return an int return < 0 on error .br .br .SH OVERVIEW .br .SS ESSENTIAL .br .br pigpio_start Connects to a pigpio daemon .br pigpio_stop Disconnects from a pigpio daemon .br .SS BASIC .br .br set_mode Set a GPIO mode .br get_mode Get a GPIO mode .br .br set_pull_up_down Set/clear GPIO pull up/down resistor .br .br gpio_read Read a GPIO .br gpio_write Write a GPIO .br .SS PWM (overrides servo commands on same GPIO) .br .br set_PWM_dutycycle Start/stop PWM pulses on a GPIO .br set_PWM_frequency Configure PWM frequency for a GPIO .br set_PWM_range Configure PWM range for a GPIO .br .br get_PWM_dutycycle Get the PWM dutycycle in use on a GPIO .br get_PWM_frequency Get configured PWM frequency for a GPIO .br get_PWM_range Get configured PWM range for a GPIO .br .br get_PWM_real_range Get underlying PWM range for a GPIO .br .SS Servo (overrides PWM commands on same GPIO) .br .br set_servo_pulsewidth Start/stop servo pulses on a GPIO .br .br get_servo_pulsewidth Get the servo pulsewidth in use on a GPIO .br .SS INTERMEDIATE .br .br gpio_trigger Send a trigger pulse to a GPIO. .br .br set_watchdog Set a watchdog on a GPIO. .br .br read_bank_1 Read all GPIO in bank 1 .br read_bank_2 Read all GPIO in bank 2 .br .br clear_bank_1 Clear selected GPIO in bank 1 .br clear_bank_2 Clear selected GPIO in bank 2 .br .br set_bank_1 Set selected GPIO in bank 1 .br set_bank_2 Set selected GPIO in bank 2 .br .br callback Create GPIO level change callback .br callback_ex Create GPIO level change callback, extended .br .br callback_cancel Cancel a callback .br .br wait_for_edge Wait for GPIO level change .br .br start_thread Start a new thread .br stop_thread Stop a previously started thread .br .SS ADVANCED .br .br notify_open Request a notification handle .br notify_begin Start notifications for selected GPIO .br notify_pause Pause notifications .br notify_close Close a notification .br .br hardware_clock Start hardware clock on supported GPIO .br .br hardware_PWM Start hardware PWM on supported GPIO .br .br set_glitch_filter Set a glitch filter on a GPIO .br set_noise_filter Set a noise filter on a GPIO .br .br set_pad_strength Sets a pads drive strength .br get_pad_strength Gets a pads drive strength .br .br shell_ Executes a shell command .br .SS Custom .br .br custom_1 User custom function 1 .br custom_2 User custom function 2 .br .SS Events .br .br event_callback Sets a callback for an event .br event_callback_ex Sets a callback for an event, extended .br .br event_callback_cancel Cancel an event callback .br .br event_trigger Triggers an event .br .br wait_for_event Wait for an event .br .SS Scripts .br .br store_script Store a script .br run_script Run a stored script .br update_script Set a scripts parameters .br script_status Get script status and parameters .br stop_script Stop a running script .br delete_script Delete a stored script .br .SS I2C .br .br i2c_open Opens an I2C device .br i2c_close Closes an I2C device .br .br i2c_write_quick smbus write quick .br .br i2c_read_byte smbus read byte .br i2c_write_byte smbus write byte .br .br i2c_read_byte_data smbus read byte data .br i2c_write_byte_data smbus write byte data .br .br i2c_read_word_data smbus read word data .br i2c_write_word_data smbus write word data .br .br i2c_read_block_data smbus read block data .br i2c_write_block_data smbus write block data .br .br i2c_read_i2c_block_data smbus read I2C block data .br i2c_write_i2c_block_data smbus write I2C block data .br .br i2c_read_device Reads the raw I2C device .br i2c_write_device Writes the raw I2C device .br .br i2c_process_call smbus process call .br i2c_block_process_call smbus block process call .br .br i2c_zip Performs multiple I2C transactions .br .SS I2C BIT BANG .br .br bb_i2c_open Opens GPIO for bit banging I2C .br bb_i2c_close Closes GPIO for bit banging I2C .br .br bb_i2c_zip Performs bit banged I2C transactions .br .SS I2C/SPI SLAVE .br .br bsc_xfer I2C/SPI as slave transfer .br bsc_i2c I2C as slave transfer .br .SS SERIAL .br .br serial_open Opens a serial device .br serial_close Closes a serial device .br .br serial_read_byte Reads a byte from a serial device .br serial_write_byte Writes a byte to a serial device .br .br serial_read Reads bytes from a serial device .br serial_write Writes bytes to a serial device .br .br serial_data_available Returns number of bytes ready to be read .br .SS SERIAL BIT BANG (read only) .br .br bb_serial_read_open Opens a GPIO for bit bang serial reads .br bb_serial_read_close Closes a GPIO for bit bang serial reads .br .br bb_serial_invert Invert serial logic (1 invert, 0 normal) .br .br bb_serial_read Reads bit bang serial data from a GPIO .br .SS SPI .br .br spi_open Opens a SPI device .br spi_close Closes a SPI device .br .br spi_read Reads bytes from a SPI device .br spi_write Writes bytes to a SPI device .br spi_xfer Transfers bytes with a SPI device .br .SS SPI BIT BANG .br .br bb_spi_open Opens GPIO for bit banging SPI .br bb_spi_close Closes GPIO for bit banging SPI .br .br bb_spi_xfer Transfers bytes with bit banging SPI .br .SS FILES .br .br file_open Opens a file .br file_close Closes a file .br .br file_read Reads bytes from a file .br file_write Writes bytes to a file .br .br file_seek Seeks to a position within a file .br .br file_list List files which match a pattern .br .SS WAVES .br .br wave_clear Deletes all waveforms .br .br wave_add_new Starts a new waveform .br wave_add_generic Adds a series of pulses to the waveform .br wave_add_serial Adds serial data to the waveform .br .br wave_create Creates a waveform from added data .br wave_create_and_pad Creates a waveform of fixed size from added data .br wave_delete Deletes one or more waveforms .br .br wave_send_once Transmits a waveform once .br wave_send_repeat Transmits a waveform repeatedly .br wave_send_using_mode Transmits a waveform in the chosen mode .br .br wave_chain Transmits a chain of waveforms .br .br wave_tx_at Returns the current transmitting waveform .br .br wave_tx_busy Checks to see if the waveform has ended .br .br wave_tx_stop Aborts the current waveform .br .br wave_get_cbs Length in cbs of the current waveform .br wave_get_high_cbs Length of longest waveform so far .br wave_get_max_cbs Absolute maximum allowed cbs .br .br wave_get_micros Length in micros of the current waveform .br wave_get_high_micros Length of longest waveform so far .br wave_get_max_micros Absolute maximum allowed micros .br .br wave_get_pulses Length in pulses of the current waveform .br wave_get_high_pulses Length of longest waveform so far .br wave_get_max_pulses Absolute maximum allowed pulses .br .SS UTILITIES .br .br get_current_tick Get current tick (microseconds) .br .br get_hardware_revision Get hardware revision .br get_pigpio_version Get the pigpio version .br pigpiod_if_version Get the pigpiod_if2 version .br .br pigpio_error Get a text description of an error code. .br .br time_sleep Sleeps for a float number of seconds .br time_time Float number of seconds since the epoch .br .SH FUNCTIONS .IP "\fBdouble time_time(void)\fP" .IP "" 4 Return the current time in seconds since the Epoch. .IP "\fBvoid time_sleep(double seconds)\fP" .IP "" 4 Delay execution for a given number of seconds. .br .br .EX seconds: the number of seconds to delay. .br .EE .IP "\fBchar *pigpio_error(int errnum)\fP" .IP "" 4 Return a text description for an error code. .br .br .EX errnum: the error code. .br .EE .IP "\fBunsigned pigpiod_if_version(void)\fP" .IP "" 4 Return the pigpiod_if2 version. .IP "\fBpthread_t *start_thread(gpioThreadFunc_t thread_func, void *userdata)\fP" .IP "" 4 Starts a new thread of execution with thread_func as the main routine. .br .br .EX thread_func: the main function for the new thread. .br userdata: a pointer to an arbitrary argument. .br .EE .br .br Returns a pointer to pthread_t if OK, otherwise NULL. .br .br The function is passed the single argument userdata. .br .br The thread can be cancelled by passing the pointer to pthread_t to \fBstop_thread\fP. .IP "\fBvoid stop_thread(pthread_t *pth)\fP" .IP "" 4 Cancels the thread pointed at by pth. .br .br .EX pth: the thread to be stopped. .br .EE .br .br No value is returned. .br .br The thread to be stopped should have been started with \fBstart_thread\fP. .IP "\fBint pigpio_start(char *addrStr, char *portStr)\fP" .IP "" 4 Connect to the pigpio daemon. Reserving command and notification streams. .br .br .EX addrStr: specifies the host or IP address of the Pi running the .br pigpio daemon. It may be NULL in which case localhost .br is used unless overridden by the PIGPIO_ADDR environment .br variable. .br .br portStr: specifies the port address used by the Pi running the .br pigpio daemon. It may be NULL in which case "8888" .br is used unless overridden by the PIGPIO_PORT environment .br variable. .br .EE .br .br Returns an integer value greater than or equal to zero if OK. .br .br This value is passed to the GPIO routines to specify the Pi to be operated on. .IP "\fBvoid pigpio_stop(int pi)\fP" .IP "" 4 Terminates the connection to a pigpio daemon and releases resources used by the library. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .IP "\fBint set_mode(int pi, unsigned gpio, unsigned mode)\fP" .IP "" 4 Set the GPIO mode. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br gpio: 0-53. .br mode: PI_INPUT, PI_OUTPUT, PI_ALT0, PI_ALT1, .br PI_ALT2, PI_ALT3, PI_ALT4, PI_ALT5. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_MODE, or PI_NOT_PERMITTED. .IP "\fBint get_mode(int pi, unsigned gpio)\fP" .IP "" 4 Get the GPIO mode. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br gpio: 0-53. .br .EE .br .br Returns the GPIO mode if OK, otherwise PI_BAD_GPIO. .IP "\fBint set_pull_up_down(int pi, unsigned gpio, unsigned pud)\fP" .IP "" 4 Set or clear the GPIO pull-up/down resistor. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br gpio: 0-53. .br pud: PI_PUD_UP, PI_PUD_DOWN, PI_PUD_OFF. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_PUD, or PI_NOT_PERMITTED. .IP "\fBint gpio_read(int pi, unsigned gpio)\fP" .IP "" 4 Read the GPIO level. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br gpio:0-53. .br .EE .br .br Returns the GPIO level if OK, otherwise PI_BAD_GPIO. .IP "\fBint gpio_write(int pi, unsigned gpio, unsigned level)\fP" .IP "" 4 Write the GPIO level. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br gpio: 0-53. .br level: 0, 1. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_LEVEL, or PI_NOT_PERMITTED. .br .br Notes .br .br If PWM or servo pulses are active on the GPIO they are switched off. .IP "\fBint set_PWM_dutycycle(int pi, unsigned user_gpio, unsigned dutycycle)\fP" .IP "" 4 Start (non-zero dutycycle) or stop (0) PWM pulses on the GPIO. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31. .br dutycycle: 0-range (range defaults to 255). .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_DUTYCYCLE, or PI_NOT_PERMITTED. Notes .br .br The \fBset_PWM_range\fP function may be used to change the default range of 255. .IP "\fBint get_PWM_dutycycle(int pi, unsigned user_gpio)\fP" .IP "" 4 Return the PWM dutycycle in use on a GPIO. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_PWM_GPIO. .br .br For normal PWM the dutycycle will be out of the defined range for the GPIO (see \fBget_PWM_range\fP). .br .br If a hardware clock is active on the GPIO the reported dutycycle will be 500000 (500k) out of 1000000 (1M). .br .br If hardware PWM is active on the GPIO the reported dutycycle will be out of a 1000000 (1M). .IP "\fBint set_PWM_range(int pi, unsigned user_gpio, unsigned range)\fP" .IP "" 4 Set the range of PWM values to be used on the GPIO. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31. .br range: 25-40000. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_DUTYRANGE, or PI_NOT_PERMITTED. .br .br Notes .br .br If PWM is currently active on the GPIO its dutycycle will be scaled to reflect the new range. .br .br The real range, the number of steps between fully off and fully on for each of the 18 available GPIO frequencies is .br .br .EX 25(#1), 50(#2), 100(#3), 125(#4), 200(#5), 250(#6), .br 400(#7), 500(#8), 625(#9), 800(#10), 1000(#11), 1250(#12), .br 2000(#13), 2500(#14), 4000(#15), 5000(#16), 10000(#17), 20000(#18) .br .EE .br .br The real value set by set_PWM_range is (dutycycle * real range) / range. .IP "\fBint get_PWM_range(int pi, unsigned user_gpio)\fP" .IP "" 4 Get the range of PWM values being used on the GPIO. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31. .br .EE .br .br Returns the dutycycle range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. .br .br If a hardware clock or hardware PWM is active on the GPIO the reported range will be 1000000 (1M). .IP "\fBint get_PWM_real_range(int pi, unsigned user_gpio)\fP" .IP "" 4 Get the real underlying range of PWM values being used on the GPIO. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31. .br .EE .br .br Returns the real range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. .br .br If a hardware clock is active on the GPIO the reported real range will be 1000000 (1M). .br .br If hardware PWM is active on the GPIO the reported real range will be approximately 250M divided by the set PWM frequency. .br .br .IP "\fBint set_PWM_frequency(int pi, unsigned user_gpio, unsigned frequency)\fP" .IP "" 4 Set the frequency (in Hz) of the PWM to be used on the GPIO. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31. .br frequency: >=0 (Hz). .br .EE .br .br Returns the numerically closest frequency if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_PERMITTED. .br .br If PWM is currently active on the GPIO it will be switched off and then back on at the new frequency. .br .br Each GPIO can be independently set to one of 18 different PWM frequencies. .br .br The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5, 8, or 10 microseconds (default 5). The sample rate is set when the pigpio daemon is started. .br .br The frequencies for each sample rate are: .br .br .EX Hertz .br .br 1: 40000 20000 10000 8000 5000 4000 2500 2000 1600 .br 1250 1000 800 500 400 250 200 100 50 .br .br 2: 20000 10000 5000 4000 2500 2000 1250 1000 800 .br 625 500 400 250 200 125 100 50 25 .br .br 4: 10000 5000 2500 2000 1250 1000 625 500 400 .br 313 250 200 125 100 63 50 25 13 .br sample .br rate .br (us) 5: 8000 4000 2000 1600 1000 800 500 400 320 .br 250 200 160 100 80 50 40 20 10 .br .br 8: 5000 2500 1250 1000 625 500 313 250 200 .br 156 125 100 63 50 31 25 13 6 .br .br 10: 4000 2000 1000 800 500 400 250 200 160 .br 125 100 80 50 40 25 20 10 5 .br .EE .IP "\fBint get_PWM_frequency(int pi, unsigned user_gpio)\fP" .IP "" 4 Get the frequency of PWM being used on the GPIO. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31. .br .EE .br .br For normal PWM the frequency will be that defined for the GPIO by \fBset_PWM_frequency\fP. .br .br If a hardware clock is active on the GPIO the reported frequency will be that set by \fBhardware_clock\fP. .br .br If hardware PWM is active on the GPIO the reported frequency will be that set by \fBhardware_PWM\fP. .br .br Returns the frequency (in hertz) used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. .IP "\fBint set_servo_pulsewidth(int pi, unsigned user_gpio, unsigned pulsewidth)\fP" .IP "" 4 Start (500-2500) or stop (0) servo pulses on the GPIO. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31. .br pulsewidth: 0 (off), 500 (anti-clockwise) - 2500 (clockwise). .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_PULSEWIDTH or PI_NOT_PERMITTED. .br .br The selected pulsewidth will continue to be transmitted until changed by a subsequent call to set_servo_pulsewidth. .br .br The pulsewidths supported by servos varies and should probably be determined by experiment. A value of 1500 should always be safe and represents the mid-point of rotation. .br .br You can DAMAGE a servo if you command it to move beyond its limits. .br .br OTHER UPDATE RATES: .br .br This function updates servos at 50Hz. If you wish to use a different update frequency you will have to use the PWM functions. .br .br .EX Update Rate (Hz) 50 100 200 400 500 .br 1E6/Hz 20000 10000 5000 2500 2000 .br .EE .br .br Firstly set the desired PWM frequency using \fBset_PWM_frequency\fP. .br .br Then set the PWM range using \fBset_PWM_range\fP to 1E6/Hz. Doing this allows you to use units of microseconds when setting the servo pulsewidth. .br .br E.g. If you want to update a servo connected to GPIO 25 at 400Hz .br .br .EX set_PWM_frequency(25, 400); .br set_PWM_range(25, 2500); .br .EE .br .br Thereafter use the \fBset_PWM_dutycycle\fP function to move the servo, e.g. set_PWM_dutycycle(25, 1500) will set a 1500 us pulse. .br .IP "\fBint get_servo_pulsewidth(int pi, unsigned user_gpio)\fP" .IP "" 4 Return the servo pulsewidth in use on a GPIO. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERVO_GPIO. .IP "\fBint notify_open(int pi)\fP" .IP "" 4 Get a free notification handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .br .br Returns a handle greater than or equal to zero if OK, otherwise PI_NO_HANDLE. .br .br A notification is a method for being notified of GPIO state changes via a pipe. .br .br Pipes are only accessible from the local machine so this function serves no purpose if you are using the library from a remote machine. The in-built (socket) notifications provided by \fBcallback\fP should be used instead. .br .br Notifications for handle x will be available at the pipe named /dev/pigpiox (where x is the handle number). E.g. if the function returns 15 then the notifications must be read from /dev/pigpio15. .IP "\fBint notify_begin(int pi, unsigned handle, uint32_t bits)\fP" .IP "" 4 Start notifications on a previously opened handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: 0-31 (as returned by \fBnotify_open\fP) .br bits: a mask indicating the GPIO to be notified. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .br .br The notification sends state changes for each GPIO whose corresponding bit in bits is set. .br .br Each notification occupies 12 bytes in the fifo as follows: .br .br .EX typedef struct .br { .br uint16_t seqno; .br uint16_t flags; .br uint32_t tick; .br uint32_t level; .br } gpioReport_t; .br .EE .br .br seqno: starts at 0 each time the handle is opened and then increments by one for each report. .br .br flags: three flags are defined, PI_NTFY_FLAGS_WDOG, PI_NTFY_FLAGS_ALIVE, and PI_NTFY_FLAGS_EVENT. .br .br If bit 5 is set (PI_NTFY_FLAGS_WDOG) then bits 0-4 of the flags indicate a GPIO which has had a watchdog timeout. .br .br If bit 6 is set (PI_NTFY_FLAGS_ALIVE) this indicates a keep alive signal on the pipe/socket and is sent once a minute in the absence of other notification activity. .br .br If bit 7 is set (PI_NTFY_FLAGS_EVENT) then bits 0-4 of the flags indicate an event which has been triggered. .br .br tick: the number of microseconds since system boot. It wraps around after 1h12m. .br .br level: indicates the level of each GPIO. If bit 1<=0 (as returned by \fBpigpio_start\fP). .br handle: 0-31 (as returned by \fBnotify_open\fP) .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .br .br Notifications for the handle are suspended until \fBnotify_begin\fP is called again. .IP "\fBint notify_close(int pi, unsigned handle)\fP" .IP "" 4 Stop notifications on a previously opened handle and release the handle for reuse. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: 0-31 (as returned by \fBnotify_open\fP) .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .IP "\fBint set_watchdog(int pi, unsigned user_gpio, unsigned timeout)\fP" .IP "" 4 Sets a watchdog for a GPIO. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31. .br timeout: 0-60000. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_BAD_WDOG_TIMEOUT. .br .br The watchdog is nominally in milliseconds. .br .br Only one watchdog may be registered per GPIO. .br .br The watchdog may be cancelled by setting timeout to 0. .br .br Once a watchdog has been started callbacks for the GPIO will be triggered every timeout interval after the last GPIO activity. .br .br The callback will receive the special level PI_TIMEOUT. .IP "\fBint set_glitch_filter(int pi, unsigned user_gpio, unsigned steady)\fP" .IP "" 4 Sets a glitch filter on a GPIO. .br .br Level changes on the GPIO are not reported unless the level has been stable for at least \fBsteady\fP microseconds. The level is then reported. Level changes of less than \fBsteady\fP microseconds are ignored. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31 .br steady: 0-300000 .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER. .br .br This filter affects the GPIO samples returned to callbacks set up with \fBcallback\fP, \fBcallback_ex\fP and \fBwait_for_edge\fP. .br .br It does not affect levels read by \fBgpio_read\fP, \fBread_bank_1\fP, or \fBread_bank_2\fP. .br .br Each (stable) edge will be timestamped \fBsteady\fP microseconds after it was first detected. .IP "\fBint set_noise_filter(int pi, unsigned user_gpio, unsigned steady, unsigned active)\fP" .IP "" 4 Sets a noise filter on a GPIO. .br .br Level changes on the GPIO are ignored until a level which has been stable for \fBsteady\fP microseconds is detected. Level changes on the GPIO are then reported for \fBactive\fP microseconds after which the process repeats. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31 .br steady: 0-300000 .br active: 0-1000000 .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER. .br .br This filter affects the GPIO samples returned to callbacks set up with \fBcallback\fP, \fBcallback_ex\fP and \fBwait_for_edge\fP. .br .br It does not affect levels read by \fBgpio_read\fP, \fBread_bank_1\fP, or \fBread_bank_2\fP. .br .br Level changes before and after the active period may be reported. Your software must be designed to cope with such reports. .IP "\fBuint32_t read_bank_1(int pi)\fP" .IP "" 4 Read the levels of the bank 1 GPIO (GPIO 0-31). .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .br .br The returned 32 bit integer has a bit set if the corresponding GPIO is logic 1. GPIO n has bit value (1<=0 (as returned by \fBpigpio_start\fP). .br .EE .br .br The returned 32 bit integer has a bit set if the corresponding GPIO is logic 1. GPIO n has bit value (1<<(n-32)). .IP "\fBint clear_bank_1(int pi, uint32_t bits)\fP" .IP "" 4 Clears GPIO 0-31 if the corresponding bit in bits is set. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br bits: a bit mask with 1 set if the corresponding GPIO is .br to be cleared. .br .EE .br .br Returns 0 if OK, otherwise PI_SOME_PERMITTED. .br .br A status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO. .IP "\fBint clear_bank_2(int pi, uint32_t bits)\fP" .IP "" 4 Clears GPIO 32-53 if the corresponding bit (0-21) in bits is set. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br bits: a bit mask with 1 set if the corresponding GPIO is .br to be cleared. .br .EE .br .br Returns 0 if OK, otherwise PI_SOME_PERMITTED. .br .br A status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO. .IP "\fBint set_bank_1(int pi, uint32_t bits)\fP" .IP "" 4 Sets GPIO 0-31 if the corresponding bit in bits is set. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br bits: a bit mask with 1 set if the corresponding GPIO is .br to be set. .br .EE .br .br Returns 0 if OK, otherwise PI_SOME_PERMITTED. .br .br A status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO. .IP "\fBint set_bank_2(int pi, uint32_t bits)\fP" .IP "" 4 Sets GPIO 32-53 if the corresponding bit (0-21) in bits is set. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br bits: a bit mask with 1 set if the corresponding GPIO is .br to be set. .br .EE .br .br Returns 0 if OK, otherwise PI_SOME_PERMITTED. .br .br A status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO. .IP "\fBint hardware_clock(int pi, unsigned gpio, unsigned clkfreq)\fP" .IP "" 4 Starts a hardware clock on a GPIO at the specified frequency. Frequencies above 30MHz are unlikely to work. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br gpio: see description .br frequency: 0 (off) or 4689-250M (13184-375M for the BCM2711) .br .EE .br .br Returns 0 if OK, otherwise PI_NOT_PERMITTED, PI_BAD_GPIO, PI_NOT_HCLK_GPIO, PI_BAD_HCLK_FREQ,or PI_BAD_HCLK_PASS. .br .br The same clock is available on multiple GPIO. The latest frequency setting will be used by all GPIO which share a clock. .br .br The GPIO must be one of the following. .br .br .EX 4 clock 0 All models .br 5 clock 1 All models but A and B (reserved for system use) .br 6 clock 2 All models but A and B .br 20 clock 0 All models but A and B .br 21 clock 1 All models but A and Rev.2 B (reserved for system use) .br .br 32 clock 0 Compute module only .br 34 clock 0 Compute module only .br 42 clock 1 Compute module only (reserved for system use) .br 43 clock 2 Compute module only .br 44 clock 1 Compute module only (reserved for system use) .br .EE .br .br Access to clock 1 is protected by a password as its use will likely crash the Pi. The password is given by or'ing 0x5A000000 with the GPIO number. .IP "\fBint hardware_PWM(int pi, unsigned gpio, unsigned PWMfreq, uint32_t PWMduty)\fP" .IP "" 4 Starts hardware PWM on a GPIO at the specified frequency and dutycycle. Frequencies above 30MHz are unlikely to work. .br .br NOTE: Any waveform started by \fBwave_send_*\fP or \fBwave_chain\fP will be cancelled. .br .br This function is only valid if the pigpio main clock is PCM. The main clock defaults to PCM but may be overridden when the pigpio daemon is started (option -t). .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br gpio: see descripton .br PWMfreq: 0 (off) or 1-125M (1-187.5M for the BCM2711) .br PWMduty: 0 (off) to 1000000 (1M)(fully on) .br .EE .br .br Returns 0 if OK, otherwise PI_NOT_PERMITTED, PI_BAD_GPIO, PI_NOT_HPWM_GPIO, PI_BAD_HPWM_DUTY, PI_BAD_HPWM_FREQ, or PI_HPWM_ILLEGAL. .br .br The same PWM channel is available on multiple GPIO. The latest frequency and dutycycle setting will be used by all GPIO which share a PWM channel. .br .br The GPIO must be one of the following. .br .br .EX 12 PWM channel 0 All models but A and B .br 13 PWM channel 1 All models but A and B .br 18 PWM channel 0 All models .br 19 PWM channel 1 All models but A and B .br .br 40 PWM channel 0 Compute module only .br 41 PWM channel 1 Compute module only .br 45 PWM channel 1 Compute module only .br 52 PWM channel 0 Compute module only .br 53 PWM channel 1 Compute module only .br .EE .br .br The actual number of steps beween off and fully on is the integral part of 250M/PWMfreq (375M/PWMfreq for the BCM2711). .br .br The actual frequency set is 250M/steps (375M/steps for the BCM2711). .br .br There will only be a million steps for a PWMfreq of 250 (375 for the BCM2711). Lower frequencies will have more steps and higher frequencies will have fewer steps. PWMduty is automatically scaled to take this into account. .IP "\fBuint32_t get_current_tick(int pi)\fP" .IP "" 4 Gets the current system tick. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .br .br Tick is the number of microseconds since system boot. .br .br As tick is an unsigned 32 bit quantity it wraps around after 2**32 microseconds, which is approximately 1 hour 12 minutes. .br .br .IP "\fBuint32_t get_hardware_revision(int pi)\fP" .IP "" 4 Get the Pi's hardware revision number. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .br .br The hardware revision is the last few characters on the Revision line of /proc/cpuinfo. .br .br If the hardware revision can not be found or is not a valid hexadecimal number the function returns 0. .br .br The revision number can be used to determine the assignment of GPIO to pins (see \fBgpio\fP). .br .br There are at least three types of board. .br .br Type 1 boards have hardware revision numbers of 2 and 3. .br .br Type 2 boards have hardware revision numbers of 4, 5, 6, and 15. .br .br Type 3 boards have hardware revision numbers of 16 or greater. .IP "\fBuint32_t get_pigpio_version(int pi)\fP" .IP "" 4 Returns the pigpio version. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .IP "\fBint wave_clear(int pi)\fP" .IP "" 4 This function clears all waveforms and any data added by calls to the \fBwave_add_*\fP functions. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .br .br Returns 0 if OK. .IP "\fBint wave_add_new(int pi)\fP" .IP "" 4 This function starts a new empty waveform. You wouldn't normally need to call this function as it is automatically called after a waveform is created with the \fBwave_create\fP function. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .br .br Returns 0 if OK. .IP "\fBint wave_add_generic(int pi, unsigned numPulses, gpioPulse_t *pulses)\fP" .IP "" 4 This function adds a number of pulses to the current waveform. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br numPulses: the number of pulses. .br pulses: an array of pulses. .br .EE .br .br Returns the new total number of pulses in the current waveform if OK, otherwise PI_TOO_MANY_PULSES. .br .br The pulses are interleaved in time order within the existing waveform (if any). .br .br Merging allows the waveform to be built in parts, that is the settings for GPIO#1 can be added, and then GPIO#2 etc. .br .br If the added waveform is intended to start after or within the existing waveform then the first pulse should consist solely of a delay. .IP "\fBint wave_add_serial(int pi, unsigned user_gpio, unsigned baud, unsigned data_bits, unsigned stop_bits, unsigned offset, unsigned numBytes, char *str)\fP" .IP "" 4 This function adds a waveform representing serial data to the existing waveform (if any). The serial data starts offset microseconds from the start of the waveform. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31. .br baud: 50-1000000 .br data_bits: number of data bits (1-32) .br stop_bits: number of stop half bits (2-8) .br offset: >=0 .br numBytes: >=1 .br str: an array of chars. .br .EE .br .br Returns the new total number of pulses in the current waveform if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_WAVE_BAUD, PI_BAD_DATABITS, PI_BAD_STOP_BITS, PI_TOO_MANY_CHARS, PI_BAD_SER_OFFSET, or PI_TOO_MANY_PULSES. .br .br NOTES: .br .br The serial data is formatted as one start bit, \fBdata_bits\fP data bits, and \fBstop_bits\fP/2 stop bits. .br .br It is legal to add serial data streams with different baud rates to the same waveform. .br .br \fBnumBytes\fP is the number of bytes of data in str. .br .br The bytes required for each character depend upon \fBdata_bits\fP. .br .br For \fBdata_bits\fP 1-8 there will be one byte per character. .br For \fBdata_bits\fP 9-16 there will be two bytes per character. .br For \fBdata_bits\fP 17-32 there will be four bytes per character. .IP "\fBint wave_create(int pi)\fP" .IP "" 4 This function creates a waveform from the data provided by the prior calls to the \fBwave_add_*\fP functions. Upon success a wave id greater than or equal to 0 is returned, otherwise PI_EMPTY_WAVEFORM, PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .br .br The data provided by the \fBwave_add_*\fP functions is consumed by this function. .br .br As many waveforms may be created as there is space available. The wave id is passed to \fBwave_send_*\fP to specify the waveform to transmit. .br .br Normal usage would be .br .br Step 1. \fBwave_clear\fP to clear all waveforms and added data. .br .br Step 2. \fBwave_add_*\fP calls to supply the waveform data. .br .br Step 3. \fBwave_create\fP to create the waveform and get a unique id .br .br Repeat steps 2 and 3 as needed. .br .br Step 4. \fBwave_send_*\fP with the id of the waveform to transmit. .br .br A waveform comprises one or more pulses. Each pulse consists of a \fBgpioPulse_t\fP structure. .br .br .EX typedef struct .br { .br uint32_t gpioOn; .br uint32_t gpioOff; .br uint32_t usDelay; .br } gpioPulse_t; .br .EE .br .br The fields specify .br .br 1) the GPIO to be switched on at the start of the pulse. .br 2) the GPIO to be switched off at the start of the pulse. .br 3) the delay in microseconds before the next pulse. .br .br .br Any or all the fields can be zero. It doesn't make any sense to set all the fields to zero (the pulse will be ignored). .br .br When a waveform is started each pulse is executed in order with the specified delay between the pulse and the next. .br .br Returns the new waveform id if OK, otherwise PI_EMPTY_WAVEFORM, PI_NO_WAVEFORM_ID, PI_TOO_MANY_CBS, or PI_TOO_MANY_OOL. .IP "\fBint wave_create_and_pad(int pi, int percent)\fP" .IP "" 4 This function creates a waveform like \fBwave_create\fP but pads the consumed resources. Where percent gives the percentage of the resources to use (in terms of the theoretical maximum, not the current amount free). This allows the reuse .br of deleted waves while a transmission is active. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br percent: 0-100, size of waveform as percentage of maximum available. .br .EE .br .br The data provided by the \fBwave_add_*\fP functions are consumed by this function. .br .br As many waveforms may be created as there is space available. The wave id is passed to \fBwave_send_*\fP to specify the waveform to transmit. .br .br A usage would be the creation of two waves where one is filled while the other is being transmitted. Each wave is assigned 50% of the resources. This buffer structure allows the transmission of infinite wave sequences. .br .br Normal usage: .br .br Step 1. \fBwave_clear\fP to clear all waveforms and added data. .br .br Step 2. \fBwave_add_*\fP calls to supply the waveform data. .br .br Step 3. \fBwave_create_and_pad\fP to create a waveform of uniform size. .br .br Step 4. \fBwave_send_*\fP with the id of the waveform to transmit. .br .br Repeat steps 2-4 as needed. .br .br Step 5. Any wave id can now be deleted and another wave of the same size can be created in its place. .br .br Returns the new waveform id if OK, otherwise PI_EMPTY_WAVEFORM, PI_NO_WAVEFORM_ID, PI_TOO_MANY_CBS, or PI_TOO_MANY_OOL. .IP "\fBint wave_delete(int pi, unsigned wave_id)\fP" .IP "" 4 This function deletes the waveform with id wave_id. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br wave_id: >=0, as returned by \fBwave_create\fP. .br .EE .br .br Wave ids are allocated in order, 0, 1, 2, etc. .br .br The wave is flagged for deletion. The resources used by the wave will only be reused when either of the following apply. .br .br - all waves with higher numbered wave ids have been deleted or have been flagged for deletion. .br .br - a new wave is created which uses exactly the same resources as the current wave (see the C source for gpioWaveCreate for details). .br .br Returns 0 if OK, otherwise PI_BAD_WAVE_ID. .IP "\fBint wave_send_once(int pi, unsigned wave_id)\fP" .IP "" 4 This function transmits the waveform with id wave_id. The waveform is sent once. .br .br NOTE: Any hardware PWM started by \fBhardware_PWM\fP will be cancelled. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br wave_id: >=0, as returned by \fBwave_create\fP. .br .EE .br .br Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE. .IP "\fBint wave_send_repeat(int pi, unsigned wave_id)\fP" .IP "" 4 This function transmits the waveform with id wave_id. The waveform cycles until cancelled (either by the sending of a new waveform or by \fBwave_tx_stop\fP). .br .br NOTE: Any hardware PWM started by \fBhardware_PWM\fP will be cancelled. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br wave_id: >=0, as returned by \fBwave_create\fP. .br .EE .br .br Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE. .IP "\fBint wave_send_using_mode(int pi, unsigned wave_id, unsigned mode)\fP" .IP "" 4 Transmits the waveform with id wave_id using mode mode. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br wave_id: >=0, as returned by \fBwave_create\fP. .br mode: PI_WAVE_MODE_ONE_SHOT, PI_WAVE_MODE_REPEAT, .br PI_WAVE_MODE_ONE_SHOT_SYNC, or PI_WAVE_MODE_REPEAT_SYNC. .br .EE .br .br PI_WAVE_MODE_ONE_SHOT: same as \fBwave_send_once\fP. .br .br PI_WAVE_MODE_REPEAT same as \fBwave_send_repeat\fP. .br .br PI_WAVE_MODE_ONE_SHOT_SYNC same as \fBwave_send_once\fP but tries to sync with the previous waveform. .br .br PI_WAVE_MODE_REPEAT_SYNC same as \fBwave_send_repeat\fP but tries to sync with the previous waveform. .br .br WARNING: bad things may happen if you delete the previous waveform before it has been synced to the new waveform. .br .br NOTE: Any hardware PWM started by \fBhardware_PWM\fP will be cancelled. .br .br Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE. .IP "\fBint wave_chain(int pi, char *buf, unsigned bufSize)\fP" .IP "" 4 This function transmits a chain of waveforms. .br .br NOTE: Any hardware PWM started by \fBhardware_PWM\fP will be cancelled. .br .br The waves to be transmitted are specified by the contents of buf which contains an ordered list of \fBwave_id\fPs and optional command codes and related data. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br buf: pointer to the wave_ids and optional command codes .br bufSize: the number of bytes in buf .br .EE .br .br Returns 0 if OK, otherwise PI_CHAIN_NESTING, PI_CHAIN_LOOP_CNT, PI_BAD_CHAIN_LOOP, PI_BAD_CHAIN_CMD, PI_CHAIN_COUNTER, PI_BAD_CHAIN_DELAY, PI_CHAIN_TOO_BIG, or PI_BAD_WAVE_ID. .br .br Each wave is transmitted in the order specified. A wave may occur multiple times per chain. .br .br A blocks of waves may be transmitted multiple times by using the loop commands. The block is bracketed by loop start and end commands. Loops may be nested. .br .br Delays between waves may be added with the delay command. .br .br The following command codes are supported: .br .br Name Cmd & Data Meaning .br Loop Start 255 0 Identify start of a wave block .br Loop Repeat 255 1 x y loop x + y*256 times .br Delay 255 2 x y delay x + y*256 microseconds .br Loop Forever 255 3 loop forever .br .br .br If present Loop Forever must be the last entry in the chain. .br .br The code is currently dimensioned to support a chain with roughly 600 entries and 20 loop counters. .br .br \fBExample\fP .br .EX #include .br #include .br .br #define WAVES 5 .br #define GPIO 4 .br .br int main(int argc, char *argv[]) .br { .br int i, pi, wid[WAVES]; .br .br pi = pigpio_start(0, 0); .br if (pi<0) return -1; .br .br set_mode(pi, GPIO, PI_OUTPUT); .br .br for (i=0; i=0 (as returned by \fBpigpio_start\fP). .br .EE .br .br Returns the waveform id or one of the following special values: .br .br PI_WAVE_NOT_FOUND (9998) - transmitted wave not found. .br PI_NO_TX_WAVE (9999) - no wave being transmitted. .IP "\fBint wave_tx_busy(int pi)\fP" .IP "" 4 This function checks to see if a waveform is currently being transmitted. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .br .br Returns 1 if a waveform is currently being transmitted, otherwise 0. .IP "\fBint wave_tx_stop(int pi)\fP" .IP "" 4 This function stops the transmission of the current waveform. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .br .br Returns 0 if OK. .br .br This function is intended to stop a waveform started with the repeat mode. .IP "\fBint wave_get_micros(int pi)\fP" .IP "" 4 This function returns the length in microseconds of the current waveform. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .IP "\fBint wave_get_high_micros(int pi)\fP" .IP "" 4 This function returns the length in microseconds of the longest waveform created since the pigpio daemon was started. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .IP "\fBint wave_get_max_micros(int pi)\fP" .IP "" 4 This function returns the maximum possible size of a waveform in .br microseconds. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .IP "\fBint wave_get_pulses(int pi)\fP" .IP "" 4 This function returns the length in pulses of the current waveform. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .IP "\fBint wave_get_high_pulses(int pi)\fP" .IP "" 4 This function returns the length in pulses of the longest waveform created since the pigpio daemon was started. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .IP "\fBint wave_get_max_pulses(int pi)\fP" .IP "" 4 This function returns the maximum possible size of a waveform in pulses. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .IP "\fBint wave_get_cbs(int pi)\fP" .IP "" 4 This function returns the length in DMA control blocks of the current waveform. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .IP "\fBint wave_get_high_cbs(int pi)\fP" .IP "" 4 This function returns the length in DMA control blocks of the longest waveform created since the pigpio daemon was started. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .IP "\fBint wave_get_max_cbs(int pi)\fP" .IP "" 4 This function returns the maximum possible size of a waveform in DMA control blocks. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br .EE .IP "\fBint gpio_trigger(int pi, unsigned user_gpio, unsigned pulseLen, unsigned level)\fP" .IP "" 4 This function sends a trigger pulse to a GPIO. The GPIO is set to level for pulseLen microseconds and then reset to not level. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31. .br pulseLen: 1-100. .br level: 0,1. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_LEVEL, PI_BAD_PULSELEN, or PI_NOT_PERMITTED. .IP "\fBint store_script(int pi, char *script)\fP" .IP "" 4 This function stores a script for later execution. .br .br See \fBhttp://abyz.me.uk/rpi/pigpio/pigs.html#Scripts\fP for details. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br script: the text of the script. .br .EE .br .br The function returns a script id if the script is valid, otherwise PI_BAD_SCRIPT. .IP "\fBint run_script(int pi, unsigned script_id, unsigned numPar, uint32_t *param)\fP" .IP "" 4 This function runs a stored script. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br script_id: >=0, as returned by \fBstore_script\fP. .br numPar: 0-10, the number of parameters. .br param: an array of parameters. .br .EE .br .br The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM .br .br param is an array of up to 10 parameters which may be referenced in the script as p0 to p9. .IP "\fBint update_script(int pi, unsigned script_id, unsigned numPar, uint32_t *param)\fP" .IP "" 4 This function sets the parameters of a script. The script may or may not be running. The first numPar parameters of the script are overwritten with the new values. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br script_id: >=0, as returned by \fBstore_script\fP. .br numPar: 0-10, the number of parameters. .br param: an array of parameters. .br .EE .br .br The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM. .br .br param is an array of up to 10 parameters which may be referenced in the script as p0 to p9. .IP "\fBint script_status(int pi, unsigned script_id, uint32_t *param)\fP" .IP "" 4 This function returns the run status of a stored script as well as the current values of parameters 0 to 9. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br script_id: >=0, as returned by \fBstore_script\fP. .br param: an array to hold the returned 10 parameters. .br .EE .br .br The function returns greater than or equal to 0 if OK, otherwise PI_BAD_SCRIPT_ID. .br .br The run status may be .br .br .EX PI_SCRIPT_INITING .br PI_SCRIPT_HALTED .br PI_SCRIPT_RUNNING .br PI_SCRIPT_WAITING .br PI_SCRIPT_FAILED .br .EE .br .br The current value of script parameters 0 to 9 are returned in param. .IP "\fBint stop_script(int pi, unsigned script_id)\fP" .IP "" 4 This function stops a running script. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br script_id: >=0, as returned by \fBstore_script\fP. .br .EE .br .br The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID. .IP "\fBint delete_script(int pi, unsigned script_id)\fP" .IP "" 4 This function deletes a stored script. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br script_id: >=0, as returned by \fBstore_script\fP. .br .EE .br .br The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID. .IP "\fBint bb_serial_read_open(int pi, unsigned user_gpio, unsigned baud, unsigned data_bits)\fP" .IP "" 4 This function opens a GPIO for bit bang reading of serial data. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31. .br baud: 50-250000 .br data_bits: 1-32 .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_WAVE_BAUD, or PI_GPIO_IN_USE. .br .br The serial data is returned in a cyclic buffer and is read using bb_serial_read. .br .br It is the caller's responsibility to read data from the cyclic buffer in a timely fashion. .IP "\fBint bb_serial_read(int pi, unsigned user_gpio, void *buf, size_t bufSize)\fP" .IP "" 4 This function copies up to bufSize bytes of data read from the bit bang serial cyclic buffer to the buffer starting at buf. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31, previously opened with \fBbb_serial_read_open\fP. .br buf: an array to receive the read bytes. .br bufSize: >=0 .br .EE .br .br Returns the number of bytes copied if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERIAL_GPIO. .br .br The bytes returned for each character depend upon the number of data bits \fBdata_bits\fP specified in the \fBbb_serial_read_open\fP command. .br .br For \fBdata_bits\fP 1-8 there will be one byte per character. .br For \fBdata_bits\fP 9-16 there will be two bytes per character. .br For \fBdata_bits\fP 17-32 there will be four bytes per character. .IP "\fBint bb_serial_read_close(int pi, unsigned user_gpio)\fP" .IP "" 4 This function closes a GPIO for bit bang reading of serial data. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31, previously opened with \fBbb_serial_read_open\fP. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_SERIAL_GPIO. .IP "\fBint bb_serial_invert(int pi, unsigned user_gpio, unsigned invert)\fP" .IP "" 4 This function inverts serial logic for big bang serial reads. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31, previously opened with \fBbb_serial_read_open\fP. .br invert: 0-1, 1 invert, 0 normal. .br .EE .br .br Returns 0 if OK, otherwise PI_NOT_SERIAL_GPIO or PI_BAD_SER_INVERT. .IP "\fBint i2c_open(int pi, unsigned i2c_bus, unsigned i2c_addr, unsigned i2c_flags)\fP" .IP "" 4 This returns a handle for the device at address i2c_addr on bus i2c_bus. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br i2c_bus: >=0. .br i2c_addr: 0-0x7F. .br i2c_flags: 0. .br .EE .br .br No flags are currently defined. This parameter should be set to zero. .br .br Physically buses 0 and 1 are available on the Pi. Higher numbered buses will be available if a kernel supported bus multiplexor is being used. .br .br The GPIO used are given in the following table. .br .br SDA SCL .br I2C 0 0 1 .br I2C 1 2 3 .br .br .br Returns a handle (>=0) if OK, otherwise PI_BAD_I2C_BUS, PI_BAD_I2C_ADDR, PI_BAD_FLAGS, PI_NO_HANDLE, or PI_I2C_OPEN_FAILED. .br .br For the SMBus commands the low level transactions are shown at the end of the function description. The following abbreviations are used. .br .br .EX S (1 bit) : Start bit .br P (1 bit) : Stop bit .br Rd/Wr (1 bit) : Read/Write bit. Rd equals 1, Wr equals 0. .br A, NA (1 bit) : Accept and not accept bit. .br .br .br Addr (7 bits): I2C 7 bit address. .br i2c_reg (8 bits): A byte which often selects a register. .br Data (8 bits): A data byte. .br Count (8 bits): A byte defining the length of a block operation. .br .br [..]: Data sent by the device. .br .EE .IP "\fBint i2c_close(int pi, unsigned handle)\fP" .IP "" 4 This closes the I2C device associated with the handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBi2c_open\fP. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .IP "\fBint i2c_write_quick(int pi, unsigned handle, unsigned bit)\fP" .IP "" 4 This sends a single bit (in the Rd/Wr bit) to the device associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBi2c_open\fP. .br bit: 0-1, the value to write. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br Quick command. SMBus 2.0 5.5.1 .EX S Addr bit [A] P .br .EE .IP "\fBint i2c_write_byte(int pi, unsigned handle, unsigned bVal)\fP" .IP "" 4 This sends a single byte to the device associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBi2c_open\fP. .br bVal: 0-0xFF, the value to write. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br Send byte. SMBus 2.0 5.5.2 .EX S Addr Wr [A] bVal [A] P .br .EE .IP "\fBint i2c_read_byte(int pi, unsigned handle)\fP" .IP "" 4 This reads a single byte from the device associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBi2c_open\fP. .br .EE .br .br Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, or PI_I2C_READ_FAILED. .br .br Receive byte. SMBus 2.0 5.5.3 .EX S Addr Rd [A] [Data] NA P .br .EE .IP "\fBint i2c_write_byte_data(int pi, unsigned handle, unsigned i2c_reg, unsigned bVal)\fP" .IP "" 4 This writes a single byte to the specified register of the device associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to write. .br bVal: 0-0xFF, the value to write. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br Write byte. SMBus 2.0 5.5.4 .EX S Addr Wr [A] i2c_reg [A] bVal [A] P .br .EE .IP "\fBint i2c_write_word_data(int pi, unsigned handle, unsigned i2c_reg, unsigned wVal)\fP" .IP "" 4 This writes a single 16 bit word to the specified register of the device associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to write. .br wVal: 0-0xFFFF, the value to write. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br Write word. SMBus 2.0 5.5.4 .EX S Addr Wr [A] i2c_reg [A] wval_Low [A] wVal_High [A] P .br .EE .IP "\fBint i2c_read_byte_data(int pi, unsigned handle, unsigned i2c_reg)\fP" .IP "" 4 This reads a single byte from the specified register of the device associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to read. .br .EE .br .br Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br Read byte. SMBus 2.0 5.5.5 .EX S Addr Wr [A] i2c_reg [A] S Addr Rd [A] [Data] NA P .br .EE .IP "\fBint i2c_read_word_data(int pi, unsigned handle, unsigned i2c_reg)\fP" .IP "" 4 This reads a single 16 bit word from the specified register of the device associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to read. .br .EE .br .br Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br Read word. SMBus 2.0 5.5.5 .EX S Addr Wr [A] i2c_reg [A] .br S Addr Rd [A] [DataLow] A [DataHigh] NA P .br .EE .IP "\fBint i2c_process_call(int pi, unsigned handle, unsigned i2c_reg, unsigned wVal)\fP" .IP "" 4 This writes 16 bits of data to the specified register of the device associated with handle and and reads 16 bits of data in return. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to write/read. .br wVal: 0-0xFFFF, the value to write. .br .EE .br .br Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br Process call. SMBus 2.0 5.5.6 .EX S Addr Wr [A] i2c_reg [A] wVal_Low [A] wVal_High [A] .br S Addr Rd [A] [DataLow] A [DataHigh] NA P .br .EE .IP "\fBint i2c_write_block_data(int pi, unsigned handle, unsigned i2c_reg, char *buf, unsigned count)\fP" .IP "" 4 This writes up to 32 bytes to the specified register of the device associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to write. .br buf: an array with the data to send. .br count: 1-32, the number of bytes to write. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br Block write. SMBus 2.0 5.5.7 .EX S Addr Wr [A] i2c_reg [A] count [A] buf0 [A] buf1 [A] ... .br [A] bufn [A] P .br .EE .IP "\fBint i2c_read_block_data(int pi, unsigned handle, unsigned i2c_reg, char *buf)\fP" .IP "" 4 This reads a block of up to 32 bytes from the specified register of the device associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to read. .br buf: an array to receive the read data. .br .EE .br .br The amount of returned data is set by the device. .br .br Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br Block read. SMBus 2.0 5.5.7 .EX S Addr Wr [A] i2c_reg [A] .br S Addr Rd [A] [Count] A [buf0] A [buf1] A ... A [bufn] NA P .br .EE .IP "\fBint i2c_block_process_call(int pi, unsigned handle, unsigned i2c_reg, char *buf, unsigned count)\fP" .IP "" 4 This writes data bytes to the specified register of the device associated with handle and reads a device specified number of bytes of data in return. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to write/read. .br buf: an array with the data to send and to receive the read data. .br count: 1-32, the number of bytes to write. .br .EE .br .br .br .br Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br The smbus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received. The total number of bytes sent/received must be 32 or less. .br .br Block write-block read. SMBus 2.0 5.5.8 .EX S Addr Wr [A] i2c_reg [A] count [A] buf0 [A] ... .br S Addr Rd [A] [Count] A [Data] ... A P .br .EE .IP "\fBint i2c_read_i2c_block_data(int pi, unsigned handle, unsigned i2c_reg, char *buf, unsigned count)\fP" .IP "" 4 This reads count bytes from the specified register of the device associated with handle . The count may be 1-32. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to read. .br buf: an array to receive the read data. .br count: 1-32, the number of bytes to read. .br .EE .br .br Returns the number of bytes read (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br .EX S Addr Wr [A] i2c_reg [A] .br S Addr Rd [A] [buf0] A [buf1] A ... A [bufn] NA P .br .EE .IP "\fBint i2c_write_i2c_block_data(int pi, unsigned handle, unsigned i2c_reg, char *buf, unsigned count)\fP" .IP "" 4 This writes 1 to 32 bytes to the specified register of the device associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBi2c_open\fP. .br i2c_reg: 0-255, the register to write. .br buf: the data to write. .br count: 1-32, the number of bytes to write. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br .EX S Addr Wr [A] i2c_reg [A] buf0 [A] buf1 [A] ... [A] bufn [A] P .br .EE .IP "\fBint i2c_read_device(int pi, unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This reads count bytes from the raw device into buf. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBi2c_open\fP. .br buf: an array to receive the read data bytes. .br count: >0, the number of bytes to read. .br .EE .br .br Returns count (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. .br .br .EX S Addr Rd [A] [buf0] A [buf1] A ... A [bufn] NA P .br .EE .IP "\fBint i2c_write_device(int pi, unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This writes count bytes from buf to the raw device. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBi2c_open\fP. .br buf: an array containing the data bytes to write. .br count: >0, the number of bytes to write. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. .br .br .EX S Addr Wr [A] buf0 [A] buf1 [A] ... [A] bufn [A] P .br .EE .IP "\fBint i2c_zip(int pi, unsigned handle, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen)\fP" .IP "" 4 This function executes a sequence of I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenated command codes and associated data. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBi2cOpen\fP .br inBuf: pointer to the concatenated I2C commands, see below .br inLen: size of command buffer .br outBuf: pointer to buffer to hold returned data .br outLen: size of output buffer .br .EE .br .br Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_HANDLE, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN. PI_BAD_I2C_WLEN, or PI_BAD_I2C_SEG. .br .br The following command codes are supported: .br .br Name Cmd & Data Meaning .br End 0 No more commands .br Escape 1 Next P is two bytes .br On 2 Switch combined flag on .br Off 3 Switch combined flag off .br Address 4 P Set I2C address to P .br Flags 5 lsb msb Set I2C flags to lsb + (msb << 8) .br Read 6 P Read P bytes of data .br Write 7 P ... Write P bytes of data .br .br .br The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). .br .br The address defaults to that associated with the handle. The flags default to 0. The address and flags maintain their previous value until updated. .br .br The returned I2C data is stored in consecutive locations of outBuf. .br .br \fBExample\fP .br .EX Set address 0x53, write 0x32, read 6 bytes .br Set address 0x1E, write 0x03, read 6 bytes .br Set address 0x68, write 0x1B, read 8 bytes .br End .br .br 0x04 0x53 0x07 0x01 0x32 0x06 0x06 .br 0x04 0x1E 0x07 0x01 0x03 0x06 0x06 .br 0x04 0x68 0x07 0x01 0x1B 0x06 0x08 .br 0x00 .br .EE .br .br .IP "\fBint bb_i2c_open(int pi, unsigned SDA, unsigned SCL, unsigned baud)\fP" .IP "" 4 This function selects a pair of GPIO for bit banging I2C at a specified baud rate. .br .br Bit banging I2C allows for certain operations which are not possible with the standard I2C driver. .br .br o baud rates as low as 50 .br o repeated starts .br o clock stretching .br o I2C on any pair of spare GPIO .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br SDA: 0-31 .br SCL: 0-31 .br baud: 50-500000 .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_I2C_BAUD, or PI_GPIO_IN_USE. .br .br NOTE: .br .br The GPIO used for SDA and SCL must have pull-ups to 3V3 connected. As a guide the hardware pull-ups on pins 3 and 5 are 1k8 in value. .IP "\fBint bb_i2c_close(int pi, unsigned SDA)\fP" .IP "" 4 This function stops bit banging I2C on a pair of GPIO previously opened with \fBbb_i2c_open\fP. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br SDA: 0-31, the SDA GPIO used in a prior call to \fBbb_i2c_open\fP .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_I2C_GPIO. .IP "\fBint bb_i2c_zip(int pi, unsigned SDA, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen)\fP" .IP "" 4 This function executes a sequence of bit banged I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenated command codes and associated data. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br SDA: 0-31 (as used in a prior call to \fBbb_i2c_open\fP) .br inBuf: pointer to the concatenated I2C commands, see below .br inLen: size of command buffer .br outBuf: pointer to buffer to hold returned data .br outLen: size of output buffer .br .EE .br .br Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_USER_GPIO, PI_NOT_I2C_GPIO, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN, PI_BAD_I2C_WLEN, PI_I2C_READ_FAILED, or PI_I2C_WRITE_FAILED. .br .br The following command codes are supported: .br .br Name Cmd & Data Meaning .br End 0 No more commands .br Escape 1 Next P is two bytes .br Start 2 Start condition .br Stop 3 Stop condition .br Address 4 P Set I2C address to P .br Flags 5 lsb msb Set I2C flags to lsb + (msb << 8) .br Read 6 P Read P bytes of data .br Write 7 P ... Write P bytes of data .br .br .br The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). .br .br The address and flags default to 0. The address and flags maintain their previous value until updated. .br .br No flags are currently defined. .br .br The returned I2C data is stored in consecutive locations of outBuf. .br .br \fBExample\fP .br .EX Set address 0x53 .br start, write 0x32, (re)start, read 6 bytes, stop .br Set address 0x1E .br start, write 0x03, (re)start, read 6 bytes, stop .br Set address 0x68 .br start, write 0x1B, (re)start, read 8 bytes, stop .br End .br .br 0x04 0x53 .br 0x02 0x07 0x01 0x32 0x02 0x06 0x06 0x03 .br .br 0x04 0x1E .br 0x02 0x07 0x01 0x03 0x02 0x06 0x06 0x03 .br .br 0x04 0x68 .br 0x02 0x07 0x01 0x1B 0x02 0x06 0x08 0x03 .br .br 0x00 .br .EE .IP "\fBint bb_spi_open(int pi, unsigned CS, unsigned MISO, unsigned MOSI, unsigned SCLK, unsigned baud, unsigned spi_flags)\fP" .IP "" 4 This function selects a set of GPIO for bit banging SPI at a specified baud rate. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br CS: 0-31 .br MISO: 0-31 .br MOSI: 0-31 .br SCLK: 0-31 .br baud: 50-250000 .br spi_flags: see below .br .EE .br .br spi_flags consists of the least significant 22 bits. .br .br .EX 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 .br 0 0 0 0 0 0 R T 0 0 0 0 0 0 0 0 0 0 0 p m m .br .EE .br .br mm defines the SPI mode, defaults to 0 .br .br .EX Mode CPOL CPHA .br 0 0 0 .br 1 0 1 .br 2 1 0 .br 3 1 1 .br .EE .br .br p is 0 if CS is active low (default) and 1 for active high. .br .br T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. .br .br R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. .br .br The other bits in flags should be set to zero. .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_SPI_BAUD, or PI_GPIO_IN_USE. .br .br If more than one device is connected to the SPI bus (defined by SCLK, MOSI, and MISO) each must have its own CS. .br .br \fBExample\fP .br .EX bb_spi_open(pi,10, MISO, MOSI, SCLK, 10000, 0); // device 1 .br bb_spi_open(pi,11, MISO, MOSI, SCLK, 20000, 3); // device 2 .br .EE .IP "\fBint bb_spi_close(int pi, unsigned CS)\fP" .IP "" 4 This function stops bit banging SPI on a set of GPIO opened with \fBbbSPIOpen\fP. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br CS: 0-31, the CS GPIO used in a prior call to \fBbb_spi_open\fP .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_SPI_GPIO. .IP "\fBint bb_spi_xfer(int pi, unsigned CS, char *txBuf, char *rxBuf, unsigned count)\fP" .IP "" 4 This function executes a bit banged SPI transfer. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br CS: 0-31 (as used in a prior call to \fBbb_spi_open\fP) .br txBuf: pointer to buffer to hold data to be sent .br rxBuf: pointer to buffer to hold returned data .br count: size of data transfer .br .EE .br .br Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_USER_GPIO, PI_NOT_SPI_GPIO or PI_BAD_POINTER. .br .br \fBExample\fP .br .EX // gcc -Wall -pthread -o bb_spi_x_test bb_spi_x_test.c -lpigpiod_if2 .br // ./bb_spi_x_test .br .br #include .br .br #include "pigpiod_if2.h" .br .br #define CE0 5 .br #define CE1 6 .br #define MISO 13 .br #define MOSI 19 .br #define SCLK 12 .br .br int main(int argc, char *argv[]) .br { .br int i, pi, count, set_val, read_val; .br unsigned char inBuf[3]; .br char cmd1[] = {0, 0}; .br char cmd2[] = {12, 0}; .br char cmd3[] = {1, 128, 0}; .br .br if ((pi = pigpio_start(0, 0)) < 0) .br { .br fprintf(stderr, "pigpio initialisation failed (%d).\n", pi); .br return 1; .br } .br .br bb_spi_open(pi, CE0, MISO, MOSI, SCLK, 10000, 0); // MCP4251 DAC .br bb_spi_open(pi, CE1, MISO, MOSI, SCLK, 20000, 3); // MCP3008 ADC .br .br for (i=0; i<256; i++) .br { .br cmd1[1] = i; .br .br count = bb_spi_xfer(pi, CE0, cmd1, (char *)inBuf, 2); // > DAC .br .br if (count == 2) .br { .br count = bb_spi_xfer(pi, CE0, cmd2, (char *)inBuf, 2); // < DAC .br .br if (count == 2) .br { .br set_val = inBuf[1]; .br .br count = bb_spi_xfer(pi, CE1, cmd3, (char *)inBuf, 3); // < ADC .br .br if (count == 3) .br { .br read_val = ((inBuf[1]&3)<<8) | inBuf[2]; .br printf("%d %d\n", set_val, read_val); .br } .br } .br } .br } .br .br bb_spi_close(pi, CE0); .br bb_spi_close(pi, CE1); .br .br pigpio_stop(pi); .br } .br .EE .IP "\fBint spi_open(int pi, unsigned spi_channel, unsigned baud, unsigned spi_flags)\fP" .IP "" 4 This function returns a handle for the SPI device on the channel. Data will be transferred at baud bits per second. The flags may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select. .br .br The Pi has two SPI peripherals: main and auxiliary. .br .br The main SPI has two chip selects (channels), the auxiliary has three. .br .br The auxiliary SPI is available on all models but the A and B. .br .br The GPIO used are given in the following table. .br .br MISO MOSI SCLK CE0 CE1 CE2 .br Main SPI 9 10 11 8 7 - .br Aux SPI 19 20 21 18 17 16 .br .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br spi_channel: 0-1 (0-2 for the auxiliary SPI). .br baud: 32K-125M (values above 30M are unlikely to work). .br spi_flags: see below. .br .EE .br .br Returns a handle (>=0) if OK, otherwise PI_BAD_SPI_CHANNEL, PI_BAD_SPI_SPEED, PI_BAD_FLAGS, PI_NO_AUX_SPI, or PI_SPI_OPEN_FAILED. .br .br spi_flags consists of the least significant 22 bits. .br .br .EX 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 .br b b b b b b R T n n n n W A u2 u1 u0 p2 p1 p0 m m .br .EE .br .br mm defines the SPI mode. .br .br Warning: modes 1 and 3 do not appear to work on the auxiliary SPI. .br .br .EX Mode POL PHA .br 0 0 0 .br 1 0 1 .br 2 1 0 .br 3 1 1 .br .EE .br .br px is 0 if CEx is active low (default) and 1 for active high. .br .br ux is 0 if the CEx GPIO is reserved for SPI (default) and 1 otherwise. .br .br A is 0 for the main SPI, 1 for the auxiliary SPI. .br .br W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Main SPI only. .br .br nnnn defines the number of bytes (0-15) to write before switching the MOSI line to MISO to read data. This field is ignored if W is not set. Main SPI only. .br .br T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. Auxiliary SPI only. .br .br R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. Auxiliary SPI only. .br .br bbbbbb defines the word size in bits (0-32). The default (0) sets 8 bits per word. Auxiliary SPI only. .br .br The \fBspi_read\fP, \fBspi_write\fP, and \fBspi_xfer\fP functions transfer data packed into 1, 2, or 4 bytes according to the word size in bits. .br .br For bits 1-8 there will be one byte per character. .br For bits 9-16 there will be two bytes per character. .br For bits 17-32 there will be four bytes per character. .br .br Multi-byte transfers are made in least significant byte first order. .br .br E.g. to transfer 32 11-bit words buf should contain 64 bytes and count should be 64. .br .br E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A. .br .br The other bits in flags should be set to zero. .IP "\fBint spi_close(int pi, unsigned handle)\fP" .IP "" 4 This functions closes the SPI device identified by the handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBspi_open\fP. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .IP "\fBint spi_read(int pi, unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This function reads count bytes of data from the SPI device associated with the handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBspi_open\fP. .br buf: an array to receive the read data bytes. .br count: the number of bytes to read. .br .EE .br .br Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. .IP "\fBint spi_write(int pi, unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This function writes count bytes of data from buf to the SPI device associated with the handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBspi_open\fP. .br buf: the data bytes to write. .br count: the number of bytes to write. .br .EE .br .br Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. .IP "\fBint spi_xfer(int pi, unsigned handle, char *txBuf, char *rxBuf, unsigned count)\fP" .IP "" 4 This function transfers count bytes of data from txBuf to the SPI device associated with the handle. Simultaneously count bytes of data are read from the device and placed in rxBuf. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBspi_open\fP. .br txBuf: the data bytes to write. .br rxBuf: the received data bytes. .br count: the number of bytes to transfer. .br .EE .br .br Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. .IP "\fBint serial_open(int pi, char *ser_tty, unsigned baud, unsigned ser_flags)\fP" .IP "" 4 This function opens a serial device at a specified baud rate with specified flags. The device name must start with /dev/tty or /dev/serial. .br .br .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br ser_tty: the serial device to open. .br baud: the baud rate in bits per second, see below. .br ser_flags: 0. .br .EE .br .br Returns a handle (>=0) if OK, otherwise PI_NO_HANDLE, or PI_SER_OPEN_FAILED. .br .br The baud rate must be one of 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, or 230400. .br .br No flags are currently defined. This parameter should be set to zero. .IP "\fBint serial_close(int pi, unsigned handle)\fP" .IP "" 4 This function closes the serial device associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBserial_open\fP. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .IP "\fBint serial_write_byte(int pi, unsigned handle, unsigned bVal)\fP" .IP "" 4 This function writes bVal to the serial port associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBserial_open\fP. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED. .IP "\fBint serial_read_byte(int pi, unsigned handle)\fP" .IP "" 4 This function reads a byte from the serial port associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBserial_open\fP. .br .EE .br .br Returns the read byte (>=0) if OK, otherwise PI_BAD_HANDLE, PI_SER_READ_NO_DATA, or PI_SER_READ_FAILED. .br .br If no data is ready PI_SER_READ_NO_DATA is returned. .IP "\fBint serial_write(int pi, unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This function writes count bytes from buf to the the serial port associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBserial_open\fP. .br buf: the array of bytes to write. .br count: the number of bytes to write. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED. .IP "\fBint serial_read(int pi, unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This function reads up to count bytes from the the serial port associated with handle and writes them to buf. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBserial_open\fP. .br buf: an array to receive the read data. .br count: the maximum number of bytes to read. .br .EE .br .br Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_SER_READ_NO_DATA, or PI_SER_WRITE_FAILED. .br .br If no data is ready zero is returned. .IP "\fBint serial_data_available(int pi, unsigned handle)\fP" .IP "" 4 Returns the number of bytes available to be read from the device associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0, as returned by a call to \fBserial_open\fP. .br .EE .br .br Returns the number of bytes of data available (>=0) if OK, otherwise PI_BAD_HANDLE. .IP "\fBint custom_1(int pi, unsigned arg1, unsigned arg2, char *argx, unsigned argc)\fP" .IP "" 4 This function is available for user customisation. .br .br It returns a single integer value. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br arg1: >=0 .br arg2: >=0 .br argx: extra (byte) arguments .br argc: number of extra arguments .br .EE .br .br Returns >= 0 if OK, less than 0 indicates a user defined error. .IP "\fBint custom_2(int pi, unsigned arg1, char *argx, unsigned argc, char *retBuf, unsigned retMax)\fP" .IP "" 4 This function is available for user customisation. .br .br It differs from custom_1 in that it returns an array of bytes rather than just an integer. .br .br The return value is an integer indicating the number of returned bytes. .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br arg1: >=0 .br argc: extra (byte) arguments .br count: number of extra arguments .br retBuf: buffer for returned data .br retMax: maximum number of bytes to return .br .EE .br .br Returns >= 0 if OK, less than 0 indicates a user defined error. .br .br Note, the number of returned bytes will be retMax or less. .IP "\fBint get_pad_strength(int pi, unsigned pad)\fP" .IP "" 4 This function returns the pad drive strength in mA. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br pad: 0-2, the pad to get. .br .EE .br .br Returns the pad drive strength if OK, otherwise PI_BAD_PAD. .br .br Pad GPIO .br 0 0-27 .br 1 28-45 .br 2 46-53 .br .br .br \fBExample\fP .br .EX strength = get_pad_strength(pi, 0); // get pad 0 strength .br .EE .IP "\fBint set_pad_strength(int pi, unsigned pad, unsigned padStrength)\fP" .IP "" 4 This function sets the pad drive strength in mA. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br pad: 0-2, the pad to set. .br padStrength: 1-16 mA. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_PAD, or PI_BAD_STRENGTH. .br .br Pad GPIO .br 0 0-27 .br 1 28-45 .br 2 46-53 .br .br .br \fBExample\fP .br .EX set_pad_strength(pi, 0, 10); // set pad 0 strength to 10 mA .br .EE .IP "\fBint shell_(int pi, char *scriptName, char *scriptString)\fP" .IP "" 4 This function uses the system call to execute a shell script with the given string as its parameter. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br scriptName: the name of the script, only alphanumeric characters, .br '-' and '_' are allowed in the name. .br scriptString: the string to pass to the script. .br .EE .br .br The exit status of the system call is returned if OK, otherwise PI_BAD_SHELL_STATUS. .br .br scriptName must exist in /opt/pigpio/cgi and must be executable. .br .br The returned exit status is normally 256 times that set by the shell script exit function. If the script can't be found 32512 will be returned. .br .br The following table gives some example returned statuses. .br .br Script exit status Returned system call status .br 1 256 .br 5 1280 .br 10 2560 .br 200 51200 .br script not found 32512 .br .br .br \fBExample\fP .br .EX // pass two parameters, hello and world .br status = shell_(pi, "scr1", "hello world"); .br .br // pass three parameters, hello, string with spaces, and world .br status = shell_(pi, "scr1", "hello 'string with spaces' world"); .br .br // pass one parameter, hello string with spaces world .br status = shell_(pi, "scr1", "\"hello string with spaces world\""); .br .EE .IP "\fBint file_open(int pi, char *file, unsigned mode)\fP" .IP "" 4 This function returns a handle to a file opened in a specified mode. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br file: the file to open. .br mode: the file open mode. .br .EE .br .br Returns a handle (>=0) if OK, otherwise PI_NO_HANDLE, PI_NO_FILE_ACCESS, PI_BAD_FILE_MODE, PI_FILE_OPEN_FAILED, or PI_FILE_IS_A_DIR. .br .br File .br .br A file may only be opened if permission is granted by an entry in /opt/pigpio/access. This is intended to allow remote access to files in a more or less controlled manner. .br .br Each entry in /opt/pigpio/access takes the form of a file path which may contain wildcards followed by a single letter permission. The permission may be R for read, W for write, U for read/write, and N for no access. .br .br Where more than one entry matches a file the most specific rule applies. If no entry matches a file then access is denied. .br .br Suppose /opt/pigpio/access contains the following entries .br .br .EX /home/* n .br /home/pi/shared/dir_1/* w .br /home/pi/shared/dir_2/* r .br /home/pi/shared/dir_3/* u .br /home/pi/shared/dir_1/file.txt n .br .EE .br .br Files may be written in directory dir_1 with the exception of file.txt. .br .br Files may be read in directory dir_2. .br .br Files may be read and written in directory dir_3. .br .br If a directory allows read, write, or read/write access then files may be created in that directory. .br .br In an attempt to prevent risky permissions the following paths are ignored in /opt/pigpio/access. .br .br .EX a path containing .. .br a path containing only wildcards (*?) .br a path containing less than two non-wildcard parts .br .EE .br .br Mode .br .br The mode may have the following values. .br .br Macro Value Meaning .br PI_FILE_READ 1 open file for reading .br PI_FILE_WRITE 2 open file for writing .br PI_FILE_RW 3 open file for reading and writing .br .br .br The following values may be or'd into the mode. .br .br Macro Value Meaning .br PI_FILE_APPEND 4 Writes append data to the end of the file .br PI_FILE_CREATE 8 The file is created if it doesn't exist .br PI_FILE_TRUNC 16 The file is truncated .br .br .br Newly created files are owned by root with permissions owner read and write. .br .br \fBExample\fP .br .EX #include .br #include .br .br int main(int argc, char *argv[]) .br { .br int pi, handle, c; .br char buf[60000]; .br .br pi = pigpio_start(NULL, NULL); .br .br if (pi < 0) return 1; .br .br // assumes /opt/pigpio/access contains the following line .br // /ram/*.c r .br .br handle = file_open(pi, "/ram/pigpio.c", PI_FILE_READ); .br .br if (handle >= 0) .br { .br while ((c=file_read(pi, handle, buf, sizeof(buf)-1))) .br { .br buf[c] = 0; .br printf("%s", buf); .br } .br .br file_close(pi, handle); .br } .br .br pigpio_stop(pi); .br } .br .EE .IP "\fBint file_close(int pi, unsigned handle)\fP" .IP "" 4 This function closes the file associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0 (as returned by \fBfile_open\fP). .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE. .br .br \fBExample\fP .br .EX file_close(pi, handle); .br .EE .IP "\fBint file_write(int pi, unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This function writes count bytes from buf to the the file associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0 (as returned by \fBfile_open\fP). .br buf: the array of bytes to write. .br count: the number of bytes to write. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_FILE_NOT_WOPEN, or PI_BAD_FILE_WRITE. .br .br \fBExample\fP .br .EX if (file_write(pi, handle, buf, 100) == 0) .br { .br // file written okay .br } .br else .br { .br // error .br } .br .EE .IP "\fBint file_read(int pi, unsigned handle, char *buf, unsigned count)\fP" .IP "" 4 This function reads up to count bytes from the the file associated with handle and writes them to buf. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0 (as returned by \fBfile_open\fP). .br buf: an array to receive the read data. .br count: the maximum number of bytes to read. .br .EE .br .br Returns the number of bytes read (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_FILE_NOT_ROPEN, or PI_BAD_FILE_WRITE. .br .br \fBExample\fP .br .EX bytes = file_read(pi, handle, buf, sizeof(buf)); .br .br if (bytes >= 0) .br { .br // process read data .br } .br .EE .IP "\fBint file_seek(int pi, unsigned handle, int32_t seekOffset, int seekFrom)\fP" .IP "" 4 This function seeks to a position within the file associated with handle. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br handle: >=0 (as returned by \fBfile_open\fP). .br seekOffset: the number of bytes to move. Positive offsets .br move forward, negative offsets backwards. .br seekFrom: one of PI_FROM_START (0), PI_FROM_CURRENT (1), .br or PI_FROM_END (2). .br .EE .br .br Returns the new byte position within the file (>=0) if OK, otherwise PI_BAD_HANDLE, or PI_BAD_FILE_SEEK. .br .br \fBExample\fP .br .EX file_seek(pi, handle, 123, PI_FROM_START); // Start plus 123 .br .br size = file_seek(pi, handle, 0, PI_FROM_END); // End, return size .br .br pos = file_seek(pi, handle, 0, PI_FROM_CURRENT); // Current position .br .EE .IP "\fBint file_list(int pi, char *fpat, char *buf, unsigned count)\fP" .IP "" 4 This function returns a list of files which match a pattern. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br fpat: file pattern to match. .br buf: an array to receive the matching file names. .br count: the maximum number of bytes to read. .br .EE .br .br Returns the number of returned bytes if OK, otherwise PI_NO_FILE_ACCESS, or PI_NO_FILE_MATCH. .br .br The pattern must match an entry in /opt/pigpio/access. The pattern may contain wildcards. See \fBfile_open\fP. .br .br NOTE .br .br The returned value is not the number of files, it is the number of bytes in the buffer. The file names are separated by newline characters. .br .br \fBExample\fP .br .EX #include .br #include .br .br int main(int argc, char *argv[]) .br { .br int pi, handle, c; .br char buf[60000]; .br .br pi = pigpio_start(NULL, NULL); .br .br if (pi < 0) return 1; .br .br // assumes /opt/pigpio/access contains the following line .br // /ram/*.c r .br .br c = file_list(pi, "/ram/p*.c", buf, sizeof(buf)); .br .br if (c >= 0) .br { .br buf[c] = 0; .br printf("%s", buf); .br } .br .br pigpio_stop(pi); .br } .br .EE .IP "\fBint callback(int pi, unsigned user_gpio, unsigned edge, CBFunc_t f)\fP" .IP "" 4 This function initialises a new callback. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31. .br edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE. .br f: the callback function. .br .EE .br .br The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback. .br .br The callback is called with the GPIO, edge, and tick, whenever the GPIO has the identified edge. .br .br .EX Parameter Value Meaning .br .br GPIO 0-31 The GPIO which has changed state .br .br edge 0-2 0 = change to low (a falling edge) .br 1 = change to high (a rising edge) .br 2 = no level change (a watchdog timeout) .br .br tick 32 bit The number of microseconds since boot .br WARNING: this wraps around from .br 4294967295 to 0 roughly every 72 minutes .br .EE .br .br The GPIO are sampled at a rate set when the pigpio daemon is started (default 5 us). .br .br The number of samples per second is given in the following table. .br .br .EX samples .br per sec .br .br 1 1,000,000 .br 2 500,000 .br sample 4 250,000 .br rate 5 200,000 .br (us) 8 125,000 .br 10 100,000 .br .EE .br .br GPIO level changes shorter than the sample rate may be missed. .br .br The daemon software which generates the callbacks is triggered 1000 times per second. The callbacks will be called once per level change since the last time they were called. i.e. The callbacks will get all level changes but there will be a latency. .br .br If you want to track the level of more than one GPIO do so by maintaining the state in the callback. Do not use \fBgpio_read\fP. Remember the event that triggered the callback may have happened several milliseconds before and the GPIO may have changed level many times since then. .IP "\fBint callback_ex(int pi, unsigned user_gpio, unsigned edge, CBFuncEx_t f, void *userdata)\fP" .IP "" 4 This function initialises a new callback. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31. .br edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE. .br f: the callback function. .br userdata: a pointer to arbitrary user data. .br .EE .br .br The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback. .br .br The callback is called with the GPIO, edge, tick, and the userdata pointer, whenever the GPIO has the identified edge. .br .br .EX Parameter Value Meaning .br .br GPIO 0-31 The GPIO which has changed state .br .br edge 0-2 0 = change to low (a falling edge) .br 1 = change to high (a rising edge) .br 2 = no level change (a watchdog timeout) .br .br tick 32 bit The number of microseconds since boot .br WARNING: this wraps around from .br 4294967295 to 0 roughly every 72 minutes .br .br userdata pointer Pointer to an arbitrary object .br .EE .IP "\fBint callback_cancel(unsigned callback_id)\fP" .IP "" 4 This function cancels a callback identified by its id. .br .br .EX callback_id: >=0, as returned by a call to \fBcallback\fP or \fBcallback_ex\fP. .br .EE .br .br The function returns 0 if OK, otherwise pigif_callback_not_found. .IP "\fBint wait_for_edge(int pi, unsigned user_gpio, unsigned edge, double timeout)\fP" .IP "" 4 This function waits for an edge on the GPIO for up to timeout seconds. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br user_gpio: 0-31. .br edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE. .br timeout: >=0. .br .EE .br .br The function returns when the edge occurs or after the timeout. .br .br Do not use this function for precise timing purposes, the edge is only checked 20 times a second. Whenever you need to know the accurate time of GPIO events use a \fBcallback\fP function. .br .br The function returns 1 if the edge occurred, otherwise 0. .IP "\fBint bsc_xfer(int pi, bsc_xfer_t *bscxfer)\fP" .IP "" 4 This function provides a low-level interface to the SPI/I2C Slave peripheral on the BCM chip. .br .br This peripheral allows the Pi to act as a hardware slave device on an I2C or SPI bus. .br .br This is not a bit bang version and as such is OS timing independent. The bus timing is handled directly by the chip. .br .br The output process is simple. You simply append data to the FIFO buffer on the chip. This works like a queue, you add data to the queue and the master removes it. .br .br I can't get SPI to work properly. I tried with a control word of 0x303 and swapped MISO and MOSI. .br .br The function sets the BSC mode, writes any data in the transmit buffer to the BSC transmit FIFO, and copies any data in the BSC receive FIFO to the receive buffer. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br bscxfer: a structure defining the transfer. .br .br typedef struct .br { .br uint32_t control; // Write .br int rxCnt; // Read only .br char rxBuf[BSC_FIFO_SIZE]; // Read only .br int txCnt; // Write .br char txBuf[BSC_FIFO_SIZE]; // Write .br } bsc_xfer_t; .br .EE .br .br To start a transfer set control (see below), copy the bytes to be added to the transmit FIFO (if any) to txBuf and set txCnt to the number of copied bytes. .br .br Upon return rxCnt will be set to the number of received bytes placed in rxBuf. .br .br The returned function value is the status of the transfer (see below). .br .br If there was an error the status will be less than zero (and will contain the error code). .br .br The most significant word of the returned status contains the number of bytes actually copied from txBuf to the BSC transmit FIFO (may be less than requested if the FIFO already contained untransmitted data). .br .br Note that the control word sets the BSC mode. The BSC will stay in that mode until a different control word is sent. .br .br GPIO used for models other than those based on the BCM2711. .br .br SDA SCL MOSI SCLK MISO CE .br I2C 18 19 - - - - .br SPI - - 18 19 20 21 .br .br .br GPIO used for models based on the BCM2711 (e.g. the Pi4B). .br .br SDA SCL MOSI SCLK MISO CE .br I2C 10 11 - - - - .br SPI - - 10 11 9 8 .br .br .br When a zero control word is received the used GPIO will be reset to INPUT mode. .br .br control consists of the following bits. .br .br .EX 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 .br a a a a a a a - - IT HC TF IR RE TE BK EC ES PL PH I2 SP EN .br .EE .br .br Bits 0-13 are copied unchanged to the BSC CR register. See pages 163-165 of the Broadcom peripherals document for full details. .br .br aaaaaaa defines the I2C slave address (only relevant in I2C mode) .br IT invert transmit status flags .br HC enable host control .br TF enable test FIFO .br IR invert receive status flags .br RE enable receive .br TE enable transmit .br BK abort operation and clear FIFOs .br EC send control register as first I2C byte .br ES send status register as first I2C byte .br PL set SPI polarity high .br PH set SPI phase high .br I2 enable I2C mode .br SP enable SPI mode .br EN enable BSC peripheral .br .br .br The returned status has the following format .br .br .EX 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 .br S S S S S R R R R R T T T T T RB TE RF TF RE TB .br .EE .br .br Bits 0-15 are copied unchanged from the BSC FR register. See pages 165-166 of the Broadcom peripherals document for full details. .br .br SSSSS number of bytes successfully copied to transmit FIFO .br RRRRR number of bytes in receieve FIFO .br TTTTT number of bytes in transmit FIFO .br RB receive busy .br TE transmit FIFO empty .br RF receive FIFO full .br TF transmit FIFO full .br RE receive FIFO empty .br TB transmit busy .br .br .br The following example shows how to configure the BSC peripheral as an I2C slave with address 0x13 and send four bytes. .br .br \fBExample\fP .br .EX bsc_xfer_t xfer; .br .br xfer.control = (0x13<<16) | 0x305; .br .br memcpy(xfer.txBuf, "ABCD", 4); .br xfer.txCnt = 4; .br .br status = bsc_xfer(pi, &xfer); .br .br if (status >= 0) .br { .br // process transfer .br } .br .EE .IP "\fBint bsc_i2c(int pi, int i2c_addr, bsc_xfer_t *bscxfer)\fP" .IP "" 4 This function allows the Pi to act as a slave I2C device. .br .br This function is not available on the BCM2711 (e.g.as used in the Pi4B). .br .br The data bytes (if any) are written to the BSC transmit FIFO and the bytes in the BSC receive FIFO are returned. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br i2c_addr: 0-0x7F. .br bscxfer: a structure defining the transfer. .br .br typedef struct .br { .br uint32_t control; // N/A .br int rxCnt; // Read only .br char rxBuf[BSC_FIFO_SIZE]; // Read only .br int txCnt; // Write .br char txBuf[BSC_FIFO_SIZE]; // Write .br } bsc_xfer_t; .br .EE .br .br txCnt is set to the number of bytes to be transmitted, possibly zero. The data itself should be copied to txBuf. .br .br Any received data will be written to rxBuf with rxCnt set. .br .br See \fBbsc_xfer\fP for details of the returned status value. .br .br If there was an error the status will be less than zero (and will contain the error code). .br .br Note that an i2c_address of 0 may be used to close the BSC device and reassign the used GPIO as inputs. .IP "\fBint event_callback(int pi, unsigned event, evtCBFunc_t f)\fP" .IP "" 4 This function initialises an event callback. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br event: 0-31. .br f: the callback function. .br .EE .br .br The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback. .br .br The callback is called with the event id, and tick, whenever the event occurs. .IP "\fBint event_callback_ex(int pi, unsigned event, evtCBFuncEx_t f, void *userdata)\fP" .IP "" 4 This function initialises an event callback. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br event: 0-31. .br f: the callback function. .br userdata: a pointer to arbitrary user data. .br .EE .br .br The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback. .br .br The callback is called with the event id, the tick, and the userdata pointer whenever the event occurs. .IP "\fBint event_callback_cancel(unsigned callback_id)\fP" .IP "" 4 This function cancels an event callback identified by its id. .br .br .EX callback_id: >=0, as returned by a call to \fBevent_callback\fP or .br \fBevent_callback_ex\fP. .br .EE .br .br The function returns 0 if OK, otherwise pigif_callback_not_found. .IP "\fBint wait_for_event(int pi, unsigned event, double timeout)\fP" .IP "" 4 This function waits for an event for up to timeout seconds. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br event: 0-31. .br timeout: >=0. .br .EE .br .br The function returns when the event occurs or after the timeout. .br .br The function returns 1 if the event occurred, otherwise 0. .IP "\fBint event_trigger(int pi, unsigned event)\fP" .IP "" 4 This function signals the occurrence of an event. .br .br .EX pi: >=0 (as returned by \fBpigpio_start\fP). .br event: 0-31. .br .EE .br .br Returns 0 if OK, otherwise PI_BAD_EVENT_ID. .br .br An event is a signal used to inform one or more consumers to start an action. Each consumer which has registered an interest in the event (e.g. by calling \fBevent_callback\fP) will be informed by a callback. .br .br One event, PI_EVENT_BSC (31) is predefined. This event is auto generated on BSC slave activity. .br .br The meaning of other events is arbitrary. .br .br Note that other than its id and its tick there is no data associated with an event. .SH PARAMETERS .br .br .IP "\fBactive\fP: 0-1000000" 0 .br .br The number of microseconds level changes are reported for once a noise filter has been triggered (by \fBsteady\fP microseconds of a stable level). .br .br .IP "\fB*addrStr\fP" 0 A string specifying the host or IP address of the Pi running the pigpio daemon. It may be NULL in which case localhost is used unless overridden by the PIGPIO_ADDR environment variable. .br .br .IP "\fBarg1\fP" 0 An unsigned argument passed to a user customised function. Its meaning is defined by the customiser. .br .br .IP "\fBarg2\fP" 0 An unsigned argument passed to a user customised function. Its meaning is defined by the customiser. .br .br .IP "\fBargc\fP" 0 The count of bytes passed to a user customised function. .br .br .IP "\fB*argx\fP" 0 A pointer to an array of bytes passed to a user customised function. Its meaning and content is defined by the customiser. .br .br .IP "\fBbaud\fP" 0 The speed of serial communication (I2C, SPI, serial link, waves) in bits per second. .br .br .IP "\fBbit\fP" 0 A value of 0 or 1. .br .br .IP "\fBbits\fP" 0 A value used to select GPIO. If bit n of bits is set then GPIO n is selected. .br .br A convenient way to set bit n is to or in (1<=0, as returned by a call to a callback function, one of .br .br \fBcallback\fP .br \fBcallback_ex\fP .br \fBevent_callback\fP .br \fBevent_callback_ex\fP .br .br The id is passed to \fBcallback_cancel\fP or \fBevent_callback_cancel\fP to cancel the callback. .br .br .IP "\fBCBFunc_t\fP" 0 .EX typedef void (*CBFunc_t) .br (int pi, unsigned user_gpio, unsigned level, uint32_t tick); .br .EE .br .br .IP "\fBCBFuncEx_t\fP" 0 .EX typedef void (*CBFuncEx_t) .br (int pi, unsigned user_gpio, unsigned level, uint32_t tick, void * userdata); .br .EE .br .br .IP "\fBchar\fP" 0 A single character, an 8 bit quantity able to store 0-255. .br .br .IP "\fBclkfreq\fP: 4689-250M (13184-375M for the BCM2711)" 0 The hardware clock frequency. .br .br .IP "\fBcount\fP" 0 The number of bytes to be transferred in a file, I2C, SPI, or serial command. .br .br .IP "\fBCS\fP" 0 The GPIO used for the slave select signal when bit banging SPI. .br .br .IP "\fBdata_bits\fP: 1-32" 0 The number of data bits in each character of serial data. .br .br .EX #define PI_MIN_WAVE_DATABITS 1 .br #define PI_MAX_WAVE_DATABITS 32 .br .EE .br .br .IP "\fBdouble\fP" 0 A floating point number. .br .br .IP "\fBdutycycle\fP: 0-range" 0 A number representing the ratio of on time to off time for PWM. .br .br The number may vary between 0 and range (default 255) where 0 is off and range is fully on. .br .br .IP "\fBedge\fP" 0 Used to identify a GPIO level transition of interest. A rising edge is a level change from 0 to 1. A falling edge is a level change from 1 to 0. .br .br .EX RISING_EDGE 0 .br FALLING_EDGE 1 .br EITHER_EDGE. 2 .br .EE .br .br .IP "\fBerrnum\fP" 0 A negative number indicating a function call failed and the nature of the error. .br .br .IP "\fBevent\fP: 0-31" 0 An event is a signal used to inform one or more consumers to start an action. .br .br .IP "\fBevtCBFunc_t\fP" 0 .br .br .EX typedef void (*evtCBFunc_t) .br (int pi, unsigned event, uint32_t tick); .br .EE .br .br .IP "\fBevtCBFuncEx_t\fP" 0 .br .br .EX typedef void (*evtCBFuncEx_t) .br (int pi, unsigned event, uint32_t tick, void *userdata); .br .EE .br .br .IP "\fBf\fP" 0 A function. .br .br .IP "\fB*file\fP" 0 A full file path. To be accessible the path must match an entry in /opt/pigpio/access. .br .br .IP "\fB*fpat\fP" 0 A file path which may contain wildcards. To be accessible the path must match an entry in /opt/pigpio/access. .br .br .IP "\fBfrequency\fP: >=0" 0 The number of times a GPIO is swiched on and off per second. This can be set per GPIO and may be as little as 5Hz or as much as 40KHz. The GPIO will be on for a proportion of the time as defined by its dutycycle. .br .br .IP "\fBgpio\fP" 0 A Broadcom numbered GPIO, in the range 0-53. .br .br There are 54 General Purpose Input Outputs (GPIO) named GPIO0 through GPIO53. .br .br They are split into two banks. Bank 1 consists of GPIO0 through GPIO31. Bank 2 consists of GPIO32 through GPIO53. .br .br All the GPIO which are safe for the user to read and write are in bank 1. Not all GPIO in bank 1 are safe though. Type 1 boards have 17 safe GPIO. Type 2 boards have 21. Type 3 boards have 26. .br .br See \fBget_hardware_revision\fP. .br .br The user GPIO are marked with an X in the following table. .br .br .EX 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 .br Type 1 X X - - X - - X X X X X - - X X .br Type 2 - - X X X - - X X X X X - - X X .br Type 3 X X X X X X X X X X X X X X .br .br 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 .br Type 1 - X X - - X X X X X - - - - - - .br Type 2 - X X - - - X X X X - X X X X X .br Type 3 X X X X X X X X X X X X - - - - .br .EE .br .br .IP "\fBgpioPulse_t\fP" 0 .EX typedef struct .br { .br uint32_t gpioOn; .br uint32_t gpioOff; .br uint32_t usDelay; .br } gpioPulse_t; .br .EE .br .br .IP "\fBgpioThreadFunc_t\fP" 0 .EX typedef void *(gpioThreadFunc_t) (void *); .br .EE .br .br .IP "\fBhandle\fP: >=0" 0 A number referencing an object opened by one of .br .br \fBfile_open\fP .br \fBi2c_open\fP .br \fBnotify_open\fP .br \fBserial_open\fP .br \fBspi_open\fP .br .br .IP "\fBi2c_addr\fP: 0-0x7F" 0 The address of a device on the I2C bus. .br .br .IP "\fBi2c_bus\fP: >=0" 0 An I2C bus number. .br .br .IP "\fBi2c_flags\fP: 0" 0 Flags which modify an I2C open command. None are currently defined. .br .br .IP "\fBi2c_reg\fP: 0-255" 0 A register of an I2C device. .br .br .IP "\fB*inBuf\fP" 0 A buffer used to pass data to a function. .br .br .IP "\fBinLen\fP" 0 The number of bytes of data in a buffer. .br .br .IP "\fBint\fP" 0 A whole number, negative or positive. .br .br .IP "\fBint32_t\fP" 0 A 32-bit signed value. .br .br .IP "\fBinvert\fP" 0 A flag used to set normal or inverted bit bang serial data level logic. .br .br .IP "\fBlevel\fP" 0 The level of a GPIO. Low or High. .br .br .EX PI_OFF 0 .br PI_ON 1 .br .br PI_CLEAR 0 .br PI_SET 1 .br .br PI_LOW 0 .br PI_HIGH 1 .br .EE .br .br There is one exception. If a watchdog expires on a GPIO the level will be reported as PI_TIMEOUT. See \fBset_watchdog\fP. .br .br .EX PI_TIMEOUT 2 .br .EE .br .br .IP "\fBMISO\fP" 0 The GPIO used for the MISO signal when bit banging SPI. .br .br .IP "\fBmode\fP" 0 1. The operational mode of a GPIO, normally INPUT or OUTPUT. .br .br .EX PI_INPUT 0 .br PI_OUTPUT 1 .br PI_ALT0 4 .br PI_ALT1 5 .br PI_ALT2 6 .br PI_ALT3 7 .br PI_ALT4 3 .br PI_ALT5 2 .br .EE .br .br 2. The mode of waveform transmission. .br .br .EX PI_WAVE_MODE_ONE_SHOT 0 .br PI_WAVE_MODE_REPEAT 1 .br PI_WAVE_MODE_ONE_SHOT_SYNC 2 .br PI_WAVE_MODE_REPEAT_SYNC 3 .br .EE .br .br 3. A file open mode. .br .br .EX PI_FILE_READ 1 .br PI_FILE_WRITE 2 .br PI_FILE_RW 3 .br .EE .br .br The following values can be or'd into the mode. .br .br .EX PI_FILE_APPEND 4 .br PI_FILE_CREATE 8 .br PI_FILE_TRUNC 16 .br .EE .br .br .IP "\fBMOSI\fP" 0 The GPIO used for the MOSI signal when bit banging SPI. .br .br .IP "\fBnumBytes\fP" 0 The number of bytes used to store characters in a string. Depending on the number of bits per character there may be 1, 2, or 4 bytes per character. .br .br .IP "\fBnumPar\fP: 0-10" 0 The number of parameters passed to a script. .br .br .IP "\fBnumPulses\fP" 0 The number of pulses to be added to a waveform. .br .br .IP "\fBoffset\fP" 0 The associated data starts this number of microseconds from the start of the waveform. .br .br .IP "\fB*outBuf\fP" 0 A buffer used to return data from a function. .br .br .IP "\fBoutLen\fP" 0 The size in bytes of an output buffer. .br .br .IP "\fBpad\fP: 0-2" 0 A set of GPIO which share common drivers. .br .br Pad GPIO .br 0 0-27 .br 1 28-45 .br 2 46-53 .br .br .br .IP "\fBpadStrength\fP: 1-16" 0 The mA which may be drawn from each GPIO whilst still guaranteeing the high and low levels. .br .br .IP "\fB*param\fP" 0 An array of script parameters. .br .br .IP "\fBpercent\fP: 0-100" 0 The size of waveform as percentage of maximum available. .br .br .IP "\fBpi\fP" 0 An integer defining a connected Pi. The value is returned by \fBpigpio_start\fP upon success. .br .br .IP "\fB*portStr\fP" 0 A string specifying the port address used by the Pi running the pigpio daemon. It may be NULL in which case "8888" is used unless overridden by the PIGPIO_PORT environment variable. .br .br .IP "\fB*pth\fP" 0 A thread identifier, returned by \fBstart_thread\fP. .br .br .br .br .IP "\fBpthread_t\fP" 0 A thread identifier. .br .br .IP "\fBpud\fP: 0-2" 0 The setting of the pull up/down resistor for a GPIO, which may be off, pull-up, or pull-down. .EX PI_PUD_OFF 0 .br PI_PUD_DOWN 1 .br PI_PUD_UP 2 .br .EE .br .br .IP "\fBpulseLen\fP" 0 1-100, the length of a trigger pulse in microseconds. .br .br .IP "\fB*pulses\fP" 0 An array of pulses to be added to a waveform. .br .br .IP "\fBpulsewidth\fP: 0, 500-2500" 0 .EX PI_SERVO_OFF 0 .br PI_MIN_SERVO_PULSEWIDTH 500 .br PI_MAX_SERVO_PULSEWIDTH 2500 .br .EE .br .br .IP "\fBPWMduty\fP: 0-1000000 (1M)" 0 The hardware PWM dutycycle. .br .br .EX #define PI_HW_PWM_RANGE 1000000 .br .EE .br .br .IP "\fBPWMfreq\fP: 1-125M (1-187.5M for the BCM2711)" 0 The hardware PWM frequency. .br .br .EX #define PI_HW_PWM_MIN_FREQ 1 .br #define PI_HW_PWM_MAX_FREQ 125000000 .br #define PI_HW_PWM_MAX_FREQ_2711 187500000 .br .EE .br .br .IP "\fBrange\fP: 25-40000" 0 The permissible dutycycle values are 0-range. .br .br .EX PI_MIN_DUTYCYCLE_RANGE 25 .br PI_MAX_DUTYCYCLE_RANGE 40000 .br .EE .br .br .IP "\fB*retBuf\fP" 0 A buffer to hold a number of bytes returned to a used customised function, .br .br .IP "\fBretMax\fP" 0 The maximum number of bytes a user customised function should return. .br .br .br .br .IP "\fB*rxBuf\fP" 0 A pointer to a buffer to receive data. .br .br .IP "\fBSCL\fP" 0 The user GPIO to use for the clock when bit banging I2C. .br .br .IP "\fBSCLK\fP" 0 The GPIO used for the SCLK signal when bit banging SPI. .br .br .IP "\fB*script\fP" 0 A pointer to the text of a script. .br .br .IP "\fBscript_id\fP" 0 An id of a stored script as returned by \fBstore_script\fP. .br .br .IP "\fB*scriptName\fP" 0 The name of a \fBshell_\fP script to be executed. The script must be present in /opt/pigpio/cgi and must have execute permission. .br .br .IP "\fB*scriptString\fP" 0 The string to be passed to a \fBshell_\fP script to be executed. .br .br .IP "\fBSDA\fP" 0 The user GPIO to use for data when bit banging I2C. .br .br .IP "\fBseconds\fP" 0 The number of seconds. .br .br .IP "\fBseekFrom\fP" 0 .br .br .EX PI_FROM_START 0 .br PI_FROM_CURRENT 1 .br PI_FROM_END 2 .br .EE .br .br .IP "\fBseekOffset\fP" 0 The number of bytes to move forward (positive) or backwards (negative) from the seek position (start, current, or end of file). .br .br .IP "\fBser_flags\fP" 0 Flags which modify a serial open command. None are currently defined. .br .br .IP "\fB*ser_tty\fP" 0 The name of a serial tty device, e.g. /dev/ttyAMA0, /dev/ttyUSB0, /dev/tty1. .br .br .IP "\fBsize_t\fP" 0 A standard type used to indicate the size of an object in bytes. .br .br .IP "\fBspi_channel\fP" 0 A SPI channel, 0-2. .br .br .IP "\fBspi_flags\fP" 0 See \fBspi_open\fP and \fBbb_spi_open\fP. .br .br .IP "\fBsteady\fP: 0-300000" 0 .br .br The number of microseconds level changes must be stable for before reporting the level changed (\fBset_glitch_filter\fP) or triggering the active part of a noise filter (\fBset_noise_filter\fP). .br .br .IP "\fBstop_bits\fP: 2-8" 0 The number of (half) stop bits to be used when adding serial data to a waveform. .br .br .EX #define PI_MIN_WAVE_HALFSTOPBITS 2 .br #define PI_MAX_WAVE_HALFSTOPBITS 8 .br .EE .br .br .IP "\fB*str\fP" 0 An array of characters. .br .br .IP "\fBthread_func\fP" 0 A function of type gpioThreadFunc_t used as the main function of a thread. .br .br .IP "\fBtimeout\fP" 0 A GPIO watchdog timeout in milliseconds. .br .br .EX PI_MIN_WDOG_TIMEOUT 0 .br PI_MAX_WDOG_TIMEOUT 60000 .br .EE .br .br .IP "\fB*txBuf\fP" 0 An array of bytes to transmit. .br .br .IP "\fBuint32_t\fP: 0-0-4,294,967,295 (Hex 0x0-0xFFFFFFFF)" 0 A 32-bit unsigned value. .br .br .IP "\fBunsigned\fP" 0 A whole number >= 0. .br .br .IP "\fBuser_gpio\fP" 0 0-31, a Broadcom numbered GPIO. .br .br See \fBgpio\fP. .br .br .IP "\fB*userdata\fP" 0 .br .br A pointer to arbitrary user data. This may be used to identify the instance. .br .br You must ensure that the pointer is in scope at the time it is processed. If it is a pointer to a global this is automatic. Do not pass the address of a local variable. If you want to pass a transient object then use the following technique. .br .br In the calling function: .br .br .EX user_type *userdata; .br .br .br user_type my_userdata; .br .br userdata = malloc(sizeof(user_type)); .br .br .br *userdata = my_userdata; .br .EE .br .br In the receiving function: .br .br .EX user_type my_userdata = *(user_type*)userdata; .br .br free(userdata); .br .EE .br .br .IP "\fBvoid\fP" 0 Denoting no parameter is required .br .br .IP "\fBwave_add_*\fP" 0 One of .br .br \fBwave_add_new\fP .br \fBwave_add_generic\fP .br \fBwave_add_serial\fP .br .br .IP "\fBwave_id\fP" 0 A number representing a waveform created by \fBwave_create\fP. .br .br .IP "\fBwave_send_*\fP" 0 One of .br .br \fBwave_send_once\fP .br \fBwave_send_repeat\fP .br .br .IP "\fBwVal\fP: 0-65535 (Hex 0x0-0xFFFF, Octal 0-0177777)" 0 A 16-bit word value. .br .br .SH pigpiod_if2 Error Codes .EX .br typedef enum .br { .br pigif_bad_send = -2000, .br pigif_bad_recv = -2001, .br pigif_bad_getaddrinfo = -2002, .br pigif_bad_connect = -2003, .br pigif_bad_socket = -2004, .br pigif_bad_noib = -2005, .br pigif_duplicate_callback = -2006, .br pigif_bad_malloc = -2007, .br pigif_bad_callback = -2008, .br pigif_notify_failed = -2009, .br pigif_callback_not_found = -2010, .br pigif_unconnected_pi = -2011, .br pigif_too_many_pis = -2012, .br } pigifError_t; .br .br .EE .SH SEE ALSO pigpiod(1), pig2vcd(1), pigs(1), pigpio(3), pigpiod_if(3) .SH AUTHOR joan@abyz.me.uk pigpio-78/pigpiod_if2.c000066400000000000000000001246531373465704200151660ustar00rootroot00000000000000/* This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to */ /* PIGPIOD_IF2_VERSION 17 */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "pigpio.h" #include "command.h" #include "pigpiod_if2.h" #define PI_MAX_REPORTS_PER_READ 4096 #define STACK_SIZE (256*1024) #define MAX_PI 32 typedef void (*CBF_t) (); struct callback_s { int id; int pi; int gpio; int edge; CBF_t f; void * user; int ex; callback_t *prev; callback_t *next; }; struct evtCallback_s { int id; int pi; int event; CBF_t f; void * user; int ex; evtCallback_t *prev; evtCallback_t *next; }; /* GLOBALS ---------------------------------------------------------------- */ static int gPiInUse [MAX_PI]; static int gPigCommand [MAX_PI]; static int gPigHandle [MAX_PI]; static int gPigNotify [MAX_PI]; static uint32_t gEventBits [MAX_PI]; static uint32_t gNotifyBits [MAX_PI]; static uint32_t gLastLevel [MAX_PI]; static pthread_t *gPthNotify [MAX_PI]; static pthread_mutex_t gCmdMutex [MAX_PI]; static int gCancelState [MAX_PI]; static callback_t *gCallBackFirst = 0; static callback_t *gCallBackLast = 0; static evtCallback_t *geCallBackFirst = 0; static evtCallback_t *geCallBackLast = 0; /* PRIVATE ---------------------------------------------------------------- */ static void _pml(int pi) { int cancelState; pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cancelState); pthread_mutex_lock(&gCmdMutex[pi]); gCancelState[pi] = cancelState; } static void _pmu(int pi) { int cancelState; cancelState = gCancelState[pi]; pthread_mutex_unlock(&gCmdMutex[pi]); pthread_setcancelstate(cancelState, NULL); } static int pigpio_command(int pi, int command, int p1, int p2, int rl) { cmdCmd_t cmd; if ((pi < 0) || (pi >= MAX_PI) || !gPiInUse[pi]) return pigif_unconnected_pi; cmd.cmd = command; cmd.p1 = p1; cmd.p2 = p2; cmd.res = 0; _pml(pi); if (send(gPigCommand[pi], &cmd, sizeof(cmd), 0) != sizeof(cmd)) { _pmu(pi); return pigif_bad_send; } if (recv(gPigCommand[pi], &cmd, sizeof(cmd), MSG_WAITALL) != sizeof(cmd)) { _pmu(pi); return pigif_bad_recv; } if (rl) _pmu(pi); return cmd.res; } static int pigpio_notify(int pi) { cmdCmd_t cmd; if ((pi < 0) || (pi >= MAX_PI) || !gPiInUse[pi]) return pigif_unconnected_pi; cmd.cmd = PI_CMD_NOIB; cmd.p1 = 0; cmd.p2 = 0; cmd.res = 0; _pml(pi); if (send(gPigNotify[pi], &cmd, sizeof(cmd), 0) != sizeof(cmd)) { _pmu(pi); return pigif_bad_send; } if (recv(gPigNotify[pi], &cmd, sizeof(cmd), MSG_WAITALL) != sizeof(cmd)) { _pmu(pi); return pigif_bad_recv; } _pmu(pi); return cmd.res; } static int pigpio_command_ext (int pi, int command, int p1, int p2, int p3, int extents, gpioExtent_t *ext, int rl) { int i; cmdCmd_t cmd; if ((pi < 0) || (pi >= MAX_PI) || !gPiInUse[pi]) return pigif_unconnected_pi; cmd.cmd = command; cmd.p1 = p1; cmd.p2 = p2; cmd.p3 = p3; _pml(pi); if (send(gPigCommand[pi], &cmd, sizeof(cmd), 0) != sizeof(cmd)) { _pmu(pi); return pigif_bad_send; } for (i=0; iai_next) { sock = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); if (sock == -1) continue; /* Disable the Nagle algorithm. */ opt = 1; setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char*)&opt, sizeof(int)); if (connect(sock, rp->ai_addr, rp->ai_addrlen) != -1) break; } freeaddrinfo(res); if (rp == NULL) return pigif_bad_connect; return sock; } static void dispatch_notification(int pi, gpioReport_t *r) { callback_t *p; evtCallback_t *ep; uint32_t changed; int l, g; /* printf("s=%4x f=%4x t=%10u l=%8x\n", r->seqno, r->flags, r->tick, r->level); */ if (r->flags == 0) { changed = (r->level ^ gLastLevel[pi]) & gNotifyBits[pi]; gLastLevel[pi] = r->level; p = gCallBackFirst; while (p) { if (((p->pi) == pi) && (changed & (1<<(p->gpio)))) { if ((r->level) & (1<<(p->gpio))) l = 1; else l = 0; if ((p->edge) ^ l) { if (p->ex) (p->f)(pi, p->gpio, l, r->tick, p->user); else (p->f)(pi, p->gpio, l, r->tick); } } p = p->next; } } else { if ((r->flags) & PI_NTFY_FLAGS_WDOG) { g = (r->flags) & 31; p = gCallBackFirst; while (p) { if (((p->pi) == pi) && ((p->gpio) == g)) { if (p->ex) (p->f)(pi, g, PI_TIMEOUT, r->tick, p->user); else (p->f)(pi, g, PI_TIMEOUT, r->tick); } p = p->next; } } else if ((r->flags) & PI_NTFY_FLAGS_EVENT) { g = (r->flags) & 31; ep = geCallBackFirst; while (ep) { if (((ep->pi) == pi) && ((ep->event) == g)) { if (ep->ex) (ep->f)(pi, g, r->tick, ep->user); else (ep->f)(pi, g, r->tick); } ep = ep->next; } } } } static void *pthNotifyThread(void *x) { static int got = 0; int pi; int bytes, r; gpioReport_t report[PI_MAX_REPORTS_PER_READ]; pi = *((int*)x); free(x); /* memory allocated in pigpio_start */ while (1) { bytes = read(gPigNotify[pi], (char*)&report+got, sizeof(report)-got); if (bytes > 0) got += bytes; else break; r = 0; while (got >= sizeof(gpioReport_t)) { dispatch_notification(pi, &report[r]); r++; got -= sizeof(gpioReport_t); } /* copy any partial report to start of array */ if (got && r) report[0] = report[r]; } fprintf(stderr, "notify thread for pi %d broke with read error %d\n", pi, bytes); while (1) sleep(1); return NULL; } static void findNotifyBits(int pi) { callback_t *p; uint32_t bits = 0; p = gCallBackFirst; while (p) { if (p->pi == pi) bits |= (1<<(p->gpio)); p = p->next; } if (bits != gNotifyBits[pi]) { gNotifyBits[pi] = bits; pigpio_command(pi, PI_CMD_NB, gPigHandle[pi], gNotifyBits[pi], 1); } } static void _wfe( int pi, unsigned user_gpio, unsigned level, uint32_t tick, void *user) { *(int *)user = 1; } static int intCallback( int pi, unsigned user_gpio, unsigned edge, void *f, void *user, int ex) { static int id = 0; callback_t *p; if ((user_gpio >=0) && (user_gpio < 32) && (edge >=0) && (edge <= 2) && f) { /* prevent duplicates */ p = gCallBackFirst; while (p) { if ((p->pi == pi) && (p->gpio == user_gpio) && (p->edge == edge) && (p->f == f)) { return pigif_duplicate_callback; } p = p->next; } p = malloc(sizeof(callback_t)); if (p) { if (!gCallBackFirst) gCallBackFirst = p; p->id = id++; p->pi = pi; p->gpio = user_gpio; p->edge = edge; p->f = f; p->user = user; p->ex = ex; p->next = 0; p->prev = gCallBackLast; if (p->prev) (p->prev)->next = p; gCallBackLast = p; findNotifyBits(pi); return p->id; } return pigif_bad_malloc; } return pigif_bad_callback; } static void findEventBits(int pi) { evtCallback_t *ep; uint32_t bits = 0; ep = geCallBackFirst; while (ep) { if (ep->pi == pi) bits |= (1<<(ep->event)); ep = ep->next; } if (bits != gEventBits[pi]) { gEventBits[pi] = bits; pigpio_command(pi, PI_CMD_EVM, gPigHandle[pi], gEventBits[pi], 1); } } static void _ewfe( int pi, unsigned event, uint32_t tick, void *user) { *(int *)user = 1; } static int intEventCallback( int pi, unsigned event, void *f, void *user, int ex) { static int id = 0; evtCallback_t *ep; if ((event >=0) && (event < 32) && f) { /* prevent duplicates */ ep = geCallBackFirst; while (ep) { if ((ep->pi == pi) && (ep->event == event) && (ep->f == f)) { return pigif_duplicate_callback; } ep = ep->next; } ep = malloc(sizeof(evtCallback_t)); if (ep) { if (!geCallBackFirst) geCallBackFirst = ep; ep->id = id++; ep->pi = pi; ep->event = event; ep->f = f; ep->user = user; ep->ex = ex; ep->next = 0; ep->prev = geCallBackLast; if (ep->prev) (ep->prev)->next = ep; geCallBackLast = ep; findEventBits(pi); return ep->id; } return pigif_bad_malloc; } return pigif_bad_callback; } static int recvMax(int pi, void *buf, int bufsize, int sent) { /* Copy at most bufSize bytes from the receieved message to buf. Discard the rest of the message. */ uint8_t scratch[4096]; int remaining, fetch, count; if (sent < bufsize) count = sent; else count = bufsize; if (count) recv(gPigCommand[pi], buf, count, MSG_WAITALL); remaining = sent - count; while (remaining) { fetch = remaining; if (fetch > sizeof(scratch)) fetch = sizeof(scratch); recv(gPigCommand[pi], scratch, fetch, MSG_WAITALL); remaining -= fetch; } return count; } /* PUBLIC ----------------------------------------------------------------- */ double time_time(void) { struct timeval tv; double t; gettimeofday(&tv, 0); t = (double)tv.tv_sec + ((double)tv.tv_usec / 1E6); return t; } void time_sleep(double seconds) { struct timespec ts, rem; if (seconds > 0.0) { ts.tv_sec = seconds; ts.tv_nsec = (seconds-(double)ts.tv_sec) * 1E9; while (clock_nanosleep(CLOCK_REALTIME, 0, &ts, &rem)) { /* copy remaining time to ts */ ts.tv_sec = rem.tv_sec; ts.tv_nsec = rem.tv_nsec; } } } char *pigpio_error(int errnum) { if (errnum > -1000) return cmdErrStr(errnum); else { switch(errnum) { case pigif_bad_send: return "failed to send to pigpiod"; case pigif_bad_recv: return "failed to receive from pigpiod"; case pigif_bad_getaddrinfo: return "failed to find address of pigpiod"; case pigif_bad_connect: return "failed to connect to pigpiod"; case pigif_bad_socket: return "failed to create socket"; case pigif_bad_noib: return "failed to open notification in band"; case pigif_duplicate_callback: return "identical callback exists"; case pigif_bad_malloc: return "failed to malloc"; case pigif_bad_callback: return "bad callback parameter"; case pigif_notify_failed: return "failed to create notification thread"; case pigif_callback_not_found: return "callback not found"; case pigif_unconnected_pi: return "not connected to Pi"; case pigif_too_many_pis: return "too many connected Pis"; default: return "unknown error"; } } } unsigned pigpiod_if_version(void) { return PIGPIOD_IF2_VERSION; } pthread_t *start_thread(gpioThreadFunc_t thread_func, void *userdata) { pthread_t *pth; pthread_attr_t pthAttr; pth = malloc(sizeof(pthread_t)); if (pth) { if (pthread_attr_init(&pthAttr)) { perror("pthread_attr_init failed"); free(pth); return NULL; } if (pthread_attr_setstacksize(&pthAttr, STACK_SIZE)) { perror("pthread_attr_setstacksize failed"); free(pth); return NULL; } if (pthread_create(pth, &pthAttr, thread_func, userdata)) { perror("pthread_create socket failed"); free(pth); return NULL; } } return pth; } void stop_thread(pthread_t *pth) { if (pth) { pthread_cancel(*pth); pthread_join(*pth, NULL); free(pth); } } int pigpio_start(char *addrStr, char *portStr) { int pi; int *userdata; for (pi=0; pi= MAX_PI) return pigif_too_many_pis; gPiInUse[pi] = 1; if ((!addrStr) || (!strlen(addrStr))) { addrStr = getenv(PI_ENVADDR); if ((!addrStr) || (!strlen(addrStr))) { addrStr = PI_DEFAULT_SOCKET_ADDR_STR; } } if ((!portStr) || (!strlen(portStr))) { portStr = getenv(PI_ENVPORT); if ((!portStr) || (!strlen(portStr))) { portStr = PI_DEFAULT_SOCKET_PORT_STR; } } pthread_mutex_init(&gCmdMutex[pi], NULL); gPigCommand[pi] = pigpioOpenSocket(addrStr, portStr); if (gPigCommand[pi] >= 0) { gPigNotify[pi] = pigpioOpenSocket(addrStr, portStr); if (gPigNotify[pi] >= 0) { gPigHandle[pi] = pigpio_notify(pi); if (gPigHandle[pi] < 0) return pigif_bad_noib; else { gLastLevel[pi] = read_bank_1(pi); /* must be freed by pthNotifyThread */ userdata = malloc(sizeof(*userdata)); *userdata = pi; gPthNotify[pi] = start_thread(pthNotifyThread, userdata); if (gPthNotify[pi]) return pi; else return pigif_notify_failed; } } else return gPigNotify[pi]; } else return gPigCommand[pi]; } void pigpio_stop(int pi) { if ((pi < 0) || (pi >= MAX_PI) || !gPiInUse[pi]) return; if (gPthNotify[pi]) { stop_thread(gPthNotify[pi]); gPthNotify[pi] = 0; } if (gPigCommand[pi] >= 0) { if (gPigHandle[pi] >= 0) { pigpio_command(pi, PI_CMD_NC, gPigHandle[pi], 0, 1); gPigHandle[pi] = -1; } close(gPigCommand[pi]); gPigCommand[pi] = -1; } if (gPigNotify[pi] >= 0) { close(gPigNotify[pi]); gPigNotify[pi] = -1; } gPiInUse[pi] = 0; } int set_mode(int pi, unsigned gpio, unsigned mode) {return pigpio_command(pi, PI_CMD_MODES, gpio, mode, 1);} int get_mode(int pi, unsigned gpio) {return pigpio_command(pi, PI_CMD_MODEG, gpio, 0, 1);} int set_pull_up_down(int pi, unsigned gpio, unsigned pud) {return pigpio_command(pi, PI_CMD_PUD, gpio, pud, 1);} int gpio_read(int pi, unsigned gpio) {return pigpio_command(pi, PI_CMD_READ, gpio, 0, 1);} int gpio_write(int pi, unsigned gpio, unsigned level) {return pigpio_command(pi, PI_CMD_WRITE, gpio, level, 1);} int set_PWM_dutycycle(int pi, unsigned user_gpio, unsigned dutycycle) {return pigpio_command(pi, PI_CMD_PWM, user_gpio, dutycycle, 1);} int get_PWM_dutycycle(int pi, unsigned user_gpio) {return pigpio_command(pi, PI_CMD_GDC, user_gpio, 0, 1);} int set_PWM_range(int pi, unsigned user_gpio, unsigned range) {return pigpio_command(pi, PI_CMD_PRS, user_gpio, range, 1);} int get_PWM_range(int pi, unsigned user_gpio) {return pigpio_command(pi, PI_CMD_PRG, user_gpio, 0, 1);} int get_PWM_real_range(int pi, unsigned user_gpio) {return pigpio_command(pi, PI_CMD_PRRG, user_gpio, 0, 1);} int set_PWM_frequency(int pi, unsigned user_gpio, unsigned frequency) {return pigpio_command(pi, PI_CMD_PFS, user_gpio, frequency, 1);} int get_PWM_frequency(int pi, unsigned user_gpio) {return pigpio_command(pi, PI_CMD_PFG, user_gpio, 0, 1);} int set_servo_pulsewidth(int pi, unsigned user_gpio, unsigned pulsewidth) {return pigpio_command(pi, PI_CMD_SERVO, user_gpio, pulsewidth, 1);} int get_servo_pulsewidth(int pi, unsigned user_gpio) {return pigpio_command(pi, PI_CMD_GPW, user_gpio, 0, 1);} int notify_open(int pi) {return pigpio_command(pi, PI_CMD_NO, 0, 0, 1);} int notify_begin(int pi, unsigned handle, uint32_t bits) {return pigpio_command(pi, PI_CMD_NB, handle, bits, 1);} int notify_pause(int pi, unsigned handle) {return pigpio_command(pi, PI_CMD_NB, handle, 0, 1);} int notify_close(int pi, unsigned handle) {return pigpio_command(pi, PI_CMD_NC, handle, 0, 1);} int set_watchdog(int pi, unsigned user_gpio, unsigned timeout) {return pigpio_command(pi, PI_CMD_WDOG, user_gpio, timeout, 1);} uint32_t read_bank_1(int pi) {return pigpio_command(pi, PI_CMD_BR1, 0, 0, 1);} uint32_t read_bank_2(int pi) {return pigpio_command(pi, PI_CMD_BR2, 0, 0, 1);} int clear_bank_1(int pi, uint32_t levels) {return pigpio_command(pi, PI_CMD_BC1, levels, 0, 1);} int clear_bank_2(int pi, uint32_t levels) {return pigpio_command(pi, PI_CMD_BC2, levels, 0, 1);} int set_bank_1(int pi, uint32_t levels) {return pigpio_command(pi, PI_CMD_BS1, levels, 0, 1);} int set_bank_2(int pi, uint32_t levels) {return pigpio_command(pi, PI_CMD_BS2, levels, 0, 1);} int hardware_clock(int pi, unsigned gpio, unsigned frequency) {return pigpio_command(pi, PI_CMD_HC, gpio, frequency, 1);} int hardware_PWM(int pi, unsigned gpio, unsigned frequency, uint32_t dutycycle) { gpioExtent_t ext[1]; /* p1=gpio p2=frequency p3=4 ## extension ## uint32_t dutycycle */ ext[0].size = sizeof(dutycycle); ext[0].ptr = &dutycycle; return pigpio_command_ext( pi, PI_CMD_HP, gpio, frequency, sizeof(dutycycle), 1, ext, 1); } uint32_t get_current_tick(int pi) {return pigpio_command(pi, PI_CMD_TICK, 0, 0, 1);} uint32_t get_hardware_revision(int pi) {return pigpio_command(pi, PI_CMD_HWVER, 0, 0, 1);} uint32_t get_pigpio_version(int pi) {return pigpio_command(pi, PI_CMD_PIGPV, 0, 0, 1);} int wave_clear(int pi) {return pigpio_command(pi, PI_CMD_WVCLR, 0, 0, 1);} int wave_add_new(int pi) {return pigpio_command(pi, PI_CMD_WVNEW, 0, 0, 1);} int wave_add_generic(int pi, unsigned numPulses, gpioPulse_t *pulses) { gpioExtent_t ext[1]; /* p1=0 p2=0 p3=pulses*sizeof(gpioPulse_t) ## extension ## gpioPulse_t[] pulses */ if (!numPulses) return 0; ext[0].size = numPulses * sizeof(gpioPulse_t); ext[0].ptr = pulses; return pigpio_command_ext( pi, PI_CMD_WVAG, 0, 0, ext[0].size, 1, ext, 1); } int wave_add_serial( int pi, unsigned user_gpio, unsigned baud, uint32_t databits, uint32_t stophalfbits, uint32_t offset, unsigned numChar, char *str) { uint8_t buf[12]; gpioExtent_t ext[2]; /* p1=user_gpio p2=baud p3=len+12 ## extension ## uint32_t databits uint32_t stophalfbits uint32_t offset char[len] str */ if (!numChar) return 0; memcpy(buf, &databits, 4); memcpy(buf+4, &stophalfbits, 4); memcpy(buf+8, &offset, 4); ext[0].size = sizeof(buf); ext[0].ptr = buf; ext[1].size = numChar; ext[1].ptr = str; return pigpio_command_ext(pi, PI_CMD_WVAS, user_gpio, baud, numChar+sizeof(buf), 2, ext, 1); } int wave_create(int pi) {return pigpio_command(pi, PI_CMD_WVCRE, 0, 0, 1);} int wave_create_and_pad(int pi, int percent) {return pigpio_command(pi, PI_CMD_WVCAP, percent, 0, 1);} int wave_delete(int pi, unsigned wave_id) {return pigpio_command(pi, PI_CMD_WVDEL, wave_id, 0, 1);} int wave_tx_start(int pi) /* DEPRECATED */ {return pigpio_command(pi, PI_CMD_WVGO, 0, 0, 1);} int wave_tx_repeat(int pi) /* DEPRECATED */ {return pigpio_command(pi, PI_CMD_WVGOR, 0, 0, 1);} int wave_send_once(int pi, unsigned wave_id) {return pigpio_command(pi, PI_CMD_WVTX, wave_id, 0, 1);} int wave_send_repeat(int pi, unsigned wave_id) {return pigpio_command(pi, PI_CMD_WVTXR, wave_id, 0, 1);} int wave_send_using_mode(int pi, unsigned wave_id, unsigned mode) {return pigpio_command(pi, PI_CMD_WVTXM, wave_id, mode, 1);} int wave_chain(int pi, char *buf, unsigned bufSize) { gpioExtent_t ext[1]; /* p1=0 p2=0 p3=bufSize ## extension ## char buf[bufSize] */ ext[0].size = bufSize; ext[0].ptr = buf; return pigpio_command_ext (pi, PI_CMD_WVCHA, 0, 0, bufSize, 1, ext, 1); } int wave_tx_at(int pi) {return pigpio_command(pi, PI_CMD_WVTAT, 0, 0, 1);} int wave_tx_busy(int pi) {return pigpio_command(pi, PI_CMD_WVBSY, 0, 0, 1);} int wave_tx_stop(int pi) {return pigpio_command(pi, PI_CMD_WVHLT, 0, 0, 1);} int wave_get_micros(int pi) {return pigpio_command(pi, PI_CMD_WVSM, 0, 0, 1);} int wave_get_high_micros(int pi) {return pigpio_command(pi, PI_CMD_WVSM, 1, 0, 1);} int wave_get_max_micros(int pi) {return pigpio_command(pi, PI_CMD_WVSM, 2, 0, 1);} int wave_get_pulses(int pi) {return pigpio_command(pi, PI_CMD_WVSP, 0, 0, 1);} int wave_get_high_pulses(int pi) {return pigpio_command(pi, PI_CMD_WVSP, 1, 0, 1);} int wave_get_max_pulses(int pi) {return pigpio_command(pi, PI_CMD_WVSP, 2, 0, 1);} int wave_get_cbs(int pi) {return pigpio_command(pi, PI_CMD_WVSC, 0, 0, 1);} int wave_get_high_cbs(int pi) {return pigpio_command(pi, PI_CMD_WVSC, 1, 0, 1);} int wave_get_max_cbs(int pi) {return pigpio_command(pi, PI_CMD_WVSC, 2, 0, 1);} int gpio_trigger(int pi, unsigned user_gpio, unsigned pulseLen, uint32_t level) { gpioExtent_t ext[1]; /* p1=user_gpio p2=pulseLen p3=4 ## extension ## unsigned level */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &level; return pigpio_command_ext( pi, PI_CMD_TRIG, user_gpio, pulseLen, 4, 1, ext, 1); } int set_glitch_filter(int pi, unsigned user_gpio, unsigned steady) {return pigpio_command(pi, PI_CMD_FG, user_gpio, steady, 1);} int set_noise_filter(int pi, unsigned user_gpio, unsigned steady, unsigned active) { gpioExtent_t ext[1]; /* p1=user_gpio p2=steady p3=4 ## extension ## unsigned active */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &active; return pigpio_command_ext( pi, PI_CMD_FN, user_gpio, steady, 4, 1, ext, 1); } int store_script(int pi, char *script) { unsigned len; gpioExtent_t ext[1]; /* p1=0 p2=0 p3=len ## extension ## char[len] script */ len = strlen(script); if (!len) return 0; ext[0].size = len; ext[0].ptr = script; return pigpio_command_ext(pi, PI_CMD_PROC, 0, 0, len, 1, ext, 1); } int run_script(int pi, unsigned script_id, unsigned numPar, uint32_t *param) { gpioExtent_t ext[1]; /* p1=script id p2=0 p3=numPar * 4 ## extension ## uint32_t[numPar] pars */ ext[0].size = 4 * numPar; ext[0].ptr = param; return pigpio_command_ext (pi, PI_CMD_PROCR, script_id, 0, numPar*4, 1, ext, 1); } int update_script(int pi, unsigned script_id, unsigned numPar, uint32_t *param) { gpioExtent_t ext[1]; /* p1=script id p2=0 p3=numPar * 4 ## extension ## uint32_t[numPar] pars */ ext[0].size = 4 * numPar; ext[0].ptr = param; return pigpio_command_ext (pi, PI_CMD_PROCU, script_id, 0, numPar*4, 1, ext, 1); } int script_status(int pi, unsigned script_id, uint32_t *param) { int status; uint32_t p[PI_MAX_SCRIPT_PARAMS+1]; /* space for script status */ status = pigpio_command(pi, PI_CMD_PROCP, script_id, 0, 0); if (status > 0) { recvMax(pi, p, sizeof(p), status); status = p[0]; if (param) memcpy(param, p+1, sizeof(p)-4); } _pmu(pi); return status; } int stop_script(int pi, unsigned script_id) {return pigpio_command(pi, PI_CMD_PROCS, script_id, 0, 1);} int delete_script(int pi, unsigned script_id) {return pigpio_command(pi, PI_CMD_PROCD, script_id, 0, 1);} int bb_serial_read_open(int pi, unsigned user_gpio, unsigned baud, uint32_t bbBits) { gpioExtent_t ext[1]; /* p1=user_gpio p2=baud p3=4 ## extension ## unsigned bbBits */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &bbBits; return pigpio_command_ext( pi, PI_CMD_SLRO, user_gpio, baud, 4, 1, ext, 1); } int bb_serial_read(int pi, unsigned user_gpio, void *buf, size_t bufSize) { int bytes; bytes = pigpio_command(pi, PI_CMD_SLR, user_gpio, bufSize, 0); if (bytes > 0) { bytes = recvMax(pi, buf, bufSize, bytes); } _pmu(pi); return bytes; } int bb_serial_read_close(int pi, unsigned user_gpio) {return pigpio_command(pi, PI_CMD_SLRC, user_gpio, 0, 1);} int bb_serial_invert(int pi, unsigned user_gpio, unsigned invert) {return pigpio_command(pi, PI_CMD_SLRI, user_gpio, invert, 1);} int i2c_open(int pi, unsigned i2c_bus, unsigned i2c_addr, uint32_t i2c_flags) { gpioExtent_t ext[1]; /* p1=i2c_bus p2=i2c_addr p3=4 ## extension ## uint32_t i2c_flags */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &i2c_flags; return pigpio_command_ext (pi, PI_CMD_I2CO, i2c_bus, i2c_addr, 4, 1, ext, 1); } int i2c_close(int pi, unsigned handle) {return pigpio_command(pi, PI_CMD_I2CC, handle, 0, 1);} int i2c_write_quick(int pi, unsigned handle, unsigned bit) {return pigpio_command(pi, PI_CMD_I2CWQ, handle, bit, 1);} int i2c_write_byte(int pi, unsigned handle, unsigned val) {return pigpio_command(pi, PI_CMD_I2CWS, handle, val, 1);} int i2c_read_byte(int pi, unsigned handle) {return pigpio_command(pi, PI_CMD_I2CRS, handle, 0, 1);} int i2c_write_byte_data(int pi, unsigned handle, unsigned reg, uint32_t val) { gpioExtent_t ext[1]; /* p1=handle p2=reg p3=4 ## extension ## uint32_t val */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &val; return pigpio_command_ext (pi, PI_CMD_I2CWB, handle, reg, 4, 1, ext, 1); } int i2c_write_word_data(int pi, unsigned handle, unsigned reg, uint32_t val) { gpioExtent_t ext[1]; /* p1=handle p2=reg p3=4 ## extension ## uint32_t val */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &val; return pigpio_command_ext (pi, PI_CMD_I2CWW, handle, reg, 4, 1, ext, 1); } int i2c_read_byte_data(int pi, unsigned handle, unsigned reg) {return pigpio_command(pi, PI_CMD_I2CRB, handle, reg, 1);} int i2c_read_word_data(int pi, unsigned handle, unsigned reg) {return pigpio_command(pi, PI_CMD_I2CRW, handle, reg, 1);} int i2c_process_call(int pi, unsigned handle, unsigned reg, uint32_t val) { gpioExtent_t ext[1]; /* p1=handle p2=reg p3=4 ## extension ## uint32_t val */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &val; return pigpio_command_ext (pi, PI_CMD_I2CPC, handle, reg, 4, 1, ext, 1); } int i2c_write_block_data( int pi, unsigned handle, unsigned reg, char *buf, unsigned count) { gpioExtent_t ext[1]; /* p1=handle p2=reg p3=count ## extension ## char buf[count] */ ext[0].size = count; ext[0].ptr = buf; return pigpio_command_ext (pi, PI_CMD_I2CWK, handle, reg, count, 1, ext, 1); } int i2c_read_block_data(int pi, unsigned handle, unsigned reg, char *buf) { int bytes; bytes = pigpio_command(pi, PI_CMD_I2CRK, handle, reg, 0); if (bytes > 0) { bytes = recvMax(pi, buf, 32, bytes); } _pmu(pi); return bytes; } int i2c_block_process_call( int pi, unsigned handle, unsigned reg, char *buf, unsigned count) { int bytes; gpioExtent_t ext[1]; /* p1=handle p2=reg p3=count ## extension ## char buf[count] */ ext[0].size = count; ext[0].ptr = buf; bytes = pigpio_command_ext (pi, PI_CMD_I2CPK, handle, reg, count, 1, ext, 0); if (bytes > 0) { bytes = recvMax(pi, buf, 32, bytes); } _pmu(pi); return bytes; } int i2c_read_i2c_block_data( int pi, unsigned handle, unsigned reg, char *buf, uint32_t count) { int bytes; gpioExtent_t ext[1]; /* p1=handle p2=reg p3=4 ## extension ## uint32_t count */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &count; bytes = pigpio_command_ext (pi, PI_CMD_I2CRI, handle, reg, 4, 1, ext, 0); if (bytes > 0) { bytes = recvMax(pi, buf, count, bytes); } _pmu(pi); return bytes; } int i2c_write_i2c_block_data( int pi, unsigned handle, unsigned reg, char *buf, unsigned count) { gpioExtent_t ext[1]; /* p1=handle p2=reg p3=count ## extension ## char buf[count] */ ext[0].size = count; ext[0].ptr = buf; return pigpio_command_ext (pi, PI_CMD_I2CWI, handle, reg, count, 1, ext, 1); } int i2c_read_device(int pi, unsigned handle, char *buf, unsigned count) { int bytes; bytes = pigpio_command(pi, PI_CMD_I2CRD, handle, count, 0); if (bytes > 0) { bytes = recvMax(pi, buf, count, bytes); } _pmu(pi); return bytes; } int i2c_write_device(int pi, unsigned handle, char *buf, unsigned count) { gpioExtent_t ext[1]; /* p1=handle p2=0 p3=count ## extension ## char buf[count] */ ext[0].size = count; ext[0].ptr = buf; return pigpio_command_ext (pi, PI_CMD_I2CWD, handle, 0, count, 1, ext, 1); } int i2c_zip( int pi, unsigned handle, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen) { int bytes; gpioExtent_t ext[1]; /* p1=handle p2=0 p3=inLen ## extension ## char inBuf[inLen] */ ext[0].size = inLen; ext[0].ptr = inBuf; bytes = pigpio_command_ext (pi, PI_CMD_I2CZ, handle, 0, inLen, 1, ext, 0); if (bytes > 0) { bytes = recvMax(pi, outBuf, outLen, bytes); } _pmu(pi); return bytes; } int bb_i2c_open(int pi, unsigned SDA, unsigned SCL, unsigned baud) { gpioExtent_t ext[1]; /* p1=SDA p2=SCL p3=4 ## extension ## uint32_t baud */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &baud; return pigpio_command_ext (pi, PI_CMD_BI2CO, SDA, SCL, 4, 1, ext, 1); } int bb_i2c_close(int pi, unsigned SDA) {return pigpio_command(pi, PI_CMD_BI2CC, SDA, 0, 1);} int bb_i2c_zip( int pi, unsigned SDA, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen) { int bytes; gpioExtent_t ext[1]; /* p1=SDA p2=0 p3=inLen ## extension ## char inBuf[inLen] */ ext[0].size = inLen; ext[0].ptr = inBuf; bytes = pigpio_command_ext (pi, PI_CMD_BI2CZ, SDA, 0, inLen, 1, ext, 0); if (bytes > 0) { bytes = recvMax(pi, outBuf, outLen, bytes); } _pmu(pi); return bytes; } int bb_spi_open( int pi, unsigned CS, unsigned MISO, unsigned MOSI, unsigned SCLK, unsigned baud, unsigned spiFlags) { uint8_t buf[20]; gpioExtent_t ext[1]; /* p1=CS p2=0 p3=20 ## extension ## uint32_t MISO uint32_t MOSI uint32_t SCLK uint32_t baud uint32_t spiFlags */ ext[0].size = 20; ext[0].ptr = &buf; memcpy(buf + 0, &MISO, 4); memcpy(buf + 4, &MOSI, 4); memcpy(buf + 8, &SCLK, 4); memcpy(buf + 12, &baud, 4); memcpy(buf + 16, &spiFlags, 4); return pigpio_command_ext (pi, PI_CMD_BSPIO, CS, 0, 20, 1, ext, 1); } int bb_spi_close(int pi, unsigned CS) {return pigpio_command(pi, PI_CMD_BSPIC, CS, 0, 1);} int bb_spi_xfer( int pi, unsigned CS, char *txBuf, char *rxBuf, unsigned count) { int bytes; gpioExtent_t ext[1]; /* p1=CS p2=0 p3=count ## extension ## char txBuf[count] */ ext[0].size = count; ext[0].ptr = txBuf; bytes = pigpio_command_ext (pi, PI_CMD_BSPIX, CS, 0, count, 1, ext, 0); if (bytes > 0) { bytes = recvMax(pi, rxBuf, count, bytes); } _pmu(pi); return bytes; } int spi_open(int pi, unsigned channel, unsigned speed, uint32_t flags) { gpioExtent_t ext[1]; /* p1=channel p2=speed p3=4 ## extension ## uint32_t flags */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &flags; return pigpio_command_ext (pi, PI_CMD_SPIO, channel, speed, 4, 1, ext, 1); } int spi_close(int pi, unsigned handle) {return pigpio_command(pi, PI_CMD_SPIC, handle, 0, 1);} int spi_read(int pi, unsigned handle, char *buf, unsigned count) { int bytes; bytes = pigpio_command (pi, PI_CMD_SPIR, handle, count, 0); if (bytes > 0) { bytes = recvMax(pi, buf, count, bytes); } _pmu(pi); return bytes; } int spi_write(int pi, unsigned handle, char *buf, unsigned count) { gpioExtent_t ext[1]; /* p1=handle p2=0 p3=count ## extension ## char buf[count] */ ext[0].size = count; ext[0].ptr = buf; return pigpio_command_ext (pi, PI_CMD_SPIW, handle, 0, count, 1, ext, 1); } int spi_xfer(int pi, unsigned handle, char *txBuf, char *rxBuf, unsigned count) { int bytes; gpioExtent_t ext[1]; /* p1=handle p2=0 p3=count ## extension ## char buf[count] */ ext[0].size = count; ext[0].ptr = txBuf; bytes = pigpio_command_ext (pi, PI_CMD_SPIX, handle, 0, count, 1, ext, 0); if (bytes > 0) { bytes = recvMax(pi, rxBuf, count, bytes); } _pmu(pi); return bytes; } int serial_open(int pi, char *dev, unsigned baud, unsigned flags) { int len; gpioExtent_t ext[1]; len = strlen(dev); /* p1=baud p2=flags p3=len ## extension ## char dev[len] */ ext[0].size = len; ext[0].ptr = dev; return pigpio_command_ext (pi, PI_CMD_SERO, baud, flags, len, 1, ext, 1); } int serial_close(int pi, unsigned handle) {return pigpio_command(pi, PI_CMD_SERC, handle, 0, 1);} int serial_write_byte(int pi, unsigned handle, unsigned val) {return pigpio_command(pi, PI_CMD_SERWB, handle, val, 1);} int serial_read_byte(int pi, unsigned handle) {return pigpio_command(pi, PI_CMD_SERRB, handle, 0, 1);} int serial_write(int pi, unsigned handle, char *buf, unsigned count) { gpioExtent_t ext[1]; /* p1=handle p2=0 p3=count ## extension ## char buf[count] */ ext[0].size = count; ext[0].ptr = buf; return pigpio_command_ext (pi, PI_CMD_SERW, handle, 0, count, 1, ext, 1); } int serial_read(int pi, unsigned handle, char *buf, unsigned count) { int bytes; bytes = pigpio_command (pi, PI_CMD_SERR, handle, count, 0); if (bytes > 0) { bytes = recvMax(pi, buf, count, bytes); } _pmu(pi); return bytes; } int serial_data_available(int pi, unsigned handle) {return pigpio_command(pi, PI_CMD_SERDA, handle, 0, 1);} int custom_1(int pi, unsigned arg1, unsigned arg2, char *argx, unsigned count) { gpioExtent_t ext[1]; /* p1=arg1 p2=arg2 p3=count ## extension ## char argx[count] */ ext[0].size = count; ext[0].ptr = argx; return pigpio_command_ext( pi, PI_CMD_CF1, arg1, arg2, count, 1, ext, 1); } int custom_2(int pi, unsigned arg1, char *argx, unsigned count, char *retBuf, uint32_t retMax) { int bytes; gpioExtent_t ext[1]; /* p1=arg1 p2=retMax p3=count ## extension ## char argx[count] */ ext[0].size = count; ext[0].ptr = argx; bytes = pigpio_command_ext (pi, PI_CMD_CF2, arg1, retMax, count, 1, ext, 0); if (bytes > 0) { bytes = recvMax(pi, retBuf, retMax, bytes); } _pmu(pi); return bytes; } int get_pad_strength(int pi, unsigned pad) {return pigpio_command(pi, PI_CMD_PADG, pad, 0, 1);} int set_pad_strength(int pi, unsigned pad, unsigned padStrength) {return pigpio_command(pi, PI_CMD_PADS, pad, padStrength, 1);} int shell_(int pi, char *scriptName, char *scriptString) { int ln, ls; gpioExtent_t ext[2]; ln = strlen(scriptName); ls = strlen(scriptString); /* p1=len(scriptName) p2=0 p3=len(scriptName) + len(scriptString) + 1 ## extension ## char[] */ ext[0].size = ln + 1; /* include null byte */ ext[0].ptr = scriptName; ext[1].size = ls; ext[1].ptr = scriptString; return pigpio_command_ext (pi, PI_CMD_SHELL, ln, 0, ln+ls+1, 2, ext, 1); } int file_open(int pi, char *file, unsigned mode) { int len; gpioExtent_t ext[1]; len = strlen(file); /* p1=mode p2=0 p3=len ## extension ## char file[len] */ ext[0].size = len; ext[0].ptr = file; return pigpio_command_ext (pi, PI_CMD_FO, mode, 0, len, 1, ext, 1); } int file_close(int pi, unsigned handle) {return pigpio_command(pi, PI_CMD_FC, handle, 0, 1);} int file_write(int pi, unsigned handle, char *buf, unsigned count) { gpioExtent_t ext[1]; /* p1=handle p2=0 p3=count ## extension ## char buf[count] */ ext[0].size = count; ext[0].ptr = buf; return pigpio_command_ext (pi, PI_CMD_FW, handle, 0, count, 1, ext, 1); } int file_read(int pi, unsigned handle, char *buf, unsigned count) { int bytes; bytes = pigpio_command (pi, PI_CMD_FR, handle, count, 0); if (bytes > 0) { bytes = recvMax(pi, buf, count, bytes); } _pmu(pi); return bytes; } int file_seek(int pi, unsigned handle, int32_t seekOffset, int seekFrom) { gpioExtent_t ext[1]; /* p1=handle p2=seekOffset p3=4 ## extension ## uint32_t seekFrom */ ext[0].size = sizeof(uint32_t); ext[0].ptr = &seekFrom; return pigpio_command_ext (pi, PI_CMD_FS, handle, seekOffset, 4, 1, ext, 1); } int file_list(int pi, char *fpat, char *buf, unsigned count) { int len; int bytes; gpioExtent_t ext[1]; len = strlen(fpat); /* p1=60000 p2=0 p3=len ## extension ## char fpat[len] */ ext[0].size = len; ext[0].ptr = fpat; bytes = pigpio_command_ext(pi, PI_CMD_FL, 60000, 0, len, 1, ext, 0); if (bytes > 0) { bytes = recvMax(pi, buf, count, bytes); } _pmu(pi); return bytes; } int callback(int pi, unsigned user_gpio, unsigned edge, CBFunc_t f) {return intCallback(pi, user_gpio, edge, f, 0, 0);} int callback_ex( int pi, unsigned user_gpio, unsigned edge, CBFuncEx_t f, void *user) {return intCallback(pi, user_gpio, edge, f, user, 1);} int callback_cancel(unsigned id) { callback_t *p; int pi; p = gCallBackFirst; while (p) { if (p->id == id) { pi = p->pi; if (p->prev) {p->prev->next = p->next;} else {gCallBackFirst = p->next;} if (p->next) {p->next->prev = p->prev;} else {gCallBackLast = p->prev;} free(p); findNotifyBits(pi); return 0; } p = p->next; } return pigif_callback_not_found; } int wait_for_edge(int pi, unsigned user_gpio, unsigned edge, double timeout) { int triggered = 0; int id; double due; if ((pi < 0) || (pi >= MAX_PI) || !gPiInUse[pi]) return pigif_unconnected_pi; if (timeout <= 0.0) return 0; due = time_time() + timeout; id = callback_ex(pi, user_gpio, edge, _wfe, &triggered); while (!triggered && (time_time() < due)) time_sleep(0.05); callback_cancel(id); return triggered; } int bsc_xfer(int pi, bsc_xfer_t *bscxfer) { int bytes; int status; gpioExtent_t ext[1]; /* p1=control p2=0 p3=len ## extension ## char buf[len] */ ext[0].size = bscxfer->txCnt; ext[0].ptr = bscxfer->txBuf; bytes = pigpio_command_ext (pi, PI_CMD_BSCX, bscxfer->control, 0, bscxfer->txCnt, 1, ext, 0); if (bytes > 0) { recvMax(pi, &status, 4, 4); status = ntohl(status); bytes -= 4; bytes = recvMax(pi, bscxfer->rxBuf, sizeof(bscxfer->rxBuf), bytes); bscxfer->rxCnt = bytes; } else { status = bytes; } _pmu(pi); return status; } int bsc_i2c(int pi, int i2c_addr, bsc_xfer_t *bscxfer) { int control = 0; if (i2c_addr) control = (i2c_addr<<16) | 0x305; bscxfer->control = control; return bsc_xfer(pi, bscxfer); } int event_callback(int pi, unsigned event, evtCBFunc_t f) {return intEventCallback(pi, event, f, 0, 0);} int event_callback_ex( int pi, unsigned event, evtCBFuncEx_t f, void *user) {return intEventCallback(pi, event, f, user, 1);} int event_callback_cancel(unsigned id) { evtCallback_t *ep; int pi; ep = geCallBackFirst; while (ep) { if (ep->id == id) { pi = ep->pi; if (ep->prev) {ep->prev->next = ep->next;} else {geCallBackFirst = ep->next;} if (ep->next) {ep->next->prev = ep->prev;} else {geCallBackLast = ep->prev;} free(ep); findEventBits(pi); return 0; } ep = ep->next; } return pigif_callback_not_found; } int wait_for_event(int pi, unsigned event, double timeout) { int triggered = 0; int id; double due; if ((pi < 0) || (pi >= MAX_PI) || !gPiInUse[pi]) return pigif_unconnected_pi; if (timeout <= 0.0) return 0; due = time_time() + timeout; id = event_callback_ex(pi, event, _ewfe, &triggered); while (!triggered && (time_time() < due)) time_sleep(0.05); event_callback_cancel(id); return triggered; } int event_trigger(int pi, unsigned event) {return pigpio_command(pi, PI_CMD_EVM, event, 0, 1);} pigpio-78/pigpiod_if2.h000066400000000000000000003260041373465704200151650ustar00rootroot00000000000000/* This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to */ #ifndef PIGPIOD_IF2_H #define PIGPIOD_IF2_H #include "pigpio.h" #define PIGPIOD_IF2_VERSION 17 /*TEXT pigpiod_if2 is a C library for the Raspberry which allows control of the GPIO via the socket interface to the pigpio daemon. *Features* o hardware timed PWM on any of GPIO 0-31 o hardware timed servo pulses on any of GPIO 0-31 o callbacks when any of GPIO 0-31 change state o callbacks at timed intervals o reading/writing all of the GPIO in a bank as one operation o individually setting GPIO modes, reading and writing o notifications when any of GPIO 0-31 change state o the construction of output waveforms with microsecond timing o rudimentary permission control over GPIO o a simple interface to start and stop new threads o I2C, SPI, and serial link wrappers o creating and running scripts on the pigpio daemon *GPIO* ALL GPIO are identified by their Broadcom number. *Notes* The PWM and servo pulses are timed using the DMA and PWM/PCM peripherals. *Usage* Include in your source files. Assuming your source is in prog.c use the following command to build . . gcc -Wall -pthread -o prog prog.c -lpigpiod_if2 -lrt . . to run make sure the pigpio daemon is running . . sudo pigpiod ./prog # sudo is not required to run programs linked to pigpiod_if2 . . For examples see x_pigpiod_if2.c within the pigpio archive file. *Notes* All the functions which return an int return < 0 on error TEXT*/ /*OVERVIEW ESSENTIAL pigpio_start Connects to a pigpio daemon pigpio_stop Disconnects from a pigpio daemon BASIC set_mode Set a GPIO mode get_mode Get a GPIO mode set_pull_up_down Set/clear GPIO pull up/down resistor gpio_read Read a GPIO gpio_write Write a GPIO PWM_(overrides_servo_commands_on_same_GPIO) set_PWM_dutycycle Start/stop PWM pulses on a GPIO set_PWM_frequency Configure PWM frequency for a GPIO set_PWM_range Configure PWM range for a GPIO get_PWM_dutycycle Get the PWM dutycycle in use on a GPIO get_PWM_frequency Get configured PWM frequency for a GPIO get_PWM_range Get configured PWM range for a GPIO get_PWM_real_range Get underlying PWM range for a GPIO Servo_(overrides_PWM_commands_on_same_GPIO) set_servo_pulsewidth Start/stop servo pulses on a GPIO get_servo_pulsewidth Get the servo pulsewidth in use on a GPIO INTERMEDIATE gpio_trigger Send a trigger pulse to a GPIO. set_watchdog Set a watchdog on a GPIO. read_bank_1 Read all GPIO in bank 1 read_bank_2 Read all GPIO in bank 2 clear_bank_1 Clear selected GPIO in bank 1 clear_bank_2 Clear selected GPIO in bank 2 set_bank_1 Set selected GPIO in bank 1 set_bank_2 Set selected GPIO in bank 2 callback Create GPIO level change callback callback_ex Create GPIO level change callback, extended callback_cancel Cancel a callback wait_for_edge Wait for GPIO level change start_thread Start a new thread stop_thread Stop a previously started thread ADVANCED notify_open Request a notification handle notify_begin Start notifications for selected GPIO notify_pause Pause notifications notify_close Close a notification hardware_clock Start hardware clock on supported GPIO hardware_PWM Start hardware PWM on supported GPIO set_glitch_filter Set a glitch filter on a GPIO set_noise_filter Set a noise filter on a GPIO set_pad_strength Sets a pads drive strength get_pad_strength Gets a pads drive strength shell_ Executes a shell command Custom custom_1 User custom function 1 custom_2 User custom function 2 Events event_callback Sets a callback for an event event_callback_ex Sets a callback for an event, extended event_callback_cancel Cancel an event callback event_trigger Triggers an event wait_for_event Wait for an event Scripts store_script Store a script run_script Run a stored script update_script Set a scripts parameters script_status Get script status and parameters stop_script Stop a running script delete_script Delete a stored script I2C i2c_open Opens an I2C device i2c_close Closes an I2C device i2c_write_quick smbus write quick i2c_read_byte smbus read byte i2c_write_byte smbus write byte i2c_read_byte_data smbus read byte data i2c_write_byte_data smbus write byte data i2c_read_word_data smbus read word data i2c_write_word_data smbus write word data i2c_read_block_data smbus read block data i2c_write_block_data smbus write block data i2c_read_i2c_block_data smbus read I2C block data i2c_write_i2c_block_data smbus write I2C block data i2c_read_device Reads the raw I2C device i2c_write_device Writes the raw I2C device i2c_process_call smbus process call i2c_block_process_call smbus block process call i2c_zip Performs multiple I2C transactions I2C_BIT_BANG bb_i2c_open Opens GPIO for bit banging I2C bb_i2c_close Closes GPIO for bit banging I2C bb_i2c_zip Performs bit banged I2C transactions I2C/SPI_SLAVE bsc_xfer I2C/SPI as slave transfer bsc_i2c I2C as slave transfer SERIAL serial_open Opens a serial device serial_close Closes a serial device serial_read_byte Reads a byte from a serial device serial_write_byte Writes a byte to a serial device serial_read Reads bytes from a serial device serial_write Writes bytes to a serial device serial_data_available Returns number of bytes ready to be read SERIAL_BIT_BANG_(read_only) bb_serial_read_open Opens a GPIO for bit bang serial reads bb_serial_read_close Closes a GPIO for bit bang serial reads bb_serial_invert Invert serial logic (1 invert, 0 normal) bb_serial_read Reads bit bang serial data from a GPIO SPI spi_open Opens a SPI device spi_close Closes a SPI device spi_read Reads bytes from a SPI device spi_write Writes bytes to a SPI device spi_xfer Transfers bytes with a SPI device SPI_BIT_BANG bb_spi_open Opens GPIO for bit banging SPI bb_spi_close Closes GPIO for bit banging SPI bb_spi_xfer Transfers bytes with bit banging SPI FILES file_open Opens a file file_close Closes a file file_read Reads bytes from a file file_write Writes bytes to a file file_seek Seeks to a position within a file file_list List files which match a pattern WAVES wave_clear Deletes all waveforms wave_add_new Starts a new waveform wave_add_generic Adds a series of pulses to the waveform wave_add_serial Adds serial data to the waveform wave_create Creates a waveform from added data wave_create_and_pad Creates a waveform of fixed size from added data wave_delete Deletes one or more waveforms wave_send_once Transmits a waveform once wave_send_repeat Transmits a waveform repeatedly wave_send_using_mode Transmits a waveform in the chosen mode wave_chain Transmits a chain of waveforms wave_tx_at Returns the current transmitting waveform wave_tx_busy Checks to see if the waveform has ended wave_tx_stop Aborts the current waveform wave_get_cbs Length in cbs of the current waveform wave_get_high_cbs Length of longest waveform so far wave_get_max_cbs Absolute maximum allowed cbs wave_get_micros Length in micros of the current waveform wave_get_high_micros Length of longest waveform so far wave_get_max_micros Absolute maximum allowed micros wave_get_pulses Length in pulses of the current waveform wave_get_high_pulses Length of longest waveform so far wave_get_max_pulses Absolute maximum allowed pulses UTILITIES get_current_tick Get current tick (microseconds) get_hardware_revision Get hardware revision get_pigpio_version Get the pigpio version pigpiod_if_version Get the pigpiod_if2 version pigpio_error Get a text description of an error code. time_sleep Sleeps for a float number of seconds time_time Float number of seconds since the epoch OVERVIEW*/ #ifdef __cplusplus extern "C" { #endif typedef void (*CBFunc_t) (int pi, unsigned user_gpio, unsigned level, uint32_t tick); typedef void (*CBFuncEx_t) (int pi, unsigned user_gpio, unsigned level, uint32_t tick, void *userdata); typedef struct callback_s callback_t; typedef void (*evtCBFunc_t) (int pi, unsigned event, uint32_t tick); typedef void (*evtCBFuncEx_t) (int pi, unsigned event, uint32_t tick, void *userdata); typedef struct evtCallback_s evtCallback_t; /*F*/ double time_time(void); /*D Return the current time in seconds since the Epoch. D*/ /*F*/ void time_sleep(double seconds); /*D Delay execution for a given number of seconds. . . seconds: the number of seconds to delay. . . D*/ /*F*/ char *pigpio_error(int errnum); /*D Return a text description for an error code. . . errnum: the error code. . . D*/ /*F*/ unsigned pigpiod_if_version(void); /*D Return the pigpiod_if2 version. D*/ /*F*/ pthread_t *start_thread(gpioThreadFunc_t thread_func, void *userdata); /*D Starts a new thread of execution with thread_func as the main routine. . . thread_func: the main function for the new thread. userdata: a pointer to an arbitrary argument. . . Returns a pointer to pthread_t if OK, otherwise NULL. The function is passed the single argument userdata. The thread can be cancelled by passing the pointer to pthread_t to [*stop_thread*]. D*/ /*F*/ void stop_thread(pthread_t *pth); /*D Cancels the thread pointed at by pth. . . pth: the thread to be stopped. . . No value is returned. The thread to be stopped should have been started with [*start_thread*]. D*/ /*F*/ int pigpio_start(char *addrStr, char *portStr); /*D Connect to the pigpio daemon. Reserving command and notification streams. . . addrStr: specifies the host or IP address of the Pi running the pigpio daemon. It may be NULL in which case localhost is used unless overridden by the PIGPIO_ADDR environment variable. portStr: specifies the port address used by the Pi running the pigpio daemon. It may be NULL in which case "8888" is used unless overridden by the PIGPIO_PORT environment variable. . . Returns an integer value greater than or equal to zero if OK. This value is passed to the GPIO routines to specify the Pi to be operated on. D*/ /*F*/ void pigpio_stop(int pi); /*D Terminates the connection to a pigpio daemon and releases resources used by the library. . . pi: >=0 (as returned by [*pigpio_start*]). . . D*/ /*F*/ int set_mode(int pi, unsigned gpio, unsigned mode); /*D Set the GPIO mode. . . pi: >=0 (as returned by [*pigpio_start*]). gpio: 0-53. mode: PI_INPUT, PI_OUTPUT, PI_ALT0, PI_ALT1, PI_ALT2, PI_ALT3, PI_ALT4, PI_ALT5. . . Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_MODE, or PI_NOT_PERMITTED. D*/ /*F*/ int get_mode(int pi, unsigned gpio); /*D Get the GPIO mode. . . pi: >=0 (as returned by [*pigpio_start*]). gpio: 0-53. . . Returns the GPIO mode if OK, otherwise PI_BAD_GPIO. D*/ /*F*/ int set_pull_up_down(int pi, unsigned gpio, unsigned pud); /*D Set or clear the GPIO pull-up/down resistor. . . pi: >=0 (as returned by [*pigpio_start*]). gpio: 0-53. pud: PI_PUD_UP, PI_PUD_DOWN, PI_PUD_OFF. . . Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_PUD, or PI_NOT_PERMITTED. D*/ /*F*/ int gpio_read(int pi, unsigned gpio); /*D Read the GPIO level. . . pi: >=0 (as returned by [*pigpio_start*]). gpio:0-53. . . Returns the GPIO level if OK, otherwise PI_BAD_GPIO. D*/ /*F*/ int gpio_write(int pi, unsigned gpio, unsigned level); /*D Write the GPIO level. . . pi: >=0 (as returned by [*pigpio_start*]). gpio: 0-53. level: 0, 1. . . Returns 0 if OK, otherwise PI_BAD_GPIO, PI_BAD_LEVEL, or PI_NOT_PERMITTED. Notes If PWM or servo pulses are active on the GPIO they are switched off. D*/ /*F*/ int set_PWM_dutycycle(int pi, unsigned user_gpio, unsigned dutycycle); /*D Start (non-zero dutycycle) or stop (0) PWM pulses on the GPIO. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31. dutycycle: 0-range (range defaults to 255). . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_DUTYCYCLE, or PI_NOT_PERMITTED. Notes The [*set_PWM_range*] function may be used to change the default range of 255. D*/ /*F*/ int get_PWM_dutycycle(int pi, unsigned user_gpio); /*D Return the PWM dutycycle in use on a GPIO. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31. . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_PWM_GPIO. For normal PWM the dutycycle will be out of the defined range for the GPIO (see [*get_PWM_range*]). If a hardware clock is active on the GPIO the reported dutycycle will be 500000 (500k) out of 1000000 (1M). If hardware PWM is active on the GPIO the reported dutycycle will be out of a 1000000 (1M). D*/ /*F*/ int set_PWM_range(int pi, unsigned user_gpio, unsigned range); /*D Set the range of PWM values to be used on the GPIO. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31. range: 25-40000. . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_DUTYRANGE, or PI_NOT_PERMITTED. Notes If PWM is currently active on the GPIO its dutycycle will be scaled to reflect the new range. The real range, the number of steps between fully off and fully on for each of the 18 available GPIO frequencies is . . 25(#1), 50(#2), 100(#3), 125(#4), 200(#5), 250(#6), 400(#7), 500(#8), 625(#9), 800(#10), 1000(#11), 1250(#12), 2000(#13), 2500(#14), 4000(#15), 5000(#16), 10000(#17), 20000(#18) . . The real value set by set_PWM_range is (dutycycle * real range) / range. D*/ /*F*/ int get_PWM_range(int pi, unsigned user_gpio); /*D Get the range of PWM values being used on the GPIO. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31. . . Returns the dutycycle range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. If a hardware clock or hardware PWM is active on the GPIO the reported range will be 1000000 (1M). D*/ /*F*/ int get_PWM_real_range(int pi, unsigned user_gpio); /*D Get the real underlying range of PWM values being used on the GPIO. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31. . . Returns the real range used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. If a hardware clock is active on the GPIO the reported real range will be 1000000 (1M). If hardware PWM is active on the GPIO the reported real range will be approximately 250M divided by the set PWM frequency. D*/ /*F*/ int set_PWM_frequency(int pi, unsigned user_gpio, unsigned frequency); /*D Set the frequency (in Hz) of the PWM to be used on the GPIO. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31. frequency: >=0 (Hz). . . Returns the numerically closest frequency if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_PERMITTED. If PWM is currently active on the GPIO it will be switched off and then back on at the new frequency. Each GPIO can be independently set to one of 18 different PWM frequencies. The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5, 8, or 10 microseconds (default 5). The sample rate is set when the pigpio daemon is started. The frequencies for each sample rate are: . . Hertz 1: 40000 20000 10000 8000 5000 4000 2500 2000 1600 1250 1000 800 500 400 250 200 100 50 2: 20000 10000 5000 4000 2500 2000 1250 1000 800 625 500 400 250 200 125 100 50 25 4: 10000 5000 2500 2000 1250 1000 625 500 400 313 250 200 125 100 63 50 25 13 sample rate (us) 5: 8000 4000 2000 1600 1000 800 500 400 320 250 200 160 100 80 50 40 20 10 8: 5000 2500 1250 1000 625 500 313 250 200 156 125 100 63 50 31 25 13 6 10: 4000 2000 1000 800 500 400 250 200 160 125 100 80 50 40 25 20 10 5 . . D*/ /*F*/ int get_PWM_frequency(int pi, unsigned user_gpio); /*D Get the frequency of PWM being used on the GPIO. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31. . . For normal PWM the frequency will be that defined for the GPIO by [*set_PWM_frequency*]. If a hardware clock is active on the GPIO the reported frequency will be that set by [*hardware_clock*]. If hardware PWM is active on the GPIO the reported frequency will be that set by [*hardware_PWM*]. Returns the frequency (in hertz) used for the GPIO if OK, otherwise PI_BAD_USER_GPIO. D*/ /*F*/ int set_servo_pulsewidth(int pi, unsigned user_gpio, unsigned pulsewidth); /*D Start (500-2500) or stop (0) servo pulses on the GPIO. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31. pulsewidth: 0 (off), 500 (anti-clockwise) - 2500 (clockwise). . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_PULSEWIDTH or PI_NOT_PERMITTED. The selected pulsewidth will continue to be transmitted until changed by a subsequent call to set_servo_pulsewidth. The pulsewidths supported by servos varies and should probably be determined by experiment. A value of 1500 should always be safe and represents the mid-point of rotation. You can DAMAGE a servo if you command it to move beyond its limits. OTHER UPDATE RATES: This function updates servos at 50Hz. If you wish to use a different update frequency you will have to use the PWM functions. . . Update Rate (Hz) 50 100 200 400 500 1E6/Hz 20000 10000 5000 2500 2000 . . Firstly set the desired PWM frequency using [*set_PWM_frequency*]. Then set the PWM range using [*set_PWM_range*] to 1E6/Hz. Doing this allows you to use units of microseconds when setting the servo pulsewidth. E.g. If you want to update a servo connected to GPIO 25 at 400Hz . . set_PWM_frequency(25, 400); set_PWM_range(25, 2500); . . Thereafter use the [*set_PWM_dutycycle*] function to move the servo, e.g. set_PWM_dutycycle(25, 1500) will set a 1500 us pulse. D*/ /*F*/ int get_servo_pulsewidth(int pi, unsigned user_gpio); /*D Return the servo pulsewidth in use on a GPIO. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31. . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERVO_GPIO. D*/ /*F*/ int notify_open(int pi); /*D Get a free notification handle. . . pi: >=0 (as returned by [*pigpio_start*]). . . Returns a handle greater than or equal to zero if OK, otherwise PI_NO_HANDLE. A notification is a method for being notified of GPIO state changes via a pipe. Pipes are only accessible from the local machine so this function serves no purpose if you are using the library from a remote machine. The in-built (socket) notifications provided by [*callback*] should be used instead. Notifications for handle x will be available at the pipe named /dev/pigpiox (where x is the handle number). E.g. if the function returns 15 then the notifications must be read from /dev/pigpio15. D*/ /*F*/ int notify_begin(int pi, unsigned handle, uint32_t bits); /*D Start notifications on a previously opened handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: 0-31 (as returned by [*notify_open*]) bits: a mask indicating the GPIO to be notified. . . Returns 0 if OK, otherwise PI_BAD_HANDLE. The notification sends state changes for each GPIO whose corresponding bit in bits is set. Each notification occupies 12 bytes in the fifo as follows: . . typedef struct { uint16_t seqno; uint16_t flags; uint32_t tick; uint32_t level; } gpioReport_t; . . seqno: starts at 0 each time the handle is opened and then increments by one for each report. flags: three flags are defined, PI_NTFY_FLAGS_WDOG, PI_NTFY_FLAGS_ALIVE, and PI_NTFY_FLAGS_EVENT. If bit 5 is set (PI_NTFY_FLAGS_WDOG) then bits 0-4 of the flags indicate a GPIO which has had a watchdog timeout. If bit 6 is set (PI_NTFY_FLAGS_ALIVE) this indicates a keep alive signal on the pipe/socket and is sent once a minute in the absence of other notification activity. If bit 7 is set (PI_NTFY_FLAGS_EVENT) then bits 0-4 of the flags indicate an event which has been triggered. tick: the number of microseconds since system boot. It wraps around after 1h12m. level: indicates the level of each GPIO. If bit 1<=0 (as returned by [*pigpio_start*]). handle: 0-31 (as returned by [*notify_open*]) . . Returns 0 if OK, otherwise PI_BAD_HANDLE. Notifications for the handle are suspended until [*notify_begin*] is called again. D*/ /*F*/ int notify_close(int pi, unsigned handle); /*D Stop notifications on a previously opened handle and release the handle for reuse. . . pi: >=0 (as returned by [*pigpio_start*]). handle: 0-31 (as returned by [*notify_open*]) . . Returns 0 if OK, otherwise PI_BAD_HANDLE. D*/ /*F*/ int set_watchdog(int pi, unsigned user_gpio, unsigned timeout); /*D Sets a watchdog for a GPIO. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31. timeout: 0-60000. . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO or PI_BAD_WDOG_TIMEOUT. The watchdog is nominally in milliseconds. Only one watchdog may be registered per GPIO. The watchdog may be cancelled by setting timeout to 0. Once a watchdog has been started callbacks for the GPIO will be triggered every timeout interval after the last GPIO activity. The callback will receive the special level PI_TIMEOUT. D*/ /*F*/ int set_glitch_filter(int pi, unsigned user_gpio, unsigned steady); /*D Sets a glitch filter on a GPIO. Level changes on the GPIO are not reported unless the level has been stable for at least [*steady*] microseconds. The level is then reported. Level changes of less than [*steady*] microseconds are ignored. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31 steady: 0-300000 . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER. This filter affects the GPIO samples returned to callbacks set up with [*callback*], [*callback_ex*] and [*wait_for_edge*]. It does not affect levels read by [*gpio_read*], [*read_bank_1*], or [*read_bank_2*]. Each (stable) edge will be timestamped [*steady*] microseconds after it was first detected. D*/ /*F*/ int set_noise_filter( int pi, unsigned user_gpio, unsigned steady, unsigned active); /*D Sets a noise filter on a GPIO. Level changes on the GPIO are ignored until a level which has been stable for [*steady*] microseconds is detected. Level changes on the GPIO are then reported for [*active*] microseconds after which the process repeats. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31 steady: 0-300000 active: 0-1000000 . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_BAD_FILTER. This filter affects the GPIO samples returned to callbacks set up with [*callback*], [*callback_ex*] and [*wait_for_edge*]. It does not affect levels read by [*gpio_read*], [*read_bank_1*], or [*read_bank_2*]. Level changes before and after the active period may be reported. Your software must be designed to cope with such reports. D*/ /*F*/ uint32_t read_bank_1(int pi); /*D Read the levels of the bank 1 GPIO (GPIO 0-31). . . pi: >=0 (as returned by [*pigpio_start*]). . . The returned 32 bit integer has a bit set if the corresponding GPIO is logic 1. GPIO n has bit value (1<=0 (as returned by [*pigpio_start*]). . . The returned 32 bit integer has a bit set if the corresponding GPIO is logic 1. GPIO n has bit value (1<<(n-32)). D*/ /*F*/ int clear_bank_1(int pi, uint32_t bits); /*D Clears GPIO 0-31 if the corresponding bit in bits is set. . . pi: >=0 (as returned by [*pigpio_start*]). bits: a bit mask with 1 set if the corresponding GPIO is to be cleared. . . Returns 0 if OK, otherwise PI_SOME_PERMITTED. A status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO. D*/ /*F*/ int clear_bank_2(int pi, uint32_t bits); /*D Clears GPIO 32-53 if the corresponding bit (0-21) in bits is set. . . pi: >=0 (as returned by [*pigpio_start*]). bits: a bit mask with 1 set if the corresponding GPIO is to be cleared. . . Returns 0 if OK, otherwise PI_SOME_PERMITTED. A status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO. D*/ /*F*/ int set_bank_1(int pi, uint32_t bits); /*D Sets GPIO 0-31 if the corresponding bit in bits is set. . . pi: >=0 (as returned by [*pigpio_start*]). bits: a bit mask with 1 set if the corresponding GPIO is to be set. . . Returns 0 if OK, otherwise PI_SOME_PERMITTED. A status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO. D*/ /*F*/ int set_bank_2(int pi, uint32_t bits); /*D Sets GPIO 32-53 if the corresponding bit (0-21) in bits is set. . . pi: >=0 (as returned by [*pigpio_start*]). bits: a bit mask with 1 set if the corresponding GPIO is to be set. . . Returns 0 if OK, otherwise PI_SOME_PERMITTED. A status of PI_SOME_PERMITTED indicates that the user is not allowed to write to one or more of the GPIO. D*/ /*F*/ int hardware_clock(int pi, unsigned gpio, unsigned clkfreq); /*D Starts a hardware clock on a GPIO at the specified frequency. Frequencies above 30MHz are unlikely to work. . . pi: >=0 (as returned by [*pigpio_start*]). gpio: see description frequency: 0 (off) or 4689-250M (13184-375M for the BCM2711) . . Returns 0 if OK, otherwise PI_NOT_PERMITTED, PI_BAD_GPIO, PI_NOT_HCLK_GPIO, PI_BAD_HCLK_FREQ,or PI_BAD_HCLK_PASS. The same clock is available on multiple GPIO. The latest frequency setting will be used by all GPIO which share a clock. The GPIO must be one of the following. . . 4 clock 0 All models 5 clock 1 All models but A and B (reserved for system use) 6 clock 2 All models but A and B 20 clock 0 All models but A and B 21 clock 1 All models but A and Rev.2 B (reserved for system use) 32 clock 0 Compute module only 34 clock 0 Compute module only 42 clock 1 Compute module only (reserved for system use) 43 clock 2 Compute module only 44 clock 1 Compute module only (reserved for system use) . . Access to clock 1 is protected by a password as its use will likely crash the Pi. The password is given by or'ing 0x5A000000 with the GPIO number. D*/ /*F*/ int hardware_PWM(int pi, unsigned gpio, unsigned PWMfreq, uint32_t PWMduty); /*D Starts hardware PWM on a GPIO at the specified frequency and dutycycle. Frequencies above 30MHz are unlikely to work. NOTE: Any waveform started by [*wave_send_**] or [*wave_chain*] will be cancelled. This function is only valid if the pigpio main clock is PCM. The main clock defaults to PCM but may be overridden when the pigpio daemon is started (option -t). . . pi: >=0 (as returned by [*pigpio_start*]). gpio: see descripton PWMfreq: 0 (off) or 1-125M (1-187.5M for the BCM2711) PWMduty: 0 (off) to 1000000 (1M)(fully on) . . Returns 0 if OK, otherwise PI_NOT_PERMITTED, PI_BAD_GPIO, PI_NOT_HPWM_GPIO, PI_BAD_HPWM_DUTY, PI_BAD_HPWM_FREQ, or PI_HPWM_ILLEGAL. The same PWM channel is available on multiple GPIO. The latest frequency and dutycycle setting will be used by all GPIO which share a PWM channel. The GPIO must be one of the following. . . 12 PWM channel 0 All models but A and B 13 PWM channel 1 All models but A and B 18 PWM channel 0 All models 19 PWM channel 1 All models but A and B 40 PWM channel 0 Compute module only 41 PWM channel 1 Compute module only 45 PWM channel 1 Compute module only 52 PWM channel 0 Compute module only 53 PWM channel 1 Compute module only . . The actual number of steps beween off and fully on is the integral part of 250M/PWMfreq (375M/PWMfreq for the BCM2711). The actual frequency set is 250M/steps (375M/steps for the BCM2711). There will only be a million steps for a PWMfreq of 250 (375 for the BCM2711). Lower frequencies will have more steps and higher frequencies will have fewer steps. PWMduty is automatically scaled to take this into account. D*/ /*F*/ uint32_t get_current_tick(int pi); /*D Gets the current system tick. . . pi: >=0 (as returned by [*pigpio_start*]). . . Tick is the number of microseconds since system boot. As tick is an unsigned 32 bit quantity it wraps around after 2**32 microseconds, which is approximately 1 hour 12 minutes. D*/ /*F*/ uint32_t get_hardware_revision(int pi); /*D Get the Pi's hardware revision number. . . pi: >=0 (as returned by [*pigpio_start*]). . . The hardware revision is the last few characters on the Revision line of /proc/cpuinfo. If the hardware revision can not be found or is not a valid hexadecimal number the function returns 0. The revision number can be used to determine the assignment of GPIO to pins (see [*gpio*]). There are at least three types of board. Type 1 boards have hardware revision numbers of 2 and 3. Type 2 boards have hardware revision numbers of 4, 5, 6, and 15. Type 3 boards have hardware revision numbers of 16 or greater. D*/ /*F*/ uint32_t get_pigpio_version(int pi); /*D Returns the pigpio version. . . pi: >=0 (as returned by [*pigpio_start*]). . . D*/ /*F*/ int wave_clear(int pi); /*D This function clears all waveforms and any data added by calls to the [*wave_add_**] functions. . . pi: >=0 (as returned by [*pigpio_start*]). . . Returns 0 if OK. D*/ /*F*/ int wave_add_new(int pi); /*D This function starts a new empty waveform. You wouldn't normally need to call this function as it is automatically called after a waveform is created with the [*wave_create*] function. . . pi: >=0 (as returned by [*pigpio_start*]). . . Returns 0 if OK. D*/ /*F*/ int wave_add_generic(int pi, unsigned numPulses, gpioPulse_t *pulses); /*D This function adds a number of pulses to the current waveform. . . pi: >=0 (as returned by [*pigpio_start*]). numPulses: the number of pulses. pulses: an array of pulses. . . Returns the new total number of pulses in the current waveform if OK, otherwise PI_TOO_MANY_PULSES. The pulses are interleaved in time order within the existing waveform (if any). Merging allows the waveform to be built in parts, that is the settings for GPIO#1 can be added, and then GPIO#2 etc. If the added waveform is intended to start after or within the existing waveform then the first pulse should consist solely of a delay. D*/ /*F*/ int wave_add_serial (int pi, unsigned user_gpio, unsigned baud, unsigned data_bits, unsigned stop_bits, unsigned offset, unsigned numBytes, char *str); /*D This function adds a waveform representing serial data to the existing waveform (if any). The serial data starts offset microseconds from the start of the waveform. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31. baud: 50-1000000 data_bits: number of data bits (1-32) stop_bits: number of stop half bits (2-8) offset: >=0 numBytes: >=1 str: an array of chars. . . Returns the new total number of pulses in the current waveform if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_WAVE_BAUD, PI_BAD_DATABITS, PI_BAD_STOP_BITS, PI_TOO_MANY_CHARS, PI_BAD_SER_OFFSET, or PI_TOO_MANY_PULSES. NOTES: The serial data is formatted as one start bit, [*data_bits*] data bits, and [*stop_bits*]/2 stop bits. It is legal to add serial data streams with different baud rates to the same waveform. [*numBytes*] is the number of bytes of data in str. The bytes required for each character depend upon [*data_bits*]. For [*data_bits*] 1-8 there will be one byte per character. For [*data_bits*] 9-16 there will be two bytes per character. For [*data_bits*] 17-32 there will be four bytes per character. D*/ /*F*/ int wave_create(int pi); /*D This function creates a waveform from the data provided by the prior calls to the [*wave_add_**] functions. Upon success a wave id greater than or equal to 0 is returned, otherwise PI_EMPTY_WAVEFORM, PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID. . . pi: >=0 (as returned by [*pigpio_start*]). . . The data provided by the [*wave_add_**] functions is consumed by this function. As many waveforms may be created as there is space available. The wave id is passed to [*wave_send_**] to specify the waveform to transmit. Normal usage would be Step 1. [*wave_clear*] to clear all waveforms and added data. Step 2. [*wave_add_**] calls to supply the waveform data. Step 3. [*wave_create*] to create the waveform and get a unique id Repeat steps 2 and 3 as needed. Step 4. [*wave_send_**] with the id of the waveform to transmit. A waveform comprises one or more pulses. Each pulse consists of a [*gpioPulse_t*] structure. . . typedef struct { uint32_t gpioOn; uint32_t gpioOff; uint32_t usDelay; } gpioPulse_t; . . The fields specify 1) the GPIO to be switched on at the start of the pulse. 2) the GPIO to be switched off at the start of the pulse. 3) the delay in microseconds before the next pulse. Any or all the fields can be zero. It doesn't make any sense to set all the fields to zero (the pulse will be ignored). When a waveform is started each pulse is executed in order with the specified delay between the pulse and the next. Returns the new waveform id if OK, otherwise PI_EMPTY_WAVEFORM, PI_NO_WAVEFORM_ID, PI_TOO_MANY_CBS, or PI_TOO_MANY_OOL. D*/ /*F*/ int wave_create_and_pad(int pi, int percent); /*D This function creates a waveform like [*wave_create*] but pads the consumed resources. Where percent gives the percentage of the resources to use (in terms of the theoretical maximum, not the current amount free). This allows the reuse of deleted waves while a transmission is active. . . pi: >=0 (as returned by [*pigpio_start*]). percent: 0-100, size of waveform as percentage of maximum available. . . The data provided by the [*wave_add_**] functions are consumed by this function. As many waveforms may be created as there is space available. The wave id is passed to [*wave_send_**] to specify the waveform to transmit. A usage would be the creation of two waves where one is filled while the other is being transmitted. Each wave is assigned 50% of the resources. This buffer structure allows the transmission of infinite wave sequences. Normal usage: Step 1. [*wave_clear*] to clear all waveforms and added data. Step 2. [*wave_add_**] calls to supply the waveform data. Step 3. [*wave_create_and_pad*] to create a waveform of uniform size. Step 4. [*wave_send_**] with the id of the waveform to transmit. Repeat steps 2-4 as needed. Step 5. Any wave id can now be deleted and another wave of the same size can be created in its place. Returns the new waveform id if OK, otherwise PI_EMPTY_WAVEFORM, PI_NO_WAVEFORM_ID, PI_TOO_MANY_CBS, or PI_TOO_MANY_OOL. D*/ /*F*/ int wave_delete(int pi, unsigned wave_id); /*D This function deletes the waveform with id wave_id. . . pi: >=0 (as returned by [*pigpio_start*]). wave_id: >=0, as returned by [*wave_create*]. . . Wave ids are allocated in order, 0, 1, 2, etc. The wave is flagged for deletion. The resources used by the wave will only be reused when either of the following apply. - all waves with higher numbered wave ids have been deleted or have been flagged for deletion. - a new wave is created which uses exactly the same resources as the current wave (see the C source for gpioWaveCreate for details). Returns 0 if OK, otherwise PI_BAD_WAVE_ID. D*/ /*F*/ int wave_send_once(int pi, unsigned wave_id); /*D This function transmits the waveform with id wave_id. The waveform is sent once. NOTE: Any hardware PWM started by [*hardware_PWM*] will be cancelled. . . pi: >=0 (as returned by [*pigpio_start*]). wave_id: >=0, as returned by [*wave_create*]. . . Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE. D*/ /*F*/ int wave_send_repeat(int pi, unsigned wave_id); /*D This function transmits the waveform with id wave_id. The waveform cycles until cancelled (either by the sending of a new waveform or by [*wave_tx_stop*]). NOTE: Any hardware PWM started by [*hardware_PWM*] will be cancelled. . . pi: >=0 (as returned by [*pigpio_start*]). wave_id: >=0, as returned by [*wave_create*]. . . Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE. D*/ /*F*/ int wave_send_using_mode(int pi, unsigned wave_id, unsigned mode); /*D Transmits the waveform with id wave_id using mode mode. . . pi: >=0 (as returned by [*pigpio_start*]). wave_id: >=0, as returned by [*wave_create*]. mode: PI_WAVE_MODE_ONE_SHOT, PI_WAVE_MODE_REPEAT, PI_WAVE_MODE_ONE_SHOT_SYNC, or PI_WAVE_MODE_REPEAT_SYNC. . . PI_WAVE_MODE_ONE_SHOT: same as [*wave_send_once*]. PI_WAVE_MODE_REPEAT same as [*wave_send_repeat*]. PI_WAVE_MODE_ONE_SHOT_SYNC same as [*wave_send_once*] but tries to sync with the previous waveform. PI_WAVE_MODE_REPEAT_SYNC same as [*wave_send_repeat*] but tries to sync with the previous waveform. WARNING: bad things may happen if you delete the previous waveform before it has been synced to the new waveform. NOTE: Any hardware PWM started by [*hardware_PWM*] will be cancelled. Returns the number of DMA control blocks in the waveform if OK, otherwise PI_BAD_WAVE_ID, or PI_BAD_WAVE_MODE. D*/ /*F*/ int wave_chain(int pi, char *buf, unsigned bufSize); /*D This function transmits a chain of waveforms. NOTE: Any hardware PWM started by [*hardware_PWM*] will be cancelled. The waves to be transmitted are specified by the contents of buf which contains an ordered list of [*wave_id*]s and optional command codes and related data. . . pi: >=0 (as returned by [*pigpio_start*]). buf: pointer to the wave_ids and optional command codes bufSize: the number of bytes in buf . . Returns 0 if OK, otherwise PI_CHAIN_NESTING, PI_CHAIN_LOOP_CNT, PI_BAD_CHAIN_LOOP, PI_BAD_CHAIN_CMD, PI_CHAIN_COUNTER, PI_BAD_CHAIN_DELAY, PI_CHAIN_TOO_BIG, or PI_BAD_WAVE_ID. Each wave is transmitted in the order specified. A wave may occur multiple times per chain. A blocks of waves may be transmitted multiple times by using the loop commands. The block is bracketed by loop start and end commands. Loops may be nested. Delays between waves may be added with the delay command. The following command codes are supported: Name @ Cmd & Data @ Meaning Loop Start @ 255 0 @ Identify start of a wave block Loop Repeat @ 255 1 x y @ loop x + y*256 times Delay @ 255 2 x y @ delay x + y*256 microseconds Loop Forever @ 255 3 @ loop forever If present Loop Forever must be the last entry in the chain. The code is currently dimensioned to support a chain with roughly 600 entries and 20 loop counters. ... #include #include #define WAVES 5 #define GPIO 4 int main(int argc, char *argv[]) { int i, pi, wid[WAVES]; pi = pigpio_start(0, 0); if (pi<0) return -1; set_mode(pi, GPIO, PI_OUTPUT); for (i=0; i=0 (as returned by [*pigpio_start*]). . . Returns the waveform id or one of the following special values: PI_WAVE_NOT_FOUND (9998) - transmitted wave not found. PI_NO_TX_WAVE (9999) - no wave being transmitted. D*/ /*F*/ int wave_tx_busy(int pi); /*D This function checks to see if a waveform is currently being transmitted. . . pi: >=0 (as returned by [*pigpio_start*]). . . Returns 1 if a waveform is currently being transmitted, otherwise 0. D*/ /*F*/ int wave_tx_stop(int pi); /*D This function stops the transmission of the current waveform. . . pi: >=0 (as returned by [*pigpio_start*]). . . Returns 0 if OK. This function is intended to stop a waveform started with the repeat mode. D*/ /*F*/ int wave_get_micros(int pi); /*D This function returns the length in microseconds of the current waveform. . . pi: >=0 (as returned by [*pigpio_start*]). . . D*/ /*F*/ int wave_get_high_micros(int pi); /*D This function returns the length in microseconds of the longest waveform created since the pigpio daemon was started. . . pi: >=0 (as returned by [*pigpio_start*]). . . D*/ /*F*/ int wave_get_max_micros(int pi); /*D This function returns the maximum possible size of a waveform in microseconds. . . pi: >=0 (as returned by [*pigpio_start*]). . . D*/ /*F*/ int wave_get_pulses(int pi); /*D This function returns the length in pulses of the current waveform. . . pi: >=0 (as returned by [*pigpio_start*]). . . D*/ /*F*/ int wave_get_high_pulses(int pi); /*D This function returns the length in pulses of the longest waveform created since the pigpio daemon was started. . . pi: >=0 (as returned by [*pigpio_start*]). . . D*/ /*F*/ int wave_get_max_pulses(int pi); /*D This function returns the maximum possible size of a waveform in pulses. . . pi: >=0 (as returned by [*pigpio_start*]). . . D*/ /*F*/ int wave_get_cbs(int pi); /*D This function returns the length in DMA control blocks of the current waveform. . . pi: >=0 (as returned by [*pigpio_start*]). . . D*/ /*F*/ int wave_get_high_cbs(int pi); /*D This function returns the length in DMA control blocks of the longest waveform created since the pigpio daemon was started. . . pi: >=0 (as returned by [*pigpio_start*]). . . D*/ /*F*/ int wave_get_max_cbs(int pi); /*D This function returns the maximum possible size of a waveform in DMA control blocks. . . pi: >=0 (as returned by [*pigpio_start*]). . . D*/ /*F*/ int gpio_trigger(int pi, unsigned user_gpio, unsigned pulseLen, unsigned level); /*D This function sends a trigger pulse to a GPIO. The GPIO is set to level for pulseLen microseconds and then reset to not level. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31. pulseLen: 1-100. level: 0,1. . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_LEVEL, PI_BAD_PULSELEN, or PI_NOT_PERMITTED. D*/ /*F*/ int store_script(int pi, char *script); /*D This function stores a script for later execution. See [[http://abyz.me.uk/rpi/pigpio/pigs.html#Scripts]] for details. . . pi: >=0 (as returned by [*pigpio_start*]). script: the text of the script. . . The function returns a script id if the script is valid, otherwise PI_BAD_SCRIPT. D*/ /*F*/ int run_script(int pi, unsigned script_id, unsigned numPar, uint32_t *param); /*D This function runs a stored script. . . pi: >=0 (as returned by [*pigpio_start*]). script_id: >=0, as returned by [*store_script*]. numPar: 0-10, the number of parameters. param: an array of parameters. . . The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM param is an array of up to 10 parameters which may be referenced in the script as p0 to p9. D*/ /*F*/ int update_script(int pi, unsigned script_id, unsigned numPar, uint32_t *param); /*D This function sets the parameters of a script. The script may or may not be running. The first numPar parameters of the script are overwritten with the new values. . . pi: >=0 (as returned by [*pigpio_start*]). script_id: >=0, as returned by [*store_script*]. numPar: 0-10, the number of parameters. param: an array of parameters. . . The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID, or PI_TOO_MANY_PARAM. param is an array of up to 10 parameters which may be referenced in the script as p0 to p9. D*/ /*F*/ int script_status(int pi, unsigned script_id, uint32_t *param); /*D This function returns the run status of a stored script as well as the current values of parameters 0 to 9. . . pi: >=0 (as returned by [*pigpio_start*]). script_id: >=0, as returned by [*store_script*]. param: an array to hold the returned 10 parameters. . . The function returns greater than or equal to 0 if OK, otherwise PI_BAD_SCRIPT_ID. The run status may be . . PI_SCRIPT_INITING PI_SCRIPT_HALTED PI_SCRIPT_RUNNING PI_SCRIPT_WAITING PI_SCRIPT_FAILED . . The current value of script parameters 0 to 9 are returned in param. D*/ /*F*/ int stop_script(int pi, unsigned script_id); /*D This function stops a running script. . . pi: >=0 (as returned by [*pigpio_start*]). script_id: >=0, as returned by [*store_script*]. . . The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID. D*/ /*F*/ int delete_script(int pi, unsigned script_id); /*D This function deletes a stored script. . . pi: >=0 (as returned by [*pigpio_start*]). script_id: >=0, as returned by [*store_script*]. . . The function returns 0 if OK, otherwise PI_BAD_SCRIPT_ID. D*/ /*F*/ int bb_serial_read_open(int pi, unsigned user_gpio, unsigned baud, unsigned data_bits); /*D This function opens a GPIO for bit bang reading of serial data. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31. baud: 50-250000 data_bits: 1-32 . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_WAVE_BAUD, or PI_GPIO_IN_USE. The serial data is returned in a cyclic buffer and is read using bb_serial_read. It is the caller's responsibility to read data from the cyclic buffer in a timely fashion. D*/ /*F*/ int bb_serial_read(int pi, unsigned user_gpio, void *buf, size_t bufSize); /*D This function copies up to bufSize bytes of data read from the bit bang serial cyclic buffer to the buffer starting at buf. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31, previously opened with [*bb_serial_read_open*]. buf: an array to receive the read bytes. bufSize: >=0 . . Returns the number of bytes copied if OK, otherwise PI_BAD_USER_GPIO or PI_NOT_SERIAL_GPIO. The bytes returned for each character depend upon the number of data bits [*data_bits*] specified in the [*bb_serial_read_open*] command. For [*data_bits*] 1-8 there will be one byte per character. For [*data_bits*] 9-16 there will be two bytes per character. For [*data_bits*] 17-32 there will be four bytes per character. D*/ /*F*/ int bb_serial_read_close(int pi, unsigned user_gpio); /*D This function closes a GPIO for bit bang reading of serial data. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31, previously opened with [*bb_serial_read_open*]. . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_SERIAL_GPIO. D*/ /*F*/ int bb_serial_invert(int pi, unsigned user_gpio, unsigned invert); /*D This function inverts serial logic for big bang serial reads. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31, previously opened with [*bb_serial_read_open*]. invert: 0-1, 1 invert, 0 normal. . . Returns 0 if OK, otherwise PI_NOT_SERIAL_GPIO or PI_BAD_SER_INVERT. D*/ /*F*/ int i2c_open(int pi, unsigned i2c_bus, unsigned i2c_addr, unsigned i2c_flags); /*D This returns a handle for the device at address i2c_addr on bus i2c_bus. . . pi: >=0 (as returned by [*pigpio_start*]). i2c_bus: >=0. i2c_addr: 0-0x7F. i2c_flags: 0. . . No flags are currently defined. This parameter should be set to zero. Physically buses 0 and 1 are available on the Pi. Higher numbered buses will be available if a kernel supported bus multiplexor is being used. The GPIO used are given in the following table. @ SDA @ SCL I2C 0 @ 0 @ 1 I2C 1 @ 2 @ 3 Returns a handle (>=0) if OK, otherwise PI_BAD_I2C_BUS, PI_BAD_I2C_ADDR, PI_BAD_FLAGS, PI_NO_HANDLE, or PI_I2C_OPEN_FAILED. For the SMBus commands the low level transactions are shown at the end of the function description. The following abbreviations are used. . . S (1 bit) : Start bit P (1 bit) : Stop bit Rd/Wr (1 bit) : Read/Write bit. Rd equals 1, Wr equals 0. A, NA (1 bit) : Accept and not accept bit. Addr (7 bits): I2C 7 bit address. i2c_reg (8 bits): A byte which often selects a register. Data (8 bits): A data byte. Count (8 bits): A byte defining the length of a block operation. [..]: Data sent by the device. . . D*/ /*F*/ int i2c_close(int pi, unsigned handle); /*D This closes the I2C device associated with the handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*i2c_open*]. . . Returns 0 if OK, otherwise PI_BAD_HANDLE. D*/ /*F*/ int i2c_write_quick(int pi, unsigned handle, unsigned bit); /*D This sends a single bit (in the Rd/Wr bit) to the device associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*i2c_open*]. bit: 0-1, the value to write. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. Quick command. SMBus 2.0 5.5.1 . . S Addr bit [A] P . . D*/ /*F*/ int i2c_write_byte(int pi, unsigned handle, unsigned bVal); /*D This sends a single byte to the device associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*i2c_open*]. bVal: 0-0xFF, the value to write. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. Send byte. SMBus 2.0 5.5.2 . . S Addr Wr [A] bVal [A] P . . D*/ /*F*/ int i2c_read_byte(int pi, unsigned handle); /*D This reads a single byte from the device associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*i2c_open*]. . . Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, or PI_I2C_READ_FAILED. Receive byte. SMBus 2.0 5.5.3 . . S Addr Rd [A] [Data] NA P . . D*/ /*F*/ int i2c_write_byte_data( int pi, unsigned handle, unsigned i2c_reg, unsigned bVal); /*D This writes a single byte to the specified register of the device associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to write. bVal: 0-0xFF, the value to write. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. Write byte. SMBus 2.0 5.5.4 . . S Addr Wr [A] i2c_reg [A] bVal [A] P . . D*/ /*F*/ int i2c_write_word_data( int pi, unsigned handle, unsigned i2c_reg, unsigned wVal); /*D This writes a single 16 bit word to the specified register of the device associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to write. wVal: 0-0xFFFF, the value to write. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. Write word. SMBus 2.0 5.5.4 . . S Addr Wr [A] i2c_reg [A] wval_Low [A] wVal_High [A] P . . D*/ /*F*/ int i2c_read_byte_data(int pi, unsigned handle, unsigned i2c_reg); /*D This reads a single byte from the specified register of the device associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to read. . . Returns the byte read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. Read byte. SMBus 2.0 5.5.5 . . S Addr Wr [A] i2c_reg [A] S Addr Rd [A] [Data] NA P . . D*/ /*F*/ int i2c_read_word_data(int pi, unsigned handle, unsigned i2c_reg); /*D This reads a single 16 bit word from the specified register of the device associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to read. . . Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. Read word. SMBus 2.0 5.5.5 . . S Addr Wr [A] i2c_reg [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P . . D*/ /*F*/ int i2c_process_call(int pi, unsigned handle, unsigned i2c_reg, unsigned wVal); /*D This writes 16 bits of data to the specified register of the device associated with handle and and reads 16 bits of data in return. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to write/read. wVal: 0-0xFFFF, the value to write. . . Returns the word read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. Process call. SMBus 2.0 5.5.6 . . S Addr Wr [A] i2c_reg [A] wVal_Low [A] wVal_High [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P . . D*/ /*F*/ int i2c_write_block_data( int pi, unsigned handle, unsigned i2c_reg, char *buf, unsigned count); /*D This writes up to 32 bytes to the specified register of the device associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to write. buf: an array with the data to send. count: 1-32, the number of bytes to write. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. Block write. SMBus 2.0 5.5.7 . . S Addr Wr [A] i2c_reg [A] count [A] buf0 [A] buf1 [A] ... [A] bufn [A] P . . D*/ /*F*/ int i2c_read_block_data(int pi, unsigned handle, unsigned i2c_reg, char *buf); /*D This reads a block of up to 32 bytes from the specified register of the device associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to read. buf: an array to receive the read data. . . The amount of returned data is set by the device. Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. Block read. SMBus 2.0 5.5.7 . . S Addr Wr [A] i2c_reg [A] S Addr Rd [A] [Count] A [buf0] A [buf1] A ... A [bufn] NA P . . D*/ /*F*/ int i2c_block_process_call( int pi, unsigned handle, unsigned i2c_reg, char *buf, unsigned count); /*D This writes data bytes to the specified register of the device associated with handle and reads a device specified number of bytes of data in return. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to write/read. buf: an array with the data to send and to receive the read data. count: 1-32, the number of bytes to write. . . Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. The smbus 2.0 documentation states that a minimum of 1 byte may be sent and a minimum of 1 byte may be received. The total number of bytes sent/received must be 32 or less. Block write-block read. SMBus 2.0 5.5.8 . . S Addr Wr [A] i2c_reg [A] count [A] buf0 [A] ... S Addr Rd [A] [Count] A [Data] ... A P . . D*/ /*F*/ int i2c_read_i2c_block_data( int pi, unsigned handle, unsigned i2c_reg, char *buf, unsigned count); /*D This reads count bytes from the specified register of the device associated with handle . The count may be 1-32. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to read. buf: an array to receive the read data. count: 1-32, the number of bytes to read. . . Returns the number of bytes read (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. . . S Addr Wr [A] i2c_reg [A] S Addr Rd [A] [buf0] A [buf1] A ... A [bufn] NA P . . D*/ /*F*/ int i2c_write_i2c_block_data( int pi, unsigned handle, unsigned i2c_reg, char *buf, unsigned count); /*D This writes 1 to 32 bytes to the specified register of the device associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*i2c_open*]. i2c_reg: 0-255, the register to write. buf: the data to write. count: 1-32, the number of bytes to write. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. . . S Addr Wr [A] i2c_reg [A] buf0 [A] buf1 [A] ... [A] bufn [A] P . . D*/ /*F*/ int i2c_read_device(int pi, unsigned handle, char *buf, unsigned count); /*D This reads count bytes from the raw device into buf. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*i2c_open*]. buf: an array to receive the read data bytes. count: >0, the number of bytes to read. . . Returns count (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_READ_FAILED. . . S Addr Rd [A] [buf0] A [buf1] A ... A [bufn] NA P . . D*/ /*F*/ int i2c_write_device(int pi, unsigned handle, char *buf, unsigned count); /*D This writes count bytes from buf to the raw device. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*i2c_open*]. buf: an array containing the data bytes to write. count: >0, the number of bytes to write. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_I2C_WRITE_FAILED. . . S Addr Wr [A] buf0 [A] buf1 [A] ... [A] bufn [A] P . . D*/ /*F*/ int i2c_zip( int pi, unsigned handle, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen); /*D This function executes a sequence of I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenated command codes and associated data. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*i2cOpen*] inBuf: pointer to the concatenated I2C commands, see below inLen: size of command buffer outBuf: pointer to buffer to hold returned data outLen: size of output buffer . . Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_HANDLE, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN. PI_BAD_I2C_WLEN, or PI_BAD_I2C_SEG. The following command codes are supported: Name @ Cmd & Data @ Meaning End @ 0 @ No more commands Escape @ 1 @ Next P is two bytes On @ 2 @ Switch combined flag on Off @ 3 @ Switch combined flag off Address @ 4 P @ Set I2C address to P Flags @ 5 lsb msb @ Set I2C flags to lsb + (msb << 8) Read @ 6 P @ Read P bytes of data Write @ 7 P ... @ Write P bytes of data The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). The address defaults to that associated with the handle. The flags default to 0. The address and flags maintain their previous value until updated. The returned I2C data is stored in consecutive locations of outBuf. ... Set address 0x53, write 0x32, read 6 bytes Set address 0x1E, write 0x03, read 6 bytes Set address 0x68, write 0x1B, read 8 bytes End 0x04 0x53 0x07 0x01 0x32 0x06 0x06 0x04 0x1E 0x07 0x01 0x03 0x06 0x06 0x04 0x68 0x07 0x01 0x1B 0x06 0x08 0x00 ... D*/ /*F*/ int bb_i2c_open(int pi, unsigned SDA, unsigned SCL, unsigned baud); /*D This function selects a pair of GPIO for bit banging I2C at a specified baud rate. Bit banging I2C allows for certain operations which are not possible with the standard I2C driver. o baud rates as low as 50 o repeated starts o clock stretching o I2C on any pair of spare GPIO . . pi: >=0 (as returned by [*pigpio_start*]). SDA: 0-31 SCL: 0-31 baud: 50-500000 . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_I2C_BAUD, or PI_GPIO_IN_USE. NOTE: The GPIO used for SDA and SCL must have pull-ups to 3V3 connected. As a guide the hardware pull-ups on pins 3 and 5 are 1k8 in value. D*/ /*F*/ int bb_i2c_close(int pi, unsigned SDA); /*D This function stops bit banging I2C on a pair of GPIO previously opened with [*bb_i2c_open*]. . . pi: >=0 (as returned by [*pigpio_start*]). SDA: 0-31, the SDA GPIO used in a prior call to [*bb_i2c_open*] . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_I2C_GPIO. D*/ /*F*/ int bb_i2c_zip( int pi, unsigned SDA, char *inBuf, unsigned inLen, char *outBuf, unsigned outLen); /*D This function executes a sequence of bit banged I2C operations. The operations to be performed are specified by the contents of inBuf which contains the concatenated command codes and associated data. . . pi: >=0 (as returned by [*pigpio_start*]). SDA: 0-31 (as used in a prior call to [*bb_i2c_open*]) inBuf: pointer to the concatenated I2C commands, see below inLen: size of command buffer outBuf: pointer to buffer to hold returned data outLen: size of output buffer . . Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_USER_GPIO, PI_NOT_I2C_GPIO, PI_BAD_POINTER, PI_BAD_I2C_CMD, PI_BAD_I2C_RLEN, PI_BAD_I2C_WLEN, PI_I2C_READ_FAILED, or PI_I2C_WRITE_FAILED. The following command codes are supported: Name @ Cmd & Data @ Meaning End @ 0 @ No more commands Escape @ 1 @ Next P is two bytes Start @ 2 @ Start condition Stop @ 3 @ Stop condition Address @ 4 P @ Set I2C address to P Flags @ 5 lsb msb @ Set I2C flags to lsb + (msb << 8) Read @ 6 P @ Read P bytes of data Write @ 7 P ... @ Write P bytes of data The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). The address and flags default to 0. The address and flags maintain their previous value until updated. No flags are currently defined. The returned I2C data is stored in consecutive locations of outBuf. ... Set address 0x53 start, write 0x32, (re)start, read 6 bytes, stop Set address 0x1E start, write 0x03, (re)start, read 6 bytes, stop Set address 0x68 start, write 0x1B, (re)start, read 8 bytes, stop End 0x04 0x53 0x02 0x07 0x01 0x32 0x02 0x06 0x06 0x03 0x04 0x1E 0x02 0x07 0x01 0x03 0x02 0x06 0x06 0x03 0x04 0x68 0x02 0x07 0x01 0x1B 0x02 0x06 0x08 0x03 0x00 ... D*/ /*F*/ int bb_spi_open( int pi, unsigned CS, unsigned MISO, unsigned MOSI, unsigned SCLK, unsigned baud, unsigned spi_flags); /*D This function selects a set of GPIO for bit banging SPI at a specified baud rate. . . pi: >=0 (as returned by [*pigpio_start*]). CS: 0-31 MISO: 0-31 MOSI: 0-31 SCLK: 0-31 baud: 50-250000 spi_flags: see below . . spi_flags consists of the least significant 22 bits. . . 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 R T 0 0 0 0 0 0 0 0 0 0 0 p m m . . mm defines the SPI mode, defaults to 0 . . Mode CPOL CPHA 0 0 0 1 0 1 2 1 0 3 1 1 . . p is 0 if CS is active low (default) and 1 for active high. T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. The other bits in flags should be set to zero. Returns 0 if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_SPI_BAUD, or PI_GPIO_IN_USE. If more than one device is connected to the SPI bus (defined by SCLK, MOSI, and MISO) each must have its own CS. ... bb_spi_open(pi,10, MISO, MOSI, SCLK, 10000, 0); // device 1 bb_spi_open(pi,11, MISO, MOSI, SCLK, 20000, 3); // device 2 ... D*/ /*F*/ int bb_spi_close(int pi, unsigned CS); /*D This function stops bit banging SPI on a set of GPIO opened with [*bbSPIOpen*]. . . pi: >=0 (as returned by [*pigpio_start*]). CS: 0-31, the CS GPIO used in a prior call to [*bb_spi_open*] . . Returns 0 if OK, otherwise PI_BAD_USER_GPIO, or PI_NOT_SPI_GPIO. D*/ /*F*/ int bb_spi_xfer( int pi, unsigned CS, char *txBuf, char *rxBuf, unsigned count); /*D This function executes a bit banged SPI transfer. . . pi: >=0 (as returned by [*pigpio_start*]). CS: 0-31 (as used in a prior call to [*bb_spi_open*]) txBuf: pointer to buffer to hold data to be sent rxBuf: pointer to buffer to hold returned data count: size of data transfer . . Returns >= 0 if OK (the number of bytes read), otherwise PI_BAD_USER_GPIO, PI_NOT_SPI_GPIO or PI_BAD_POINTER. ... // gcc -Wall -pthread -o bb_spi_x_test bb_spi_x_test.c -lpigpiod_if2 // ./bb_spi_x_test #include #include "pigpiod_if2.h" #define CE0 5 #define CE1 6 #define MISO 13 #define MOSI 19 #define SCLK 12 int main(int argc, char *argv[]) { int i, pi, count, set_val, read_val; unsigned char inBuf[3]; char cmd1[] = {0, 0}; char cmd2[] = {12, 0}; char cmd3[] = {1, 128, 0}; if ((pi = pigpio_start(0, 0)) < 0) { fprintf(stderr, "pigpio initialisation failed (%d).\n", pi); return 1; } bb_spi_open(pi, CE0, MISO, MOSI, SCLK, 10000, 0); // MCP4251 DAC bb_spi_open(pi, CE1, MISO, MOSI, SCLK, 20000, 3); // MCP3008 ADC for (i=0; i<256; i++) { cmd1[1] = i; count = bb_spi_xfer(pi, CE0, cmd1, (char *)inBuf, 2); // > DAC if (count == 2) { count = bb_spi_xfer(pi, CE0, cmd2, (char *)inBuf, 2); // < DAC if (count == 2) { set_val = inBuf[1]; count = bb_spi_xfer(pi, CE1, cmd3, (char *)inBuf, 3); // < ADC if (count == 3) { read_val = ((inBuf[1]&3)<<8) | inBuf[2]; printf("%d %d\n", set_val, read_val); } } } } bb_spi_close(pi, CE0); bb_spi_close(pi, CE1); pigpio_stop(pi); } ... D*/ /*F*/ int spi_open(int pi, unsigned spi_channel, unsigned baud, unsigned spi_flags); /*D This function returns a handle for the SPI device on the channel. Data will be transferred at baud bits per second. The flags may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select. The Pi has two SPI peripherals: main and auxiliary. The main SPI has two chip selects (channels), the auxiliary has three. The auxiliary SPI is available on all models but the A and B. The GPIO used are given in the following table. @ MISO @ MOSI @ SCLK @ CE0 @ CE1 @ CE2 Main SPI @ 9 @ 10 @ 11 @ 8 @ 7 @ - Aux SPI @ 19 @ 20 @ 21 @ 18 @ 17 @ 16 . . pi: >=0 (as returned by [*pigpio_start*]). spi_channel: 0-1 (0-2 for the auxiliary SPI). baud: 32K-125M (values above 30M are unlikely to work). spi_flags: see below. . . Returns a handle (>=0) if OK, otherwise PI_BAD_SPI_CHANNEL, PI_BAD_SPI_SPEED, PI_BAD_FLAGS, PI_NO_AUX_SPI, or PI_SPI_OPEN_FAILED. spi_flags consists of the least significant 22 bits. . . 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 b b b b b b R T n n n n W A u2 u1 u0 p2 p1 p0 m m . . mm defines the SPI mode. Warning: modes 1 and 3 do not appear to work on the auxiliary SPI. . . Mode POL PHA 0 0 0 1 0 1 2 1 0 3 1 1 . . px is 0 if CEx is active low (default) and 1 for active high. ux is 0 if the CEx GPIO is reserved for SPI (default) and 1 otherwise. A is 0 for the main SPI, 1 for the auxiliary SPI. W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Main SPI only. nnnn defines the number of bytes (0-15) to write before switching the MOSI line to MISO to read data. This field is ignored if W is not set. Main SPI only. T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. Auxiliary SPI only. R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. Auxiliary SPI only. bbbbbb defines the word size in bits (0-32). The default (0) sets 8 bits per word. Auxiliary SPI only. The [*spi_read*], [*spi_write*], and [*spi_xfer*] functions transfer data packed into 1, 2, or 4 bytes according to the word size in bits. For bits 1-8 there will be one byte per character. For bits 9-16 there will be two bytes per character. For bits 17-32 there will be four bytes per character. Multi-byte transfers are made in least significant byte first order. E.g. to transfer 32 11-bit words buf should contain 64 bytes and count should be 64. E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A. The other bits in flags should be set to zero. D*/ /*F*/ int spi_close(int pi, unsigned handle); /*D This functions closes the SPI device identified by the handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*spi_open*]. . . Returns 0 if OK, otherwise PI_BAD_HANDLE. D*/ /*F*/ int spi_read(int pi, unsigned handle, char *buf, unsigned count); /*D This function reads count bytes of data from the SPI device associated with the handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*spi_open*]. buf: an array to receive the read data bytes. count: the number of bytes to read. . . Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. D*/ /*F*/ int spi_write(int pi, unsigned handle, char *buf, unsigned count); /*D This function writes count bytes of data from buf to the SPI device associated with the handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*spi_open*]. buf: the data bytes to write. count: the number of bytes to write. . . Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. D*/ /*F*/ int spi_xfer( int pi, unsigned handle, char *txBuf, char *rxBuf, unsigned count); /*D This function transfers count bytes of data from txBuf to the SPI device associated with the handle. Simultaneously count bytes of data are read from the device and placed in rxBuf. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*spi_open*]. txBuf: the data bytes to write. rxBuf: the received data bytes. count: the number of bytes to transfer. . . Returns the number of bytes transferred if OK, otherwise PI_BAD_HANDLE, PI_BAD_SPI_COUNT, or PI_SPI_XFER_FAILED. D*/ /*F*/ int serial_open(int pi, char *ser_tty, unsigned baud, unsigned ser_flags); /*D This function opens a serial device at a specified baud rate with specified flags. The device name must start with /dev/tty or /dev/serial. . . pi: >=0 (as returned by [*pigpio_start*]). ser_tty: the serial device to open. baud: the baud rate in bits per second, see below. ser_flags: 0. . . Returns a handle (>=0) if OK, otherwise PI_NO_HANDLE, or PI_SER_OPEN_FAILED. The baud rate must be one of 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, or 230400. No flags are currently defined. This parameter should be set to zero. D*/ /*F*/ int serial_close(int pi, unsigned handle); /*D This function closes the serial device associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*serial_open*]. . . Returns 0 if OK, otherwise PI_BAD_HANDLE. D*/ /*F*/ int serial_write_byte(int pi, unsigned handle, unsigned bVal); /*D This function writes bVal to the serial port associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*serial_open*]. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED. D*/ /*F*/ int serial_read_byte(int pi, unsigned handle); /*D This function reads a byte from the serial port associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*serial_open*]. . . Returns the read byte (>=0) if OK, otherwise PI_BAD_HANDLE, PI_SER_READ_NO_DATA, or PI_SER_READ_FAILED. If no data is ready PI_SER_READ_NO_DATA is returned. D*/ /*F*/ int serial_write(int pi, unsigned handle, char *buf, unsigned count); /*D This function writes count bytes from buf to the the serial port associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*serial_open*]. buf: the array of bytes to write. count: the number of bytes to write. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, or PI_SER_WRITE_FAILED. D*/ /*F*/ int serial_read(int pi, unsigned handle, char *buf, unsigned count); /*D This function reads up to count bytes from the the serial port associated with handle and writes them to buf. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*serial_open*]. buf: an array to receive the read data. count: the maximum number of bytes to read. . . Returns the number of bytes read (>=0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_SER_READ_NO_DATA, or PI_SER_WRITE_FAILED. If no data is ready zero is returned. D*/ /*F*/ int serial_data_available(int pi, unsigned handle); /*D Returns the number of bytes available to be read from the device associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0, as returned by a call to [*serial_open*]. . . Returns the number of bytes of data available (>=0) if OK, otherwise PI_BAD_HANDLE. D*/ /*F*/ int custom_1(int pi, unsigned arg1, unsigned arg2, char *argx, unsigned argc); /*D This function is available for user customisation. It returns a single integer value. . . pi: >=0 (as returned by [*pigpio_start*]). arg1: >=0 arg2: >=0 argx: extra (byte) arguments argc: number of extra arguments . . Returns >= 0 if OK, less than 0 indicates a user defined error. D*/ /*F*/ int custom_2(int pi, unsigned arg1, char *argx, unsigned argc, char *retBuf, unsigned retMax); /*D This function is available for user customisation. It differs from custom_1 in that it returns an array of bytes rather than just an integer. The return value is an integer indicating the number of returned bytes. . . pi: >=0 (as returned by [*pigpio_start*]). arg1: >=0 argc: extra (byte) arguments count: number of extra arguments retBuf: buffer for returned data retMax: maximum number of bytes to return . . Returns >= 0 if OK, less than 0 indicates a user defined error. Note, the number of returned bytes will be retMax or less. D*/ /*F*/ int get_pad_strength(int pi, unsigned pad); /*D This function returns the pad drive strength in mA. . . pi: >=0 (as returned by [*pigpio_start*]). pad: 0-2, the pad to get. . . Returns the pad drive strength if OK, otherwise PI_BAD_PAD. Pad @ GPIO 0 @ 0-27 1 @ 28-45 2 @ 46-53 ... strength = get_pad_strength(pi, 0); // get pad 0 strength ... D*/ /*F*/ int set_pad_strength(int pi, unsigned pad, unsigned padStrength); /*D This function sets the pad drive strength in mA. . . pi: >=0 (as returned by [*pigpio_start*]). pad: 0-2, the pad to set. padStrength: 1-16 mA. . . Returns 0 if OK, otherwise PI_BAD_PAD, or PI_BAD_STRENGTH. Pad @ GPIO 0 @ 0-27 1 @ 28-45 2 @ 46-53 ... set_pad_strength(pi, 0, 10); // set pad 0 strength to 10 mA ... D*/ /*F*/ int shell_(int pi, char *scriptName, char *scriptString); /*D This function uses the system call to execute a shell script with the given string as its parameter. . . pi: >=0 (as returned by [*pigpio_start*]). scriptName: the name of the script, only alphanumeric characters, '-' and '_' are allowed in the name. scriptString: the string to pass to the script. . . The exit status of the system call is returned if OK, otherwise PI_BAD_SHELL_STATUS. scriptName must exist in /opt/pigpio/cgi and must be executable. The returned exit status is normally 256 times that set by the shell script exit function. If the script can't be found 32512 will be returned. The following table gives some example returned statuses. Script exit status @ Returned system call status 1 @ 256 5 @ 1280 10 @ 2560 200 @ 51200 script not found @ 32512 ... // pass two parameters, hello and world status = shell_(pi, "scr1", "hello world"); // pass three parameters, hello, string with spaces, and world status = shell_(pi, "scr1", "hello 'string with spaces' world"); // pass one parameter, hello string with spaces world status = shell_(pi, "scr1", "\"hello string with spaces world\""); ... D*/ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcomment" /*F*/ int file_open(int pi, char *file, unsigned mode); /*D This function returns a handle to a file opened in a specified mode. . . pi: >=0 (as returned by [*pigpio_start*]). file: the file to open. mode: the file open mode. . . Returns a handle (>=0) if OK, otherwise PI_NO_HANDLE, PI_NO_FILE_ACCESS, PI_BAD_FILE_MODE, PI_FILE_OPEN_FAILED, or PI_FILE_IS_A_DIR. File A file may only be opened if permission is granted by an entry in /opt/pigpio/access. This is intended to allow remote access to files in a more or less controlled manner. Each entry in /opt/pigpio/access takes the form of a file path which may contain wildcards followed by a single letter permission. The permission may be R for read, W for write, U for read/write, and N for no access. Where more than one entry matches a file the most specific rule applies. If no entry matches a file then access is denied. Suppose /opt/pigpio/access contains the following entries . . /home/* n /home/pi/shared/dir_1/* w /home/pi/shared/dir_2/* r /home/pi/shared/dir_3/* u /home/pi/shared/dir_1/file.txt n . . Files may be written in directory dir_1 with the exception of file.txt. Files may be read in directory dir_2. Files may be read and written in directory dir_3. If a directory allows read, write, or read/write access then files may be created in that directory. In an attempt to prevent risky permissions the following paths are ignored in /opt/pigpio/access. . . a path containing .. a path containing only wildcards (*?) a path containing less than two non-wildcard parts . . Mode The mode may have the following values. Macro @ Value @ Meaning PI_FILE_READ @ 1 @ open file for reading PI_FILE_WRITE @ 2 @ open file for writing PI_FILE_RW @ 3 @ open file for reading and writing The following values may be or'd into the mode. Macro @ Value @ Meaning PI_FILE_APPEND @ 4 @ Writes append data to the end of the file PI_FILE_CREATE @ 8 @ The file is created if it doesn't exist PI_FILE_TRUNC @ 16 @ The file is truncated Newly created files are owned by root with permissions owner read and write. ... #include #include int main(int argc, char *argv[]) { int pi, handle, c; char buf[60000]; pi = pigpio_start(NULL, NULL); if (pi < 0) return 1; // assumes /opt/pigpio/access contains the following line // /ram/*.c r handle = file_open(pi, "/ram/pigpio.c", PI_FILE_READ); if (handle >= 0) { while ((c=file_read(pi, handle, buf, sizeof(buf)-1))) { buf[c] = 0; printf("%s", buf); } file_close(pi, handle); } pigpio_stop(pi); } ... D*/ #pragma GCC diagnostic pop /*F*/ int file_close(int pi, unsigned handle); /*D This function closes the file associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0 (as returned by [*file_open*]). . . Returns 0 if OK, otherwise PI_BAD_HANDLE. ... file_close(pi, handle); ... D*/ /*F*/ int file_write(int pi, unsigned handle, char *buf, unsigned count); /*D This function writes count bytes from buf to the the file associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0 (as returned by [*file_open*]). buf: the array of bytes to write. count: the number of bytes to write. . . Returns 0 if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_FILE_NOT_WOPEN, or PI_BAD_FILE_WRITE. ... if (file_write(pi, handle, buf, 100) == 0) { // file written okay } else { // error } ... D*/ /*F*/ int file_read(int pi, unsigned handle, char *buf, unsigned count); /*D This function reads up to count bytes from the the file associated with handle and writes them to buf. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0 (as returned by [*file_open*]). buf: an array to receive the read data. count: the maximum number of bytes to read. . . Returns the number of bytes read (>0) if OK, otherwise PI_BAD_HANDLE, PI_BAD_PARAM, PI_FILE_NOT_ROPEN, or PI_BAD_FILE_WRITE. ... bytes = file_read(pi, handle, buf, sizeof(buf)); if (bytes >= 0) { // process read data } ... D*/ /*F*/ int file_seek(int pi, unsigned handle, int32_t seekOffset, int seekFrom); /*D This function seeks to a position within the file associated with handle. . . pi: >=0 (as returned by [*pigpio_start*]). handle: >=0 (as returned by [*file_open*]). seekOffset: the number of bytes to move. Positive offsets move forward, negative offsets backwards. seekFrom: one of PI_FROM_START (0), PI_FROM_CURRENT (1), or PI_FROM_END (2). . . Returns the new byte position within the file (>=0) if OK, otherwise PI_BAD_HANDLE, or PI_BAD_FILE_SEEK. ... file_seek(pi, handle, 123, PI_FROM_START); // Start plus 123 size = file_seek(pi, handle, 0, PI_FROM_END); // End, return size pos = file_seek(pi, handle, 0, PI_FROM_CURRENT); // Current position ... D*/ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcomment" /*F*/ int file_list(int pi, char *fpat, char *buf, unsigned count); /*D This function returns a list of files which match a pattern. . . pi: >=0 (as returned by [*pigpio_start*]). fpat: file pattern to match. buf: an array to receive the matching file names. count: the maximum number of bytes to read. . . Returns the number of returned bytes if OK, otherwise PI_NO_FILE_ACCESS, or PI_NO_FILE_MATCH. The pattern must match an entry in /opt/pigpio/access. The pattern may contain wildcards. See [*file_open*]. NOTE The returned value is not the number of files, it is the number of bytes in the buffer. The file names are separated by newline characters. ... #include #include int main(int argc, char *argv[]) { int pi, handle, c; char buf[60000]; pi = pigpio_start(NULL, NULL); if (pi < 0) return 1; // assumes /opt/pigpio/access contains the following line // /ram/*.c r c = file_list(pi, "/ram/p*.c", buf, sizeof(buf)); if (c >= 0) { buf[c] = 0; printf("%s", buf); } pigpio_stop(pi); } ... D*/ #pragma GCC diagnostic pop /*F*/ int callback(int pi, unsigned user_gpio, unsigned edge, CBFunc_t f); /*D This function initialises a new callback. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31. edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE. f: the callback function. . . The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback. The callback is called with the GPIO, edge, and tick, whenever the GPIO has the identified edge. . . Parameter Value Meaning GPIO 0-31 The GPIO which has changed state edge 0-2 0 = change to low (a falling edge) 1 = change to high (a rising edge) 2 = no level change (a watchdog timeout) tick 32 bit The number of microseconds since boot WARNING: this wraps around from 4294967295 to 0 roughly every 72 minutes . . The GPIO are sampled at a rate set when the pigpio daemon is started (default 5 us). The number of samples per second is given in the following table. . . samples per sec 1 1,000,000 2 500,000 sample 4 250,000 rate 5 200,000 (us) 8 125,000 10 100,000 . . GPIO level changes shorter than the sample rate may be missed. The daemon software which generates the callbacks is triggered 1000 times per second. The callbacks will be called once per level change since the last time they were called. i.e. The callbacks will get all level changes but there will be a latency. If you want to track the level of more than one GPIO do so by maintaining the state in the callback. Do not use [*gpio_read*]. Remember the event that triggered the callback may have happened several milliseconds before and the GPIO may have changed level many times since then. D*/ /*F*/ int callback_ex (int pi, unsigned user_gpio, unsigned edge, CBFuncEx_t f, void *userdata); /*D This function initialises a new callback. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31. edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE. f: the callback function. userdata: a pointer to arbitrary user data. . . The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback. The callback is called with the GPIO, edge, tick, and the userdata pointer, whenever the GPIO has the identified edge. . . Parameter Value Meaning GPIO 0-31 The GPIO which has changed state edge 0-2 0 = change to low (a falling edge) 1 = change to high (a rising edge) 2 = no level change (a watchdog timeout) tick 32 bit The number of microseconds since boot WARNING: this wraps around from 4294967295 to 0 roughly every 72 minutes userdata pointer Pointer to an arbitrary object . . D*/ /*F*/ int callback_cancel(unsigned callback_id); /*D This function cancels a callback identified by its id. . . callback_id: >=0, as returned by a call to [*callback*] or [*callback_ex*]. . . The function returns 0 if OK, otherwise pigif_callback_not_found. D*/ /*F*/ int wait_for_edge(int pi, unsigned user_gpio, unsigned edge, double timeout); /*D This function waits for an edge on the GPIO for up to timeout seconds. . . pi: >=0 (as returned by [*pigpio_start*]). user_gpio: 0-31. edge: RISING_EDGE, FALLING_EDGE, or EITHER_EDGE. timeout: >=0. . . The function returns when the edge occurs or after the timeout. Do not use this function for precise timing purposes, the edge is only checked 20 times a second. Whenever you need to know the accurate time of GPIO events use a [*callback*] function. The function returns 1 if the edge occurred, otherwise 0. D*/ /*F*/ int bsc_xfer(int pi, bsc_xfer_t *bscxfer); /*D This function provides a low-level interface to the SPI/I2C Slave peripheral on the BCM chip. This peripheral allows the Pi to act as a hardware slave device on an I2C or SPI bus. This is not a bit bang version and as such is OS timing independent. The bus timing is handled directly by the chip. The output process is simple. You simply append data to the FIFO buffer on the chip. This works like a queue, you add data to the queue and the master removes it. I can't get SPI to work properly. I tried with a control word of 0x303 and swapped MISO and MOSI. The function sets the BSC mode, writes any data in the transmit buffer to the BSC transmit FIFO, and copies any data in the BSC receive FIFO to the receive buffer. . . pi: >=0 (as returned by [*pigpio_start*]). bscxfer: a structure defining the transfer. typedef struct { uint32_t control; // Write int rxCnt; // Read only char rxBuf[BSC_FIFO_SIZE]; // Read only int txCnt; // Write char txBuf[BSC_FIFO_SIZE]; // Write } bsc_xfer_t; . . To start a transfer set control (see below), copy the bytes to be added to the transmit FIFO (if any) to txBuf and set txCnt to the number of copied bytes. Upon return rxCnt will be set to the number of received bytes placed in rxBuf. The returned function value is the status of the transfer (see below). If there was an error the status will be less than zero (and will contain the error code). The most significant word of the returned status contains the number of bytes actually copied from txBuf to the BSC transmit FIFO (may be less than requested if the FIFO already contained untransmitted data). Note that the control word sets the BSC mode. The BSC will stay in that mode until a different control word is sent. GPIO used for models other than those based on the BCM2711. @ SDA @ SCL @ MOSI @ SCLK @ MISO @ CE I2C @ 18 @ 19 @ - @ - @ - @ - SPI @ - @ - @ 18 @ 19 @ 20 @ 21 GPIO used for models based on the BCM2711 (e.g. the Pi4B). @ SDA @ SCL @ MOSI @ SCLK @ MISO @ CE I2C @ 10 @ 11 @ - @ - @ - @ - SPI @ - @ - @ 10 @ 11 @ 9 @ 8 When a zero control word is received the used GPIO will be reset to INPUT mode. control consists of the following bits. . . 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 a a a a a a a - - IT HC TF IR RE TE BK EC ES PL PH I2 SP EN . . Bits 0-13 are copied unchanged to the BSC CR register. See pages 163-165 of the Broadcom peripherals document for full details. aaaaaaa @ defines the I2C slave address (only relevant in I2C mode) IT @ invert transmit status flags HC @ enable host control TF @ enable test FIFO IR @ invert receive status flags RE @ enable receive TE @ enable transmit BK @ abort operation and clear FIFOs EC @ send control register as first I2C byte ES @ send status register as first I2C byte PL @ set SPI polarity high PH @ set SPI phase high I2 @ enable I2C mode SP @ enable SPI mode EN @ enable BSC peripheral The returned status has the following format . . 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 S S S S S R R R R R T T T T T RB TE RF TF RE TB . . Bits 0-15 are copied unchanged from the BSC FR register. See pages 165-166 of the Broadcom peripherals document for full details. SSSSS @ number of bytes successfully copied to transmit FIFO RRRRR @ number of bytes in receieve FIFO TTTTT @ number of bytes in transmit FIFO RB @ receive busy TE @ transmit FIFO empty RF @ receive FIFO full TF @ transmit FIFO full RE @ receive FIFO empty TB @ transmit busy The following example shows how to configure the BSC peripheral as an I2C slave with address 0x13 and send four bytes. ... bsc_xfer_t xfer; xfer.control = (0x13<<16) | 0x305; memcpy(xfer.txBuf, "ABCD", 4); xfer.txCnt = 4; status = bsc_xfer(pi, &xfer); if (status >= 0) { // process transfer } ... D*/ /*F*/ int bsc_i2c(int pi, int i2c_addr, bsc_xfer_t *bscxfer); /*D This function allows the Pi to act as a slave I2C device. This function is not available on the BCM2711 (e.g.as used in the Pi4B). The data bytes (if any) are written to the BSC transmit FIFO and the bytes in the BSC receive FIFO are returned. . . pi: >=0 (as returned by [*pigpio_start*]). i2c_addr: 0-0x7F. bscxfer: a structure defining the transfer. typedef struct { uint32_t control; // N/A int rxCnt; // Read only char rxBuf[BSC_FIFO_SIZE]; // Read only int txCnt; // Write char txBuf[BSC_FIFO_SIZE]; // Write } bsc_xfer_t; . . txCnt is set to the number of bytes to be transmitted, possibly zero. The data itself should be copied to txBuf. Any received data will be written to rxBuf with rxCnt set. See [*bsc_xfer*] for details of the returned status value. If there was an error the status will be less than zero (and will contain the error code). Note that an i2c_address of 0 may be used to close the BSC device and reassign the used GPIO as inputs. D*/ /*F*/ int event_callback(int pi, unsigned event, evtCBFunc_t f); /*D This function initialises an event callback. . . pi: >=0 (as returned by [*pigpio_start*]). event: 0-31. f: the callback function. . . The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback. The callback is called with the event id, and tick, whenever the event occurs. D*/ /*F*/ int event_callback_ex(int pi, unsigned event, evtCBFuncEx_t f, void *userdata); /*D This function initialises an event callback. . . pi: >=0 (as returned by [*pigpio_start*]). event: 0-31. f: the callback function. userdata: a pointer to arbitrary user data. . . The function returns a callback id if OK, otherwise pigif_bad_malloc, pigif_duplicate_callback, or pigif_bad_callback. The callback is called with the event id, the tick, and the userdata pointer whenever the event occurs. D*/ /*F*/ int event_callback_cancel(unsigned callback_id); /*D This function cancels an event callback identified by its id. . . callback_id: >=0, as returned by a call to [*event_callback*] or [*event_callback_ex*]. . . The function returns 0 if OK, otherwise pigif_callback_not_found. D*/ /*F*/ int wait_for_event(int pi, unsigned event, double timeout); /*D This function waits for an event for up to timeout seconds. . . pi: >=0 (as returned by [*pigpio_start*]). event: 0-31. timeout: >=0. . . The function returns when the event occurs or after the timeout. The function returns 1 if the event occurred, otherwise 0. D*/ /*F*/ int event_trigger(int pi, unsigned event); /*D This function signals the occurrence of an event. . . pi: >=0 (as returned by [*pigpio_start*]). event: 0-31. . . Returns 0 if OK, otherwise PI_BAD_EVENT_ID. An event is a signal used to inform one or more consumers to start an action. Each consumer which has registered an interest in the event (e.g. by calling [*event_callback*]) will be informed by a callback. One event, PI_EVENT_BSC (31) is predefined. This event is auto generated on BSC slave activity. The meaning of other events is arbitrary. Note that other than its id and its tick there is no data associated with an event. D*/ /*PARAMS active :: 0-1000000 The number of microseconds level changes are reported for once a noise filter has been triggered (by [*steady*] microseconds of a stable level). *addrStr:: A string specifying the host or IP address of the Pi running the pigpio daemon. It may be NULL in which case localhost is used unless overridden by the PIGPIO_ADDR environment variable. arg1:: An unsigned argument passed to a user customised function. Its meaning is defined by the customiser. arg2:: An unsigned argument passed to a user customised function. Its meaning is defined by the customiser. argc:: The count of bytes passed to a user customised function. *argx:: A pointer to an array of bytes passed to a user customised function. Its meaning and content is defined by the customiser. baud:: The speed of serial communication (I2C, SPI, serial link, waves) in bits per second. bit:: A value of 0 or 1. bits:: A value used to select GPIO. If bit n of bits is set then GPIO n is selected. A convenient way to set bit n is to or in (1<=0, as returned by a call to a callback function, one of [*callback*] [*callback_ex*] [*event_callback*] [*event_callback_ex*] The id is passed to [*callback_cancel*] or [*event_callback_cancel*] to cancel the callback. CBFunc_t:: . . typedef void (*CBFunc_t) (int pi, unsigned user_gpio, unsigned level, uint32_t tick); . . CBFuncEx_t:: . . typedef void (*CBFuncEx_t) (int pi, unsigned user_gpio, unsigned level, uint32_t tick, void * userdata); . . char:: A single character, an 8 bit quantity able to store 0-255. clkfreq::4689-250M (13184-375M for the BCM2711) The hardware clock frequency. count:: The number of bytes to be transferred in a file, I2C, SPI, or serial command. CS:: The GPIO used for the slave select signal when bit banging SPI. data_bits::1-32 The number of data bits in each character of serial data. . . #define PI_MIN_WAVE_DATABITS 1 #define PI_MAX_WAVE_DATABITS 32 . . double:: A floating point number. dutycycle::0-range A number representing the ratio of on time to off time for PWM. The number may vary between 0 and range (default 255) where 0 is off and range is fully on. edge:: Used to identify a GPIO level transition of interest. A rising edge is a level change from 0 to 1. A falling edge is a level change from 1 to 0. . . RISING_EDGE 0 FALLING_EDGE 1 EITHER_EDGE. 2 . . errnum:: A negative number indicating a function call failed and the nature of the error. event::0-31 An event is a signal used to inform one or more consumers to start an action. evtCBFunc_t:: . . typedef void (*evtCBFunc_t) (int pi, unsigned event, uint32_t tick); . . evtCBFuncEx_t:: . . typedef void (*evtCBFuncEx_t) (int pi, unsigned event, uint32_t tick, void *userdata); . . f:: A function. *file:: A full file path. To be accessible the path must match an entry in /opt/pigpio/access. *fpat:: A file path which may contain wildcards. To be accessible the path must match an entry in /opt/pigpio/access. frequency::>=0 The number of times a GPIO is swiched on and off per second. This can be set per GPIO and may be as little as 5Hz or as much as 40KHz. The GPIO will be on for a proportion of the time as defined by its dutycycle. gpio:: A Broadcom numbered GPIO, in the range 0-53. There are 54 General Purpose Input Outputs (GPIO) named GPIO0 through GPIO53. They are split into two banks. Bank 1 consists of GPIO0 through GPIO31. Bank 2 consists of GPIO32 through GPIO53. All the GPIO which are safe for the user to read and write are in bank 1. Not all GPIO in bank 1 are safe though. Type 1 boards have 17 safe GPIO. Type 2 boards have 21. Type 3 boards have 26. See [*get_hardware_revision*]. The user GPIO are marked with an X in the following table. . . 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Type 1 X X - - X - - X X X X X - - X X Type 2 - - X X X - - X X X X X - - X X Type 3 X X X X X X X X X X X X X X 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Type 1 - X X - - X X X X X - - - - - - Type 2 - X X - - - X X X X - X X X X X Type 3 X X X X X X X X X X X X - - - - . . gpioPulse_t:: . . typedef struct { uint32_t gpioOn; uint32_t gpioOff; uint32_t usDelay; } gpioPulse_t; . . gpioThreadFunc_t:: . . typedef void *(gpioThreadFunc_t) (void *); . . handle::>=0 A number referencing an object opened by one of [*file_open*] [*i2c_open*] [*notify_open*] [*serial_open*] [*spi_open*] i2c_addr::0-0x7F The address of a device on the I2C bus. i2c_bus::>=0 An I2C bus number. i2c_flags::0 Flags which modify an I2C open command. None are currently defined. i2c_reg:: 0-255 A register of an I2C device. *inBuf:: A buffer used to pass data to a function. inLen:: The number of bytes of data in a buffer. int:: A whole number, negative or positive. int32_t:: A 32-bit signed value. invert:: A flag used to set normal or inverted bit bang serial data level logic. level:: The level of a GPIO. Low or High. . . PI_OFF 0 PI_ON 1 PI_CLEAR 0 PI_SET 1 PI_LOW 0 PI_HIGH 1 . . There is one exception. If a watchdog expires on a GPIO the level will be reported as PI_TIMEOUT. See [*set_watchdog*]. . . PI_TIMEOUT 2 . . MISO:: The GPIO used for the MISO signal when bit banging SPI. mode:: 1. The operational mode of a GPIO, normally INPUT or OUTPUT. . . PI_INPUT 0 PI_OUTPUT 1 PI_ALT0 4 PI_ALT1 5 PI_ALT2 6 PI_ALT3 7 PI_ALT4 3 PI_ALT5 2 . . 2. The mode of waveform transmission. . . PI_WAVE_MODE_ONE_SHOT 0 PI_WAVE_MODE_REPEAT 1 PI_WAVE_MODE_ONE_SHOT_SYNC 2 PI_WAVE_MODE_REPEAT_SYNC 3 . . 3. A file open mode. . . PI_FILE_READ 1 PI_FILE_WRITE 2 PI_FILE_RW 3 . . The following values can be or'd into the mode. . . PI_FILE_APPEND 4 PI_FILE_CREATE 8 PI_FILE_TRUNC 16 . . MOSI:: The GPIO used for the MOSI signal when bit banging SPI. numBytes:: The number of bytes used to store characters in a string. Depending on the number of bits per character there may be 1, 2, or 4 bytes per character. numPar:: 0-10 The number of parameters passed to a script. numPulses:: The number of pulses to be added to a waveform. offset:: The associated data starts this number of microseconds from the start of the waveform. *outBuf:: A buffer used to return data from a function. outLen:: The size in bytes of an output buffer. pad:: 0-2 A set of GPIO which share common drivers. Pad @ GPIO 0 @ 0-27 1 @ 28-45 2 @ 46-53 padStrength:: 1-16 The mA which may be drawn from each GPIO whilst still guaranteeing the high and low levels. *param:: An array of script parameters. percent:: 0-100 The size of waveform as percentage of maximum available. pi:: An integer defining a connected Pi. The value is returned by [*pigpio_start*] upon success. *portStr:: A string specifying the port address used by the Pi running the pigpio daemon. It may be NULL in which case "8888" is used unless overridden by the PIGPIO_PORT environment variable. *pth:: A thread identifier, returned by [*start_thread*]. pthread_t:: A thread identifier. pud::0-2 The setting of the pull up/down resistor for a GPIO, which may be off, pull-up, or pull-down. . . PI_PUD_OFF 0 PI_PUD_DOWN 1 PI_PUD_UP 2 . . pulseLen:: 1-100, the length of a trigger pulse in microseconds. *pulses:: An array of pulses to be added to a waveform. pulsewidth::0, 500-2500 . . PI_SERVO_OFF 0 PI_MIN_SERVO_PULSEWIDTH 500 PI_MAX_SERVO_PULSEWIDTH 2500 . . PWMduty::0-1000000 (1M) The hardware PWM dutycycle. . . #define PI_HW_PWM_RANGE 1000000 . . PWMfreq::1-125M (1-187.5M for the BCM2711) The hardware PWM frequency. . . #define PI_HW_PWM_MIN_FREQ 1 #define PI_HW_PWM_MAX_FREQ 125000000 #define PI_HW_PWM_MAX_FREQ_2711 187500000 . . range::25-40000 The permissible dutycycle values are 0-range. . . PI_MIN_DUTYCYCLE_RANGE 25 PI_MAX_DUTYCYCLE_RANGE 40000 . . *retBuf:: A buffer to hold a number of bytes returned to a used customised function, retMax:: The maximum number of bytes a user customised function should return. *rxBuf:: A pointer to a buffer to receive data. SCL:: The user GPIO to use for the clock when bit banging I2C. SCLK:: The GPIO used for the SCLK signal when bit banging SPI. *script:: A pointer to the text of a script. script_id:: An id of a stored script as returned by [*store_script*]. *scriptName:: The name of a [*shell_*] script to be executed. The script must be present in /opt/pigpio/cgi and must have execute permission. *scriptString:: The string to be passed to a [*shell_*] script to be executed. SDA:: The user GPIO to use for data when bit banging I2C. seconds:: The number of seconds. seekFrom:: . . PI_FROM_START 0 PI_FROM_CURRENT 1 PI_FROM_END 2 . . seekOffset:: The number of bytes to move forward (positive) or backwards (negative) from the seek position (start, current, or end of file). ser_flags:: Flags which modify a serial open command. None are currently defined. *ser_tty:: The name of a serial tty device, e.g. /dev/ttyAMA0, /dev/ttyUSB0, /dev/tty1. size_t:: A standard type used to indicate the size of an object in bytes. spi_channel:: A SPI channel, 0-2. spi_flags:: See [*spi_open*] and [*bb_spi_open*]. steady:: 0-300000 The number of microseconds level changes must be stable for before reporting the level changed ([*set_glitch_filter*]) or triggering the active part of a noise filter ([*set_noise_filter*]). stop_bits::2-8 The number of (half) stop bits to be used when adding serial data to a waveform. . . #define PI_MIN_WAVE_HALFSTOPBITS 2 #define PI_MAX_WAVE_HALFSTOPBITS 8 . . *str:: An array of characters. thread_func:: A function of type gpioThreadFunc_t used as the main function of a thread. timeout:: A GPIO watchdog timeout in milliseconds. . . PI_MIN_WDOG_TIMEOUT 0 PI_MAX_WDOG_TIMEOUT 60000 . . *txBuf:: An array of bytes to transmit. uint32_t::0-0-4,294,967,295 (Hex 0x0-0xFFFFFFFF) A 32-bit unsigned value. unsigned:: A whole number >= 0. user_gpio:: 0-31, a Broadcom numbered GPIO. See [*gpio*]. *userdata:: A pointer to arbitrary user data. This may be used to identify the instance. You must ensure that the pointer is in scope at the time it is processed. If it is a pointer to a global this is automatic. Do not pass the address of a local variable. If you want to pass a transient object then use the following technique. In the calling function: . . user_type *userdata; user_type my_userdata; userdata = malloc(sizeof(user_type)); *userdata = my_userdata; . . In the receiving function: . . user_type my_userdata = *(user_type*)userdata; free(userdata); . . void:: Denoting no parameter is required wave_add_*:: One of [*wave_add_new*] [*wave_add_generic*] [*wave_add_serial*] wave_id:: A number representing a waveform created by [*wave_create*]. wave_send_*:: One of [*wave_send_once*] [*wave_send_repeat*] wVal::0-65535 (Hex 0x0-0xFFFF, Octal 0-0177777) A 16-bit word value. PARAMS*/ /*DEF_S pigpiod_if2 Error Codes*/ typedef enum { pigif_bad_send = -2000, pigif_bad_recv = -2001, pigif_bad_getaddrinfo = -2002, pigif_bad_connect = -2003, pigif_bad_socket = -2004, pigif_bad_noib = -2005, pigif_duplicate_callback = -2006, pigif_bad_malloc = -2007, pigif_bad_callback = -2008, pigif_notify_failed = -2009, pigif_callback_not_found = -2010, pigif_unconnected_pi = -2011, pigif_too_many_pis = -2012, } pigifError_t; /*DEF_E*/ #ifdef __cplusplus } #endif #endif pigpio-78/pigs.1000066400000000000000000003070531373465704200136500ustar00rootroot00000000000000 ." Process this file with ." groff -man -Tascii foo.1 ." .TH pigs 1 2012-2020 Linux "pigpio archive" .SH NAME pigs - command line socket access to the pigpio daemon. /dev/pigpio - command line pipe access to the pigpio daemon. .SH SYNOPSIS .B sudo pigpiod then .B pigs {command}+ or .B "echo {command}+ >/dev/pigpio" .SH DESCRIPTION .ad l .nh .br The socket and pipe interfaces allow control of the Pi's GPIO by passing messages to the running pigpio library. .br The normal way to start the pigpio library would be as a daemon during boot. .br .EX sudo pigpiod .br .EE .br .SS Features .br o hardware timed PWM on any of GPIO 0-31 .br o hardware timed servo pulses on any of GPIO 0-31 .br o reading/writing all of the GPIO in a bank as one operation .br o individually setting GPIO modes, reading and writing .br o notifications when any of GPIO 0-31 change state .br o the construction of output waveforms with microsecond timing .br o I2C, SPI, and serial link wrappers .br o creating and running scripts on the pigpio daemon .br .SS GPIO .br ALL GPIO are identified by their Broadcom number. .br .SS Usage .br pigs is a program and internally uses the socket interface to pigpio whereas /dev/pigpio uses the pipe interface. .br pigs and the pipe interface share the same commands and are invoked in a similar fashion from the command line. .br The pigpio library must be running, either by running a program linked with the library or starting the pigpio daemon (sudo pigpiod). .br pigs {command}+ .br echo "{command}+" >/dev/pigpio .br pigs will show the result of the command on screen. .br The pigs process returns an exit status (which can be displayed with the command echo $?). .br .EX PIGS_OK 0 .br PIGS_CONNECT_ERR 255 .br PIGS_OPTION_ERR 254 .br PIGS_SCRIPT_ERR 253 .br .br .br .EE .br The results of /dev/pigpio commands need to be read from /dev/pigout, e.g. cat /dev/pigout (try cat /dev/pigout& so that all subsequent results are shown on screen). .br In both cases if an error was detected a message will have been written to /dev/pigerr (try cat /dev/pigerr&). This is likely to be more informative than the message returned by pigs or the error code returned by the pipe interface. .br Several commands may be entered on a line. If present PROC and PARSE must be the last command on a line. .br E.g. .br .EX pigs w 22 1 mils 1000 w 22 0 .br .EE .br is equivalent to .br .EX pigs w 22 1 .br pigs mils 1000 .br pigs w 22 0 .br .EE .br and .br .EX echo "m 4 w w 4 0 mils 250 m 4 r r 4" >/dev/pigpio .br .EE .br is equivalent to .br .EX echo "m 4 w" >/dev/pigpio .br echo "w 4 0" >/dev/pigpio .br echo "mils 250" >/dev/pigpio .br echo "m 4 r" >/dev/pigpio .br echo "r 4" >/dev/pigpio .br .EE .br .SS Notes .br The examples from now on will show the pigs interface but the same commands will also work on the pipe interface. .br pigs does not show the status of successful commands unless the command itself returns data. The status (0) will be returned to pigs but will be discarded. .br The status/data of each command sent to the pipe interface should be read from /dev/pigout. .br When a command takes a number as a parameter it may be entered as hex (precede by 0x), octal (precede by 0), or decimal. .br E.g. 23 is 23 decimal, 0x100 is 256 decimal, 070 is 56 decimal. .br Some commands can return a variable number of data bytes. By default this data is displayed as decimal. The pigs -a option can be used to force the display as ASCII and the pigs -x option can be used to force the display as hex. .br E.g. assuming the transmitted serial data is the letters ABCDEONM .br .EX $ pigs slr 4 100 .br 8 65 66 67 68 69 79 78 77 .br .br $ pigs -a slr 4 100 .br 8 ABCDEONM .br .br $ pigs -x slr 4 100 .br 8 41 42 43 44 45 4f 4e 4d .br .EE .br .SH OVERVIEW .SS BASIC .B M/MODES g m Set GPIO mode .P .B MG/MODEG g Get GPIO mode .P .B PUD g p Set GPIO pull up/down .P .B R/READ g Read GPIO level .P .B W/WRITE g L Write GPIO level .P .SS PWM (overrides servo commands on same GPIO) .B P/PWM u v Set GPIO PWM value .P .B PFS u v Set GPIO PWM frequency .P .B PRS u v Set GPIO PWM range .P .B GDC u Get GPIO PWM dutycycle .P .B PFG u Get GPIO PWM frequency .P .B PRG u Get GPIO PWM range .P .B PRRG u Get GPIO PWM real range .P .SS Servo (overrides PWM commands on same GPIO) .B S/SERVO u v Set GPIO servo pulsewidth .P .B GPW u Get GPIO servo pulsewidth .P .SS INTERMEDIATE .B TRIG u pl L Send a trigger pulse .P .B WDOG u v Set GPIO watchdog .P .B BR1 Read bank 1 GPIO .P .B BR2 Read bank 2 GPIO .P .B BC1 bits Clear specified GPIO in bank 1 .P .B BC2 bits Clear specified GPIO in bank 2 .P .B BS1 bits Set specified GPIO in bank 1 .P .B BS2 bits Set specified GPIO in bank 2 .P .SS ADVANCED .B NO Request a notification .P .B NC h Close notification .P .B NB h bits Start notification .P .B NP h Pause notification .P .B HC g cf Set hardware clock frequency .P .B HP g pf pdc Set hardware PWM frequency and dutycycle .P .B FG u stdy Set a glitch filter on a GPIO .P .B FN u stdy actv Set a noise filter on a GPIO .P .B PADS pad padma Set pad drive strength .P .B PADG pad Get pad drive strength .P .B SHELL name str Execute a shell command .P .SS Custom .B CF1 uvs Custom function 1 .P .B CF2 uvs Custom function 2 .P .SS Events .B EVM h bits Set events to monitor .P .B EVT event Trigger event .P .SS Scripts .B PROC t Store script .P .B PROCR sid pars Run script .P .B PROCU sid pars Set script parameters .P .B PROCP sid Get script status and parameters .P .B PROCS sid Stop script .P .B PROCD sid Delete script .P .B PARSE t Validate script .P .SS I2C .B I2CO ib id if Open I2C bus and device with flags .P .B I2CC h Close I2C handle .P .B I2CWQ h bit smb Write Quick: write bit .P .B I2CRS h smb Read Byte: read byte .P .B I2CWS h bv smb Write Byte: write byte .P .B I2CRB h r smb Read Byte Data: read byte from register .P .B I2CWB h r bv smb Write Byte Data: write byte to register .P .B I2CRW h r smb Read Word Data: read word from register .P .B I2CWW h r wv smb Write Word Data: write word to register .P .B I2CRK h r smb Read Block Data: read data from register .P .B I2CWK h r bvs smb Write Block Data: write data to register .P .B I2CWI h r bvs smb Write I2C Block Data .P .B I2CRI h r num smb Read I2C Block Data: read bytes from register .P .B I2CRD h num i2c Read device .P .B I2CWD h bvs i2c Write device .P .B I2CPC h r wv smb Process Call: exchange register with word .P .B I2CPK h r bvs smb Block Process Call: exchange data bytes with register .P .B I2CZ h bvs Performs multiple I2C transactions .P .SS I2C BIT BANG .B BI2CO sda scl b Open bit bang I2C .P .B BI2CC sda Close bit bang I2C .P .B BI2CZ sda bvs I2C bit bang multiple transactions .P .SS I2C/SPI SLAVE .B BSCX bctl bvs BSC I2C/SPI transfer .P .SS SERIAL .B SERO dev b sef Open serial device dev at baud b with flags .P .B SERC h Close serial handle .P .B SERRB Read byte from serial handle .P .B SERWB h bv Write byte to serial handle .P .B SERR h num Read bytes from serial handle .P .B SERW h bvs Write bytes to serial handle .P .B SERDA h Check for serial data ready to read .P .SS SERIAL BIT BANG (read only) .B SLRO u b db Open GPIO for bit bang serial data .P .B SLRC u Close GPIO for bit bang serial data .P .B SLRI u v Sets bit bang serial data logic levels .P .B SLR u num Read bit bang serial data from GPIO .P .SS SPI .B SPIO c b spf SPI open channel at baud b with flags .P .B SPIC h SPI close handle .P .B SPIR h num SPI read bytes from handle .P .B SPIW h bvs SPI write bytes to handle .P .B SPIX h bvs SPI transfer bytes to handle .P .SS SPI BIT BANG .B BSPIO cs miso mosi sclk b spf Open bit bang SPI .P .B BSPIC cs Close bit bang SPI .P .B BSPIX cs bvs SPI bit bang transfer .P .SS FILES .B FO file mode Open a file in mode .P .B FC h Close file handle .P .B FR h num Read bytes from file handle .P .B FW h bvs Write bytes to file handle .P .B FS h num from Seek to file handle position .P .B FL pat num List files which match pattern .P .SS WAVES .B WVCLR Clear all waveforms .P .B WVNEW Initialise a new waveform .P .B WVAG trips Add generic pulses to waveform .P .B WVAS u b db sb o bvs Add serial data to waveform .P .B WVCRE Create a waveform .P .B WVCAP percent Create a waveform of fixed size .P .B WVDEL wid Delete selected waveform .P .B WVTX wid Transmits waveform once .P .B WVTXM wid wmde Transmits waveform using mode .P .B WVTXR wid Transmits waveform repeatedly .P .B WVCHA bvs Transmits a chain of waveforms .P .B WVTAT Returns the current transmitting waveform .P .B WVBSY Check if waveform is being transmitted .P .B WVHLT Stop waveform .P .B WVSC ws Get waveform DMA CB stats .P .B WVSM ws Get waveform time stats .P .B WVSP ws Get waveform pulse stats .P .SS UTILITIES .B H/HELP Display command help .P .B HWVER Get hardware version .P .B MICS v Microseconds delay .P .B MILS v Milliseconds delay .P .B PIGPV Get pigpio library version .P .B T/TICK Get current tick .P .SS CONFIGURATION .B CGI Configuration get internals .P .B CSI v Configuration set internals .P .SH COMMANDS .br .IP "\fBBC1 bits\fP - Clear specified GPIO in bank 1" .IP "" 4 This command clears (sets low) the GPIO specified by \fBbits\fP in bank 1. Bank 1 consists of GPIO 0-31. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs bc1 0x400010 # clear GPIO 4 (1<<4) and 22 (1<<22) .br .br $ pigs bc1 32 # clear GPIO 5 (1<<5) .br -42 .br ERROR: no permission to update one or more GPIO .br .EE .br .IP "\fBBC2 bits\fP - Clear specified GPIO in bank 2" .IP "" 4 This command clears (sets low) the GPIO specified by \fBbits\fP in bank 2. Bank 2 consists of GPIO 32-53. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs bc2 0x8000 # clear GPIO 47 (activity LED on A+/B+/Pi2/Pi3) .br .br $ pigs bc2 1 # clear GPIO 32 (first in bank 2) .br -42 .br ERROR: no permission to update one or more GPIO .br .EE .br .IP "\fBBI2CC sda\fP - Close bit bang I2C" .IP "" 4 This command signals that bit banging I2C on \fBsda\fP (and \fBscl\fP) is no longer required. .br \fBExample\fP .br .EX $ pigs bi2cc 5 .br .EE .br .IP "\fBBI2CO sda scl b\fP - Open bit bang I2C" .IP "" 4 This command signals that GPIO \fBsda\fP and \fBscl\fP are to be used for bit banging I2C at \fBb\fP baud. .br Bit banging I2C allows for certain operations which are not possible with the standard I2C driver. .br o baud rates as low as 50 .br o repeated starts .br o clock stretching .br o I2C on any pair of spare GPIO .br The baud rate may be between 50 and 500000 bits per second. .br The GPIO used for SDA and SCL must have pull-ups to 3V3 connected. As a guide the hardware pull-ups on pins 3 and 5 are 1k8 in value. .br .IP "\fBBI2CZ sda bvs\fP - I2C bit bang multiple transactions" .IP "" 4 This function executes a sequence of bit banged I2C operations. The operations to be performed are specified by the contents of \fBbvs\fP which contains the concatenated command codes and associated data. .br The following command codes are supported: .br .EX Name Cmd & Data Meaning End 0 No more commands Escape 1 Next P is two bytes Start 2 Start condition Stop 3 Stop condition Address 4 P Set I2C address to P Flags 5 lsb msb Set I2C flags to lsb + (msb << 8) Read 6 P Read P bytes of data Write 7 P ... Write P bytes of data .EE .br The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). .br The address and flags default to 0. The address and flags maintain their previous value until updated. .br No flags are currently defined. .br \fBExample\fP .br .EX Set address 0x53 .br start, write 0x32, (re)start, read 6 bytes, stop .br Set address 0x1E .br start, write 0x03, (re)start, read 6 bytes, stop .br Set address 0x68 .br start, write 0x1B, (re)start, read 8 bytes, stop .br End .br .br 0x04 0x53 .br 0x02 0x07 0x01 0x32 0x02 0x06 0x06 0x03 .br .br 0x04 0x1E .br 0x02 0x07 0x01 0x03 0x02 0x06 0x06 0x03 .br .br 0x04 0x68 .br 0x02 0x07 0x01 0x1B 0x02 0x06 0x08 0x03 .br .br 0x00 .br .EE .br .IP "\fBBR1 \fP - Read bank 1 GPIO" .IP "" 4 This command read GPIO 0-31 (bank 1) and returns the levels as a 32-bit hexadecimal value. .br \fBExample\fP .br .EX $ pigs br1 .br 1001C1CF .br .EE .br .IP "\fBBR2 \fP - Read bank 2 GPIO" .IP "" 4 This command read GPIO 32-53 (bank 2) and returns the levels as a 32-bit hexadecimal value. .br \fBExample\fP .br .EX $ pigs br2 .br 003F0000 .br .EE .br .IP "\fBBS1 bits\fP - Set specified GPIO in bank 1" .IP "" 4 This command sets (sets high) the GPIO specified by \fBbits\fP in bank 1. Bank 1 consists of GPIO 0-31. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs bs1 16 # set GPIO 4 (1<<4) .br .br $ pigs bs1 1 # set GPIO 1 (1<<0) .br -42 .br ERROR: no permission to update one or more GPIO .br .EE .br .IP "\fBBS2 bits\fP - Set specified GPIO in bank 2" .IP "" 4 This command sets (sets high) the GPIO specified by \fBbits\fP in bank 2. Bank 2 consists of GPIO 32-53. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs bs2 0x40 # set GPIO 38 (enable high current mode A+/B+/Pi2/Pi3) .br .br $ pigs bs2 1 # set GPIO 32 (first in bank 2) .br -42 .br ERROR: no permission to update one or more GPIO .br .EE .br .IP "\fBBSCX bctl bvs\fP - BSC I2C/SPI transfer" .IP "" 4 .br This command performs a BSC I2C/SPI slave transfer as defined by \fBbctl\fP with data \fBbvs\fP. .br This function provides a low-level interface to the SPI/I2C Slave peripheral on the BCM chip. .br This peripheral allows the Pi to act as a hardware slave device on an I2C or SPI bus. .br This is not a bit bang version and as such is OS timing independent. The bus timing is handled directly by the chip. .br The output process is simple. You simply append data to the FIFO buffer on the chip. This works like a queue, you add data to the queue and the master removes it. .br I can't get SPI to work properly. I tried with a control word of 0x303 and swapped MISO and MOSI. .br The command sets the BSC mode and writes any data \fBbvs\fP to the BSC transmit FIFO. It returns the data count (at least 1 for the status word), the status word, followed by any data bytes read from the BSC receive FIFO. .br Note that the control word sets the BSC mode. The BSC will stay in that mode until a different control word is sent. .br For I2C use a control word of (I2C address << 16) + 0x305. .br E.g. to talk as I2C slave with address 0x13 use 0x130305. .br GPIO used for models other than those based on the BCM2711. .br .EX SDA SCL MOSI SCLK MISO CE I2C 18 19 - - - - SPI - - 18 19 20 21 .EE .br GPIO used for models based on the BCM2711 (e.g. the Pi4B). .br .EX SDA SCL MOSI SCLK MISO CE I2C 10 11 - - - - SPI - - 10 11 9 8 .EE .br When a zero control word is received the used GPIO will be reset to INPUT mode. .br The control word consists of the following bits. .br .EX 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 .br a a a a a a a - - IT HC TF IR RE TE BK EC ES PL PH I2 SP EN .br .EE .br Bits 0-13 are copied unchanged to the BSC CR register. See pages 163-165 of the Broadcom peripherals document for full details. .br .EX aaaaaaa defines the I2C slave address (only relevant in I2C mode) IT invert transmit status flags HC enable host control TF enable test FIFO IR invert receive status flags RE enable receive TE enable transmit BK abort operation and clear FIFOs EC send control register as first I2C byte ES send status register as first I2C byte PL set SPI polarity high PH set SPI phase high I2 enable I2C mode SP enable SPI mode EN enable BSC peripheral .EE .br The returned status has the following format .br .EX 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 .br S S S S S R R R R R T T T T T RB TE RF TF RE TB .br .EE .br Bits 0-15 are copied unchanged from the BSC FR register. See pages 165-166 of the Broadcom peripherals document for full details. .br .EX SSSSS number of bytes successfully copied to transmit FIFO RRRRR number of bytes in receieve FIFO TTTTT number of bytes in transmit FIFO RB receive busy TE transmit FIFO empty RF receive FIFO full TF transmit FIFO full RE receive FIFO empty TB transmit busy .EE .br This example assumes that GPIO 2/3 are connected to GPIO 18/19 (GPIO 10/11 on the BCM2711). .br \fBExample\fP .br .EX $ pigs bscx 0x130305 # start BSC as I2C slave 0x13 .br 1 18 .br .br $ i2cdetect -y 1 .br 0 1 2 3 4 5 6 7 8 9 a b c d e f .br 00: -- -- -- -- -- -- -- -- -- -- -- -- -- .br 10: -- -- -- 13 -- -- -- -- -- -- -- -- -- -- -- -- .br 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .br 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .br 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .br 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .br 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- .br 70: -- -- -- -- -- -- -- -- .br .br $ pigs i2co 1 0x13 0 # get handle for device 0x13 on bus 1 .br 0 .br .br $ pigs i2cwd 0 90 87 51 9 23 # write 5 bytes .br .br $ pigs bscx 0x130305 # check for data .br 6 18 90 87 51 9 23 .br .br $ pigs bscx 0x130305 11 13 15 17 # check for data and send 4 bytes .br 1 262338 .br .br $ pigs i2crd 0 4 # read 4 bytes .br 4 11 13 15 17 .br .br $ pigs i2cwd 0 90 87 51 9 23 # write 5 bytes .br $ pigs bscx 0x130305 11 13 15 17 # check for data and send 4 bytes .br 6 262338 90 87 51 9 23 .br .br $ pigs i2crd 0 4 .br 4 11 13 15 17 .br .br $ pigs bscx 0x130305 22 33 44 55 66 .br 1 327938 .br $ pigs i2crd 0 5 .br 5 22 33 44 55 66 .br .EE .br .IP "\fBBSPIC cs\fP - Close bit bang SPI" .IP "" 4 .br This command stops bit banging SPI on a set of GPIO opened with \fBBSPIO\fP. .br The set of GPIO is specifed by \fBcs\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs bspic 10 .br .br $ pigs bspic 10 .br -142 .br ERROR: no bit bang SPI in progress on GPIO .br .EE .br .IP "\fBBSPIO cs miso mosi sclk b spf\fP - Open bit bang SPI" .IP "" 4 .br This command starts bit banging SPI on a group of GPIO with slave select \fBcs\fP, MISO \fBmiso\fP, MOSI \fBmosi\fP, and clock \fBsclk\fP. .br Data will be transferred at baud \fBb\fP bits per second (which may be set in the range 50-250000). .br The flags \fBspf\fP may be used to modify the default behaviour of mode 0, active low chip select. .br The flags consists of the least significant 22 bits. .br .EX 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 .br 0 0 0 0 0 0 R T 0 0 0 0 0 0 0 0 0 0 0 p m m .br .EE .br mm defines the SPI mode. .br .EX Mode POL PHA .br 0 0 0 .br 1 0 1 .br 2 1 0 .br 3 1 1 .br .EE .br p is 0 if CS is active low (default) and 1 for active high. .br T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. .br R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. .br The other bits in flags should be set to zero. .br Upon success 0 is returned. On error a negative status code will be returned. .br If more than one device is connected to the SPI bus (defined by SCLK, MOSI, and MISO) each must have its own CS. .br \fBExample\fP .br .EX $ pigs bspio 9 11 12 13 50000 0 .br .br $ pigs bspio 10 11 12 13 50000 0 .br .br $ pigs bspio 29 19 20 21 50000 0 # GPIO 29 not avaialble on this Pi .br -41 .br ERROR: no permission to update GPIO .br .EE .br .IP "\fBBSPIX cs bvs\fP - SPI bit bang transfer" .IP "" 4 .br This command writes bytes \fBbvs\fP to the bit bang SPI device associated with slave select \fBcs\fP. It returns the same number of bytes read from the device. .br Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs bspio 5 13 19 12 10000 0 # MCP4251 DAC .br $ pigs bspio 6 13 19 12 20000 3 # MCP3008 ADC .br .br $ pigs bspix 5 0 16 # set DAC to 16 .br 2 255 255 .br .br $ pigs bspix 5 12 0 # read back DAC .br 2 254 16 .br .br $ pigs bspix 6 1 128 0 # read ADC input 0 .br 3 0 3 184 # 952 .br .br $ pigs bspix 5 0 240 # set DAC to 240 .br 2 255 255 .br .br $ pigs bspix 5 12 0 # read back DAC .br 2 254 240 .br .br $ pigs bspix 6 1 128 0 # read ADC input 0 .br 3 0 0 63 # 63 .br .br $ pigs bspix 5 0 128 # set DAC to 128 .br 2 255 255 .br .br $ pigs bspix 5 12 0 # read back DAC .br 2 254 128 .br .br $ pigs bspix 6 1 128 0 # read ADC input 0 .br 3 0 1 255 # 511 .br .br $ pigs bspic 5 # close SPI CS 5 .br $ pigs bspic 6 # close SPI CS 6 .br .br $ pigs bspic 5 # try to close SPI CS 5 again .br -142 .br ERROR: no bit bang SPI in progress on GPIO .br .EE .br .br .IP "\fBCF1 uvs\fP - Custom function 1" .IP "" 4 .br This command calls a user customised function. The meaning of any paramaters and the returned value is defined by the customiser. .br .IP "\fBCF2 uvs\fP - Custom function 2" .IP "" 4 .br This command calls a user customised function. The meaning of any paramaters and the returned value is defined by the customiser. .br .IP "\fBCGI \fP - Configuration get internals" .IP "" 4 This command returns the value of the internal library configuration settings. .br .IP "\fBCSI v\fP - Configuration set internals" .IP "" 4 This command sets the value of the internal library configuration settings to \fBv\fP. .br .IP "\fBEVM h bits\fP - Set events to monitor" .IP "" 4 This command starts event reporting on handle \fBh\fP (returned by a prior call to \fBNO\fP). .br Upon success nothing is returned. On error a negative status code will be returned. .br The notification gets reports for each event specified by \fBbits\fP. .br \fBExample\fP .br .EX $ pigs evm 0 -1 # Shorthand for events 0-31. .br $ pigs evm 0 0xf0 # Get notifications for events 4-7. .br .br $ pigs evm 1 0xf .br -25 .br ERROR: unknown handle .br .EE .br .IP "\fBEVT event\fP - Trigger event" .IP "" 4 This command triggers event \fBevent\fP. .br One event, number 31, is predefined. This event is auto generated on BSC slave activity. .br \fBExample\fP .br .EX $ pigs evt 12 .br $ pigs evt 5 .br .br $ pigs evt 32 .br -143 .br ERROR: bad event id .br .EE .br .IP "\fBFC h\fP - Close file handle" .IP "" 4 This command closes a file handle \fBh\fP previously opened with \fBFO\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs fc 0 # First close okay. .br .br $ pigs fc 0 # Second fails. .br -25 .br ERROR: unknown handle .br .EE .br .IP "\fBFG u stdy\fP - Set a glitch filter on a GPIO" .IP "" 4 .br Level changes on the GPIO \fBu\fP are not reported unless the level has been stable for at least \fBstdy\fP microseconds. The level is then reported. Level changes of less than \fBstdy\fP microseconds are ignored. .br The filter only affects callbacks (including pipe notifications). .br The \fBR/READ\fP, \fBBR1\fP, and \fBBR2\fP commands are not affected. .br Note, each (stable) edge will be timestamped \fBstdy\fP microseconds after it was first detected. .br \fBExample\fP .br .EX $ pigs fg 4 250 .br .br $ pigs fg 4 1000000 .br -125 .br ERROR: bad filter parameter .br .EE .br .IP "\fBFL pat num\fP - List files which match pattern" .IP "" 4 This command returns a list of the files matching \fBpat\fP. Up to \fBnum\fP bytes may be returned. .br Upon success the count of returned bytes followed by the matching files is returned. On error a negative status code will be returned. .br A newline (0x0a) character separates each file name. .br Only files which have a matching entry in /opt/pigpio/access may be listed. .br Suppose /opt/pigpio/access contains .br /sys/bus/w1/devices/28*/w1_slave r .br \fBExample\fP .br .EX $ pigs -a fl "/sys/bus/w1/devices/28*/w1_slave" 5000 .br 90 /sys/bus/w1/devices/28-000005d34cd2/w1_slave .br /sys/bus/w1/devices/28-001414abbeff/w1_slave .br .br $ pigs -a fl "/sys/bus/*" 5000 .br ERROR: no permission to access file .br -137 .br .EE .br .IP "\fBFN u stdy actv\fP - Set a noise filter on a GPIO" .IP "" 4 .br Level changes on the GPIO \fBu\fP are ignored until a level which has been stable for \fBstdy\fP microseconds is detected. Level changes on the GPIO are then reported for \fBactv\fP microseconds after which the process repeats. .br The filter only affects callbacks (including pipe notifications). .br The \fBR/READ\fP, \fBBR1\fP, and \fBBR2\fP commands are not affected. .br Note, level changes before and after the active period may be reported. Your software must be designed to cope with such reports. .br \fBExample\fP .br .EX $ pigs fn 7 250 1000 .br .br $ pigs fn 7 2500000 1000 .br -125 .br ERROR: bad filter parameter .br .EE .br .IP "\fBFO file mode\fP - Open a file in mode" .IP "" 4 This function returns a handle to a file \fBfile\fP opened in a specified mode \fBmode\fP. .br Upon success a handle (>=0) is returned. On error a negative status code will be returned. .br File .br A file may only be opened if permission is granted by an entry in /opt/pigpio/access. This is intended to allow remote access to files in a more or less controlled manner. .br Each entry in /opt/pigpio/access takes the form of a file path which may contain wildcards followed by a single letter permission. The permission may be R for read, W for write, U for read/write, and N for no access. .br Where more than one entry matches a file the most specific rule applies. If no entry matches a file then access is denied. .br Suppose /opt/pigpio/access contains the following entries .br .EX /home/* n .br /home/pi/shared/dir_1/* w .br /home/pi/shared/dir_2/* r .br /home/pi/shared/dir_3/* u .br /home/pi/shared/dir_1/file.txt n .br .EE .br Files may be written in directory dir_1 with the exception of file.txt. .br Files may be read in directory dir_2. .br Files may be read and written in directory dir_3. .br If a directory allows read, write, or read/write access then files may be created in that directory. .br In an attempt to prevent risky permissions the following paths are ignored in /opt/pigpio/access. .br .EX a path containing .. .br a path containing only wildcards (*?) .br a path containing less than two non-wildcard parts .br .EE .br Mode .br The mode may have the following values. .br .EX Value Meaning READ 1 open file for reading WRITE 2 open file for writing RW 3 open file for reading and writing .EE .br The following values may be or'd into the mode. .br .EX Value Meaning APPEND 4 All writes append data to the end of the file CREATE 8 The file is created if it doesn't exist TRUNC 16 The file is truncated .EE .br Newly created files are owned by root with permissions owner read and write. .br \fBExample\fP .br .EX $ ls /ram/*.c .br /ram/command.c /ram/pigpiod.c /ram/pigs.c .br /ram/x_pigpiod_if.c /ram/pig2vcd.c /ram/pigpiod_if2.c .br /ram/x_pigpio.c /ram/x_repeat.c /ram/pigpio.c .br /ram/pigpiod_if.c /ram/x_pigpiod_if2.c .br .br # assumes /opt/pigpio/access contains the following line .br # /ram/*.c r .br .br $ pigs fo /ram/pigpio.c 1 .br 0 .br .br $ pigs fo /ram/new.c 1 .br -128 .br ERROR: file open failed .br .br $ pigs fo /ram/new.c 9 .br 1 .br .br $ ls /ram/*.c -l .br -rw-r--r-- 1 joan joan 42923 Jul 10 11:22 /ram/command.c .br -rw------- 1 root root 0 Jul 10 16:54 /ram/new.c .br -rw-r--r-- 1 joan joan 2971 Jul 10 11:22 /ram/pig2vcd.c .br -rw------- 1 joan joan 296235 Jul 10 11:22 /ram/pigpio.c .br -rw-r--r-- 1 joan joan 9266 Jul 10 11:22 /ram/pigpiod.c .br -rw-r--r-- 1 joan joan 37331 Jul 10 11:22 /ram/pigpiod_if2.c .br -rw-r--r-- 1 joan joan 33088 Jul 10 11:22 /ram/pigpiod_if.c .br -rw-r--r-- 1 joan joan 7990 Jul 10 11:22 /ram/pigs.c .br -rw-r--r-- 1 joan joan 19970 Jul 10 11:22 /ram/x_pigpio.c .br -rw-r--r-- 1 joan joan 20804 Jul 10 11:22 /ram/x_pigpiod_if2.c .br -rw-r--r-- 1 joan joan 19844 Jul 10 11:22 /ram/x_pigpiod_if.c .br -rw-r--r-- 1 joan joan 19907 Jul 10 11:22 /ram/x_repeat.c .br .EE .br .IP "\fBFR h num\fP - Read bytes from file handle" .IP "" 4 This command returns up to \fBnum\fP bytes of data read from the file associated with handle \fBh\fP. .br Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs fr 0 10 .br 5 48 49 128 144 255 .br .br $ pigs fr 0 10 .br 0 .br .EE .br .IP "\fBFS h num from\fP - Seek to file handle position" .IP "" 4 This command seeks to a position within the file associated with handle \fBh\fP. .br The number of bytes to move is \fBnum\fP. Positive offsets move forward, negative offsets backwards. The move start position is determined by \fBfrom\fP as follows. .br .EX From 0 start 1 current position 2 end .EE .br Upon success the new byte position within the file (>=0) is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs fs 0 200 0 # Seek to start of file plus 200 .br 200 .br .br $ pigs fs 0 0 1 # Return current position .br 200 .br .br $ pigs fs 0 0 2 # Seek to end of file, return size .br 296235 .br .EE .br .IP "\fBFW h bvs\fP - Write bytes to file handle" .IP "" 4 This command writes bytes \fBbvs\fP to the file associated with handle \fBh\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs fw 0 23 45 67 89 .br .EE .br .IP "\fBGDC u\fP - Get GPIO PWM dutycycle" .IP "" 4 .br This command returns the PWM dutycycle in use on GPIO \fBu\fP. .br Upon success the dutycycle is returned. On error a negative status code will be returned. .br For normal PWM the dutycycle will be out of the defined range for the GPIO (see \fBPRG\fP). .br If a hardware clock is active on the GPIO the reported dutycycle will be 500000 (500k) out of 1000000 (1M). .br If hardware PWM is active on the GPIO the reported dutycycle will be out of a 1000000 (1M). .br \fBExample\fP .br .EX $ pigs p 4 129 .br $ pigs gdc 4 .br 129 .br .br pigs gdc 5 .br -92 .br ERROR: GPIO is not in use for PWM .br .EE .br .IP "\fBGPW u\fP - Get GPIO servo pulsewidth" .IP "" 4 .br This command returns the servo pulsewidth in use on GPIO \fBu\fP. .br Upon success the servo pulsewidth is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs s 4 1235 .br $ pigs gpw 4 .br 1235 .br .br $ pigs gpw 9 .br -93 .br ERROR: GPIO is not in use for servo pulses .br .EE .br .IP "\fBH/HELP \fP - Display command help" .IP "" 4 This command displays a brief list of the commands and their parameters. .br \fBExample\fP .br .EX $ pigs h .br .br $ pigs help .br .EE .br .IP "\fBHC g cf\fP - Set hardware clock frequency" .IP "" 4 This command sets the hardware clock associated with GPIO \fBg\fP to frequency \fBcf\fP. Frequencies above 30MHz are unlikely to work. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs hc 4 5000 # start a 5 KHz clock on GPIO 4 (clock 0) .br .br $ pigs hc 5 5000000 # start a 5 MHz clcok on GPIO 5 (clock 1) .br -99 .br ERROR: need password to use hardware clock 1 .br .EE .br The same clock is available on multiple GPIO. The latest frequency setting will be used by all GPIO which share a clock. .br The GPIO must be one of the following. .br .EX 4 clock 0 All models 5 clock 1 All models but A and B (reserved for system use) 6 clock 2 All models but A and B 20 clock 0 All models but A and B 21 clock 1 All models but A and B Rev.2 (reserved for system use) .EE .br .EX 32 clock 0 Compute module only 34 clock 0 Compute module only 42 clock 1 Compute module only (reserved for system use) 43 clock 2 Compute module only 44 clock 1 Compute module only (reserved for system use) .EE .br Access to clock 1 is protected by a password as its use will likely crash the Pi. The password is given by or'ing 0x5A000000 with the GPIO number. .br .IP "\fBHP g pf pdc\fP - Set hardware PWM frequency and dutycycle" .IP "" 4 This command sets the hardware PWM associated with GPIO \fBg\fP to frequency \fBpf\fP with dutycycle \fBpdc\fP. Frequencies above 30MHz are unlikely to work. .br NOTE: Any waveform started by \fBWVTX\fP, \fBWVTXR\fP, or \fBWVCHA\fP will be cancelled. .br This function is only valid if the pigpio main clock is PCM. The main clock defaults to PCM but may be overridden when the pigpio daemon is started (option -t). .br Upon success nothing is returned. On error a negative status code will be returned. .br .EX $ pigs hp 18 100 800000 # 80% dutycycle .br .br $ pigs hp 19 100 200000 # 20% dutycycle .br .br $ pigs hp 19 400000000 100000 .br -96 .br ERROR: invalid hardware PWM frequency .br .EE .br The same PWM channel is available on multiple GPIO. The latest frequency and dutycycle setting will be used by all GPIO which share a PWM channel. .br The GPIO must be one of the following. .br .EX 12 PWM channel 0 All models but A and B 13 PWM channel 1 All models but A and B 18 PWM channel 0 All models 19 PWM channel 1 All models but A and B .EE .br .EX 40 PWM channel 0 Compute module only 41 PWM channel 1 Compute module only 45 PWM channel 1 Compute module only 52 PWM channel 0 Compute module only 53 PWM channel 1 Compute module only .EE .br The actual number of steps beween off and fully on is the integral part of 250M/\fBpf\fP (375M/\fBpf\fP for the BCM2711). .br The actual frequency set is 250M/steps (375M/steps for the BCM2711). .br There will only be a million steps for a \fBpf\fP of 250 (375 for the BCM2711). Lower frequencies will have more steps and higher frequencies will have fewer steps. \fBpdc\fP is automatically scaled to take this into account. .br .IP "\fBHWVER \fP - Get hardware version" .IP "" 4 This command returns the hardware revision of the Pi. .br The hardware revision is found in the last 4 characters on the revision line of /proc/cpuinfo. .br If the hardware revision can not be found or is not a valid hexadecimal number the command returns 0. .br The revision number can be used to determine the assignment of GPIO to pins (see \fBg\fP). .br There are currently three types of board. .br Type 1 boards have hardware revision numbers of 2 and 3. .br Type 2 boards have hardware revision numbers of 4, 5, 6, and 15. .br Type 3 boards have hardware revision numbers of 16 or greater. .br for "Revision : 0002" the command returns 2. .br for "Revision : 000f" the command returns 15. .br for "Revision : 000g" the command returns 0. .br \fBExample\fP .br .EX $ pigs hwver # On a B+ .br 16 .br .EE .br .IP "\fBI2CC h\fP - Close I2C handle" .IP "" 4 This command closes an I2C handle \fBh\fP previously opened with \fBI2CO\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs i2cc 0 # First close okay. .br .br $ pigs i2cc 0 # Second fails. .br -25 .br ERROR: unknown handle .br .EE .br .IP "\fBI2CO ib id if\fP - Open I2C bus and device with flags" .IP "" 4 This command returns a handle to access device \fBid\fP on I2C bus \fBib\fP. The device is opened with flags \fBif\fP. .br Physically buses 0 and 1 are available on the Pi. Higher numbered buses will be available if a kernel supported bus multiplexor is being used. .br The GPIO used are given in the following table. .br .EX SDA SCL I2C 0 0 1 I2C 1 2 3 .EE .br No flags are currently defined. The parameter \fBif\fP should be 0. .br Upon success the next free handle (>=0) is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs i2co 1 0x70 0 # Bus 1, device 0x70, flags 0. .br 0 .br .br $ pigs i2co 1 0x53 0 # Bus 1, device 0x53, flags 0. .br 1 .br .EE .br .IP "\fBI2CPC h r wv\fP - smb Process Call: exchange register with word" .IP "" 4 This command writes \fBwv\fP to register \fBr\fP of the I2C device associated with handle \fBh\fP and returns a 16-bit word read from the device. .br Upon success a value between 0 and 65535 will be returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs i2cpc 0 37 43210 .br 39933 .br .br $ pigs i2cpc 0 256 43210 .br ERROR: bad i2c/spi/ser parameter .br -81 .br .EE .br .IP "\fBI2CPK h r bvs\fP - smb Block Process Call: exchange data bytes with register" .IP "" 4 .br This command writes the data bytes \fBbvs\fP to register \fBr\fP of the I2C device associated with handle \fBh\fP and returns a device specific number of bytes. .br Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs i2cpk 0 0 0x11 0x12 .br 6 0 0 0 0 0 0 .br .EE .br .IP "\fBI2CRB h r\fP - smb Read Byte Data: read byte from register" .IP "" 4 .br This command returns a single byte read from register \fBr\fP of the I2C device associated with handle \fBh\fP. .br Upon success a value between 0 and 255 will be returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs i2crb 0 0 .br 6 .br .EE .br .IP "\fBI2CRD h num\fP - i2c Read device" .IP "" 4 .br This command returns \fBnum\fP bytes read from the I2C device associated with handle \fBh\fP. .br Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. .br This command operates on the raw I2C device. The maximum value of the parameter \fBnum\fP is dependent on the I2C drivers and the device itself. pigs imposes a limit of about 8000 bytes. .br \fBExample\fP .br .EX $ pigs i2crd 0 16 .br 16 6 24 0 0 0 0 0 0 0 0 0 0 0 0 32 78 .br .EE .br .IP "\fBI2CRI h r num\fP - smb Read I2C Block Data: read bytes from register" .IP "" 4 .br This command returns \fBnum\fP bytes from register \fBr\fP of the I2C device associated with handle \fBh\fP. .br Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. .br The parameter \fBnum\fP may be 1-32. .br \fBExample\fP .br .EX $ pigs i2cri 0 0 16 .br 16 237 155 155 155 155 155 155 155 155 155 155 155 155 155 155 155 .br .EE .br .IP "\fBI2CRK h r\fP - smb Read Block Data: read data from register" .IP "" 4 .br This command returns between 1 and 32 bytes read from register \fBr\fP of the I2C device associated with handle \fBh\fP. .br Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. .br The number of bytes of returned data is specific to the device and register. .br \fBExample\fP .br .EX $ pigs i2crk 0 0 .br 6 0 0 0 0 0 0 .br .br $ pigs i2crk 0 1 .br 24 0 0 0 0 0 0 0 0 0 0 0 0 120 222 105 215 128 87 195 217 0 0 0 0 .br .EE .br .IP "\fBI2CRS h\fP - smb Read Byte: read byte" .IP "" 4 .br This command returns a single byte read from the I2C device associated with handle \fBh\fP. .br Upon success a value between 0 and 255 will be returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs i2crs 0 .br 0 .br .EE .br .IP "\fBI2CRW h r\fP - smb Read Word Data: read word from register" .IP "" 4 .br This command returns a single 16 bit word read from register \fBr\fP of the I2C device associated with handle \fBh\fP. .br Upon success a value between 0 and 65535 will be returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs i2crw 0 0 .br 6150 .br .EE .br .IP "\fBI2CWB h r bv\fP - smb Write Byte Data: write byte to register" .IP "" 4 .br This command writes a single byte \fBbv\fP to register \fBr\fP of the I2C device associated with handle \fBh\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs i2cwb 0 10 0x54 .br .EE .br .IP "\fBI2CWD h bvs\fP - i2c Write device" .IP "" 4 .br This command writes a block of bytes \fBbvs\fP to the I2C device associated with handle \fBh\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br The number of bytes which may be written in one transaction is dependent on the I2C drivers and the device itself. pigs imposes a limit of about 500 bytes. .br This command operates on the raw I2C device. .br \fBExample\fP .br .EX $ pigs i2cwd 0 0x01 0x02 0x03 0x04 .br .EE .br .IP "\fBI2CWI h r bvs\fP - smb Write I2C Block Data" .IP "" 4 .br This command writes between 1 and 32 bytes \fBbvs\fP to register \fBr\fP of the I2C device associated with handle \fBh\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs i2cwi 0 4 0x01 0x04 0xc0 .br .EE .br .IP "\fBI2CWK h r bvs\fP - smb Write Block Data: write data to register" .IP "" 4 .br This command writes between 1 and 32 bytes \fBbvs\fP to register \fBr\fP of the I2C device associated with handle \fBh\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX pigs i2cwk 0 4 0x01 0x04 0xc0 .br .EE .br .IP "\fBI2CWQ h bit\fP - smb Write Quick: write bit" .IP "" 4 .br This command writes a single \fBbit\fP to the I2C device associated with handle \fBh\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs i2cwq 0 1 .br .EE .br .IP "\fBI2CWS h bv\fP - smb Write Byte: write byte" .IP "" 4 .br This command writes a single byte \fBbv\fP to the I2C device associated with handle \fBh\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs i2cws 0 0x12 .br .br $ pigs i2cws 0 0xff .br -82 .br ERROR: I2C write failed .br .EE .br .IP "\fBI2CWW h r wv\fP - smb Write Word Data: write word to register" .IP "" 4 .br This command writes a single 16 bit word \fBwv\fP to register \fBr\fP of the I2C device associated with handle \fBh\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs i2cww 0 0 0xffff .br .EE .br .IP "\fBI2CZ h bvs\fP - Performs multiple I2C transactions" .IP "" 4 This command executes a sequence of I2C operations. The operations to be performed are specified by the contents of \fBbvs\fP which contains the concatenated command codes and associated data. .br The following command codes are supported: .br .EX Name Cmd & Data Meaning End 0 No more commands Escape 1 Next P is two bytes On 2 Switch combined flag on Off 3 Switch combined flag off Address 4 P Set I2C address to P Flags 5 lsb msb Set I2C flags to lsb + (msb << 8) Read 6 P Read P bytes of data Write 7 P ... Write P bytes of data .EE .br The address, read, and write commands take a parameter P. Normally P is one byte (0-255). If the command is preceded by the Escape command then P is two bytes (0-65535, least significant byte first). .br The address defaults to that associated with the handle \fBh\fP. The flags default to 0. The address and flags maintain their previous value until updated. .br \fBExample\fP .br .EX Set address 0x53, write 0x32, read 6 bytes .br Set address 0x1E, write 0x03, read 6 bytes .br Set address 0x68, write 0x1B, read 8 bytes .br End .br .br 0x04 0x53 0x07 0x01 0x32 0x06 0x06 .br 0x04 0x1E 0x07 0x01 0x03 0x06 0x06 .br 0x04 0x68 0x07 0x01 0x1B 0x06 0x08 .br 0x00 .br .EE .br .br .IP "\fBM/MODES g m\fP - Set GPIO mode" .IP "" 4 .br This command sets GPIO \fBg\fP to mode \fBm\fP, typically input (read) or output (write). .br Upon success nothing is returned. On error a negative status code will be returned. .br Each GPIO can be configured to be in one of 8 different modes. The modes are named Input, Output, ALT0, ALT1, ALT2, ALT3, ALT4, and ALT5. .br To set the mode use the code for the mode. .br .EX Mode Input Output ALT0 ALT1 ALT2 ALT3 ALT4 ALT5 Code R W 0 1 2 3 4 5 .EE .br \fBExample\fP .br .EX $ pigs m 4 r # Input (read) .br $ pigs m 4 w # Output (write) .br $ pigs m 4 0 # ALT 0 .br $ pigs m 4 5 # ALT 5 .br .EE .br .IP "\fBMG/MODEG g\fP - Get GPIO mode" .IP "" 4 .br This command returns the current mode of GPIO \fBg\fP. .br Upon success the value of the GPIO mode is returned. On error a negative status code will be returned. .br .EX Value 0 1 2 3 4 5 6 7 Mode Input Output ALT5 ALT4 ALT0 ALT1 ALT2 ALT3 .EE .br \fBExample\fP .br .EX $ pigs mg 4 .br 1 .br .EE .br .IP "\fBMICS v\fP - Microseconds delay" .IP "" 4 This command delays execution for \fBv\fP microseconds. .br Upon success nothing is returned. On error a negative status code will be returned. .br The main use of this command is expected to be within \fBScripts\fP. .br \fBExample\fP .br .EX $ pigs mics 20 # Delay 20 microseconds. .br $ pigs mics 1000000 # Delay 1 second. .br .br $ pigs mics 2000000 .br -64 .br ERROR: bad MICS delay (too large) .br .EE .br .IP "\fBMILS v\fP - Milliseconds delay" .IP "" 4 .br This command delays execution for \fBv\fP milliseconds. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs mils 2000 # Delay 2 seconds. .br .br $ pigs mils 61000 .br -65 .br ERROR: bad MILS delay (too large) .br .EE .br .IP "\fBNB h bits\fP - Start notification" .IP "" 4 .br This command starts notifications on handle \fBh\fP returned by a prior call to \fBNO\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br The notification gets state changes for each GPIO specified by \fBbits\fP. .br \fBExample\fP .br .EX $ pigs nb 0 -1 # Shorthand for GPIO 0-31. .br $ pigs nb 0 0xf0 # Get notifications for GPIO 4-7. .br .br $ pigs nb 1 0xf .br -25 .br ERROR: unknown handle .br .EE .br .IP "\fBNC h\fP - Close notification" .IP "" 4 .br This command stops notifications on handle \fBh\fP returned by a prior call to \fBNO\fP and releases the handle for reuse. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs nc 0 # First call succeeds. .br .br $ pigs nc 1 # Second call fails. .br -25 .br ERROR: unknown handle .br .EE .br .IP "\fBNO \fP - Request a notification" .IP "" 4 .br This command requests a free notification handle. .br A notification is a method for being notified of GPIO state changes via a pipe. .br Upon success the command returns a handle greater than or equal to zero. On error a negative status code will be returned. .br Notifications for handle x will be available at the pipe named /dev/pigpiox (where x is the handle number). .br E.g. if the command returns 15 then the notifications must be read from /dev/pigpio15. .br \fBExample\fP .br .EX $ pigs no .br 0 .br .EE .br .IP "\fBNP h\fP - Pause notification" .IP "" 4 .br This command pauses notifications on handle \fBh\fP returned by a prior call to \fBNO\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br Notifications for the handle are suspended until a new \fBNB\fP command is given for the handle. .br \fBExample\fP .br .EX $ pigs np 0 .br .EE .br .IP "\fBP/PWM u v\fP - Set GPIO PWM value" .IP "" 4 .br This command starts PWM on GPIO \fBu\fP with dutycycle \fBv\fP. The dutycycle varies from 0 (off) to range (fully on). The range defaults to 255. .br Upon success nothing is returned. On error a negative status code will be returned. .br This and the servo functionality use the DMA and PWM or PCM peripherals to control and schedule the pulsewidths and dutycycles. .br The \fBPRS\fP command may be used to change the default range of 255. .br \fBExample\fP .br .EX $ pigs p 4 64 # Start PWM on GPIO 4 with 25% dutycycle .br $ pigs p 4 128 # 50% .br $ pigs p 4 192 # 75% .br $ pigs p 4 255 # 100% .br .EE .br .IP "\fBPADG pad\fP - Get pad drive strength" .IP "" 4 .br This command gets the \fBpad\fP drive strength \fBpadma\fP in mA. .br Returns the pad drive strength if OK. On error a negative status code will be returned. .br .EX Pad GPIO 0 0-27 1 28-45 2 46-53 .EE .br \fBExample\fP .br .EX $ pigs padg 0 .br 8 .br $ pigs pads 0 16 .br $ pigs padg 0 .br 16 .br pigs padg 3 .br -126 .br ERROR: bad pad number .br .EE .br .IP "\fBPADS pad padma\fP - Set pad drive strength" .IP "" 4 .br This command sets the \fBpad\fP drive strength \fBpadma\fP in mA. .br Upon success nothing is returned. On error a negative status code will be returned. .br .EX Pad GPIO 0 0-27 1 28-45 2 46-53 .EE .br \fBExample\fP .br .EX $ pigs pads 0 16 .br $ pigs padg 0 .br 16 .br $ pigs pads 0 17 .br -127 .br ERROR: bad pad drive strength .br .EE .br .IP "\fBPARSE t\fP - Validate script" .IP "" 4 .br Validates the text \fBt\fP of a script without storing the script. .br Upon success nothing is returned. On error a list of detected script errors will be given. .br See \fBScripts\fP. .br This command may be used to find script syntax faults. .br \fBExample\fP .br .EX $ pigs parse tag 100 w 22 1 mils 200 w 22 0 mils 800 jmp 100 .br .br $ pigs parse tag 0 w 22 1 mills 50 w 22 0 dcr p10 jp 99 .br Unknown command: mills .br Unknown command: 50 .br Bad parameter to dcr .br Can't resolve tag 99 .br .EE .br .IP "\fBPFG u\fP - Get GPIO PWM frequency" .IP "" 4 .br This command returns the PWM frequency in Hz used for GPIO \fBu\fP. .br Upon success the PWM frequency is returned. On error a negative status code will be returned. .br For normal PWM the frequency will be that defined for the GPIO by \fBPFS\fP. .br If a hardware clock is active on the GPIO the reported frequency will be that set by \fBHC\fP. .br If hardware PWM is active on the GPIO the reported frequency will be that set by \fBHP\fP. .br \fBExample\fP .br .EX $ pigs pfg 4 .br 800 .br .br $ pigs pfg 34 .br ERROR: GPIO not 0-31 .br -2 .br .EE .br .IP "\fBPFS u v\fP - Set GPIO PWM frequency" .IP "" 4 This command sets the PWM frequency \fBv\fP to be used for GPIO \fBu\fP. .br The numerically closest frequency to \fBv\fP will be selected. .br Upon success the new frequency is returned. On error a negative status code will be returned. .br If PWM is currently active on the GPIO it will be switched off and then back on at the new frequency. .br Each GPIO can be independently set to one of 18 different PWM frequencies. .br The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5, 8, or 10 microseconds (default 5). The sample rate is set when the pigpio daemon is started. .br The frequencies for each sample rate are: .br .EX Hertz .br .br 1: 40000 20000 10000 8000 5000 4000 2500 2000 1600 .br 1250 1000 800 500 400 250 200 100 50 .br .br 2: 20000 10000 5000 4000 2500 2000 1250 1000 800 .br 625 500 400 250 200 125 100 50 25 .br .br 4: 10000 5000 2500 2000 1250 1000 625 500 400 .br 313 250 200 125 100 63 50 25 13 .br sample .br rate .br (us) 5: 8000 4000 2000 1600 1000 800 500 400 320 .br 250 200 160 100 80 50 40 20 10 .br .br 8: 5000 2500 1250 1000 625 500 313 250 200 .br 156 125 100 63 50 31 25 13 6 .br .br 10: 4000 2000 1000 800 500 400 250 200 160 .br 125 100 80 50 40 25 20 10 5 .br .EE .br \fBExample\fP .br .EX pigs pfs 4 0 # 0 selects the lowest frequency. .br 10 .br .br $ pigs pfs 4 1000 # Set 1000Hz PWM. .br 1000 .br .br $ pigs pfs 4 100000 # Very big number selects the highest frequency. .br 8000 .br .EE .br .IP "\fBPIGPV \fP - Get pigpio library version" .IP "" 4 .br This command returns the pigpio library version. .br \fBExample\fP .br .EX $ pigs pigpv .br 17 .br .EE .br .IP "\fBPRG u\fP - Get GPIO PWM range" .IP "" 4 .br This command returns the dutycycle range for GPIO \fBu\fP. .br Upon success the range is returned. On error a negative status code will be returned. .br If a hardware clock or hardware PWM is active on the GPIO the reported range will be 1000000 (1M). .br \fBExample\fP .br .EX $ pigs prg 4 .br 255 .br .EE .br .IP "\fBPROC t\fP - Store script" .IP "" 4 .br This command stores a script \fBt\fP for later execution. .br If the script is valid a script id (>=0) is returned which is passed to the other script commands. On error a negative status code will be returned. .br See \fBScripts\fP. .br \fBExample\fP .br .EX $ pigs proc tag 123 w 4 0 mils 200 w 4 1 mils 300 dcr p0 jp 123 .br 0 .br .br $ pigs proc tag 123 w 4 0 mils 5 w 4 1 mils 5 jmp 12 .br ERROR: script has unresolved tag .br -63 .br .EE .br .IP "\fBPROCD sid\fP - Delete script" .IP "" 4 .br This command deletes script \fBsid\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br See \fBScripts\fP. .br \fBExample\fP .br .EX $ pigs procd 1 .br .br $ pigs procd 1 .br ERROR: unknown script id .br -48 .br .EE .br .IP "\fBPROCP sid\fP - Get script status and parameters" .IP "" 4 .br This command returns the status of script \fBsid\fP as well as the current value of its 10 parameters. .br Upon success the script status and parameters are returned. On error a negative status code will be returned. .br The script status may be one of .br .EX 0 being initialised 1 halted 2 running 3 waiting 4 failed .EE .br See \fBScripts\fP. .br \fBExample\fP .br .EX $ pigs procp 0 .br 1 0 0 0 0 0 0 0 0 0 0 .br .EE .br .IP "\fBPROCR sid pars\fP - Run script" .IP "" 4 .br This command runs stored script \fBsid\fP passing it up to 10 optional parameters. .br Upon success nothing is returned. On error a negative status code will be returned. .br See \fBScripts\fP. .br \fBExample\fP .br .EX $ pigs proc tag 123 w 4 0 mils 200 w 4 1 mils 300 dcr p0 jp 123 .br 0 .br .br $ pigs procr 0 50 # Run script 0 with parameter 0 of 50. .br .br $ pigs procp 0 .br 2 44 0 0 0 0 0 0 0 0 0 .br $ pigs procp 0 .br 2 37 0 0 0 0 0 0 0 0 0 .br $ pigs procp 0 .br 2 10 0 0 0 0 0 0 0 0 0 .br $ pigs procp 0 .br 2 5 0 0 0 0 0 0 0 0 0 .br $ pigs procp 0 .br 2 2 0 0 0 0 0 0 0 0 0 .br $ pigs procp 0 .br 1 -1 0 0 0 0 0 0 0 0 0 .br .EE .br .IP "\fBPROCS sid\fP - Stop script" .IP "" 4 .br This command stops a running script \fBsid\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br See \fBScripts\fP. .br \fBExample\fP .br .EX $ pigs procs 0 .br .br $ pigs procs 1 .br -48 .br ERROR: unknown script id .br .EE .br .IP "\fBPROCU sid pars\fP - Set script parameters" .IP "" 4 .br This command sets the parameters of a stored script \fBsid\fP passing it up to 10 parameters. .br Upon success nothing is returned. On error a negative status code will be returned. .br See \fBScripts\fP. .br \fBExample\fP .br .EX $ pigs proc tag 0 hp 18 p0 p1 mils 1000 jmp 0 .br 0 .br $ pigs procu 0 50 500000 .br $ pigs procr 0 .br $ pigs procu 0 100 .br $ pigs procu 0 200 .br $ pigs procu 0 200 100000 .br .EE .br .IP "\fBPRRG u\fP - Get GPIO PWM real range" .IP "" 4 .br This command returns the real underlying range used by GPIO \fBu\fP. .br If a hardware clock is active on the GPIO the reported real range will be 1000000 (1M). .br If hardware PWM is active on the GPIO the reported real range will be approximately 250M divided by the set PWM frequency. .br On error a negative status code will be returned. .br See \fBPRS\fP. .br \fBExample\fP .br .EX $ pigs prrg 17 .br 250 .br .br $ pigs pfs 17 0 .br 10 .br $ pigs prrg 17 .br 20000 .br .br $ pigs pfs 17 100000 .br 8000 .br $ pigs prrg 17 .br 25 .br .EE .br .IP "\fBPRS u v\fP - Set GPIO PWM range" .IP "" 4 .br This command sets the dutycycle range \fBv\fP to be used for GPIO \fBu\fP. Subsequent uses of command \fBP/PWM\fP will use a dutycycle between 0 (off) and \fBv\fP (fully on). .br Upon success the real underlying range used by the GPIO is returned. On error a negative status code will be returned. .br If PWM is currently active on the GPIO its dutycycle will be scaled to reflect the new range. .br The real range, the number of steps between fully off and fully on for each frequency, is given in the following table. .br .EX #1 #2 #3 #4 #5 #6 #7 #8 #9 25 50 100 125 200 250 400 500 625 #10 #11 #12 #13 #14 #15 #16 #17 #18 800 1000 1250 2000 2500 4000 5000 10000 20000 .EE .br The real value set by \fBPRS\fP is (dutycycle * real range) / range. .br See \fBPRRG\fP .br \fBExample\fP .br .EX $ pigs prs 18 1000 .br 250 .br .EE .br .IP "\fBPUD g p\fP - Set GPIO pull up/down" .IP "" 4 .br This command sets the internal pull/up down for GPIO \fBg\fP to mode \fBp\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br The mode may be pull-down (D), pull-up (U), or off (O). .br \fBExample\fP .br .EX $ pigs pud 4 d # Set pull-down on GPIO 4. .br $ pigs pud 4 u # Set pull-up on GPIO 4. .br $ pigs pud 4 o # No pull-up/down on GPIO 4. .br .EE .br .IP "\fBR/READ g\fP - Read GPIO level" .IP "" 4 .br This reads the current level of GPIO \fBg\fP. .br Upon success the current level is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs r 17 # Get level of GPIO 17. .br 0 .br .br $ pigs r 4 # Get level of GPIO 4. .br 1 .br .EE .br .IP "\fBS/SERVO u v\fP - Set GPIO servo pulsewidth" .IP "" 4 .br This command starts servo pulses of \fBv\fP microseconds on GPIO \fBu\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br The servo pulsewidth may be 0 (off), 500 (most anti-clockwise) to 2500 (most clockwise). .br The range supported by servos varies and should probably be determined by experiment. Generally values between 1000-2000 should be safe. A value of 1500 should always be safe and represents the mid-point of rotation. .br You can DAMAGE a servo if you command it to move beyond its limits. .br \fBExample\fP .br .EX $ pigs SERVO 17 1500 .br .EE .br This example causes an on pulse of 1500 microseconds duration to be transmitted on GPIO 17 at a rate of 50 times per second. .br This will command a servo connected to GPIO 17 to rotate to its mid-point. .br \fBExample\fP .br .EX pigs s 17 0 # Switch servo pulses off. .br .EE .br .IP "\fBSERC h\fP - Close serial handle" .IP "" 4 .br This command closes a serial handle \fBh\fP previously opened with \fBSERO\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs serc 0 # First close okay. .br .br $ pigs serc 0 # Second close gives error. .br -25 .br ERROR: unknown handle .br .EE .br .IP "\fBSERDA h\fP - Check for serial data ready to read" .IP "" 4 .br This command returns the number of bytes of data available to be read from the serial device associated with handle \fBh\fP. .br Upon success the count of bytes available to be read is returned (which may be 0). On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs serda 0 .br 0 .br .EE .br .IP "\fBSERO dev b sef\fP - Open serial device dev at baud b with flags" .IP "" 4 .br This command opens the serial \fBdev\fP at \fBb\fP bits per second. .br No flags are currently defined. \fBsef\fP should be set to zero. .br Upon success a handle (>=0) is returned. On error a negative status code will be returned. .br The device name must start with /dev/tty or /dev/serial. .br .br The baud rate must be one of 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, or 230400. .br \fBExample\fP .br .EX $ pigs sero /dev/ttyAMA0 9600 0 .br 0 .br .br $ pigs sero /dev/tty1 38400 0 .br 1 .br .EE .br .IP "\fBSERR h num\fP - Read bytes from serial handle" .IP "" 4 .br This command returns up to \fBnum\fP bytes of data read from the serial device associated with handle \fBh\fP. .br Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs serr 0 10 .br 5 48 49 128 144 255 .br .br $ pigs serr 0 10 .br 0 .br .EE .br .IP "\fBSERRB \fP - Read byte from serial handle" .IP "" 4 .br This command returns a byte of data read from the serial device associated with handle \fBh\fP. .br Upon success a number between 0 and 255 is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs serrb 0 .br 23 .br $ pigs serrb 0 .br 45 .br .EE .br .IP "\fBSERW h bvs\fP - Write bytes to serial handle" .IP "" 4 .br This command writes bytes \fBbvs\fP to the serial device associated with handle \fBh\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs serw 0 23 45 67 89 .br .EE .br .IP "\fBSERWB h bv\fP - Write byte to serial handle" .IP "" 4 .br This command writes a single byte \fBbv\fP to the serial device associated with handle \fBh\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs serwb 0 23 .br $ pigs serwb 0 0xf0 .br .EE .br .IP "\fBSHELL name str\fP - Execute a shell command" .IP "" 4 .br This command uses the system call to execute a shell script \fBname\fP with the given string \fBstr\fP as its parameter. .br The exit status of the system call is returned if OK, otherwise PI_BAD_SHELL_STATUS. .br \fBname\fP must exist in /opt/pigpio/cgi and must be executable. .br The returned exit status is normally 256 times that set by the shell script exit function. If the script can't be found 32512 will be returned. .br The following table gives some example returned statuses. .br .EX Script exit status Returned system call status 1 256 5 1280 10 2560 200 51200 script not found 32512 .EE .br \fBExample\fP .br .EX # pass two parameters, hello and world .br $ pigs shell scr1 hello world .br 256 .br .br # pass three parameters, hello, string with spaces, and world .br $ pigs shell scr1 "hello 'string with spaces' world" .br 256 .br .br # pass one parameter, hello string with spaces world .br $ pigs shell scr1 "\"hello string with spaces world\"" .br 256 .br .br # non-existent script .br $ pigs shell scr78 par1 .br 32512 .br .EE .br .IP "\fBSLR u num\fP - Read bit bang serial data from GPIO" .IP "" 4 .br This command returns up to \fBnum\fP bytes of bit bang serial data read from GPIO \fBu\fP. .br Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. .br The GPIO \fBu\fP should have been initialised with the \fBSLRO\fP command. .br The bytes returned for each character depend upon the number of data bits \fBdb\fP specified in the \fBSLRO\fP command. .br For \fBdb\fP 1-8 there will be one byte per character. .br For \fBdb\fP 9-16 there will be two bytes per character. .br For \fBdb\fP 17-32 there will be four bytes per character. .br \fBExample\fP .br .EX $ pigs slr 15 20 .br 6 1 0 23 45 89 0 .br .EE .br .IP "\fBSLRC u\fP - Close GPIO for bit bang serial data" .IP "" 4 .br This command closes GPIO \fBu\fP for reading bit bang serial data. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs slrc 23 .br .br $ pigs slrc 23 .br -38 .br ERROR: no serial read in progress on GPIO .br .EE .br .IP "\fBSLRI u v\fP - Sets bit bang serial data logic levels" .IP "" 4 .br This command sets the logic level for reading bit bang serial data on GPIO \fBu\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br The invert parameter \fBv\fP is 1 for inverted signal, 0 for normal. .br \fBExample\fP .br .EX $ pigs slri 17 1 # invert logic on GPIO 17 .br .br $ pigs slri 23 0 # use normal logic on GPIO 23 .br .EE .br .IP "\fBSLRO u b db\fP - Open GPIO for bit bang serial data" .IP "" 4 .br This command opens GPIO \fBu\fP for reading bit bang serial data at \fBb\fP baud and \fBdb\fP data bits. .br Upon success nothing is returned. On error a negative status code will be returned. .br The baud rate may be between 50 and 250000 bits per second. .br The received data is held in a cyclic buffer. .br It is the user's responsibility to read the data (with \fBSLR\fP) in a timely fashion. .br \fBExample\fP .br .EX $ pigs slro 23 19200 8 .br .br $ pigs slro 23 19200 8 .br -50 .br ERROR: GPIO already in use .br .EE .br .IP "\fBSPIC h\fP - SPI close handle" .IP "" 4 .br This command closes the SPI handle \fBh\fP returned by a prior call to \fBSPIO\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs spic 1 .br .br $ pigs spic 1 .br -25 .br ERROR: unknown handle .br .EE .br .IP "\fBSPIO c b spf\fP - SPI open channel at baud b with flags" .IP "" 4 .br This command returns a handle to a SPI device on channel \fBc\fP. .br Data will be transferred at \fBb\fP bits per second. The flags \fBspf\fP may be used to modify the default behaviour of 4-wire operation, mode 0, active low chip select. .br Speeds between 32kbps and 125Mbps are allowed. Speeds above 30Mbps are unlikely to work. .br The Pi has two SPI peripherals: main and auxiliary. .br The main SPI has two chip selects (channels), the auxiliary has three. .br The auxiliary SPI is available on all models but the A and B. .br The GPIO used are given in the following table. .br .EX MISO MOSI SCLK CE0 CE1 CE2 Main SPI 9 10 11 8 7 - Aux SPI 19 20 21 18 17 16 .EE .br The flags consists of the least significant 22 bits. .br .EX 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 .br b b b b b b R T n n n n W A u2 u1 u0 p2 p1 p0 m m .br .EE .br mm defines the SPI mode. .br Warning: modes 1 and 3 do not appear to work on the auxiliary SPI. .br .EX Mode POL PHA .br 0 0 0 .br 1 0 1 .br 2 1 0 .br 3 1 1 .br .EE .br px is 0 if CEx is active low (default) and 1 for active high. .br ux is 0 if the CEx GPIO is reserved for SPI (default) and 1 otherwise. .br A is 0 for the main SPI, 1 for the auxiliary SPI. .br W is 0 if the device is not 3-wire, 1 if the device is 3-wire. Main SPI only. .br nnnn defines the number of bytes (0-15) to write before switching the MOSI line to MISO to read data. This field is ignored if W is not set. Main SPI only. .br T is 1 if the least significant bit is transmitted on MOSI first, the default (0) shifts the most significant bit out first. Auxiliary SPI only. .br R is 1 if the least significant bit is received on MISO first, the default (0) receives the most significant bit first. Auxiliary SPI only. .br bbbbbb defines the word size in bits (0-32). The default (0) sets 8 bits per word. Auxiliary SPI only. .br The \fBSPIR\fP, \fBSPIW\fP, and \fBSPIX\fP commands transfer data packed into 1, 2, or 4 bytes according to the word size in bits. .br For bits 1-8 there will be one byte per character. .br For bits 9-16 there will be two bytes per character. .br For bits 17-32 there will be four bytes per character. .br Multi-byte transfers are made in least significant byte first order. .br E.g. to transfer 32 11-bit words 64 bytes need to be sent. .br E.g. to transfer the 14 bit value 0x1ABC send the bytes 0xBC followed by 0x1A. .br The other bits in flags should be set to zero. .br Upon success a handle (>=0) is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs spio 0 100000 3 # Open channel 0 at 100kbps in mode 3. .br 0 .br .br $ pigs spio 0 32000 256 # Open channel 0 of auxiliary spi at 32kbps. .br 1 .br .EE .br .IP "\fBSPIR h num\fP - SPI read bytes from handle" .IP "" 4 .br This command returns \fBnum\fP bytes read from the SPI device associated with handle \fBh\fP. .br Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs spir 0 10 # Read 10 bytes from the SPI device. .br 10 0 0 0 0 0 0 0 0 0 0 .br .EE .br .IP "\fBSPIW h bvs\fP - SPI write bytes to handle" .IP "" 4 .br This command writes bytes \fBbvs\fP to the SPI device associated with handle \fBh\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs spiw 0 0x22 0x33 0xcc 0xff .br .EE .br .IP "\fBSPIX h bvs\fP - SPI transfer bytes to handle" .IP "" 4 .br This command writes bytes \fBbvs\fP to the SPI device associated with handle \fBh\fP. It returns the same number of bytes read from the device. .br Upon success the count of returned bytes followed by the bytes themselves is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs spix 0 0x22 0x33 0xcc 0xff .br 4 0 0 0 0 .br .EE .br .IP "\fBT/TICK \fP - Get current tick" .IP "" 4 .br This command returns the current system tick. .br Tick is the number of microseconds since system boot. .br As tick is an unsigned 32 bit quantity it wraps around after 2^32 microseconds, which is approximately 1 hour 12 minutes. .br \fBExample\fP .br .EX $ pigs t mils 1000 t .br 3691823946 .br 3692833987 .br .EE .br .IP "\fBTRIG u pl L\fP - Send a trigger pulse" .IP "" 4 .br This command sends a trigger pulse of \fBpl\fP microseconds at level \fBL\fP to GPIO \fBu\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br The GPIO is set to not level at the end of the pulse. .br \fBExample\fP .br .EX $ pigs trig 4 10 1 .br .br $ pigs trig 4 51 1 .br -46 .br ERROR: trigger pulse > 50 microseconds .br .EE .br .IP "\fBW/WRITE g L\fP - Write GPIO level" .IP "" 4 .br This command sets GPIO \fBg\fP to level \fBL\fP. The level may be 0 (low, off, clear) or 1 (high, on, set). .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs w 23 0 .br $ pigs w 23 1 .br .br $ pigs w 23 2 .br -5 .br ERROR: level not 0-1 .br .EE .br .IP "\fBWDOG u v\fP - Set GPIO watchdog" .IP "" 4 .br This command sets a watchdog of \fBv\fP milliseconds on GPIO \fBu\fP. .br Upon success nothing is returned. On error a negative status code will be returned. .br The watchdog is nominally in milliseconds. .br One watchdog may be registered per GPIO. .br The watchdog may be cancelled by setting timeout to 0. .br Once a watchdog has been started monitors of the GPIO will be triggered every timeout interval after the last GPIO activity. The watchdog expiry will be indicated by a special TIMEOUT value. .br \fBExample\fP .br .EX $ pigs wdog 23 90000 .br -15 .br ERROR: timeout not 0-60000 .br .br $ pigs wdog 23 9000 .br .EE .br This example causes a report to be written to any notification pipes listening on GPIO 23 whenever GPIO 23 changes state or approximately every 9000 ms. .br .IP "\fBWVAG trips\fP - Add generic pulses to waveform" .IP "" 4 .br This command adds 1 one or more triplets \fBtrips\fP of GPIO on, GPIO off, delay to the existing waveform (if any). .br Upon success the total number of pulses in the waveform so far is returned. On error a negative status code will be returned. .br The triplets will be added at the start of the existing waveform. If they are to start offset from the start then the first triplet should consist solely of a delay i.e. 0 0 offset. .br \fBExample\fP .br .EX $ pigs wvag 0x10 0x80 1000 0x80 0x10 9000 .br 2 .br .br $ pigs wvag 0 0 10000 0x10 0x80 1000 0x80 0x10 9000 .br 4 .br .EE .br .IP "\fBWVAS u b db sb o bvs\fP - Add serial data to waveform" .IP "" 4 .br This command adds a waveform representing serial data \fBbvs\fP to GPIO \fBu\fP at \fBb\fP baud to the existing waveform (if any). The serial data starts \fBo\fP microseconds from the start of the waveform. .br Upon success the total number of pulses in the waveform so far is returned. On error a negative status code will be returned. .br The serial data is formatted as one start bit, \fBdb\fP data bits, and \fBsb\fP/2 stop bits. .br The baud rate may be between 50 and 1000000 bits per second. .br It is legal to add serial data streams with different baud rates to the same waveform. .br The bytes required for each character depend upon \fBdb\fP. .br For \fBdb\fP 1-8 there will be one byte per character. .br For \fBdb\fP 9-16 there will be two bytes per character. .br For \fBdb\fP 17-32 there will be four bytes per character. .br \fBExample\fP .br .EX $ pigs wvas 4 9600 8 2 0 0x30 0x31 0x32 0x33 .br 23 .br .br $ pigs wvas 7 38400 8 2 0 0x41 0x42 .br 35 .br .EE .br .IP "\fBWVTAT \fP - Returns the current transmitting waveform" .IP "" 4 .br This command returns the id of the waveform currently being transmitted. Chained waves are not supported. .br Returns the waveform id or one of the following special values: .br 9998 - transmitted wave not found .br 9999 - no wave being transmitted .br \fBExample\fP .br .EX $ pigs wvtat .br 9999 .br .EE .br .IP "\fBWVBSY \fP - Check if waveform is being transmitted" .IP "" 4 .br This command checks to see if a waveform is currently being transmitted. .br Returns 1 if a waveform is currently being transmitted, otherwise 0. .br \fBExample\fP .br .EX $ pigs wvbsy .br 0 .br .EE .br .IP "\fBWVCHA bvs\fP - Transmits a chain of waveforms" .IP "" 4 .br This command transmits a chain of waveforms. .br NOTE: Any hardware PWM started by \fBHP\fP will be cancelled. .br The waves to be transmitted are specified by the contents of \fBbvs\fP which contains an ordered list of wave_ids and optional command codes and related data. .br Upon success 0 is returned. On error a negative status code will be returned. .br Each wave is transmitted in the order specified. A wave may occur multiple times per chain. .br A blocks of waves may be transmitted multiple times by using the loop commands. The block is bracketed by loop start and end commands. Loops may be nested. .br Delays between waves may be added with the delay command. .br The following command codes are supported: .br .EX Name Cmd & Data Meaning Loop Start 255 0 Identify start of a wave block Loop Repeat 255 1 x y loop x + y*256 times Delay 255 2 x y delay x + y*256 microseconds Loop Forever 255 3 loop forever .EE .br If present Loop Forever must be the last entry in the chain. .br The code is currently dimensioned to support a chain with roughly 600 entries and 20 loop counters. .br \fBExample\fP .br .EX #!/bin/bash .br .br GPIO=4 .br WAVES=5 .br .br pigs m $GPIO w .br .br for ((i=0; i<$WAVES; i++)) .br do .br pigs wvag $((1<=0) is returned. On error a negative status code will be returned. .br The data provided by the \fBWVAG\fP and \fBWVAS\fP commands is consumed by this command. .br As many waveforms may be created as there is space available. The wave id is passed to \fBWVTX\fP or \fBWVTXR\fP to specify the waveform to transmit. .br Normal usage would be .br Step 1. \fBWVCLR\fP to clear all waveforms and added data. .br Step 2. \fBWVAG\fP/\fBWVAS\fP calls to supply the waveform data. .br Step 3. \fBWVCRE\fP to create the waveform and get a unique id. .br Repeat steps 2 and 3 as needed. .br Step 4. \fBWVTX\fP or \fBWVTXR\fP with the id of the waveform to transmit. .br A waveform comprises of one or more pulses. .br A pulse specifies .br 1) the GPIO to be switched on at the start of the pulse. .br 2) the GPIO to be switched off at the start of the pulse. .br 3) the delay in microseconds before the next pulse. .br Any or all the fields can be zero. It doesn't make any sense to set all the fields to zero (the pulse will be ignored). .br When a waveform is started each pulse is executed in order with the specified delay between the pulse and the next. .br \fBExample\fP .br .EX $ pigs wvas 4 9600 0 23 45 67 89 90 .br 37 .br $ pigs wvcre .br 0 .br .br $ pigs wvcre .br -69 .br ERROR: attempt to create an empty waveform .br .EE .br .IP "\fBWVCAP percent\fP - Create a waveform of fixed size" .IP "" 4 .br Create a waveform of fixed size. Similar to \fBWVCRE\fP, this command creates a waveform but pads the consumed resources to a fixed size, specified as a \fBpercent\fP of the total resources. Padded waves of equal size can be re-cycled efficiently allowing newly created waves to re-use the resources of deleted waves of the same dimension. .br Upon success a wave id (>=0) is returned. On error a negative status code will be returned. .br The data provided by the \fBWVAG\fP and \fBWVAS\fP commands are consumed by this command. .br As many waveforms may be created as there is space available. The wave id is passed to \fBWVTX\fP or \fBWVTXR\fP to specify the waveform to transmit. .br Normal usage would be .br Step 1. \fBWVCLR\fP to clear all waveforms and added data. .br Step 2. \fBWVAG\fP/\fBWVAS\fP calls to supply the waveform data. .br Step 3. \fBWVCAP\fP to create a waveform of a uniform size. .br Step 4. \fBWVTX\fP or \fBWVTXR\fP with the id of the waveform to transmit. .br Repeat steps 2 - 4 as needed. .br Step 5. Any wave id can now be deleted and another wave of the same size can be created in its place. .br Example .br \fBExample\fP .br .EX # Create a wave that consumes 50% of the total resource: .br .br $ pigs wvag 16 0 5000000 0 16 5000000 .br 2 .br $ pigs wvcap 50 .br 0 .br $ pigs wvtx 0 .br 11918 .br .EE .br .IP "\fBWVDEL wid\fP - Delete selected waveform" .IP "" 4 .br This command deletes the waveform with id \fBwid\fP. .br The wave is flagged for deletion. The resources used by the wave will only be reused when either of the following apply. .br - all waves with higher numbered wave ids have been deleted or have been flagged for deletion. .br - a new wave is created which uses exactly the same resources as the current wave (see the C source for gpioWaveCreate for details). .br Upon success nothing is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs wvdel 0 .br .br $ pigs wvdel 0 .br -66 .br ERROR: non existent wave id .br .EE .br .IP "\fBWVHLT \fP - Stop waveform" .IP "" 4 .br This command aborts the transmission of the current waveform. .br Nothing is returned. .br This command is intended to stop a waveform started in the repeat mode. .br \fBExample\fP .br .EX $ pigs wvhlt .br .EE .br .IP "\fBWVNEW \fP - Initialise a new waveform" .IP "" 4 .br This clears any existing waveform data ready for the creation of a new waveform. .br Nothing is returned. .br \fBExample\fP .br .EX $ pigs wvnew .br .EE .br .IP "\fBWVSC ws\fP - Get waveform DMA CB stats" .IP "" 4 .br The statistic requested by \fBws\fP is returned. .br \fBws\fP identifies the subcommand as follows. .br 0 Get Cbs .br 1 Get High Cbs .br 2 Get Max Cbs .br \fBExample\fP .br .EX $ pigs wvas 4 9600 0 23 45 67 89 90 .br 37 .br .br $ pigs wvsc 0 .br 74 .br $ pigs wvsc 1 .br 74 .br $ pigs wvsc 2 .br 25016 .br .EE .br .IP "\fBWVSM ws\fP - Get waveform time stats" .IP "" 4 .br The statistic requested by \fBws\fP is returned. .br \fBws\fP identifies the subcommand as follows. .br 0 Get Micros .br 1 Get High Micros .br 2 Get Max Micros .br \fBExample\fP .br .EX $ pigs wvsm 0 .br 5314 .br $ pigs wvsm 1 .br 5314 .br $ pigs wvsm 2 .br 1800000000 .br .EE .br .IP "\fBWVSP ws\fP - Get waveform pulse stats" .IP "" 4 .br The statistic requested by \fBws\fP is returned. .br \fBws\fP identifies the subcommand as follows. .br 0 Get Pulses .br 1 Get High Pulses .br 2 Get Max Pulses .br \fBExample\fP .br .EX $ pigs wvsp 0 .br 37 .br $ pigs wvsp 1 .br 37 .br $ pigs wvsp 2 .br 12000 .br .EE .br .IP "\fBWVTX wid\fP - Transmits waveform once" .IP "" 4 .br This command transmits the waveform with id \fBwid\fP once. .br NOTE: Any hardware PWM started by \fBHP\fP will be cancelled. .br Upon success the number of DMA control blocks in the waveform is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs wvtx 1 .br 75 .br .br $ pigs wvtx 2 .br -66 .br ERROR: non existent wave id .br .EE .br .IP "\fBWVTXM wid wmde\fP - Transmits waveform using mode" .IP "" 4 .br This command transmits the waveform with id \fBwid\fP using mode \fBwmde\fP. .br The mode may be send once (0), send repeatedly (1), send once but first sync with previous wave (2), or send repeatedly but first sync with previous wave (3). .br WARNING: bad things may happen if you delete the previous waveform before it has been synced to the new waveform. .br NOTE: Any hardware PWM started by \fBHP\fP will be cancelled. .br Upon success the number of DMA control blocks in the waveform is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs wvtxm 1 3 .br 75 .br .br $ pigs wvtxm 2 0 .br -66 .br ERROR: non existent wave id .br .EE .br .IP "\fBWVTXR wid\fP - Transmits waveform repeatedly" .IP "" 4 .br This command transmits the waveform with id \fBwid\fP repeatedly. .br NOTE: Any hardware PWM started by \fBHP\fP will be cancelled. .br Upon success the number of DMA control blocks in the waveform is returned. On error a negative status code will be returned. .br \fBExample\fP .br .EX $ pigs wvtxr 1 .br 75 .br .br $ pigs wvtxr 2 .br -66 .br ERROR: non existent wave id .br .EE .br .SH PARAMETERS .br .IP "\fBactv\fP - 0-1000000" 0 .br The number of microseconds level changes are reported for once a noise filter has been triggered (by \fBstdy\fP microseconds of a stable level). .br .IP "\fBb\fP - baud" 0 The command expects the baud rate in bits per second for the transmission of serial data (I2C/SPI/serial link, waves). .br .IP "\fBbctl\fP - BSC control word" 0 The command expects a BSC control word, see \fBBSCX\fP. .br .IP "\fBbit\fP - bit value (0-1)" 0 The command expects 0 or 1. .br .IP "\fBbits\fP - a bit mask" 0 A mask is used to select one or more GPIO. A GPIO is selected if bit (1<=0)" 0 The command expects a handle. .br A handle is a number referencing an object opened by one of \fBFO\fP, \fBI2CO\fP, \fBNO\fP, \fBSERO\fP, \fBSPIO\fP. .br .IP "\fBib\fP - I2C bus (>=0)" 0 The command expects an I2C bus number. .br .IP "\fBid\fP - I2C device (0-0x7F)" 0 The command expects the address of an I2C device. .br .IP "\fBif\fP - I2C flags (0)" 0 The command expects an I2C flags value. No flags are currently defined. .br .IP "\fBL\fP - level (0-1)" 0 The command expects a GPIO level. .br .IP "\fBm\fP - mode (RW540123)" 0 The command expects a mode character. .br Each GPIO can be configured to be in one of 8 different modes. The modes are named Input, Output, ALT0, ALT1, ALT2, ALT3, ALT4, and ALT5. .br To set the mode use the code for the mode. .br The value is returned by the mode get command. .br .EX Mode Input Output ALT0 ALT1 ALT2 ALT3 ALT4 ALT5 Code R W 0 1 2 3 4 5 Value 0 1 4 5 6 7 3 2 .EE .br .IP "\fBmiso\fP - GPIO (0-31)" 0 The GPIO used for the MISO signal when bit banging SPI. .br .IP "\fBmode\fP - file open mode" 0 One of the following values. .br .EX Value Meaning READ 1 open file for reading WRITE 2 open file for writing RW 3 open file for reading and writing .EE .br The following values can be or'd into the mode. .br .EX Value Meaning APPEND 4 All writes append data to the end of the file CREATE 8 The file is created if it doesn't exist TRUNC 16 The file is truncated .EE .br .IP "\fBmosi\fP - GPIO (0-31)" 0 The GPIO used for the MOSI signal when bit banging SPI. .br .IP "\fBname\fP - the name of a script" 0 Only alphanumeric characters, '-' and '_' are allowed in the name. .br .IP "\fBnum\fP - maximum number of bytes to return (1-)" 0 The command expects the maximum number of bytes to return. .br For the I2C and SPI commands the requested number of bytes will always be returned. .br For the serial and file commands the smaller of the number of bytes available to be read (which may be zero) and \fBnum\fP bytes will be returned. .br .IP "\fBo\fP - offset (>=0)" 0 Serial data is stored offset microseconds from the start of the waveform. .br .IP "\fBp\fP - PUD (ODU)" 0 The command expects a PUD character. .br Each GPIO can be configured to use or not use an internal pull up or pull down resistor. This is useful to provide a default state for inputs. .br A pull up will default the input to 1 (high). .br A pull down will default the input to 0 (low). .br To set the pull up down state use the command character for the state. .br .EX Pull Up Down Off Pull Down Pull Up Command Character O D U .EE .br There is no mechanism to read the pull up down state. .br .IP "\fBpad\fP - 0-2" 0 A set of GPIO which share common drivers. .br .EX Pad GPIO 0 0-27 1 28-45 2 46-53 .EE .br .IP "\fBpadma\fP - 1-16" 0 The mA which may be drawn from each GPIO whilst still guaranteeing the high and low levels. .br .IP "\fBpars\fP - script parameters" 0 The command expects 0 to 10 numbers as parameters to be passed to the script. .br .IP "\fBpat\fP - a file name pattern" 0 A file path which may contain wildcards. To be accessible the path must match an entry in /opt/pigpio/access. .br .IP "\fBpdc\fP - hardware PWM dutycycle (0-1000000)" 0 The command expects a dutycycle. .br .IP "\fBpercent\fP - percent (1-100)" 0 The percent of wave resources to allocate to a wave. It can be useful to create waves of fixed sizes to prevent wave fragmentation (where there are plenty of resources but not a large enough contiguous space). .br .IP "\fBpf\fP - hardware PWM frequency (1-125M, 1-187.5M for the BCM2711)" 0 The command expects a frequency. .br .IP "\fBpl\fP - pulse length (1-100)" 0 The command expects a pulse length in microseconds. .br .IP "\fBr\fP - register (0-255)" 0 The command expects an I2C register number. .br .IP "\fBsb\fP - serial stop (half) bits (2-8)" 0 The command expects the number of stop (half) bits per serial character. .br .IP "\fBscl\fP - user GPIO (0-31)" 0 The command expects the number of the GPIO to be used for SCL when bit banging I2C. .br .IP "\fBsclk\fP - user GPIO (0-31)" 0 The GPIO used for the SCLK signal when bit banging SPI. .br .IP "\fBsda\fP - user GPIO (0-31)" 0 The command expects the number of the GPIO to be used for SDA when bit banging I2C. .br .IP "\fBsef\fP - serial flags (32 bits)" 0 The command expects a flag value. No serial flags are currently defined. .br .IP "\fBsid\fP - script id (>= 0)" 0 The command expects a script id as returned by a call to \fBPROC\fP. .br .IP "\fBspf\fP - SPI flags (32 bits)" 0 See \fBSPIO\fP and \fBBSPIO\fP. .br .IP "\fBstdy\fP - 0-300000" 0 .br The number of microseconds level changes must be stable for before reporting the level changed (\fBFG\fP) or triggering the active part of a noise filter (\fBFN\fP). .br .IP "\fBstr\fP - a string" 0 The command expects a string. .br .IP "\fBt\fP - a string" 0 The command expects a string. .br .IP "\fBtrips\fP - triplets" 0 The command expects 1 or more triplets of GPIO on, GPIO off, delay. .br E.g. 0x400000 0 100000 0 0x400000 900000 defines two pulses as follows .br .EX GPIO on GPIO off delay 0x400000 (GPIO 22) 0 (None) 100000 (1/10th s) 0 (None) 0x400000 (GPIO 22) 900000 (9/10th s) .EE .br .IP "\fBu\fP - user GPIO (0-31)" 0 The command expects the number of a user GPIO. .br A number of commands are restricted to GPIO in bank 1, in particular the PWM commands, the servo command, the watchdog command, and the notification command. .br It is your responsibility to ensure that the PWM and servo commands are only used on safe GPIO. .br See \fBg\fP .br .IP "\fBuvs\fP - values" 0 The command expects an arbitrary number of >=0 values (possibly none). Any after the first two must be <= 255. .br .IP "\fBv\fP - value" 0 The command expects a number. .br .IP "\fBwid\fP - wave id (>=0)" 0 The command expects a wave id. .br When a waveform is created it is given an id (0, 1, 2, ...). .br .IP "\fBwmde\fP - mode (0-3)" 0 The command expects a wave transmission mode. .br 0 = send once .br 1 = send repeatedly .br 2 = send once but first sync with previous wave .br 3 = send repeatedly but first sync with previous wave .br .br .IP "\fBws\fP - wave stats sucommand (0-2)" 0 The command expects a subcommand. .br 0 = current value. .br 1 = highest value so far. .br 2 = maximum possible value. .br .IP "\fBwv\fP - word value (0-65535)" 0 The command expects a word value. .br .SH SCRIPTS .br Scripts are programs to be stored and executed by the pigpio daemon. They are intended to mitigate any performance problems associated with the pigpio daemon server/client model. .br .SS Example .br A trivial example might be useful. Suppose you want to toggle a GPIO on and off as fast as possible. .br From the command line you could write .br .EX for ((i=0; i<1000;i++)); do pigs w 22 1 w 22 0; done .br .EE .br Timing that you will see it takes about 14 seconds, or roughly 70 toggles per second. .br Using the pigpio Python module you could use code such as .br .EX #!/usr/bin/env python .br .br import time .br .br import pigpio .br .br PIN=4 .br .br TOGGLE=10000 .br .br pi = pigpio.pi() # Connect to local Pi. .br .br s = time.time() .br .br for i in range(TOGGLE): .br pi.write(PIN, 1) .br pi.write(PIN, 0) .br .br e = time.time() .br .br print("pigpio did {} toggles per second".format(int(TOGGLE/(e-s)))) .br .br pi.stop() .br .EE .br Timing that shows a speed improvement to roughly 800 toggles per second. .br Now let's use a script. .br .EX pigs proc tag 999 w 22 1 w 22 0 dcr p0 jp 999 .br .EE .br Ignore the details for now. .br Let's time the script running. .br Again, ignore the details for now. .br .EX time (pigs procr 0 10000000; while a=$(pigs procp 0); [[ ${a::1} -eq 2 ]];\ .br do sleep 0.2; done) .br .EE .br The script takes roughly 12 seconds to complete, or 800,000 toggles per second. .br That is the advantage of a stored script. .br Some details. .br .EX pigs proc tag 999 w 22 1 w 22 0 dcr p0 jp 999 .br .EE .br proc introduces a script. Everything after proc is part of the script. .br tag 999 names the current position in the script. .br w 22 1 writes 1 to GPIO 22. .br w 22 0 writes 0 to GPIO 22. .br dcr p0 decrements parameter 0. .br jp 999 jumps to tag 999 if the result is positive. .br .EX time (pigs procr 0 10000000; while a=$(pigs procp 0); [[ ${a::1} -eq 2 ]];\ .br do sleep 0.2; done) .br .EE .br pigs procr 0 10000000 starts script 0 with parameter 0 of 10 million. .br The rest is bash apart from .br pigs procp 0 asks for the status and parameters of script 0. The status will be 2 while the script is running and 1 when it is complete. .br .SS Virtual machine .br A script runs within a virtual machine with .br a 32 bit accumulator A. .br a flags register F. .br a program counter PC. .br Each script has .br 10 parameters named 0 through 9. .br 150 variables named 0 through 149. .br 50 labels which are named by any unique number. .br .SS Commands .br Many pigpio commands may be used within a script. However some commands do not work within the script model as designed and are not permitted. .br The following commands are not permitted within a script: .br File - FL FO FR FW .br I2C - BI2CZ I2CPK I2CRD I2CRI I2CRK I2CWD I2CWI I2CWK I2CZ .br Misc - BSCX CF1 CF2 SHELL .br Script control - PARSE PROC PROCD PROCP PROCR PROCS PROCU .br Serial - SERO SERR SERW SLR .br SPI - BSPIO BSPIX SPIR SPIW SPIX .br Waves - WVAG WVAS WVCHA WVGO WVGOR .br The following commands are only permitted within a script: .br .EX Command Description Definition ADD x Add x to accumulator A+=x; F=A AND x And x with accumulator A&=x; F=A CALL L Call subroutine at tag L push(PC+1); PC=L CMP x Compare x with accumulator F=A-x DCR y Decrement register --*y; F=*y DCRA Decrement accumulator --A; F=A DIV x Divide x into accumulator A/=x; F=A EVTWT Wait for an event to occur A=wait(x); F=A HALT Halt Halt INR y Increment register ++*y; F=*y INRA Increment accumulator ++A; F=A JM L Jump if minus to tag L if (F<0) PC=L JMP L Jump to tag L PC=L JNZ L Jump if non-zero to tag L if (F) PC=L JP L Jump if positive to tag L if (F>=0) PC=L JZ L Jump if zero to tag L if (!F) PC=L LD y x Load register with x *y=x LDA x Load accumulator with x A=x MLT x Multiply x with accumulator A*=x; F=A MOD x Modulus x with accumulator A%=x; F=A OR x Or x with accumulator A|=x; F=A POP y Pop register y=pop() POPA Pop accumulator A=pop() PUSH y Push register push(y) PUSHA Push accumulator push(A) RET Return from subroutine PC=pop() RL y x Rotate left register x bits *y<<=x; F=*y RLA x Rotate left accumulator x bits A<<=x; F=A RR y x Rotate right register x bits *y>>=x; F=*y RRA x Rotate right accumulator x bits A>>=x; F=A STA y Store accumulator in register y=A SUB x Subtract x from accumulator A-=x; F=A SYS str Run external script (/opt/pigpio/cgi/str) system(str); F=A TAG L Label the current script position N/A WAIT x Wait for a GPIO in x to change state A=wait(x); F=A X y1 y2 Exchange contents of registers y1 and y2 t=*y1;*y1=*y2;*y2=t XA y Exchange contents of accumulator and register t=A;A=*y;*y=t XOR x Xor x with accumulator A^=x; F=A .EE .br x may be a constant, a parameter (p0-p9), or a variable (v0-v149). .br y may be a parameter (p0-p9), or a variable (v0-v149). If p or v isn't specified y is assumed to be a variable. .br The EVTWT command parameter is a bit-mask with 1 set for events of interest. .br The WAIT command parameter is a bit-mask with 1 set for GPIO of interest. .br The SYS script receives two unsigned parameters: the accumulator A and the current GPIO levels. .br .SH SEE ALSO pigpiod(1), pig2vcd(1), pigpio(3), pigpiod_if(3), pigpiod_if2(3) .SH AUTHOR joan@abyz.me.uk pigpio-78/pigs.c000066400000000000000000000222311373465704200137220ustar00rootroot00000000000000/* This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to */ /* This version is for pigpio version 69+ */ #include #include #include #include #include #include #include #include #include #include #include "pigpio.h" #include "command.h" #include "pigs.h" /* This program provides a socket interface to some of the commands available from pigpio. */ char command_buf[CMD_MAX_EXTENSION]; char response_buf[CMD_MAX_EXTENSION]; int printFlags = 0; int status = PIGS_OK; #define SOCKET_OPEN_FAILED -1 #define PRINT_HEX 1 #define PRINT_ASCII 2 void report(int err, char *fmt, ...) { char buf[128]; va_list ap; if (err > status) status = err; va_start(ap, fmt); vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); fprintf(stderr, "%s\n", buf); fflush(stderr); } static int initOpts(int argc, char *argv[]) { int opt, args; opterr = 0; args = 1; while ((opt = getopt(argc, argv, "ax")) != -1) { switch (opt) { case 'a': printFlags |= PRINT_ASCII; args++; break; case 'x': printFlags |= PRINT_HEX; args++; break; default: args++; report(PIGS_OPTION_ERR, "ERROR: bad option %c", optopt); } } return args; } static int openSocket(void) { int sock, err; struct addrinfo hints, *res, *rp; const char *addrStr, *portStr; portStr = getenv(PI_ENVPORT); if (!portStr) portStr = PI_DEFAULT_SOCKET_PORT_STR; addrStr = getenv(PI_ENVADDR); if (!addrStr) addrStr = PI_DEFAULT_SOCKET_ADDR_STR; memset (&hints, 0, sizeof (hints)); hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_flags |= AI_CANONNAME; err = getaddrinfo(addrStr, portStr, &hints, &res); if (err) return SOCKET_OPEN_FAILED; for (rp=res; rp!=NULL; rp=rp->ai_next) { sock = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); if (sock == -1) continue; if (connect(sock, rp->ai_addr, rp->ai_addrlen) != -1) break; } freeaddrinfo(res); if (rp == NULL) return SOCKET_OPEN_FAILED; return sock; } void print_result(int sock, int rv, cmdCmd_t cmd) { int i, r, ch; uint32_t *p; r = cmd.res; switch (rv) { case 0: case 1: if (r < 0) { printf("%d\n", r); report(PIGS_SCRIPT_ERR, "ERROR: %s", cmdErrStr(r)); } break; case 2: printf("%d\n", r); if (r < 0) report(PIGS_SCRIPT_ERR, "ERROR: %s", cmdErrStr(r)); break; case 3: printf("%08X\n", cmd.res); break; case 4: printf("%u\n", cmd.res); break; case 5: printf("%s", cmdUsage); break; case 6: /* BI2CZ CF2 FL FR I2CPK I2CRD I2CRI I2CRK I2CZ SERR SLR SPIX SPIR */ printf("%d", r); if (r < 0) report(PIGS_SCRIPT_ERR, "ERROR: %s", cmdErrStr(r)); if (r > 0) { if (printFlags == PRINT_ASCII) printf(" "); for (i=0; i 4) { if (printFlags == PRINT_ASCII) printf(" "); for (i=4; i 0) { recv(sock, response_buf, res, MSG_WAITALL); response_buf[res] = 0; } break; } } int main(int argc , char *argv[]) { int sock, command; int args, idx, i, pp, l, len; cmdCmd_t cmd; uintptr_t p[CMD_P_ARR]; cmdCtlParse_t ctl; cmdScript_t s; char v[CMD_MAX_EXTENSION]; sock = openSocket(); args = initOpts(argc, argv); command_buf[0] = 0; l = 0; pp = 0; for (i=args; i= 0) && (ctl.eaten < len)) { if ((idx=cmdParse(command_buf, p, CMD_MAX_EXTENSION, v, &ctl)) >= 0) { command = p[0]; if (command < PI_CMD_SCRIPT) { if (command == PI_CMD_HELP) { printf("%s", cmdUsage); } else if (command == PI_CMD_PARSE) { cmdParseScript(v, &s, 1); if (s.par) free (s.par); } else { cmd.cmd = command; cmd.p1 = p[1]; cmd.p2 = p[2]; cmd.p3 = p[3]; if (sock != SOCKET_OPEN_FAILED) { if (send(sock, &cmd, sizeof(cmdCmd_t), 0) == sizeof(cmdCmd_t)) { if (p[3]) send(sock, v, p[3], 0); /* send extensions */ if (recv(sock, &cmd, sizeof(cmdCmd_t), MSG_WAITALL) == sizeof(cmdCmd_t)) { get_extensions(sock, command, cmd.res); print_result(sock, cmdInfo[idx].rv, cmd); } else report(PIGS_CONNECT_ERR, "socket receive failed"); } else report(PIGS_CONNECT_ERR, "socket send failed"); } else report(PIGS_CONNECT_ERR, "socket connect failed"); } } else report(PIGS_SCRIPT_ERR, "%s only allowed within a script", cmdInfo[idx].name); } else { if (idx == CMD_UNKNOWN_CMD) report(PIGS_SCRIPT_ERR, "%s? unknown command, pigs h for help", cmdStr()); else report(PIGS_SCRIPT_ERR, "%s: bad parameter, pigs h for help", cmdStr()); } } if (sock >= 0) close(sock); return status; } pigpio-78/pigs.h000066400000000000000000000026141373465704200137320ustar00rootroot00000000000000/* This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to */ /* This version is for pigpio version 67+ */ #ifndef PIGS_H #define PIGS_H #define PIGS_OK 0 #define PIGS_CONNECT_ERR 255 #define PIGS_OPTION_ERR 254 #define PIGS_SCRIPT_ERR 253 #endif pigpio-78/setup.py000066400000000000000000000012761373465704200143340ustar00rootroot00000000000000#!/usr/bin/env python from distutils.core import setup setup(name='pigpio', version='1.78', author='joan', author_email='joan@abyz.me.uk', maintainer='joan', maintainer_email='joan@abyz.me.uk', url='http://abyz.me.uk/rpi/pigpio/python.html', description='Raspberry Pi GPIO module', long_description='Raspberry Pi Python module to access the pigpio daemon', download_url='http://abyz.me.uk/rpi/pigpio/pigpio.zip', license='unlicense.org', py_modules=['pigpio'], keywords=['raspberrypi', 'gpio',], classifiers=[ "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", ] ) pigpio-78/util/000077500000000000000000000000001373465704200135715ustar00rootroot00000000000000pigpio-78/util/Findpigpio.cmake000066400000000000000000000020651373465704200166660ustar00rootroot00000000000000################################################################################ ### Find the pigpio shared libraries. ################################################################################ # Find the path to the pigpio includes. find_path(pigpio_INCLUDE_DIR NAMES pigpio.h pigpiod_if.h pigpiod_if2.h HINTS /usr/local/include) # Find the pigpio libraries. find_library(pigpio_LIBRARY NAMES libpigpio.so HINTS /usr/local/lib) find_library(pigpiod_if_LIBRARY NAMES libpigpiod_if.so HINTS /usr/local/lib) find_library(pigpiod_if2_LIBRARY NAMES libpigpiod_if2.so HINTS /usr/local/lib) # Set the pigpio variables to plural form to make them accessible for # the paramount cmake modules. set(pigpio_INCLUDE_DIRS ${pigpio_INCLUDE_DIR}) set(pigpio_INCLUDES ${pigpio_INCLUDE_DIR}) # Handle REQUIRED, QUIET, and version arguments # and set the _FOUND variable. include(FindPackageHandleStandardArgs) find_package_handle_standard_args(pigpio DEFAULT_MSG pigpio_INCLUDE_DIR pigpio_LIBRARY pigpiod_if_LIBRARY pigpiod_if2_LIBRARY) pigpio-78/util/pigpiod.service000066400000000000000000000002151373465704200166040ustar00rootroot00000000000000[Unit] Description=Pigpio daemon [Service] Type=forking PIDFile=pigpio.pid ExecStart=/usr/bin/pigpiod [Install] WantedBy=multi-user.target pigpio-78/util/readme.md000066400000000000000000000015711373465704200153540ustar00rootroot00000000000000This folder provides utility files for the pigpio library. ### pigpiod `pigpiod` is a script that allows to run pigpiod as a Linux service with root privileges. The advantage of running pigpiod as a service is that pigpiod can be automatically launched on system startup. To automatically start pigpiod as a service, do the following: + Copy `pigpiod` from this directory to `/etc/init.d/`. + Make it executable: ``` sudo chmod +x /etc/init.d/pigpiod ``` + Tell update-rc.d to automatically start the pigpiod service on system startup: ``` sudo update-rc.d pigpiod defaults ``` + Now, you can start, stop, and restart pigpiod using ``` sudo service pigpiod start sudo service pigpiod stop sudo service pigpiod restart ``` ### Findpigpio.cmake `Findpigpio.cmake` is a script used by CMake to find out where the pigpio header and library files are located. pigpio-78/x_pigpio.c000066400000000000000000000520741373465704200146060ustar00rootroot00000000000000/* gcc -Wall -pthread -o x_pigpio x_pigpio.c -lpigpio sudo ./x_pigpio *** WARNING ************************************************ * * * All the tests make extensive use of gpio 25 (pin 22). * * Ensure that either nothing or just a LED is connected to * * gpio 25 before running any of the tests. * * * * Some tests are statistical in nature and so may on * * occasion fail. Repeated failures on the same test or * * many failures in a group of tests indicate a problem. * ************************************************************ */ #include #include #include #include #include #include #include #include #include "pigpio.h" #define USERDATA 18249013 #define GPIO 25 void CHECK(int t, int st, int got, int expect, int pc, char *desc) { if ((got >= (((1E2-pc)*expect)/1E2)) && (got <= (((1E2+pc)*expect)/1E2))) { printf("TEST %2d.%-2d PASS (%s: %d)\n", t, st, desc, expect); } else { fprintf(stderr, "TEST %2d.%-2d FAILED got %d (%s: %d)\n", t, st, got, desc, expect); } } void t0() { printf("\nTesting pigpio C I/F\n"); printf("pigpio version %d.\n", gpioVersion()); printf("Hardware revision %d.\n", gpioHardwareRevision()); } void t1() { int v; printf("Mode/PUD/read/write tests.\n"); gpioSetMode(GPIO, PI_INPUT); v = gpioGetMode(GPIO); CHECK(1, 1, v, 0, 0, "set mode, get mode"); gpioSetPullUpDown(GPIO, PI_PUD_UP); gpioDelay(1); /* 1 micro delay to let GPIO reach level reliably */ v = gpioRead(GPIO); CHECK(1, 2, v, 1, 0, "set pull up down, read"); gpioSetPullUpDown(GPIO, PI_PUD_DOWN); gpioDelay(1); /* 1 micro delay to let GPIO reach level reliably */ v = gpioRead(GPIO); CHECK(1, 3, v, 0, 0, "set pull up down, read"); gpioWrite(GPIO, PI_LOW); v = gpioGetMode(GPIO); CHECK(1, 4, v, 1, 0, "write, get mode"); v = gpioRead(GPIO); CHECK(1, 5, v, 0, 0, "read"); gpioWrite(GPIO, PI_HIGH); gpioDelay(1); /* 1 micro delay to let GPIO reach level reliably */ v = gpioRead(GPIO); CHECK(1, 6, v, 1, 0, "write, read"); } int t2_count; void t2cb(int gpio, int level, uint32_t tick) { t2_count++; } void t2() { int dc, f, r, rr, oc; printf("PWM dutycycle/range/frequency tests.\n"); gpioSetPWMrange(GPIO, 255); gpioSetPWMfrequency(GPIO, 0); f = gpioGetPWMfrequency(GPIO); CHECK(2, 1, f, 10, 0, "set PWM range, set/get PWM frequency"); t2_count=0; gpioSetAlertFunc(GPIO, t2cb); gpioPWM(GPIO, 0); dc = gpioGetPWMdutycycle(GPIO); CHECK(2, 2, dc, 0, 0, "get PWM dutycycle"); time_sleep(0.5); /* allow old notifications to flush */ oc = t2_count; time_sleep(2); f = t2_count - oc; CHECK(2, 3, f, 0, 0, "set PWM dutycycle, callback"); gpioPWM(GPIO, 128); dc = gpioGetPWMdutycycle(GPIO); CHECK(2, 4, dc, 128, 0, "get PWM dutycycle"); oc = t2_count; time_sleep(2); f = t2_count - oc; CHECK(2, 5, f, 40, 5, "set PWM dutycycle, callback"); gpioSetPWMfrequency(GPIO, 100); f = gpioGetPWMfrequency(GPIO); CHECK(2, 6, f, 100, 0, "set/get PWM frequency"); oc = t2_count; time_sleep(2); f = t2_count - oc; CHECK(2, 7, f, 400, 1, "callback"); gpioSetPWMfrequency(GPIO, 1000); f = gpioGetPWMfrequency(GPIO); CHECK(2, 8, f, 1000, 0, "set/get PWM frequency"); oc = t2_count; time_sleep(2); f = t2_count - oc; CHECK(2, 9, f, 4000, 1, "callback"); r = gpioGetPWMrange(GPIO); CHECK(2, 10, r, 255, 0, "get PWM range"); rr = gpioGetPWMrealRange(GPIO); CHECK(2, 11, rr, 200, 0, "get PWM real range"); gpioSetPWMrange(GPIO, 2000); r = gpioGetPWMrange(GPIO); CHECK(2, 12, r, 2000, 0, "set/get PWM range"); rr = gpioGetPWMrealRange(GPIO); CHECK(2, 13, rr, 200, 0, "get PWM real range"); gpioPWM(GPIO, 0); } int t3_val; int t3_reset; int t3_count; uint32_t t3_tick; float t3_on; float t3_off; void t3cbf(int gpio, int level, uint32_t tick, void *userdata) { static int unreported = 1; uint32_t td; int *val; val = userdata; if (*val != USERDATA) { if (unreported) { fprintf ( stderr, "unexpected userdata %d (expected %d)\n", *val, USERDATA ); } unreported = 0; } if (t3_reset) { t3_count = 0; t3_on = 0.0; t3_off = 0.0; t3_reset = 0; } else { td = tick - t3_tick; if (level == 0) t3_on += td; else t3_off += td; } t3_count ++; t3_tick = tick; } void t3() { int f, rr; float on, off; int t, v; int pw[3]={500, 1500, 2500}; int dc[4]={20, 40, 60, 80}; printf("PWM/Servo pulse accuracy tests.\n"); t3_val = USERDATA; t3_reset=1; t3_count=0; t3_tick=0; t3_on=0.0; t3_off=0.0; gpioSetAlertFuncEx(GPIO, t3cbf, &t3_val); /* test extended alert */ for (t=0; t<3; t++) { gpioServo(GPIO, pw[t]); v = gpioGetServoPulsewidth(GPIO); CHECK(3, t+t+1, v, pw[t], 0, "get servo pulsewidth"); time_sleep(1); t3_reset = 1; time_sleep(4); on = t3_on; off = t3_off; CHECK(3, t+t+2, (1E3*(on+off))/on, 2E7/pw[t], 1, "set servo pulsewidth"); } gpioServo(GPIO, 0); gpioSetPWMfrequency(GPIO, 1000); f = gpioGetPWMfrequency(GPIO); CHECK(3, 7, f, 1000, 0, "set/get PWM frequency"); rr = gpioSetPWMrange(GPIO, 100); CHECK(3, 8, rr, 200, 0, "set PWM range"); for (t=0; t<4; t++) { gpioPWM(GPIO, dc[t]); v = gpioGetPWMdutycycle(GPIO); CHECK(3, t+t+9, v, dc[t], 0, "get PWM dutycycle"); time_sleep(1); t3_reset = 1; time_sleep(2); on = t3_on; off = t3_off; CHECK(3, t+t+10, (1E3*on)/(on+off), 1E1*dc[t], 1, "set PWM dutycycle"); } gpioPWM(GPIO, 0); } void t4() { int h, e, f, n, s, b, l, seq_ok, toggle_ok; gpioReport_t r; char p[32]; printf("Pipe notification tests.\n"); gpioSetPWMfrequency(GPIO, 0); gpioPWM(GPIO, 0); gpioSetPWMrange(GPIO, 100); h = gpioNotifyOpen(); sprintf(p, "/dev/pigpio%d", h); f = open(p, O_RDONLY); e = gpioNotifyBegin(h, (1< 0) text[c] = 0; CHECK(5, 11, strcmp(TEXT, text), 0, 0, "wave tx busy, serial read"); e = gpioSerialReadClose(GPIO); CHECK(5, 12, e, 0, 0, "serial read close"); c = gpioWaveGetMicros(); CHECK(5, 13, c, 6158148, 0, "wave get micros"); c = gpioWaveGetHighMicros(); CHECK(5, 14, c, 6158148, 0, "wave get high micros"); c = gpioWaveGetMaxMicros(); CHECK(5, 15, c, 1800000000, 0, "wave get max micros"); c = gpioWaveGetPulses(); CHECK(5, 16, c, 3405, 0, "wave get pulses"); c = gpioWaveGetHighPulses(); CHECK(5, 17, c, 3405, 0, "wave get high pulses"); c = gpioWaveGetMaxPulses(); CHECK(5, 18, c, 12000, 0, "wave get max pulses"); c = gpioWaveGetCbs(); if (e < 6963) CHECK(5, 19, c, 6810, 0, "wave get cbs"); else CHECK(5, 19, c, 7115, 0, "wave get cbs"); c = gpioWaveGetHighCbs(); if (e < 6963) CHECK(5, 20, c, 6810, 0, "wave get high cbs"); else CHECK(5, 20, c, 7115, 0, "wave get high cbs"); c = gpioWaveGetMaxCbs(); CHECK(5, 21, c, 25016, 0, "wave get max cbs"); /* waveCreatePad tests */ gpioWaveTxStop(); gpioWaveClear(); gpioSetAlertFunc(GPIO, t5cbf); e = gpioWaveAddGeneric(2, (gpioPulse_t[]) { {1<= 0) text[b] = 0; CHECK(10, 7, strcmp(TEXT, text), 0, 0, "serial read"); b = serReadByte(h); CHECK(10, 8, b, 0xAA, 0, "serial read byte"); b = serReadByte(h); CHECK(10, 9, b, 0x55, 0, "serial read byte"); b = serReadByte(h); CHECK(10, 10, b, 0x00, 0, "serial read byte"); b = serReadByte(h); CHECK(10, 11, b, 0xFF, 0, "serial read byte"); b = serDataAvailable(h); CHECK(10, 12, b, 0, 0, "serial data availabe"); e = serClose(h); CHECK(10, 13, e, 0, 0, "serial close"); } void tb() { int h, e, b, len; char *exp; char buf[128]; printf("SMBus / I2C tests."); /* this test requires an ADXL345 on I2C bus 1 addr 0x53 */ h = i2cOpen(1, 0x53, 0); CHECK(11, 1, h, 0, 0, "i2cOpen"); e = i2cWriteDevice(h, "\x00", 1); /* move to known register */ CHECK(11, 2, e, 0, 0, "i2cWriteDevice"); b = i2cReadDevice(h, buf, 1); CHECK(11, 3, b, 1, 0, "i2cReadDevice"); CHECK(11, 4, buf[0], 0xE5, 0, "i2cReadDevice"); b = i2cReadByte(h); CHECK(11, 5, b, 0xE5, 0, "i2cReadByte"); b = i2cReadByteData(h, 0); CHECK(11, 6, b, 0xE5, 0, "i2cReadByteData"); b = i2cReadByteData(h, 48); CHECK(11, 7, b, 2, 0, "i2cReadByteData"); exp = "\x1D[aBcDeFgHjKM]"; len = strlen(exp); e = i2cWriteDevice(h, exp, len); CHECK(11, 8, e, 0, 0, "i2cWriteDevice"); e = i2cWriteDevice(h, "\x1D", 1); b = i2cReadDevice(h, buf, len-1); CHECK(11, 9, b, len-1, 0, "i2cReadDevice"); CHECK(11, 10, strncmp(buf, exp+1, len-1), 0, 0, "i2cReadDevice"); if (strncmp(buf, exp+1, len-1)) printf("got [%.*s] expected [%.*s]\n", len-1, buf, len-1, exp+1); e = i2cWriteByteData(h, 0x1d, 0xAA); CHECK(11, 11, e, 0, 0, "i2cWriteByteData"); b = i2cReadByteData(h, 0x1d); CHECK(11, 12, b, 0xAA, 0, "i2cReadByteData"); e = i2cWriteByteData(h, 0x1d, 0x55); CHECK(11, 13, e, 0, 0, "i2cWriteByteData"); b = i2cReadByteData(h, 0x1d); CHECK(11, 14, b, 0x55, 0, "i2cReadByteData"); exp = "[1234567890#]"; len = strlen(exp); e = i2cWriteBlockData(h, 0x1C, exp, len); CHECK(11, 15, e, 0, 0, "i2c writeBlockData"); e = i2cWriteDevice(h, "\x1D", 1); b = i2cReadDevice(h, buf, len); CHECK(11, 16, b, len, 0, "i2cReadDevice"); CHECK(11, 17, strncmp(buf, exp, len), 0, 0, "i2cReadDevice"); if (strncmp(buf, exp, len)) printf("got [%.*s] expected [%.*s]\n", len, buf, len, exp); b = i2cReadI2CBlockData(h, 0x1D, buf, len); CHECK(11, 18, b, len, 0, "i2cReadI2CBlockData"); CHECK(11, 19, strncmp(buf, exp, len), 0, 0, "i2cReadI2CBlockData"); if (strncmp(buf, exp, len)) printf("got [%.*s] expected [%.*s]\n", len, buf, len, exp); exp = "(-+=;:,<>!%)"; len = strlen(exp); e = i2cWriteI2CBlockData(h, 0x1D, exp, len); CHECK(11, 20, e, 0, 0, "i2cWriteI2CBlockData"); b = i2cReadI2CBlockData(h, 0x1D, buf, len); CHECK(11, 21, b, len, 0, "i2cReadI2CBlockData"); CHECK(11, 22, strncmp(buf, exp, len), 0, 0, "i2cReadI2CBlockData"); if (strncmp(buf, exp, len)) printf("got [%.*s] expected [%.*s]\n", len, buf, len, exp); e = i2cClose(h); CHECK(11, 23, e, 0, 0, "i2cClose"); } void tc() { int h, x, b, e; char txBuf[8], rxBuf[8]; printf("SPI tests."); /* this test requires a MCP3202 on SPI channel 1 */ h = spiOpen(1, 50000, 0); CHECK(12, 1, h, 0, 0, "spiOpen"); sprintf(txBuf, "\x01\x80"); for (x=0; x<5; x++) { b = spiXfer(h, txBuf, rxBuf, 3); CHECK(12, 2, b, 3, 0, "spiXfer"); if (b == 3) { time_sleep(1.0); printf("%d ", ((rxBuf[1]&0x0F)*256)|rxBuf[2]); } } e = spiClose(h); CHECK(12, 99, e, 0, 0, "spiClose"); } int main(int argc, char *argv[]) { int i, t, c, status; char test[64]={0,}; if (argc > 1) { t = 0; for (i=0; i 0x03000000: if type(r) == type(""): r = bytearray(r, 'latin-1') if type(s) == type(""): s = bytearray(s, 'latin-1') if r != s: print(r, s) return 0 else: return 1 def CHECK(t, st, got, expect, pc, desc): if got >= (((1E2-pc)*expect)/1E2) and got <= (((1E2+pc)*expect)/1E2): print("TEST {:2d}.{:<2d} PASS ({}: {:d})".format(t, st, desc, expect)) else: print("TEST {:2d}.{:<2d} FAILED got {:d} ({}: {:d})". format(t, st, got, desc, expect)) def t0(): print("\nTesting pigpio Python module {}".format(pigpio.VERSION)) print("Python {}".format(sys.version.replace("\n", " "))) print("pigpio version {}.".format(pi.get_pigpio_version())) print("Hardware revision {}.".format(pi.get_hardware_revision())) def t1(): print("Mode/PUD/read/write tests.") pi.set_mode(GPIO, pigpio.INPUT) v = pi.get_mode(GPIO) CHECK(1, 1, v, 0, 0, "set mode, get mode") pi.set_pull_up_down(GPIO, pigpio.PUD_UP) v = pi.read(GPIO) CHECK(1, 2, v, 1, 0, "set pull up down, read") pi.set_pull_up_down(GPIO, pigpio.PUD_DOWN) v = pi.read(GPIO) CHECK(1, 3, v, 0, 0, "set pull up down, read") pi.write(GPIO, pigpio.LOW) v = pi.get_mode(GPIO) CHECK(1, 4, v, 1, 0, "write, get mode") v = pi.read(GPIO) CHECK(1, 5, v, 0, 0, "read") pi.write(GPIO, pigpio.HIGH) v = pi.read(GPIO) CHECK(1, 6, v, 1, 0, "write, read") t2_count=0 def t2cbf(gpio, level, tick): global t2_count t2_count += 1 def t2(): global t2_count print("PWM dutycycle/range/frequency tests.") pi.set_PWM_range(GPIO, 255) pi.set_PWM_frequency(GPIO,0) f = pi.get_PWM_frequency(GPIO) CHECK(2, 1, f, 10, 0, "set PWM range, set/get PWM frequency") t2cb = pi.callback(GPIO, pigpio.EITHER_EDGE, t2cbf) pi.set_PWM_dutycycle(GPIO, 0) dc = pi.get_PWM_dutycycle(GPIO) CHECK(2, 2, dc, 0, 0, "get PWM dutycycle") time.sleep(0.5) # allow old notifications to flush oc = t2_count time.sleep(2) f = t2_count - oc CHECK(2, 3, f, 0, 0, "set PWM dutycycle, callback") pi.set_PWM_dutycycle(GPIO, 128) dc = pi.get_PWM_dutycycle(GPIO) CHECK(2, 4, dc, 128, 0, "get PWM dutycycle") time.sleep(1) oc = t2_count time.sleep(2) f = t2_count - oc CHECK(2, 5, f, 40, 10, "set PWM dutycycle, callback") pi.set_PWM_frequency(GPIO,100) f = pi.get_PWM_frequency(GPIO) CHECK(2, 6, f, 100, 0, "set/get PWM frequency") time.sleep(1) oc = t2_count time.sleep(2) f = t2_count - oc CHECK(2, 7, f, 400, 5, "callback") pi.set_PWM_frequency(GPIO,1000) f = pi.get_PWM_frequency(GPIO) CHECK(2, 8, f, 1000, 0, "set/get PWM frequency") time.sleep(1) oc = t2_count time.sleep(2) f = t2_count - oc CHECK(2, 9, f, 4000, 5, "callback") r = pi.get_PWM_range(GPIO) CHECK(2, 10, r, 255, 0, "get PWM range") rr = pi.get_PWM_real_range(GPIO) CHECK(2, 11, rr, 200, 0, "get PWM real range") pi.set_PWM_range(GPIO, 2000) r = pi.get_PWM_range(GPIO) CHECK(2, 12, r, 2000, 0, "set/get PWM range") rr = pi.get_PWM_real_range(GPIO) CHECK(2, 13, rr, 200, 0, "get PWM real range") pi.set_PWM_dutycycle(GPIO, 0) t2cb.cancel() t3_reset=True t3_count=0 t3_tick=0 t3_on=0.0 t3_off=0.0 def t3cbf(gpio, level, tick): global t3_reset, t3_count, t3_tick, t3_on, t3_off if t3_reset: t3_count = 0 t3_on = 0.0 t3_off = 0.0 t3_reset = False else: td = pigpio.tickDiff(t3_tick, tick) if level == 0: t3_on += td else: t3_off += td t3_count += 1 t3_tick = tick def t3(): global t3_reset, t3_count, t3_on, t3_off pw=[500.0, 1500.0, 2500.0] dc=[0.2, 0.4, 0.6, 0.8] print("PWM/Servo pulse accuracy tests.") t3cb = pi.callback(GPIO, pigpio.EITHER_EDGE, t3cbf) t = 0 for x in pw: t += 1 pi.set_servo_pulsewidth(GPIO, x) v = pi.get_servo_pulsewidth(GPIO) CHECK(3, t, v, int(x), 0, "get servo pulsewidth") t += 1 time.sleep(1) t3_reset = True time.sleep(4) c = t3_count on = t3_on off = t3_off CHECK(3, t, int((1E3*(on+off))/on), int(2E7/x), 1, "set servo pulsewidth") pi.set_servo_pulsewidth(GPIO, 0) pi.set_PWM_frequency(GPIO, 1000) f = pi.get_PWM_frequency(GPIO) CHECK(3, 7, f, 1000, 0, "set/get PWM frequency") rr = pi.set_PWM_range(GPIO, 100) CHECK(3, 8, rr, 200, 0, "set PWM range") t = 8 for x in dc: t += 1 pi.set_PWM_dutycycle(GPIO, x*100) v = pi.get_PWM_dutycycle(GPIO) CHECK(3, t, v, int(x*100), 0, "get PWM dutycycle") t += 1 time.sleep(1) t3_reset = True time.sleep(2) c = t3_count on = t3_on off = t3_off CHECK(3, t, int((1E3*on)/(on+off)), int(1E3*x), 1, "set PWM dutycycle") pi.set_PWM_dutycycle(GPIO, 0) t3cb.cancel() def t4(): print("Pipe notification tests.") pi.set_PWM_frequency(GPIO, 0) pi.set_PWM_dutycycle(GPIO, 0) pi.set_PWM_range(GPIO, 100) h = pi.notify_open() e = pi.notify_begin(h, (1<=0, 1, 0, "serial open") (b, s) = pi.serial_read(h, 1000) # flush buffer b = pi.serial_data_available(h) CHECK(10, 2, b, 0, 0, "serial data available") TEXT = """ To be, or not to be, that is the question- Whether 'tis Nobler in the mind to suffer The Slings and Arrows of outrageous Fortune, Or to take Arms against a Sea of troubles, """ e = pi.serial_write(h, TEXT) CHECK(10, 3, e, 0, 0, "serial write") e = pi.serial_write_byte(h, 0xAA) e = pi.serial_write_byte(h, 0x55) e = pi.serial_write_byte(h, 0x00) e = pi.serial_write_byte(h, 0xFF) CHECK(10, 4, e, 0, 0, "serial write byte") time.sleep(0.1) # allow time for transmission b = pi.serial_data_available(h) CHECK(10, 5, b, len(TEXT)+4, 0, "serial data available") (b, text) = pi.serial_read(h, len(TEXT)) CHECK(10, 6, b, len(TEXT), 0, "serial read") CHECK(10, 7, STRCMP(text, TEXT), True, 0, "serial read") b = pi.serial_read_byte(h) CHECK(10, 8, b, 0xAA, 0, "serial read byte") b = pi.serial_read_byte(h) CHECK(10, 9, b, 0x55, 0, "serial read byte") b = pi.serial_read_byte(h) CHECK(10, 10, b, 0x00, 0, "serial read byte") b = pi.serial_read_byte(h) CHECK(10, 11, b, 0xFF, 0, "serial read byte") b = pi.serial_data_available(h) CHECK(10, 12, b, 0, 0, "serial data available") e = pi.serial_close(h) CHECK(10, 13, e, 0, 0, "serial close") def tb(): print("SMBus / I2C tests.") # this test requires an ADXL345 on I2C bus 1 addr 0x53 h = pi.i2c_open(1, 0x53) CHECK(11, 1, h>=0, 1, 0, "i2c open") e = pi.i2c_write_device(h, "\x00") # move to known register CHECK(11, 2, e, 0, 0, "i2c write device") (b, d) = pi.i2c_read_device(h, 1) CHECK(11, 3, b, 1, 0, "i2c read device") CHECK(11, 4, ord(d), 0xE5, 0, "i2c read device") b = pi.i2c_read_byte(h) CHECK(11, 5, b, 0xE5, 0, "i2c read byte") b = pi.i2c_read_byte_data(h, 0) CHECK(11, 6, b, 0xE5, 0, "i2c read byte data") b = pi.i2c_read_byte_data(h, 48) CHECK(11, 7, b, 2, 0, "i2c read byte data") exp = b"[aB\x08cD\xAAgHj\xFD]" e = pi.i2c_write_device(h, b'\x1D'+ exp) CHECK(11, 8, e, 0, 0, "i2c write device") e = pi.i2c_write_device(h, '\x1D') (b, d) = pi.i2c_read_device(h, 12) CHECK(11, 9, b, 12, 0, "i2c read device") CHECK(11, 10, STRCMP(d, exp), True, 0, "i2c read device") e = pi.i2c_write_byte_data(h, 0x1d, 0xAA) CHECK(11, 11, e, 0, 0, "i2c write byte data") b = pi.i2c_read_byte_data(h, 0x1d) CHECK(11, 12, b, 0xAA, 0, "i2c read byte data") e = pi.i2c_write_byte_data(h, 0x1d, 0x55) CHECK(11, 13, e, 0, 0, "i2c write byte data") b = pi.i2c_read_byte_data(h, 0x1d) CHECK(11, 14, b, 0x55, 0, "i2c read byte data") exp = "[1234567890#]" e = pi.i2c_write_block_data(h, 0x1C, exp) CHECK(11, 15, e, 0, 0, "i2c write block data") e = pi.i2c_write_device(h, '\x1D') (b, d) = pi.i2c_read_device(h, 13) CHECK(11, 16, b, 13, 0, "i2c read device") CHECK(11, 17, STRCMP(d, exp), True, 0, "i2c read device") (b, d) = pi.i2c_read_i2c_block_data(h, 0x1D, 13) CHECK(11, 18, b, 13, 0, "i2c read i2c block data") CHECK(11, 19, STRCMP(d, exp), True, 0, "i2c read i2c block data") expl = [0x01, 0x05, 0x06, 0x07, 0x09, 0x1B, 0x99, 0xAA, 0xBB, 0xCC] exp = "\x01\x05\x06\x07\x09\x1B\x99\xAA\xBB\xCC" e = pi.i2c_write_i2c_block_data(h, 0x1D, expl) CHECK(11, 20, e, 0, 0, "i2c write i2c block data") (b, d) = pi.i2c_read_i2c_block_data(h, 0x1D, 10) CHECK(11, 21, b, 10, 0, "i2c read i2c block data") CHECK(11, 22, STRCMP(d, exp), True, 0, "i2c read i2c block data") e = pi.i2c_close(h) CHECK(11, 23, e, 0, 0, "i2c close") def tca(b, d): if b == 3: c1 = d[1] & 0x0F c2 = d[2] time.sleep(1.0) print((c1*256)+c2) def tc(): print("SPI tests.") # this test requires a MCP3202 on SPI channel 1 h = pi.spi_open(1, 50000) CHECK(12, 1, h>=0, 1, 0, "spi open") (b, d) = pi.spi_xfer(h, [1,128,0]) CHECK(12, 2, b, 3, 0, "spi xfer") tca(b, d) (b, d) = pi.spi_xfer(h, "\x01\x80\x00") CHECK(12, 2, b, 3, 0, "spi xfer") tca(b, d) (b, d) = pi.spi_xfer(h, b"\x01\x80\x00") CHECK(12, 2, b, 3, 0, "spi xfer") tca(b, d) (b, d) = pi.spi_xfer(h, '\x01\x80\x00') CHECK(12, 2, b, 3, 0, "spi xfer") tca(b, d) (b, d) = pi.spi_xfer(h, b'\x01\x80\x00') CHECK(12, 2, b, 3, 0, "spi xfer") tca(b, d) e = pi.spi_close(h) CHECK(12, 99, e, 0, 0, "spi close") def td(): print("Wavechains & filter tests.") tdcb = pi.callback(GPIO) pi.set_mode(GPIO, pigpio.OUTPUT) pi.write(GPIO, pigpio.LOW) e = pi.wave_clear() CHECK(13, 1, e, 0, 0, "callback, set mode, wave clear") wf = [] wf.append(pigpio.pulse(1< 1: tests = "" for C in sys.argv[1]: c = C.lower() if c not in tests: tests += c else: tests = "0123456789d" pi = pigpio.pi() if pi.connected: print("Connected to pigpio daemon.") if '0' in tests: t0() if '1' in tests: t1() if '2' in tests: t2() if '3' in tests: t3() if '4' in tests: t4() if '5' in tests: t5() if '6' in tests: t6() if '7' in tests: t7() if '8' in tests: t8() if '9' in tests: t9() if 'a' in tests: ta() if 'b' in tests: tb() if 'c' in tests: tc() if 'd' in tests: td() pi.stop() pigpio-78/x_pigpiod_if.c000066400000000000000000000465661373465704200154410ustar00rootroot00000000000000/* gcc -Wall -pthread -o x_pigpiod_if x_pigpiod_if.c -lpigpiod_if ./x_pigpiod_if *** WARNING ************************************************ * * * All the tests make extensive use of gpio 25 (pin 22). * * Ensure that either nothing or just a LED is connected to * * gpio 25 before running any of the tests. * * * * Some tests are statistical in nature and so may on * * occasion fail. Repeated failures on the same test or * * many failures in a group of tests indicate a problem. * ************************************************************ */ #include #include #include #include #include #include #include #include "pigpiod_if.h" #define GPIO 25 void CHECK(int t, int st, int got, int expect, int pc, char *desc) { if ((got >= (((1E2-pc)*expect)/1E2)) && (got <= (((1E2+pc)*expect)/1E2))) { printf("TEST %2d.%-2d PASS (%s: %d)\n", t, st, desc, expect); } else { fprintf(stderr, "TEST %2d.%-2d FAILED got %d (%s: %d)\n", t, st, got, desc, expect); } } void t0() { printf("\nTesting pigpiod C I/F 1\n"); printf("pigpio version %d.\n", get_pigpio_version()); printf("Hardware revision %d.\n", get_hardware_revision()); } void t1() { int v; printf("Mode/PUD/read/write tests.\n"); set_mode(GPIO, PI_INPUT); v = get_mode(GPIO); CHECK(1, 1, v, 0, 0, "set mode, get mode"); set_pull_up_down(GPIO, PI_PUD_UP); v = gpio_read(GPIO); CHECK(1, 2, v, 1, 0, "set pull up down, read"); set_pull_up_down(GPIO, PI_PUD_DOWN); v = gpio_read(GPIO); CHECK(1, 3, v, 0, 0, "set pull up down, read"); gpio_write(GPIO, PI_LOW); v = get_mode(GPIO); CHECK(1, 4, v, 1, 0, "write, get mode"); v = gpio_read(GPIO); CHECK(1, 5, v, 0, 0, "read"); gpio_write(GPIO, PI_HIGH); v = gpio_read(GPIO); CHECK(1, 6, v, 1, 0, "write, read"); } int t2_count=0; void t2cb(unsigned gpio, unsigned level, uint32_t tick) { t2_count++; } void t2() { int dc, f, r, rr, oc; printf("PWM dutycycle/range/frequency tests.\n"); set_PWM_range(GPIO, 255); set_PWM_frequency(GPIO, 0); f = get_PWM_frequency(GPIO); CHECK(2, 1, f, 10, 0, "set PWM range, set/get PWM frequency"); callback(GPIO, EITHER_EDGE, t2cb); set_PWM_dutycycle(GPIO, 0); dc = get_PWM_dutycycle(GPIO); CHECK(2, 2, dc, 0, 0, "get PWM dutycycle"); time_sleep(0.5); /* allow old notifications to flush */ oc = t2_count; time_sleep(2); f = t2_count - oc; CHECK(2, 3, f, 0, 0, "set PWM dutycycle, callback"); set_PWM_dutycycle(GPIO, 128); dc = get_PWM_dutycycle(GPIO); CHECK(2, 4, dc, 128, 0, "get PWM dutycycle"); time_sleep(0.2); oc = t2_count; time_sleep(2); f = t2_count - oc; CHECK(2, 5, f, 40, 5, "set PWM dutycycle, callback"); set_PWM_frequency(GPIO, 100); f = get_PWM_frequency(GPIO); CHECK(2, 6, f, 100, 0, "set/get PWM frequency"); time_sleep(0.2); oc = t2_count; time_sleep(2); f = t2_count - oc; CHECK(2, 7, f, 400, 1, "callback"); set_PWM_frequency(GPIO, 1000); f = get_PWM_frequency(GPIO); CHECK(2, 8, f, 1000, 0, "set/get PWM frequency"); time_sleep(0.2); oc = t2_count; time_sleep(2); f = t2_count - oc; CHECK(2, 9, f, 4000, 1, "callback"); r = get_PWM_range(GPIO); CHECK(2, 10, r, 255, 0, "get PWM range"); rr = get_PWM_real_range(GPIO); CHECK(2, 11, rr, 200, 0, "get PWM real range"); set_PWM_range(GPIO, 2000); r = get_PWM_range(GPIO); CHECK(2, 12, r, 2000, 0, "set/get PWM range"); rr = get_PWM_real_range(GPIO); CHECK(2, 13, rr, 200, 0, "get PWM real range"); set_PWM_dutycycle(GPIO, 0); } int t3_reset=1; int t3_count=0; uint32_t t3_tick=0; float t3_on=0.0; float t3_off=0.0; void t3cbf(unsigned gpio, unsigned level, uint32_t tick) { uint32_t td; if (t3_reset) { t3_count = 0; t3_on = 0.0; t3_off = 0.0; t3_reset = 0; } else { td = tick - t3_tick; if (level == 0) t3_on += td; else t3_off += td; } t3_count ++; t3_tick = tick; } void t3() { int pw[3]={500, 1500, 2500}; int dc[4]={20, 40, 60, 80}; int f, rr, v; float on, off; int t; printf("PWM/Servo pulse accuracy tests.\n"); callback(GPIO, EITHER_EDGE, t3cbf); for (t=0; t<3; t++) { set_servo_pulsewidth(GPIO, pw[t]); v = get_servo_pulsewidth(GPIO); CHECK(3, t+t+1, v, pw[t], 0, "get servo pulsewidth"); time_sleep(1); t3_reset = 1; time_sleep(4); on = t3_on; off = t3_off; CHECK(3, t+t+2, (1000.0*(on+off))/on, 20000000.0/pw[t], 1, "set servo pulsewidth"); } set_servo_pulsewidth(GPIO, 0); set_PWM_frequency(GPIO, 1000); f = get_PWM_frequency(GPIO); CHECK(3, 7, f, 1000, 0, "set/get PWM frequency"); rr = set_PWM_range(GPIO, 100); CHECK(3, 8, rr, 200, 0, "set PWM range"); for (t=0; t<4; t++) { set_PWM_dutycycle(GPIO, dc[t]); v = get_PWM_dutycycle(GPIO); CHECK(3, t+t+9, v, dc[t], 0, "get PWM dutycycle"); time_sleep(1); t3_reset = 1; time_sleep(2); on = t3_on; off = t3_off; CHECK(3, t+t+10, (1000.0*on)/(on+off), 10.0*dc[t], 1, "set PWM dutycycle"); } set_PWM_dutycycle(GPIO, 0); } void t4() { int h, e, f, n, s, b, l, seq_ok, toggle_ok; gpioReport_t r; char p[32]; printf("Pipe notification tests.\n"); set_PWM_frequency(GPIO, 0); set_PWM_dutycycle(GPIO, 0); set_PWM_range(GPIO, 100); h = notify_open(); sprintf(p, "/dev/pigpio%d", h); f = open(p, O_RDONLY); e = notify_begin(h, (1< 0) text[c] = 0; /* null terminate string */ CHECK(5, 11, strcmp(TEXT, text), 0, 0, "wave tx busy, serial read"); e = bb_serial_read_close(GPIO); CHECK(5, 12, e, 0, 0, "serial read close"); c = wave_get_micros(); CHECK(5, 13, c, 6158148, 0, "wave get micros"); c = wave_get_high_micros(); if (c > 6158148) c = 6158148; CHECK(5, 14, c, 6158148, 0, "wave get high micros"); c = wave_get_max_micros(); CHECK(5, 15, c, 1800000000, 0, "wave get max micros"); c = wave_get_pulses(); CHECK(5, 16, c, 3405, 0, "wave get pulses"); c = wave_get_high_pulses(); CHECK(5, 17, c, 3405, 0, "wave get high pulses"); c = wave_get_max_pulses(); CHECK(5, 18, c, 12000, 0, "wave get max pulses"); c = wave_get_cbs(); if (c < 6963) CHECK(5, 19, c, 6810, 0, "wave get cbs"); else CHECK(5, 19, c, 7115, 0, "wave get cbs"); c = wave_get_high_cbs(); if (c < 6963) CHECK(5, 20, c, 6810, 0, "wave get high cbs"); else CHECK(5, 20, c, 7115, 0, "wave get high cbs"); c = wave_get_max_cbs(); CHECK(5, 21, c, 25016, 0, "wave get max cbs"); } int t6_count=0; int t6_on=0; uint32_t t6_on_tick=0; void t6cbf(unsigned gpio, unsigned level, uint32_t tick) { if (level == 1) { t6_on_tick = tick; t6_count++; } else { if (t6_on_tick) t6_on += (tick - t6_on_tick); } } void t6() { int tp, t, p; printf("Trigger tests.\n"); gpio_write(GPIO, PI_LOW); tp = 0; callback(GPIO, EITHER_EDGE, t6cbf); time_sleep(0.2); for (t=0; t<5; t++) { time_sleep(0.1); p = 10 + (t*10); tp += p; gpio_trigger(GPIO, p, 1); } time_sleep(0.5); CHECK(6, 1, t6_count, 5, 0, "gpio trigger count"); CHECK(6, 2, t6_on, tp, 25, "gpio trigger pulse length"); } int t7_count=0; void t7cbf(unsigned gpio, unsigned level, uint32_t tick) { if (level == PI_TIMEOUT) t7_count++; } void t7() { int c, oc; printf("Watchdog tests.\n"); /* type of edge shouldn't matter for watchdogs */ callback(GPIO, FALLING_EDGE, t7cbf); set_watchdog(GPIO, 50); /* 50 ms, 20 per second */ time_sleep(0.5); oc = t7_count; time_sleep(2); c = t7_count - oc; CHECK(7, 1, c, 39, 5, "set watchdog on count"); set_watchdog(GPIO, 0); /* 0 switches watchdog off */ time_sleep(0.5); oc = t7_count; time_sleep(2); c = t7_count - oc; CHECK(7, 2, c, 0, 1, "set watchdog off count"); } void t8() { int v; printf("Bank read/write tests.\n"); gpio_write(GPIO, 0); v = read_bank_1() & (1<= 0) text[b] = 0; CHECK(10, 7, strcmp(TEXT, text), 0, 0, "serial read"); b = serial_read_byte(h); CHECK(10, 8, b, 0xAA, 0, "serial read byte"); b = serial_read_byte(h); CHECK(10, 9, b, 0x55, 0, "serial read byte"); b = serial_read_byte(h); CHECK(10, 10, b, 0x00, 0, "serial read byte"); b = serial_read_byte(h); CHECK(10, 11, b, 0xFF, 0, "serial read byte"); b = serial_data_available(h); CHECK(10, 12, b, 0, 0, "serial data availabe"); e = serial_close(h); CHECK(10, 13, e, 0, 0, "serial close"); } void tb() { int h, e, b, len; char *exp; char buf[128]; printf("SMBus / I2C tests."); /* this test requires an ADXL345 on I2C bus 1 addr 0x53 */ h = i2c_open(1, 0x53, 0); CHECK(11, 1, h, 0, 0, "i2c open"); e = i2c_write_device(h, "\x00", 1); /* move to known register */ CHECK(11, 2, e, 0, 0, "i2c write device"); b = i2c_read_device(h, buf, 1); CHECK(11, 3, b, 1, 0, "i2c read device"); CHECK(11, 4, buf[0], 0xE5, 0, "i2c read device"); b = i2c_read_byte(h); CHECK(11, 5, b, 0xE5, 0, "i2c read byte"); b = i2c_read_byte_data(h, 0); CHECK(11, 6, b, 0xE5, 0, "i2c read byte data"); b = i2c_read_byte_data(h, 48); CHECK(11, 7, b, 2, 0, "i2c read byte data"); exp = "\x1D[aBcDeFgHjKM]"; len = strlen(exp); e = i2c_write_device(h, exp, len); CHECK(11, 8, e, 0, 0, "i2c write device"); e = i2c_write_device(h, "\x1D", 1); b = i2c_read_device(h, buf, len-1); CHECK(11, 9, b, len-1, 0, "i2c read device"); CHECK(11, 10, strncmp(buf, exp+1, len-1), 0, 0, "i2c read device"); if (strncmp(buf, exp+1, len-1)) printf("got [%.*s] expected [%.*s]\n", len-1, buf, len-1, exp+1); e = i2c_write_byte_data(h, 0x1d, 0xAA); CHECK(11, 11, e, 0, 0, "i2c write byte data"); b = i2c_read_byte_data(h, 0x1d); CHECK(11, 12, b, 0xAA, 0, "i2c read byte data"); e = i2c_write_byte_data(h, 0x1d, 0x55); CHECK(11, 13, e, 0, 0, "i2c write byte data"); b = i2c_read_byte_data(h, 0x1d); CHECK(11, 14, b, 0x55, 0, "i2c read byte data"); exp = "[1234567890#]"; len = strlen(exp); e = i2c_write_block_data(h, 0x1C, exp, len); CHECK(11, 15, e, 0, 0, "i2c write block data"); e = i2c_write_device(h, "\x1D", 1); b = i2c_read_device(h, buf, len); CHECK(11, 16, b, len, 0, "i2c read device"); CHECK(11, 17, strncmp(buf, exp, len), 0, 0, "i2c read device"); if (strncmp(buf, exp, len)) printf("got [%.*s] expected [%.*s]\n", len, buf, len, exp); b = i2c_read_i2c_block_data(h, 0x1D, buf, len); CHECK(11, 18, b, len, 0, "i2c read i2c block data"); CHECK(11, 19, strncmp(buf, exp, len), 0, 0, "i2c read i2c block data"); if (strncmp(buf, exp, len)) printf("got [%.*s] expected [%.*s]\n", len, buf, len, exp); exp = "(-+=;:,<>!%)"; len = strlen(exp); e = i2c_write_i2c_block_data(h, 0x1D, exp, len); CHECK(11, 20, e, 0, 0, "i2c write i2c block data"); b = i2c_read_i2c_block_data(h, 0x1D, buf, len); CHECK(11, 21, b, len, 0, "i2c read i2c block data"); CHECK(11, 22, strncmp(buf, exp, len), 0, 0, "i2c read i2c block data"); if (strncmp(buf, exp, len)) printf("got [%.*s] expected [%.*s]\n", len, buf, len, exp); e = i2c_close(h); CHECK(11, 23, e, 0, 0, "i2c close"); } void tc() { int h, x, b, e; char buf[128]; printf("SPI tests."); /* this test requires a MCP3202 on SPI channel 1 */ h = spi_open(1, 50000, 0); CHECK(12, 1, h, 0, 0, "spi open"); for (x=0; x<5; x++) { sprintf(buf, "\x01\x80"); b = spi_xfer(h, buf, buf, 3); CHECK(12, 2, b, 3, 0, "spi xfer"); if (b == 3) { time_sleep(1.0); printf("%d ", ((buf[1]&0x0F)*256)|buf[2]); } } e = spi_close(h); CHECK(12, 99, e, 0, 0, "spi close"); } int main(int argc, char *argv[]) { int i, t, c, status; char test[64]={0,}; if (argc > 1) { t = 0; for (i=0; i #include #include #include #include #include #include #include "pigpiod_if2.h" #define GPIO 25 void CHECK(int t, int st, int got, int expect, int pc, char *desc) { if ((got >= (((1E2-pc)*expect)/1E2)) && (got <= (((1E2+pc)*expect)/1E2))) { printf("TEST %2d.%-2d PASS (%s: %d)\n", t, st, desc, expect); } else { fprintf(stderr, "TEST %2d.%-2d FAILED got %d (%s: %d)\n", t, st, got, desc, expect); } } void t0(int pi) { printf("\nTesting pigpiod C I/F 2\n"); printf("pigpio version %d.\n", get_pigpio_version(pi)); printf("Hardware revision %d.\n", get_hardware_revision(pi)); } void t1(int pi) { int v; printf("Mode/PUD/read/write tests.\n"); set_mode(pi, GPIO, PI_INPUT); v = get_mode(pi, GPIO); CHECK(1, 1, v, 0, 0, "set mode, get mode"); set_pull_up_down(pi, GPIO, PI_PUD_UP); v = gpio_read(pi, GPIO); CHECK(1, 2, v, 1, 0, "set pull up down, read"); set_pull_up_down(pi, GPIO, PI_PUD_DOWN); v = gpio_read(pi, GPIO); CHECK(1, 3, v, 0, 0, "set pull up down, read"); gpio_write(pi, GPIO, PI_LOW); v = get_mode(pi, GPIO); CHECK(1, 4, v, 1, 0, "write, get mode"); v = gpio_read(pi, GPIO); CHECK(1, 5, v, 0, 0, "read"); gpio_write(pi, GPIO, PI_HIGH); v = gpio_read(pi, GPIO); CHECK(1, 6, v, 1, 0, "write, read"); } int t2_count=0; void t2cb(int pi, unsigned gpio, unsigned level, uint32_t tick) { t2_count++; } void t2(int pi) { int dc, f, r, rr, oc, id; printf("PWM dutycycle/range/frequency tests.\n"); set_PWM_range(pi, GPIO, 255); set_PWM_frequency(pi, GPIO, 0); f = get_PWM_frequency(pi, GPIO); CHECK(2, 1, f, 10, 0, "set PWM range, set/get PWM frequency"); id = callback(pi, GPIO, EITHER_EDGE, t2cb); set_PWM_dutycycle(pi, GPIO, 0); dc = get_PWM_dutycycle(pi, GPIO); CHECK(2, 2, dc, 0, 0, "get PWM dutycycle"); time_sleep(0.5); /* allow old notifications to flush */ oc = t2_count; time_sleep(2); f = t2_count - oc; CHECK(2, 3, f, 0, 0, "set PWM dutycycle, callback"); set_PWM_dutycycle(pi, GPIO, 128); dc = get_PWM_dutycycle(pi, GPIO); CHECK(2, 4, dc, 128, 0, "get PWM dutycycle"); time_sleep(0.2); oc = t2_count; time_sleep(2); f = t2_count - oc; CHECK(2, 5, f, 40, 5, "set PWM dutycycle, callback"); set_PWM_frequency(pi, GPIO, 100); f = get_PWM_frequency(pi, GPIO); CHECK(2, 6, f, 100, 0, "set/get PWM frequency"); time_sleep(0.2); oc = t2_count; time_sleep(2); f = t2_count - oc; CHECK(2, 7, f, 400, 1, "callback"); set_PWM_frequency(pi, GPIO, 1000); f = get_PWM_frequency(pi, GPIO); CHECK(2, 8, f, 1000, 0, "set/get PWM frequency"); time_sleep(0.2); oc = t2_count; time_sleep(2); f = t2_count - oc; CHECK(2, 9, f, 4000, 1, "callback"); r = get_PWM_range(pi, GPIO); CHECK(2, 10, r, 255, 0, "get PWM range"); rr = get_PWM_real_range(pi, GPIO); CHECK(2, 11, rr, 200, 0, "get PWM real range"); set_PWM_range(pi, GPIO, 2000); r = get_PWM_range(pi, GPIO); CHECK(2, 12, r, 2000, 0, "set/get PWM range"); rr = get_PWM_real_range(pi, GPIO); CHECK(2, 13, rr, 200, 0, "get PWM real range"); set_PWM_dutycycle(pi, GPIO, 0); callback_cancel(id); } int t3_reset=1; int t3_count=0; uint32_t t3_tick=0; float t3_on=0.0; float t3_off=0.0; void t3cbf(int pi, unsigned gpio, unsigned level, uint32_t tick) { uint32_t td; // printf("pi=%d g=%d l=%d t=%u\n", pi, gpio, level, tick); if (t3_reset) { t3_count = 0; t3_on = 0.0; t3_off = 0.0; t3_reset = 0; } else { td = tick - t3_tick; if (level == 0) t3_on += td; else t3_off += td; } t3_count ++; t3_tick = tick; } void t3(int pi) { int pw[3]={500, 1500, 2500}; int dc[4]={20, 40, 60, 80}; int f, rr, v; float on, off; int t, id; printf("PWM/Servo pulse accuracy tests.\n"); id = callback(pi, GPIO, EITHER_EDGE, t3cbf); for (t=0; t<3; t++) { set_servo_pulsewidth(pi, GPIO, pw[t]); v = get_servo_pulsewidth(pi, GPIO); CHECK(3, t+t+1, v, pw[t], 0, "get servo pulsewidth"); time_sleep(1); t3_reset = 1; time_sleep(4); on = t3_on; off = t3_off; CHECK(3, t+t+2, (1000.0*(on+off))/on, 20000000.0/pw[t], 1, "set servo pulsewidth"); } set_servo_pulsewidth(pi, GPIO, 0); set_PWM_frequency(pi, GPIO, 1000); f = get_PWM_frequency(pi, GPIO); CHECK(3, 7, f, 1000, 0, "set/get PWM frequency"); rr = set_PWM_range(pi, GPIO, 100); CHECK(3, 8, rr, 200, 0, "set PWM range"); for (t=0; t<4; t++) { set_PWM_dutycycle(pi, GPIO, dc[t]); v = get_PWM_dutycycle(pi, GPIO); CHECK(3, t+t+9, v, dc[t], 0, "get PWM dutycycle"); time_sleep(1); t3_reset = 1; time_sleep(2); on = t3_on; off = t3_off; CHECK(3, t+t+10, (1000.0*on)/(on+off), 10.0*dc[t], 1, "set PWM dutycycle"); } set_PWM_dutycycle(pi, GPIO, 0); callback_cancel(id); } void t4(int pi) { int h, e, f, n, s, b, l, seq_ok, toggle_ok; gpioReport_t r; char p[32]; printf("Pipe notification tests.\n"); set_PWM_frequency(pi, GPIO, 0); set_PWM_dutycycle(pi, GPIO, 0); set_PWM_range(pi, GPIO, 100); h = notify_open(pi); sprintf(p, "/dev/pigpio%d", h); f = open(p, O_RDONLY); e = notify_begin(pi, h, (1< 0) text[c] = 0; /* null terminate string */ CHECK(5, 11, strcmp(TEXT, text), 0, 0, "wave tx busy, serial read"); e = bb_serial_read_close(pi, GPIO); CHECK(5, 12, e, 0, 0, "serial read close"); c = wave_get_micros(pi); CHECK(5, 13, c, 6158148, 0, "wave get micros"); c = wave_get_high_micros(pi); if (c > 6158148) c = 6158148; CHECK(5, 14, c, 6158148, 0, "wave get high micros"); c = wave_get_max_micros(pi); CHECK(5, 15, c, 1800000000, 0, "wave get max micros"); c = wave_get_pulses(pi); CHECK(5, 16, c, 3405, 0, "wave get pulses"); c = wave_get_high_pulses(pi); CHECK(5, 17, c, 3405, 0, "wave get high pulses"); c = wave_get_max_pulses(pi); CHECK(5, 18, c, 12000, 0, "wave get max pulses"); c = wave_get_cbs(pi); if (c < 6963) CHECK(5, 19, c, 6810, 0, "wave get cbs"); else CHECK(5, 19, c, 7115, 0, "wave get cbs"); c = wave_get_high_cbs(pi); if (c < 6963) CHECK(5, 20, c, 6810, 0, "wave get high cbs"); else CHECK(5, 20, c, 7115, 0, "wave get high cbs"); c = wave_get_max_cbs(pi); CHECK(5, 21, c, 25016, 0, "wave get max cbs"); callback_cancel(id); /* wave create and pad tests */ id = callback(pi, GPIO, FALLING_EDGE, t5cbf); e = wave_clear(pi); e = wave_add_generic(pi, 2, (gpioPulse_t[]) { {1<= 0) text[b] = 0; CHECK(10, 7, strcmp(TEXT, text), 0, 0, "serial read"); b = serial_read_byte(pi, h); CHECK(10, 8, b, 0xAA, 0, "serial read byte"); b = serial_read_byte(pi, h); CHECK(10, 9, b, 0x55, 0, "serial read byte"); b = serial_read_byte(pi, h); CHECK(10, 10, b, 0x00, 0, "serial read byte"); b = serial_read_byte(pi, h); CHECK(10, 11, b, 0xFF, 0, "serial read byte"); b = serial_data_available(pi, h); CHECK(10, 12, b, 0, 0, "serial data availabe"); e = serial_close(pi, h); CHECK(10, 13, e, 0, 0, "serial close"); } void tb(int pi) { int h, e, b, len; char *exp; char buf[128]; printf("SMBus / I2C tests."); /* this test requires an ADXL345 on I2C bus 1 addr 0x53 */ h = i2c_open(pi, 1, 0x53, 0); CHECK(11, 1, h, 0, 0, "i2c open"); e = i2c_write_device(pi, h, "\x00", 1); /* move to known register */ CHECK(11, 2, e, 0, 0, "i2c write device"); b = i2c_read_device(pi, h, buf, 1); CHECK(11, 3, b, 1, 0, "i2c read device"); CHECK(11, 4, buf[0], 0xE5, 0, "i2c read device"); b = i2c_read_byte(pi, h); CHECK(11, 5, b, 0xE5, 0, "i2c read byte"); b = i2c_read_byte_data(pi, h, 0); CHECK(11, 6, b, 0xE5, 0, "i2c read byte data"); b = i2c_read_byte_data(pi, h, 48); CHECK(11, 7, b, 2, 0, "i2c read byte data"); exp = "\x1D[aBcDeFgHjKM]"; len = strlen(exp); e = i2c_write_device(pi, h, exp, len); CHECK(11, 8, e, 0, 0, "i2c write device"); e = i2c_write_device(pi, h, "\x1D", 1); b = i2c_read_device(pi, h, buf, len-1); CHECK(11, 9, b, len-1, 0, "i2c read device"); CHECK(11, 10, strncmp(buf, exp+1, len-1), 0, 0, "i2c read device"); if (strncmp(buf, exp+1, len-1)) printf("got [%.*s] expected [%.*s]\n", len-1, buf, len-1, exp+1); e = i2c_write_byte_data(pi, h, 0x1d, 0xAA); CHECK(11, 11, e, 0, 0, "i2c write byte data"); b = i2c_read_byte_data(pi, h, 0x1d); CHECK(11, 12, b, 0xAA, 0, "i2c read byte data"); e = i2c_write_byte_data(pi, h, 0x1d, 0x55); CHECK(11, 13, e, 0, 0, "i2c write byte data"); b = i2c_read_byte_data(pi, h, 0x1d); CHECK(11, 14, b, 0x55, 0, "i2c read byte data"); exp = "[1234567890#]"; len = strlen(exp); e = i2c_write_block_data(pi, h, 0x1C, exp, len); CHECK(11, 15, e, 0, 0, "i2c write block data"); e = i2c_write_device(pi, h, "\x1D", 1); b = i2c_read_device(pi, h, buf, len); CHECK(11, 16, b, len, 0, "i2c read device"); CHECK(11, 17, strncmp(buf, exp, len), 0, 0, "i2c read device"); if (strncmp(buf, exp, len)) printf("got [%.*s] expected [%.*s]\n", len, buf, len, exp); b = i2c_read_i2c_block_data(pi, h, 0x1D, buf, len); CHECK(11, 18, b, len, 0, "i2c read i2c block data"); CHECK(11, 19, strncmp(buf, exp, len), 0, 0, "i2c read i2c block data"); if (strncmp(buf, exp, len)) printf("got [%.*s] expected [%.*s]\n", len, buf, len, exp); exp = "(-+=;:,<>!%)"; len = strlen(exp); e = i2c_write_i2c_block_data(pi, h, 0x1D, exp, len); CHECK(11, 20, e, 0, 0, "i2c write i2c block data"); b = i2c_read_i2c_block_data(pi, h, 0x1D, buf, len); CHECK(11, 21, b, len, 0, "i2c read i2c block data"); CHECK(11, 22, strncmp(buf, exp, len), 0, 0, "i2c read i2c block data"); if (strncmp(buf, exp, len)) printf("got [%.*s] expected [%.*s]\n", len, buf, len, exp); e = i2c_close(pi, h); CHECK(11, 23, e, 0, 0, "i2c close"); } void tc(int pi) { int h, x, b, e; char buf[128]; printf("SPI tests."); /* this test requires a MCP3202 on SPI channel 1 */ h = spi_open(pi, 1, 50000, 0); CHECK(12, 1, h, 0, 0, "spi open"); for (x=0; x<5; x++) { sprintf(buf, "\x01\x80"); b = spi_xfer(pi, h, buf, buf, 3); CHECK(12, 2, b, 3, 0, "spi xfer"); if (b == 3) { time_sleep(1.0); printf("%d ", ((buf[1]&0x0F)*256)|buf[2]); } } e = spi_close(pi, h); CHECK(12, 99, e, 0, 0, "spi close"); } int main(int argc, char *argv[]) { int i, t, c, pi; char test[64]={0,}; if (argc > 1) { t = 0; for (i=0; i/dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 h /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 p /dev/pigpio read -t 1 s /dev/pigpio read -t 1 -a v /dev/pigpio read -t 1 s /dev/pigpio sleep 0.1 read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 w /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio echo "tick" >/dev/pigpio read -t 1 t1 /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 w /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s /dev/pigpio read -t 1 s
  • &[ў'˘K8LIărj ViMcH|pop^q/Zx)rf mZ-BL65.aKnT蕦Os(uNpY:YYoAA W[Ä=عM`xJv< TĚ}}Vۖ@מ焵߳Ly"=`Wj~A+?[5)v:%6YF֙քK^9 «GȦ"b) UuSi4SP4KE%ᚴ\0J3/ϱDBձiIud3D6f]2Zx%{)-h="PK+iP`db=.8Otr~,k2e >%14ZΘ8r1@RF0y釘,ĊAoFWL2`!@h LpeQYA)*ܽIƈԣitm8l`Ms4r'&1 FnfyVѬ&\DP:7֚zK$b!VN#.r吷 j5AĻX(+q޸YrH`Rixs?;DV,s=^"Ny]D^YbĘ5FC%euu ܥoh} )&, cA3lM dZZ=N+-XvP8 y G5{ 1S8wӛ1쌃̡圣f60*" Q ՛9{{.b%V*Ni򊸶)uV*UM>8s\ ,;g!Ͳ'N#n1ɘ!M~]z ˸opzn˸\Wy fUZ"gcLL1 ա`1u [%Ohq̏]A(]'h!tϯ'|]AA}YPt +i(#eϪO0EPKTn\Ys 9tLG@q\f'F  !^fNZn^@ :݋89f 9%ĵؖMjYfV,%1& ) !(ㄥ`%>P|Ng/R$ H-#ʔW0߼{k#-*u?~P67P=Lȟ(|57!Z𥳐ʛnyʢt7)񰏀wN*jOsY@bO0S uP3e^tSfegr;%3f_*/QuFyl⚂F\ScAFޜ7v(Ӧ`8FDR2%HyU:Y1>1LjWJrCcȰtlfA-<_D5 leSRf_8bG DE}B=]jK >-nM6(yd/cJ𮓋 )GN(0^Kn$ Q._HM{JZ*/߉z*M.nÆY\B3qeU@(v9)2O^9xJ {Aj Z< rR(ЙꜩO8uZ]Z94J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hTJgap$oC!, >kOqn*/0:T 5G8v.^c{O;t?F`$BQLL:uܹԄٳgX$ٙe rrsRw 077aٙ~t tlr6##חV__ф'O<#]V~YTyAA˗f{uqqP(ꫯ]ENN[nnAB@"N,//'FGGkhh888|)))#YAAA(NR|>?00 9sfzZ[[KJJ/\!hH}6wvv&TWWϛ7O}UUn'Ɍ-,**Zf͐)**7o = pf] mmm:Ninn>~85)GSSyx}Qzt4::ˋdR%MMMC?''gʕ+WRӽ%G,eGH!"A ޙO./I !AAA!!!]]]Px$//ݝ~9DȂ'OF@"?VVVaaabUTTH?֣q<֭[gϞ.]tH\|JCCc֬Yrwht(q"$899fggVTTQkWMM-66644zpẺv@0)Üpi_3<<\іB2mذ`lܸ1 {xCGGǥKRӦNNNӦM x뭷<77:.JqwwQdzI(.}-!x<R>⤗*XիWeʕQGz6Y.!Pfdd455B222=pIهVSi{TPP 7RܬBa\\W_}HZZZ~~~0DH閖儐h{{{ ?<%%ed7+222((Kr\###:`3g(RF344 )++.!'Ž۷o|gggBHuuyWUUfyzz2L鳶)EEElaqfFt:!אrI#=:d2&aohh=¾D@ JJJzg>8$#$HKtuuB0Dׯ__zlmD'$ Ū~$Gcx<ޭ[Ξ=K]tiVVp4ڌ3vu%" *IWW7;;?44E ƩƆRo#"">\WW.7070700100 }- 2013:06:09 12:27:562013:06:09 12:27:56`Z%1x".<  T   tat &0|  F V f f]n@@@ @ @ @0@ ,@L@t`@@b17,Zq:UDXgCanon EOS 50DFirmware Version 1.0.9p+p+egnm~Z@ P +S17u` pv1.0.951(20)\,T0a3addd edd     ᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳtQt2)p` ` ` cPPPvPPPcObbbxbbbOiiW4mEF-S55-250mm f/4-5.6 ISP0123615t\8l\  ` P 1" H8 Hjj1A75 E i [, 75?K\YV pKPv X/p],,1 tzK\ _KiKiKiKiKiQQQQQ~*'sl OX6pQpP \,hQV*q2 a    ^` "#&*5*AJ!&J#"//47F7>7<,'J*&+2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TT.7'·4.I"0 ֹ #J]*Bnfod,wDꧏk=p]OW8̜~ܤ3G9LSҜ N^ 4#sg2U_6jv|}ԩyg`~'@ %f e,.jg{2nPā$2 nQ^5bFO?O4TۀGV<GJ-6sPF8`2Qs;S6,fupݣb+;ʐ,̹lێ+`\LI ?lQp-d <ʐx*iSy1P :~y{|0?󟽏^qRogύ*{s@D,Gȍzps=*yfXg8ªj]ML9p}ȭ !-%"j(+k١ -\zL?1ֽwLuoz‰p̊YMQp!u(Qh3s}4"C!zz54Ķ.m/Pi捣-ap?t` Qqɐ9fϽt~ 2X姘C\2k}y? %0)ggEvX ?ZwVԋW5bp>VvUikfѤG، ڦ344'<&ysZg&Va&=0 ʐ~$my-짆s*$f @#+SJB4v*A +y}yo.q =v5X˥֓imGL?A{c9ea$ߨ^gdHVX$85ksZTvksK.d#s3]T2N@ިEaelѼ01)ML#I8_ ],DJDŽ&6[uy 'f\n\&{s5m>@jFi\mzV-rp3Âk/E X6D&S4^[KgsxRTsP# WliP+#9 pz{emjNF{UbEEUF?O.<5-4} é}*_;ň#͟ѽG~F9GqU-/uo\f:(ѯՀukuo^)1Ǽo4w=}y7] Oxֹcz[2AeRI66&vc jbMU;l;S-'^{?U5e\|AdȋʌtlzKU&g|W\uܼ*{ˉ{pہW"\!5[%M;bO2:5 ?E5$u'je..Qf? b ?2ҹR‱7 RTUa)ʾ>Ioj,0nǠn*r}ZbP&7?Ff4Q7i2ORiqF(1F)ؤ&*US1R.ȀUVJ1C3IM+ZL(E E.)1@%.(R@ E))q@ F)qE%P52*50tI#(*ƛj94i]1VzqJU1aU b"嚴E& *>>oh&@qEY) [W(A@Ѵ՝҂WiDu>1E1c uqO http://ns.adobe.com/xap/1.0/ Canon Canon EOS 50D Top-left 72 72 Inch 2013:06:09 12:27:56 Co-sited Tony O'Leary (Photographer) - [None] (Editor) JPEG compression 72 72 Inch 1/125 sec. f/4.5 Normal programme 1250 Exif Version 2.21 2013:06:09 12:27:56 2013:06:09 12:27:56 Y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१e1"&S_pz`&ER}aQgU2?1U_=m"Ǟ6~m5q'לptq;B~]bdF4[ u:t9'=+ףa#A'|OՇ*qdK-GuvHM㔼TdG{_IZƵV| )EIs_xʤ٧MSvW"kDڡUJi_үDTu#F?V FAh-$?nF3hn\}չpU-X BZ4 AhZ-@ж- @6~:~Ơ7N>%?K^^r0B!ʚD% Ah@-#@'2 Am A@`  Z @lt)_[b[ϣnF.RZJjDDFȌ)Z h-B@ aA6  P[]1չ݌i`7rK oƖlmbTţ4F[#49FBZ ٶ4[Ah(% AhЄ@` ٸ?2#FkeEG?ɹ,AFT sj5O& + S]D7ֈ; "h="2Ңh҅Kw y;.k u a an```^ RzCГ}6x2}չϢ*>ⴓJU:NJ@.t8f]JP,(HFdd^XKd̻lc uNSesi R7~_IQx 7 ?!UGᒁ*ۯv!4^D!pJP@i8aR~' үipQ ~ Oh8\v|~8]iCh~7Hh/)_*?)_*3JP'<0fH.ҾT?i\1Qd5SM{C)?*1JT  OB_+S;//bHFxfHE+CѳE+Cи^>|~(JHT䦝LPZȱ{-AvUʅE4Ki䔎@~nI1$R  a@vݿ8ik@R ` M ak;-( l !Уpigpio-78/DOC/HTML/images/remote-2.jpg000066400000000000000000000675021373465704200174000ustar00rootroot00000000000000JFIFHH3ExifII* (2; i%*<CanonCanon EOS 50DHH2013:06:09 13:31:58Tony O'Leary^f"'@0221n    |>0000000100 8 2013:06:09 12:26:502013:06:09 12:26:50%1x".<  T   tat &0|  F V f f]n@@@ @ @ @0@ ,@L@t`@@b17@q:UD rCanon EOS 50DFirmware Version 1.0.9y0x0hry[c@ P 0X17u` pv1.0.951(20)\,T0a3addd edd     ᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳtQt2)p` ` ` cPPPvPPPcObbbxbbbOiiW4[EF-S55-250mm f/4-5.6 ISP0123615t\8l\  ` P " H8 Hjj1A75 E i [, 75?K\ r qbKPv X/p],,1 tzK\ _KiKiKiKiKiQQQQQ~*'sl OX6pQpP \,hQV*q2 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|F*gBB3~W^6R~4˾7.+B#c x+W?0_aPN(}y[#Wb+*[̲nI7]^IcO]UjfՉ,eJ\)($0mi\^fb~"cO78FO>>z{*3˺ڋ .+*H덮Z[~:ن+fdRYo3%JB@E4ZnLL;4iYP:n+brOvNb4P4nȍ!h;6Lu!I61zQf[.aŧxl)4mJOmcL&v=pH"P^Zxj;%ϥ  vIO \uMhgcavGGDtK޿G;.?#'o{I `SoхB#"6^KmbkхcmV&}ۦO?3BƄ#Mq$ϡ;qǡ miscІz?BƄ#s+Diǡ "Am=ڱ(Xʲd* %K[*ZIM2j/he6+9)[e7:ucwC$ZK`ZqM ("t%jtÖ  n` n׶f onzh 22u168h^:C a@=0lkynP$x\`)9Jxkq%@>r(tڴ5JU:JJ:S/%(J@$f#2E2/axe;/e6g)<es2 .)?DFqOC .HClҿ:]i3JT?964*҇ 6˯q5J?ʇ!&j !Eـ7K/BB4]UJP/Qv`G$J 6Iҵ~r{1'YUCz}Kt%Ѷ`$~.8(C!Qv`5WCeRG #EهQh/?mRޢl}KFXLR8ڨ~rB"joClWC f{f7/$Zjzt?9 =q4~5hRgUI):2V2,^yGa|вAX]h)nI1"a>D(t9:DKCpP0&$q:\OVk+\rJA7D.6 ¹:"ȌBa Dmpigpio-78/DOC/HTML/images/reverse.jpg000066400000000000000000001060241373465704200174120ustar00rootroot00000000000000JFIFHH9ExifII* (2; i%*<CanonCanon EOS 50DHH2014:08:28 14:27:28Tony O'Leary^f"'@0221n    |>3737370100 } 2014:08:28 13:01:172014:08:28 13:01:17d%1x".<  T   tat &0|  F V f f]n@@@ @ @ @0@ ,@L@t`@@bdd`@dq:UD (`dnCanon EOS 50DFirmware Version 1.0.9q!p hnbdqdE< P  Xddg` pv1.0.951(20)\,T0a3addd edd     ᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳᆳ(Sy2)p` ` ` cPPPvPPPcObbbxbbbOiiW4dE<EF100mm f/2.8 Macro USMP0123615t\8l\  ` P T'" H8 Hjj1A75 E i [,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tAȡhV) #[L 2X+c\Aُ)؉b\&+ެsMhn#Sr|?: Canon Canon EOS 50D Top-left 72 72 Inch 2014:08:28 13:01:17 Co-sited Tony O'Leary (Photographer) - [None] (Editor) JPEG compression 72 72 Inch 1/125 sec. f/2.8 Normal programme 1600 Exif Version 2.21 2014:08:28 13:01:17 2014:08:28 13:01:17 Y Cb Cr - 7.00 EV (1/128 sec.) 3.00 EV (f/2.8) 0.00 EV Spot 100.0 mm 6974 bytes undefined data 37 37 37 FlashPix Version 1.0 sRGB 4752 3168 5315.436 5306.533 Inch Normal process Auto exposure Manual white balance Standard 2.2.0.0 R98 0100 C     C   ! ^e{c#.#£>9x&@S:uv.$~X].|uoa$rkG Cj/%؊ӗ XYԹ;V x\'jt ǹ]۬$Zwgj,kZB!$\'Z $C3X|SqdҴ+v$VW&o{sJ̞L N+ftfj#1/J渶8c#SVuφ]o1_dbXTɺ< ei(ԾuxtO9uyz¹-4h SWkVܶ6jIC!m,fj;e8W1Pij:FCvҒ=ss2KdxVn[4Bi\u&3XpTjg[yp9 Pһ66':b:dFw]F5TiqK$denV0̏NdF1gq6>HڪQGJreJYvm-+{9^j@'!nN󭛃e7 +y>򙝅GvJ'{ڍhD}s}٘ffATs{RzhueYLz2WÈU 3B,T} 04EՎ_}NՒ\d9~ YX PeBKnkvW]s( 7lyٓ0f;!)!k~q˞GԸ<XUn5ޛLزS閨[k᜻K+˕ʩ-/0Yv:b  ?*kU Ӳ&nѬ H#9vWK% Odf{(FV#7JuY]_b&0Y%ks0?{ug57b5,4,__j8 HYyJlU^ vcfJ:ܙ,R=3Ngg'T^. A!"1#02B$4CL wF8b솺;ψ eNL:9}WR2 cKK7Il8/OÎ$y z)?_k0սO!D0]HBsUuO_ϦJ x6̀ǽԏ ы} 9X«D96#}(oj5 wF0-]Q=]YJ }ǽ+lMUYt{H$i0lr5ONipV9~3tA[9}~ɔ4+|*}Q7][DZy2x= 4 Ek,Mqv$$(7.Vu1_˦?ǖRiuMK獫N>5"涪΁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Oj^DooŨ0hCdRÃK}GSMp26atxO/7 sֹ+KmoG|mv<=+׭c ToXtIƳK42O;v=U}D{O0Ee3DA[<*Ţk/m{i#- =j9_bavg+@!iX s*Kk$&L0Ľ3?ʤԞ7*$ztsize+9)ojVVwelcXoy[ĚEl^yS9'z*9 FHQr;u.qg5r1q{:l!]1;:1mn:Kyibۇ$BZUQ>a5iUIOfu2% Ti{<'[H2>[)V&ZxyYLϮ}jj^N7D?ZIYV(Zy㸊1ڢ# ?AT_E5uQ{F;M <ϭ*## mϯ?#Yj-w,^^FbX%NO9P%/#H:NP< ֡`܄+S<0qVE| O|v4ęP)U=H@Nv($F@~U#P.# ʱZDrj 9ME~|kq  n-$4 _j6ִtUCjsӹ<@?W{t2uS@h$(CqQqKzRyGҵ$ӭF#'4\V(v=AhҴ#R*[-@= E?Šs4 &*1ާk0Xӷ(3ҕʌ4 3 gy,hIAEÕQ>|G2qڔ1\CHX`$6c 5RNXC@ƛ`ȥ0d}HRm c{sQIApAMU=/QxbzTA9<)g4(E;H4ǽO,k:^P X.F\zPn|ޝ?)$42ܜ;dF$FxǽJ@T֚TmR2*@vrBOgoPL8m)dd|$ .x>xWs#8ǔ'v=j7:I:) nN*oF\rNiNC*Xw http://ns.adobe.com/xap/1.0/ Canon Canon EOS 50D Top-left 72 72 Inch 2014:08:28 12:55:52 Co-sited Tony O'Leary (Photographer) - [None] (Editor) JPEG compression 72 72 Inch 1/125 sec. f/2.8 Normal programme 160 Exif Version 2.21 2014:08:28 12:55:52 2014:08:28 12:55:52 Y Cb Cr - 7.00 EV (1/128 sec.) 3.00 EV (f/2.8) 0.00 EV Spot 100.0 mm 6974 bytes undefined data 00 00 00 FlashPix Version 1.0 sRGB 4752 3168 5315.436 5306.533 Inch Normal process Auto exposure Manual white balance Standard 2.2.0.0 R98 0100 C     C   !  Fhwcv dmxThc-A8afYR[Ûi/^a^Ky-Ë:%} '47YmhP4tu*}rK3uu&ť B>DF]g+i87fEF0ܧO:R' Zϧ#M7305+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