![]() |
HT32SX Monarch Scan
Monarch Scan application for HT32SX
|
: This file provides code for the configuration of the SPI instances. More...
#include "main.h"Go to the source code of this file.
Functions | |
| void | MX_SPI1_Init (void) |
| uint16_t | S2LPSpiWriteRegisters (uint8_t address, uint8_t n_bytes, uint8_t *buffer) |
| SPI function to write registers of a slave device. More... | |
| uint16_t | S2LPSpiReadRegisters (uint8_t RegisterAddr, uint8_t NumByteToRead, uint8_t *pBuffer) |
| SPI function to read registers from a slave device. More... | |
| void | S2LPSetSpiInUse (uint8_t state) |
| Set the S2LP in use flag. More... | |
| uint8_t | S2LPGetSpiInUse (void) |
| Get the S2LP in use flag. More... | |
| uint16_t | S2LPSpiCommandStrobes (uint8_t command) |
| uint16_t | S2LPSpiReadFifo (uint8_t n_bytes, uint8_t *buffer) |
| uint16_t | S2LPSpiWriteFifo (uint8_t n_bytes, uint8_t *buffer) |
Variables | |
| SPI_HandleTypeDef | hspi1 |
: This file provides code for the configuration of the SPI instances.
This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause
| uint8_t S2LPGetSpiInUse | ( | void | ) |
Get the S2LP in use flag.
| [in] | none | |
| [out] | none |
| spi_in_use | 1 if in use, else 0 |
| void S2LPSetSpiInUse | ( | uint8_t | state | ) |
Set the S2LP in use flag.
| [in] | state | 1 if in use, else 0 |
| [out] | none |
| none |
| uint16_t S2LPSpiReadRegisters | ( | uint8_t | RegisterAddr, |
| uint8_t | NumByteToRead, | ||
| uint8_t * | pBuffer | ||
| ) |
SPI function to read registers from a slave device.
| RegisterAddr | register address |
| NumByteToRead | number of byte to read |
| pBuffer | buffer to retrieve data from a slave |
| ErrorStatus | error status ErrorStatus This parameter can be: SUCCESS or ERROR. |
| uint16_t S2LPSpiWriteRegisters | ( | uint8_t | address, |
| uint8_t | n_bytes, | ||
| uint8_t * | buffer | ||
| ) |
SPI function to write registers of a slave device.
| RegisterAddr | register address |
| NumByteToRead | number of byte to write |
| pBuffer | buffer contains data to write |
| ErrorStatus | error status ErrorStatus This parameter can be: SUCCESS or ERROR. |