Class SPICPAL

Inheritance Relationships

Derived Type

Class Documentation

class SPICPAL

SPI abstract API.

Subclassed by tle5012::SPICIno

Public Functions

virtual Error_t init() = 0

Initializes the SPIC.

Return values:
  • OK – if success

  • INIT_ERROR – if initialization error

Returns:

SPIC error code

virtual Error_t deinit() = 0

Deinitialize the SPIC.

Return values:
  • OK – if success

  • INIT_ERROR – if deinitialization error

Returns:

SPIC error code

virtual Error_t triggerUpdate() = 0

Sends a trigger through out the SPI bus.

Return values:
  • OK – if success

  • INIT_ERROR – if deinitialization error

Returns:

SPIC error code

virtual Error_t sendReceive(uint16_t *sent_data, uint16_t size_of_sent_data, uint16_t *received_data, uint16_t size_of_received_data) = 0

Function which allows 3wire SPI (SSC) by sending and receiving data in the same function.

Parameters:
  • sent_data – pointer two 2*unit16_t value for one command word and one data word if something should be written

  • size_of_sent_data – the size of the command word default 1 = only command 2 = command and data word

  • received_data – pointer to data structure buffer for the read data

  • size_of_received_data – size of data words to be read

Return values:
  • OK – if success

  • INIT_ERROR – if transfer fails

Returns:

SPIC error code