Declaration file for TLE94x1 SBC family device SPI functions.
More...
#include <stdint.h>
Go to the source code of this file.
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
◆ 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
-
Method | has 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
-
Upper | The first 8 bit to transmit to the SBC. |
Lower | The second 8 bit to transmit to the SBC. |
- Return values
-
The | function 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. |