camerart
Well-Known Member
Hi,
I'm trying to translate some code from C to Oshonsoft, and I'm a bit stuck!
Here is the code below for a PIC controlled radio module SX1278. If it's understandable, how would this be written in Oshonsoft please?
Camerart.
Variables;
SIZE
X
LENGTH
DATA
FROM SX1278 DATA SHEET
Reading the SX1278 RxNbBytes Register gives the number of bytes received so far = SIZE
Reading the FIFO is receiving the DATA
Writing the PayLoadLength sets number in the Register
Write FIFO DATA Transmit FIFO DATA until x = LENGTH
CODE:
size = ReadSPI(GetRxNbBytes())
while (x < size)
SPIRead(GetFifo())
x = x+1
WriteSPI(SetPayloadLength(length))
while (x < length) {
WriteSPI(SetFifo(data[ x ]))
x = x+1
I'm trying to translate some code from C to Oshonsoft, and I'm a bit stuck!
Here is the code below for a PIC controlled radio module SX1278. If it's understandable, how would this be written in Oshonsoft please?
Camerart.
Variables;
SIZE
X
LENGTH
DATA
FROM SX1278 DATA SHEET
Reading the SX1278 RxNbBytes Register gives the number of bytes received so far = SIZE
Reading the FIFO is receiving the DATA
Writing the PayLoadLength sets number in the Register
Write FIFO DATA Transmit FIFO DATA until x = LENGTH
CODE:
size = ReadSPI(GetRxNbBytes())
while (x < size)
SPIRead(GetFifo())
x = x+1
WriteSPI(SetPayloadLength(length))
while (x < length) {
WriteSPI(SetFifo(data[ x ]))
x = x+1
Last edited: