Question about Debug
Greg LaPolla
Posts: 320
in Propeller 2
The debug line displays:
Pins :
I cant figure out why the variable values aren't displayed. I have also tried using the parameter variables as well. I have a few other debug statements in this object that I am working on that do the same thing.
PUB start(dpin, cspin, clkpin, numDevs) | i SPI_MOSI := dpin SPI_CLK := clkpin SPI_CS := cspin debug("Pins : ", SPI_MOSI," ",SPI_CLK," ",SPI_CS) if (numDevs <= 0 || numDevs > 8 ) numDevs := 8 maxDevices := numDevs pinl(SPI_MOSI) pinl(SPI_CLK) pinh(SPI_CS) bytefill(@status, $00, 64) repeat i from 0 to maxdevices - 1 spiTransfer(i,OP_DISPLAYTEST,0) setScanLimit(i,7) spiTransfer(i,OP_DECODEMODE,0) clearDisplay(i) shutdown(i,true) i++
Comments
You need to tell it how you want the value displayed:
debug("Pins : ", udec (SPI_MOSI, SPI_CLK, SPI_CS))