SAmeis / pascalio

Input/Output library for Raspberry Pi or any other Linux based microcontroller
Other
29 stars 9 forks source link

fpspi.pas SetMode procedure issues #5

Closed rainbow-cnay closed 7 years ago

rainbow-cnay commented 7 years ago

fpspi.pas , line 185:

procedure TSPILinuxDevice.SetMode(AValue: TSPIMode); begin if FpIOCtl(fHandle, SPI_IOC_RD_MODE, @AValue) = -1 then DoIoCtlError(SPI_IOC_RD_MODE); end;

This should be:

procedure TSPILinuxDevice.SetMode(AValue: TSPIMode); begin if FpIOCtl(fHandle, SPI_IOC_WR_MODE, @AValue) = -1 then DoIoCtlError(SPI_IOC_WR_MODE); end;