Lite SBC Library  v1.0.0
TLE94x1_SPI.h File Reference

Declaration file for TLE94x1 SBC family device SPI functions. More...

#include <stdint.h>
Include dependency graph for TLE94x1_SPI.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

uint8_t SBC_SPI_INIT (void)
 IMPORTANT! THIS METHOD HAS TO BE DEFINED BY THE USER. More...
 
uint16_t SBC_SPI_TRANSFER16 (uint8_t Upper, uint8_t Lower)
 IMPORTANT! THIS METHOD HAS TO BE DEFINED BY THE USER. More...
 

Detailed Description

Declaration file for TLE94x1 SBC family device SPI functions.

Version
V1.0.0
Date
15. April 2019
Author
Markus Noll / marku.nosp@m.s.no.nosp@m.ll@in.nosp@m.fine.nosp@m.on.co.nosp@m.m
Yannek Micha Rixen / Yanne.nosp@m.k.Ri.nosp@m.xen@i.nosp@m.nfin.nosp@m.eon.c.nosp@m.om

Function Documentation

◆ SBC_SPI_INIT()

uint8_t SBC_SPI_INIT ( void  )

IMPORTANT! THIS METHOD HAS TO BE DEFINED BY THE USER.

     The function has to initialze the SPI of the uC and will be called once during SBC_Init().
     In case, the SPI hardware is already initialized by some other code before, it can be left blank.
Return values
Methodhas to return 0 if initialization was successful.

◆ SBC_SPI_TRANSFER16()

uint16_t SBC_SPI_TRANSFER16 ( uint8_t  Upper,
uint8_t  Lower 
)

IMPORTANT! THIS METHOD HAS TO BE DEFINED BY THE USER.

     The function will be called by the library everytime when a SPI communication is needed.
     The function proceeds a bidirectional 16-bit transfer to/from the SBC  .
     As some UCs only supports 8-Bit transfers, the input arguments are split in two 8-bit arguments.
     For further implementation details have a look at datasheet chapter 13.1 or at the Arduino-examples.
Parameters
UpperThe first 8 bit to transmit to the SBC.
LowerThe second 8 bit to transmit to the SBC.
Return values
Thefunction will return all 16 bits received from the SBC. Bit[15:8] are the first 8 bits received (Status-Information-Field). Bit[7:0] is the data-field transmitted of the SBC.