Module grisp_spi

SPI driver API.

Description

SPI driver API.

Data Types

spi_mode()

spi_mode() = #{cpol => low, cpha => leading} | #{cpol => low, cpha => trailing} | #{cpol => high, cpha => leading} | #{cpol => high, cpha => trailing}

spi_slot()

spi_slot() = spi1 | spi2

Function Index

send_recv/3Send request and receive response.
send_recv/5Send request and receive response.

Function Details

send_recv/3

send_recv(Slot::spi_slot(), Mode::spi_mode(), Req::binary()) -> Response::binary()

Send request and receive response.

send_recv/5

send_recv(Slot::spi_slot(), Mode::spi_mode(), Req::binary(), Skip::integer(), Pad::integer()) -> Response::binary()

Send request and receive response.

The send data is Req appended with Pad times <<16#ff>>, i.e, Pad * 8 bits of value 1.

The parameter Skip denotes the number of bytes skipped at the beginning of the received response.


Generated by EDoc