PreviousNext
Help > RITTLE FOR THE PIC32MZ MICROCONTROLLER > Work with Communication Interfaces > recv
recv

Format:                                                                        

integer= recv (text_interface);

Receive a single data word from the specified interface.

The interfaces is specified in text form – “UART1”, “SPI2”, etc.

Specifically for the I2C case, the interface also includes an optional action, immediately following the interface identifier.

Actions can be

:S     - The transmission is preceded by an I2C start condition.

:P     - The transmission is followed by an I2C stop condition.

:R     - The transmission is preceded by an I2C repeated start condition.

Example:

var byte key = recv(“UART1”);