www.beck-ipc.com

@CHIP-RTOS C Library V2.06 - SPI API


spi_read_write_hw

Read and write from the SPI Interface simultaneously (hardware interface)

unsigned int spi_read_write_hw ( void far *rbufferPtr,                                  const void far *wbufferPtr,                                  unsigned short nbytes );

Parameters

rbufferPtr

Pointer to buffer where read data should be stored

wbufferPtr

Pointer to buffer which contains write data

nbytes

number of bytes to read

Return Value

State:
BIT5 = 1: A collision has occurred between multiple masters
BIT6 = 1: A overrun was detected

Comments

Use this function if the hardware interface is used.
Overrun detection only works if the SLVSEL pin is used as chipselect.

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to this RTOS API function's documentation for more details.

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3
    n/an/an/aV0.90

Supported by @CHIP-RTOS C Library since version

    CLIB
    V2.01

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document