Recent

Author Topic: Lazarus / RaspberyPi Hardware Library  (Read 79585 times)

Pelican

  • New member
  • *
  • Posts: 5
Re: Lazarus / RaspberyPi Hardware Library
« Reply #45 on: May 26, 2015, 01:40:31 am »
I've downloaded the unit a year ago and it worked on the older Pis but now I have a Pi 2 which needs the new version of the wiringPi but when I try to build any program using that new object files the linker gives me the following error messages:

Code: [Select]
/usr/bin/ld.bfd: wiringPi.o undefined reference to symbol '__aeabi_idiv@@GCC3.5'
//lib/arm-linux-gnueabihf/libgcc_s.so.1: error adding symbols: DSO missing from command line

If I link the lazwiringpi's object file then no error but the gpio function doesn't work.
Could you help me how can I solve this linker issue?
I tried to make the object files by myself - no change.

wiringPi 2.25
Lazarus 0.9.30.4-6

I added to the wrapper more functions in wiringPi (and the spi, i2c and serial functions too) send me an email if you want the sources.

Edit:
I think this is a similar problem, but I have no idea how could I fix this.
http://glandium.org/blog/?p=2510
« Last Edit: May 29, 2015, 12:53:37 pm by Pelican »

Pelican

  • New member
  • *
  • Posts: 5
Re: Lazarus / RaspberyPi Hardware Library
« Reply #46 on: June 14, 2015, 09:34:21 am »
I've updated my Lazarus to v1.5 and fpc to the latest but the problem is still there, cannot compile any code which use the wiringPi.o.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1447
Re: Lazarus / RaspberyPi Hardware Library
« Reply #47 on: June 14, 2015, 09:50:07 am »
Try to add this to the compiler options when compiling for RPi2:
Code: [Select]
-dFPC_ARMHF -CpARMV7A -CaEABIHF -CfVFPv3 -OoFASTMATH
if you use hardfloat for RPi2.

Pelican

  • New member
  • *
  • Posts: 5
Re: Lazarus / RaspberyPi Hardware Library
« Reply #48 on: June 15, 2015, 06:11:05 pm »
Hi,

Thank you for your reply.
I tried to put those to the Project options/Compilation and Linking/Linking/pass to linker...
I've got unrecognized option warning for these options: -CpARMV7A -CaEABIHF -CfVFPv3
I removed them and got a new error message: Error while linking

« Last Edit: June 15, 2015, 06:46:34 pm by Pelican »

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1447
Re: Lazarus / RaspberyPi Hardware Library
« Reply #49 on: June 15, 2015, 07:01:00 pm »
Could it be that you have a compiler that does not support hardfloat ?
I presume you need hardfloat due to the info in your post:
Code: [Select]
//lib/arm-linux-gnueabihf/libgcc_s.so.1: error adding symbols: DSO missing from command line
If your compiler does hardfloat, it would support the instructions I gave you.
So, check your compiler would be my advice !

Pelican

  • New member
  • *
  • Posts: 5
Re: Lazarus / RaspberyPi Hardware Library
« Reply #50 on: June 15, 2015, 10:54:36 pm »
This is the compiler: Free Pascal Compiler version 3.1.1 [2015/05/28] for arm
Based on it's help it supports all of the options you gave but I put all those to the linker's option...  :o
How can I give these option to the compiler?
I tried to put Project options/Compiler options/Additions and overrides/Custom and got this error message>

Code: [Select]
Compile Project, Target: homeserver: Exit code 256, Errors: 1, Warnings: 2, Hints: 1
main.pas(8,79) Hint: Unit "wiringPi" not used in Main
homeserver.lpr(21,0) Warning: "crtbegin.o" not found, this will probably cause a linking failure
homeserver.lpr(21,0) Warning: "crtend.o" not found, this will probably cause a linking failure
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/usr/bin/ld: /home/pi/projects/homeserver/wiringPi.o: undefined reference to symbol '__aeabi_idiv@@GCC_3.5'
//lib/arm-linux-gnueabihf/libgcc_s.so.1: error adding symbols: DSO missing from command line
[8.977] Executing "/usr/bin/ld" with command line "  --dynamic-linker=/lib/ld-linux-armhf.so.3    -L. -o homeserver link.res"
homeserver.lpr(21,0) Error: Error while linking

Edit:

Anyway, I tried the h2wiringpi from the previous page and it seems it's working...

The
{$linklib libwiringPi}
just did the trick.
« Last Edit: June 16, 2015, 12:15:06 am by Pelican »

lazaursrotton

  • Newbie
  • Posts: 3

lazaursrotton

  • Newbie
  • Posts: 3

Pelican

  • New member
  • *
  • Posts: 5
Re: Lazarus / RaspberyPi Hardware Library
« Reply #53 on: June 18, 2015, 11:07:02 pm »
I've put SPI, I2C, serial and other functions to it.
http://pel.hu/down/libwiringpi.pas

kaptindan

  • Newbie
  • Posts: 2
Re: Lazarus / RaspberyPi 2 model B Hardware Library
« Reply #54 on: February 15, 2016, 03:53:43 pm »
Hello, newbe here! I've been working with the Raspberry Pi 2 Model B and trying to access the GPIO....no luck so far using h2wiringPi...any ideas?????

avra

  • Hero Member
  • *****
  • Posts: 2130
    • Additional info
Re: Lazarus / RaspberyPi Hardware Library
« Reply #55 on: May 10, 2021, 09:42:24 am »
I've put SPI, I2C, serial and other functions to it.
http://pel.hu/down/libwiringpi.pas

In case someone else was hunting it down (original site has gone to oblivion):
Code: Pascal  [Select][+][-]
  1. unit libwiringpi;
  2.  
  3. (* Pascal wrapper unit for Gordon Henderson wiringPi library. The source can
  4.  * be found at https://http://wiringpi.com
  5.  *
  6.  * hwiringpi: origanal Wrapper and
  7.  * pascal sample by Alex Schaller.
  8.  *
  9.  * Fork
  10.  * h2wiringpi: Version 0.1 By Allen Roton
  11.  * wiringPi Version 2.26
  12.  *
  13.  * libwiringpi: Version 0.2 by Pelican (pel.hu)
  14.  * I2C, SPI, serial and other functions
  15.  *
  16.  * wiringPi:
  17.  *  Arduino compatable (ish) Wiring library for the Raspberry Pi
  18.  *  Copyright (c) 2012 Gordon Henderson
  19.  ***********************************************************************
  20.  * This file is part of wiringPi:
  21.  *  https://projects.drogon.net/raspberry-pi/wiringpi/
  22.  *
  23.  *    wiringPi is free software: you can redistribute it and/or modify
  24.  *    it under the terms of the GNU General Public License as published by
  25.  *    the Free Software Foundation, either version 3 of the License, or
  26.  *    (at your option) any later version.
  27.  *
  28.  *    wiringPi is distributed in the hope that it will be useful,
  29.  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
  30.  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  31.  *    GNU General Public License for more details.
  32.  *
  33.  *    You should have received a copy of the GNU General Public License
  34.  *    along with wiringPi.  If not, see <http://www.gnu.org/licenses/>.
  35.  ***********************************************************************
  36.  *)
  37.  
  38. {$linklib c}
  39. {$linklib libwiringPi}
  40.  
  41. interface
  42.  
  43. // Handy defines
  44. const
  45. // Pin modes
  46.   INPUT =           0;
  47.   OUTPUT  =         1;
  48.   PWM_OUTPUT=       2;
  49.   GPIO_CLOCK=       3;
  50.   SOFT_PWM_OUTPUT=  4;
  51.   SOFT_TONE_OUTPUT= 5;
  52.   PWM_TONE_OUTPUT=  6;
  53.  
  54.   LOW=  0;
  55.   HIGH= 1;
  56.  
  57. // Pull up/down/none
  58.   PUD_OFF=     0;
  59.   PUD_DOWN=    1;
  60.   PUD_UP=      2;
  61.  
  62. // PWM
  63.   PWM_MODE_MS=    0;
  64.   PWM_MODE_BAL=   1;
  65.  
  66. // Interrupt levels
  67.   INT_EDGE_SETUP=   0;
  68.   INT_EDGE_FALLING= 1;
  69.   INT_EDGE_RISING=  2;
  70.   INT_EDGE_BOTH=    3;
  71.  
  72.   PI_MODELS : array [0..7] of string = (
  73.     'Unknown',
  74.     'model A',
  75.     'model B',
  76.     'model B+',
  77.     'model CM',
  78.     'model A+',
  79.     'model 2',
  80.     'New unknown'
  81.    );
  82.  
  83.   PI_VERSIONS : array [0..5] of string = (
  84.     'version unknown',
  85.     'v1',
  86.     'v1.1',
  87.     'v1.2',
  88.     'v2',
  89.     'new unknown'
  90.    );
  91.  
  92.   PI_MAKERS : array [0..5] of string = (
  93.     'Unknown',
  94.     'EGOMAN',
  95.     'SONY',
  96.     'QISDA',
  97.     'MBEST',
  98.     'New unknown');
  99.  
  100.   // Pin mappings from P1 connector to WiringPi library
  101.   // Px represents to physical pin on the RaspberryPi P1 connector
  102.  
  103.   // P1 = 3.3V
  104.   // P2 = 5V
  105.   P3  = 8;
  106.   // P4 = 5V
  107.   P5  = 9;
  108.   //P6 = GND
  109.   P7  = 7;
  110.   P8  = 15;
  111.   //P9 = GND
  112.   P10 = 16;
  113.   P11 = 0;
  114.   P12 = 1;
  115.   P13 = 2;
  116.   //P14 = GND
  117.   P15 = 3;
  118.   P16 = 4;
  119.   // P17 = 3.3V
  120.   P18 = 5;
  121.   P19 = 12;
  122.   // P20 = GND
  123.   P21 = 13;
  124.   P22 = 6;
  125.   P23 = 14;
  126.   P24 = 10;
  127.   // P25 = GND
  128.   P26 = 11;
  129.   // pi2
  130.   P27 = 30;
  131.   P28 = 31;
  132.   P29 = 21;
  133.   // P30 = GND
  134.   P31  = 22;
  135.   P32 = 26;
  136.   P33 = 23;
  137.   // P34 = GND
  138.   P35 = 24;
  139.   P36 = 27;
  140.   P37 = 25;   // ops was 24
  141.   P38 = 28;
  142.   // P39 = GND
  143.   P40 = 29;
  144.  
  145.   PI_2_WiretoPhy : array[0..29] of integer = (
  146.     11, 12,     //0,1
  147.     13, 15,     //2,3
  148.     16, 18,     //4,5
  149.     22, 7,      //6,7
  150.     3,  5,      //8,9
  151.     24, 26,     //10,11
  152.     19, 21,     //12,13
  153.     23, 8,      //14,15
  154.     10,-17,     //16,17
  155.    -18,-19,     //18,19
  156.    -20, 29,     //20,21
  157.     31, 33,     //22,23
  158.     35, 37,     //24,25
  159.     32, 36,     //26,27
  160.     38, 40      //28,29
  161.   ) ;
  162.  // -1 GND
  163.  // -5 5V
  164.  // -3 3.3V
  165.  // -6
  166.  // -7
  167.   PI_2_Phy_toWire : array [1..40] of integer =
  168.     ( -3,  -5,
  169.        8,  -5,
  170.        9,  -1,
  171.        7,   15,
  172.       -1,   16,
  173.        0,   1,
  174.        2,  -1,
  175.        3,   4,
  176.       -3,   5,
  177.        12, -1,
  178.        13,  6,
  179.        14,  10,
  180.       -1,   11,
  181.       -6,  -7,
  182.        21, -1,
  183.        22,  26,
  184.        23, -1,
  185.        24,  27,
  186.        25,  28,
  187.       -1,   29
  188.     );
  189.  
  190.   altmodes : array[0..7] of string = ('IN', 'OUT', 'ALT5', 'ALT4', 'ALT0', 'ALT1', 'ALT2', 'ALT3');
  191.  
  192. type
  193.   TPinMode = (pm_INPUT,pm_OUTPUT,pm_PWM_OUTPUT,pm_GPIO_CLOCK,pm_SOFT_PWM_OUTPUT,pm_SOFT_TONE_OUTPUT,pm_PWM_TONE_OUTPUT);
  194.   TpullRisistor = (prPUD_OFF  ,prPUD_DOWN , prPUD_UP );
  195.   Tintlevles = (il_EDGE_SETUP,il_EDIGE_FALLING,il_EDGE_RISING,il_EDGE_BOTH);
  196.  
  197. // Core wiringPi functions
  198.  
  199. //extern struct wiringPiNodeStruct *wiringPiFindNode (int pin) ;
  200. //extern struct wiringPiNodeStruct *wiringPiNewNode  (int pinBase, int numPins) ;
  201.  
  202. //This initialises wiringPi and assumes that the calling program is going to be using the wiringPi pin numbering scheme. This is a simplified numbering scheme which provides a mapping from virtual pin numbers 0 through 16 to the real underlying Broadcom GPIO pin numbers. See the pins page for a table which maps the wiringPi pin number to the Broadcom GPIO pin number to the physical location on the edge connector.
  203. //This function needs to be called with root privileges.
  204. function wiringPiSetup:longint;cdecl;external;
  205. //This initialises wiringPi but uses the /sys/class/gpio interface rather than accessing the hardware directly. This can be called as a non-root user provided the GPIO pins have been exported before-hand using the gpio program. Pin numbering in this mode is the native Broadcom GPIO numbers – the same as wiringPiSetupGpio() above, so be aware of the differences between Rev 1 and Rev 2 boards.
  206. //Note: In this mode you can only use the pins which have been exported via the /sys/class/gpio interface before you run your program. You can do this in a separate shell-script, or by using the system() function from inside your program to call the gpio program.
  207. //Also note that some functions have no effect when using this mode as they’re not currently possible to action unless called with root privileges. (although you can use system() to call gpio to set/change modes if needed)
  208. function wiringPiSetupSys:longint;cdecl;external;
  209. // This is identical to wiringPiSetup, however it allows the calling programs to use the Broadcom GPIO pin numbers directly with no re-mapping.
  210. // this function needs to be called with root privileges, and note that some pins are different from revision 1 to revision 2 boards.
  211. function wiringPiSetupGpio:longint;cdecl;external;
  212. //Identical to wiringPiSetupGpio, however it allows the calling programs to use the physical pin numbers on the P1 connector only.
  213. //this function needs to be called with root priviliges.
  214. function wiringPiSetupPhys:longint;cdecl;external;
  215. procedure pinModeAlt(pin:longint; mode:longint);cdecl;external;
  216.  
  217. procedure pinMode(pin:longint; mode:longint);cdecl;external;
  218. procedure pinMode_pas(pin:longint; mode:TPinMode);
  219.  
  220. procedure pullUpDnControl(pin:longint; pud:longint);cdecl;external;
  221. //This sets the pull-up or pull-down resistor mode on the given pin, which should be set as an input.
  222. //Unlike the Arduino, the BCM2835 has both pull-up an down internal resistors.
  223. //The parameter pud should be; PUD_OFF, (no pull up/down), PUD_DOWN (pull to ground) or PUD_UP (pull to 3.3v)
  224. //The internal pull up/down resistors have a value of approximately 50K? on the Raspberry Pi.
  225. //This function has no effect on the Raspberry Pi’s GPIO pins when in Sys mode.
  226. //If you need to activate a pull-up/pull-down, then you can do it with the gpio program in a script before you start your program.
  227. procedure pullUpDnControl_pas(pin : longint ; pud : tpullRisistor);
  228.  
  229. function digitalRead(pin:longint):longint;cdecl;external;
  230. procedure digitalWrite(pin:longint; value:longint);cdecl;external;
  231. function digitalWriteByte(value:longint):longint;cdecl;external;
  232. procedure pwmWrite(pin:longint; value:longint);cdecl;external;
  233. function analogRead(pin:longint):longint;cdecl;external;
  234. procedure analogWrite(pin:longint; value:longint);cdecl;external;
  235.  
  236. // PiFace specifics
  237. //  (Deprecated)
  238. //extern int  wiringPiSetupPiFace (void) ;
  239. //extern int  wiringPiSetupPiFaceForGpioProg (void) ; // Don't use this - for gpio program only
  240.  
  241. // On-Board Raspberry Pi hardware specific stuff
  242. function piBoardRev:longint;cdecl;external;
  243. // USE AT YOU OWN RISK
  244. procedure piBoardId(
  245.   var model : longint ;
  246.   var rev : longint;
  247.   var mem : longint;
  248.   var maker : longint ;
  249.   var overvolted :longint );cdecl;external;
  250. // USE AT YOUR OWN RISK
  251. function piboardtostr() : string ;
  252.  
  253. function wpiPinToGpio(wpiPin:longint):longint;cdecl;external;
  254. function physPinToGpio(physPin:longint):longint;cdecl;external;
  255. procedure setPadDrive(group:longint; value:longint);cdecl;external;
  256. function getAlt(pin:longint):longint;cdecl;external;
  257. // from getalt to array of sting
  258. function getaltpintostr(pin : longint):string;
  259.  
  260. procedure pwmToneWrite(group:longint; freq:longint);cdecl;external;
  261. procedure pwmSetMode(range:longint);cdecl;external;    
  262. procedure pwmSetRange(range:dword);cdecl;external;     //unsigned
  263. procedure pwmSetClock(divisor:longint);cdecl;external;
  264. procedure gpioClockSet(pin:longint; freq:longint);cdecl;external;
  265.  
  266. // Interrupts
  267. //  (Also Pi hardware specific)
  268. // DEPICATED use wiringPiISR
  269. function waitForInterrupt(pin:longint;mS:longint):longint;cdecl;external;
  270. function wiringPiISR(pin:longint;mode:longint ;  pcallbback : pointer):longint;cdecl;external;
  271. //  wiringPiISR
  272. function wiringPiISR_pas(pin:longint; mode:Tintlevles ;  pcallbback : pointer):longint;
  273.  
  274. // Threads
  275. //  function piThreadCreate(ptr:pointer):longint;cdecl;external;
  276. procedure piLock(key:longint);cdecl;external;
  277. procedure piUnlock(key:longint);cdecl;external;
  278.  
  279. // Schedulling priority
  280. function piHiPri(const pri:longint):longint;cdecl;external;
  281.  
  282. // Extras from arduino land
  283. procedure delay(howLong:dword);cdecl;external;
  284. procedure delayMicroseconds(howLong:dword);cdecl;external;
  285. //This returns a number representing the number of milliseconds since your
  286. //program called one of the wiringPiSetup functions. It returns an
  287. //unsigned 32-bit number which wraps after 49 days.
  288. function millis:dword;cdecl;external;
  289. function micros:dword;cdecl;external;
  290.  
  291. procedure wiringPiGpioMode(mode:longint);cdecl;external;
  292.  
  293. function wiringPiI2CSetupInterface(const device:PChar; devId: longint):longint;cdecl;external;
  294. function wiringPiI2CSetup(const devId: longint):longint;cdecl;external;
  295. function wiringPiI2CRead(fd:longint):longint;cdecl;external;
  296. function wiringPiI2CReadReg8(fd,reg:longint):longint;cdecl;external;
  297. function wiringPiI2CReadReg16(fd,reg:longint):longint;cdecl;external;
  298. function wiringPiI2CWrite(fd,data:longint):longint;cdecl;external;
  299. function wiringPiI2CWriteReg8(fd,reg,data:longint):longint;cdecl;external;
  300. function wiringPiI2CWriteReg16(fd,reg,data:longint):longint;cdecl;external;
  301.  
  302. function wiringPiSPIGetFd(channel:longint):longint;cdecl;external;
  303. function wiringPiSPIDataRW(channel:longint; data: Pointer; len:longint):longint;cdecl;external;
  304. function wiringPiSPISetup(channel,speed:longint):longint;cdecl;external;
  305.  
  306. function serialOpen(const device:PChar; const baud: longint):longint;cdecl;external;
  307. procedure serialClose(const fd:longint);cdecl;external;
  308. procedure serialFlush(const fd:longint);cdecl;external;
  309. procedure serialPutchar(const fd:longint; const c: char);cdecl;external;
  310. procedure serialPuts(const fd:longint; const s:PChar);cdecl;external;
  311. //  procedure serialPrintf(const fd:longint; const message);cdecl;external;
  312.  
  313. function serialDataAvail(const fd:longint):longint;cdecl;external;
  314. function serialGetchar(const fd:longint):longint;cdecl;external;
  315. function serialGetString(const fd:longint): String;
  316. procedure serialPutString(const fd:longint; s:string);
  317.  
  318. //extern void gpioClockSet        (int pin, int freq) ;
  319.  
  320. function max31855Setup (const pinBase:longint; const spiChannel:longint):longint;cdecl;external;
  321. function max5322Setup (const pinBase:longint; const spiChannel:longint):longint;cdecl;external;
  322. function mcp23008Setup(const pinBase:longint; const i2cAddress:longint):longint;cdecl;external;
  323. function mcp23016Setup(const pinBase:longint; const i2cAddress:longint):longint;cdecl;external;
  324. function mcp23017Setup(const pinBase:longint; const i2cAddress:longint):longint;cdecl;external;
  325. function mcp23s08Setup (const pinBase:longint; const spiPort:longint; const devId: longint):longint;cdecl;external;
  326. function mcp23s17Setup (const pinBase:longint; const spiPort:longint; const devId: longint):longint;cdecl;external;
  327. function mcp3002Setup (const pinBase:longint; const spiChannel:longint):longint;cdecl;external;
  328. function mcp3004Setup (const pinBase:longint; const spiChannel:longint):longint;cdecl;external;
  329. function mcp4802Setup (const pinBase:longint; const spiChannel:longint):longint;cdecl;external;
  330. function sn3218Setup(const pinBase:longint):longint;cdecl;external;
  331.  
  332. function softPwmCreate(pin,value,range:longint):longint;cdecl;external;
  333. procedure softPwmWrite(pin,value:longint);cdecl;external;
  334.  
  335. function pcf8574Setup(const pinBase:longint; const i2cAddress:longint):longint;cdecl;external;
  336. function pcf8591Setup(const pinBase:longint; const i2cAddress:longint):longint;cdecl;external;
  337.  
  338. procedure setBit(pin:longint);
  339. procedure clearBit(pin:longint);
  340. function getBit(pin:longint):longint;
  341.  
  342.  
  343. implementation
  344.  
  345. uses sysutils;
  346.  
  347. procedure pullUpDnControl_pas(pin : longint ; pud : tpullRisistor);
  348. begin
  349.   pullUpDnControl(pin,ord(pud));
  350. end;
  351.  
  352. procedure pinMode_pas(pin:longint; mode:TPinMode);
  353. begin
  354.      pinMode(pin, ord(mode));
  355. end;
  356.  
  357. function wiringPiISR_pas(pin:longint; mode:Tintlevles ;  pcallbback : pointer):longint;
  358. begin
  359.    result := wiringPiISR(pin,ord(mode) , pcallbback) ;
  360. end;
  361.  
  362. function piboardtostr() : string ;
  363.  var model : longint ;
  364.  var rev : longint;
  365.  var mem : longint;
  366.  var maker : longint ;
  367.  var overvolted :longint;
  368. begin
  369.   result:='Unkown';
  370.   piBoardId(model,rev,mem,maker,overvolted );
  371.   result:='MODEL: '+PI_MODELS[model]+#13#10+'REV: '+IntToStr(rev)+#13#10+'MAKER: '+PI_MAKERS[maker]+
  372.       #13#10+'MEM: '+IntToStr(mem);
  373.  // if overvolted <> 0 then
  374.  //  result := result + ' OVER VOLT' + inttostr(overvolted );
  375. end;
  376.  
  377. function getaltpintostr(pin : longint):string;
  378. begin
  379.   result := altmodes[ getAlt(pin) ];
  380. end;
  381.  
  382. function serialGetString(const fd:longint): String;
  383. begin
  384.   Result:='';
  385.   while serialDataAvail(fd)>0 do Result:=Result+chr(serialGetChar(fd));
  386. end;
  387.  
  388. procedure serialPutString(const fd:longint; s:string);
  389. begin
  390.   serialPuts(fd,PChar(s));
  391. end;
  392.  
  393. procedure setBit(pin:longint);
  394. begin
  395.   digitalWrite(pin,1);
  396. end;
  397.  
  398. procedure clearBit(pin:longint);
  399. begin
  400.   digitalWrite(pin,0);
  401. end;
  402.  
  403. function getBit(pin:longint):longint;
  404. begin
  405.   Result:=digitalRead(pin);
  406. end;
  407.  
  408. end.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

ccrause

  • Sr. Member
  • ****
  • Posts: 389
Re: Lazarus / RaspberyPi Hardware Library
« Reply #56 on: May 10, 2021, 12:05:01 pm »
Gordon has deprecated wiringPi.  Obviously the library didn't become useless overnight, but I guess as time passes users will miss out on support for newer RPi models (beyond 4B).  In future perhaps consider one of the alternative hardware access methods mentioned in the wiki.

MarkMLl

  • Hero Member
  • *****
  • Posts: 2712
Re: Lazarus / RaspberyPi Hardware Library
« Reply #57 on: May 10, 2021, 01:45:39 pm »
Gordon has deprecated wiringPi.  Obviously the library didn't become useless overnight, but I guess as time passes users will miss out on support for newer RPi models (beyond 4B).  In future perhaps consider one of the alternative hardware access methods mentioned in the wiki.

Noting also that hardware access via /sys/class/gpio has itself been deprecated in favour of /dev/gpiochip, and that /dev/mem is specific to RPi-like boards while /sys/class/gpio and /dev/gpiochip are supported by the standard Linux kernel.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

avra

  • Hero Member
  • *****
  • Posts: 2130
    • Additional info
Re: Lazarus / RaspberyPi Hardware Library
« Reply #58 on: May 11, 2021, 08:58:29 am »
Gordon has deprecated wiringPi.  Obviously the library didn't become useless overnight, but I guess as time passes users will miss out on support for newer RPi models (beyond 4B).
WiringPi has been forked and maintained, having also a Debian package. We'll see what happens. According to number of commits and issues solved (33 closed) - things do not look that bad.

https://github.com/WiringPi/WiringPi
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

ccrause

  • Sr. Member
  • ****
  • Posts: 389
Re: Lazarus / RaspberyPi Hardware Library
« Reply #59 on: May 11, 2021, 10:35:01 am »
Gordon has deprecated wiringPi.  Obviously the library didn't become useless overnight, but I guess as time passes users will miss out on support for newer RPi models (beyond 4B).
WiringPi has been forked and maintained, having also a Debian package. We'll see what happens. According to number of commits and issues solved (33 closed) - things do not look that bad.

https://github.com/WiringPi/WiringPi
Thanks, good to know it is alive somewhere else!

 

TinyPortal © 2005-2018