STM32F0xx Standard Peripherals Firmware Library: SPI_MSD

STM32F0xx Standard Peripherals Library

STM32F0xx Standard Peripherals Firmware Library

Functions

static TestStatus Buffercmp (uint8_t *pBuffer1, uint8_t *pBuffer2, uint16_t BufferLength)
 Compares two buffers.
static void Fill_Buffer (uint8_t *pBuffer, uint16_t BufferLenght, uint8_t Offset)
 Fill the gloal buffer.
void HardFault_Handler (void)
 This function handles Hard Fault exception.
int main (void)
 Main program.
void NMI_Handler (void)
 This function handles NMI exception.
void PendSV_Handler (void)
 This function handles PendSVC exception.
void SVC_Handler (void)
 This function handles SVCall exception.
void SysTick_Handler (void)
 This function handles SysTick Handler.

Variables

uint8_t Buffer_Block_Rx [BUFFERSIZE]
uint8_t Buffer_Block_Tx [BUFFERSIZE]
uint16_t Status = 0
TestStatus TransferStatus = FAILED

Function Documentation

static TestStatus Buffercmp ( uint8_t *  pBuffer1,
uint8_t *  pBuffer2,
uint16_t  BufferLength 
) [static]

Compares two buffers.

Parameters:
pBuffer1,pBuffer2,:buffers to be compared.
BufferLength,:buffer's length
Return values:
PASSED,:pBuffer1 identical to pBuffer2 FAILED: pBuffer1 differs from pBuffer2

Definition at line 138 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_MSD/main.c.

References FAILED, and PASSED.

Referenced by main().

static void Fill_Buffer ( uint8_t *  pBuffer,
uint16_t  BufferLenght,
uint8_t  Offset 
) [static]

Fill the gloal buffer.

Parameters:
pBuffer,:pointer on the Buffer to fill
BufferLenght,:length of the buffer to fill
Offset,:first value to fill on the Buffer
Return values:
None.

Definition at line 120 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_MSD/main.c.

Referenced by main().

void HardFault_Handler ( void  )

This function handles Hard Fault exception.

Parameters:
None
Return values:
None

Definition at line 66 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_MSD/stm32f0xx_it.c.

int main ( void  )

Main program.

Parameters:
None
Return values:
None

< At this stage the microcontroller clock setting is already configured, this is done through SystemInit() function which is called from startup file (startup_stm32f0xx.s) before to branch to application main. To reconfigure the default setting of SystemInit() function, refer to system_stm32f0xx.c file

Definition at line 59 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_MSD/main.c.

References Buffer_Block_Rx, Buffer_Block_Tx, Buffercmp(), BUFFERSIZE, Fill_Buffer(), PASSED, Status, and TransferStatus.

void NMI_Handler ( void  )

This function handles NMI exception.

Parameters:
None
Return values:
None

Definition at line 57 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_MSD/stm32f0xx_it.c.

void PendSV_Handler ( void  )

This function handles PendSVC exception.

Parameters:
None
Return values:
None

Definition at line 88 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_MSD/stm32f0xx_it.c.

void SVC_Handler ( void  )

This function handles SVCall exception.

Parameters:
None
Return values:
None

Definition at line 79 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_MSD/stm32f0xx_it.c.

void SysTick_Handler ( void  )

This function handles SysTick Handler.

Parameters:
None
Return values:
None

Definition at line 97 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_MSD/stm32f0xx_it.c.


Variable Documentation

uint8_t Buffer_Block_Rx[BUFFERSIZE]

Definition at line 44 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_MSD/main.c.

Referenced by main().

uint8_t Buffer_Block_Tx[BUFFERSIZE]

Definition at line 44 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_MSD/main.c.

Referenced by main().

uint16_t Status = 0

Definition at line 46 of file STM32F0xx_StdPeriph_Examples/SPI/SPI_MSD/main.c.

Referenced by main().

STM32L1xx Standard Peripherals Library: Footer

 

 

 For complete documentation on STM32 Microcontrollers visit www.st.com/STM32