#include <stdint.h>
#include "Driver_SPI.h"
Go to the source code of this file.
|
| #define | SPI_DAC_SPEED 5e5 |
| |
| #define | SPI_control_for_relay_driver (ARM_SPI_MODE_MASTER | ARM_SPI_CPOL1_CPHA1 | ARM_SPI_MSB_LSB | ARM_SPI_SS_MASTER_SW | ARM_SPI_DATA_BITS(8) ) |
| | [ref_SPI_control_for_relay_driver]
|
| |
| #define | SPI_control_for_DAC (ARM_SPI_MODE_MASTER | ARM_SPI_CPOL0_CPHA1 | ARM_SPI_MSB_LSB | ARM_SPI_SS_MASTER_SW | ARM_SPI_DATA_BITS(16) ) |
| | [ref_SPI_control_for_relay_driver]
|
| |
|
| void | SPI_Inizialize (void) |
| | SPI is initialized here. Its ise t at 8 bits and 100 KHz, as default.
|
| |
| void | SPI_callback (uint32_t event) |
| | After that the SPI ends its operations and the interrupt is generated this signal function is called which marks errors, if any and flags of operation done.
|
| |
| void | SPI_Inizialize_per_il_DAC (void) |
| | SPI is initialized here for DAC. Remember to set the variable SPI_speed before the call. This function is becoming obsolote.
|
| |
| void | SPItx (unsigned char dato) |
| | This is a blocking function that transmits one byte over the SPI.
|
| |
| void | SPItx_16_per_il_DAC (uint16_t dato) |
| |
| unsigned char | SPIrx (void) |
| |
| unsigned long int | SPIrx24 (void) |
| |
|
|
ARM_DRIVER_SPI | Driver_SPI2 |
| |
| ARM_DRIVER_SPI * | SPIdrv |
| |
| uint32_t | evento_SPI |
| | This is the variable which resembles the flags from the communication.
|
| |
| uint32_t | SPI_speed |
| | The speed to be set to SPI. It could varies from chip to chip.
|
| |
| int32_t | status |
| |