STM32F0xx Standard Peripherals Firmware Library: I2C_TwoBoards

STM32F0xx Standard Peripherals Library

STM32F0xx Standard Peripherals Firmware Library

Enumerations

enum  TestStatus {
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 1, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED
}

Functions

uint8_t Buffer_Check (uint8_t *pBuffer, uint8_t *pBuffer1, uint8_t *pBuffer2, uint8_t *pBuffer3, uint16_t BufferLength)
 Compares a buffer to a list of buffers.
TestStatus Buffer_Compare (uint8_t *pBuffer1, uint8_t *pBuffer2, uint16_t BufferLength)
 Compares two buffers.
void EXTI0_1_IRQHandler (void)
 This function handles SysTick Handler.
void EXTI4_15_IRQHandler (void)
 This function handles EXTI4_15 interrupt request.
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 Switch_Color (void)
 Swap the color of the line on LCD.
void Switch_ErrorColor (void)
 Swap the color of the line on LCD.
static void TIM17_Config (uint32_t Period)
 Configures TIM17 and associated resources to generate an update interrupt.
void TIM17_IRQHandler (void)
 This function handles TIM17 global interrupt request.
static void TIM6_Config (void)
 Configures TIM6 and associated resources to generate an update interrupt each 50 ms.
void TIM6_DAC_IRQHandler (void)
 This function handles TIM6 global interrupt request.

Variables

__IO uint32_t ActionState
__IO uint32_t ActionState = ACTION_NONE
uint32_t BufferSize = BUFFER_SIZE
uint8_t Color = 0
uint32_t Divider = 1
uint32_t PeriodicValue = 15000
__IO uint32_t RecieverMode
__IO uint32_t RecieverMode = 0
CPAL_TransferTypeDef sRxStructure
CPAL_TransferTypeDef sTxStructure
__IO uint32_t TransmitMode = 0
uint8_t tRxBuffer [MAX_BUFF_SIZE]
const uint8_t tSignal1 [] = "STM32 CPAL 2xBoards Example: Signal Signal1"
const uint8_t tSignal2 [] = "STM32 CPAL 2xBoards Example: Signal Signal2"
const uint8_t tStateSignal [] = "STM32 CPAL 2xBoards Example: Signal State "

Enumeration Type Documentation

enum TestStatus
Enumerator:
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 

Definition at line 41 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/main.c.


Function Documentation

uint8_t Buffer_Check ( uint8_t *  pBuffer,
uint8_t *  pBuffer1,
uint8_t *  pBuffer2,
uint8_t *  pBuffer3,
uint16_t  BufferLength 
)

Compares a buffer to a list of buffers.

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

Definition at line 339 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/main.c.

References Buffer_Compare(), and PASSED.

Referenced by CPAL_I2C_RXTC_UserCallback().

TestStatus Buffer_Compare ( uint8_t *  pBuffer1,
uint8_t *  pBuffer2,
uint16_t  BufferLength 
)

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 315 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/main.c.

References FAILED, and PASSED.

Referenced by Buffer_Check().

void EXTI0_1_IRQHandler ( void  )

This function handles SysTick Handler.

This function handles EXTI 10 to 15 request.

Parameters:
None
Return values:
NoneThis function handles EXTI0_1 interrupt request.
Parameters:
None
Return values:
None

Definition at line 115 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/stm32f0xx_it.c.

References ACTION_NONE, ActionState, RecieverMode, and STATE_OFF.

void EXTI4_15_IRQHandler ( void  )

This function handles EXTI4_15 interrupt request.

This function handles EXTI 6 request.

Parameters:
None
Return values:
None

Definition at line 134 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/stm32f0xx_it.c.

References ACTION_NONE, ActionState, RecieverMode, and STATE_OFF.

void HardFault_Handler ( void  )

This function handles Hard Fault exception.

Parameters:
None
Return values:
None

Definition at line 68 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/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 79 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/main.c.

References ACTION_NONE, ACTION_PENDING, ACTION_PERIODIC, ActionState, BufferSize, Divider, I2C_DevStructure, I2C_TIMING, MEASSAGE_EMPTY, MESSAGE1, MESSAGE2, MESSAGE3, OWN_ADDRESS, PeriodicValue, sRxStructure, STATE_OFF, STATE_ON, sTxStructure, TIM17_Config(), TIM6_Config(), TransmitMode, tRxBuffer, tSignal1, tSignal2, and tStateSignal.

void NMI_Handler ( void  )

This function handles NMI exception.

Parameters:
None
Return values:
None

Definition at line 59 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/stm32f0xx_it.c.

void PendSV_Handler ( void  )

This function handles PendSVC exception.

Parameters:
None
Return values:
None

Definition at line 90 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/stm32f0xx_it.c.

void SVC_Handler ( void  )

This function handles SVCall exception.

Parameters:
None
Return values:
None

Definition at line 81 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/stm32f0xx_it.c.

void Switch_Color ( void  )

Swap the color of the line on LCD.

Parameters:
None.
Return values:
None.

Definition at line 364 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/main.c.

References Color.

Referenced by CPAL_I2C_RXTC_UserCallback(), and CPAL_I2C_TXTC_UserCallback().

void Switch_ErrorColor ( void  )

Swap the color of the line on LCD.

Parameters:
None.
Return values:
None.

Definition at line 384 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/main.c.

References Color.

Referenced by CPAL_I2C_ERR_UserCallback(), and CPAL_TIMEOUT_UserCallback().

static void TIM17_Config ( uint32_t  Period) [static]

Configures TIM17 and associated resources to generate an update interrupt.

The period of Timer is depending on Period value.

Parameters:
Period: affected to Timer Period
Return values:
None

Definition at line 280 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/main.c.

References NVIC_InitStructure, SystemCoreClock, and TIM_TimeBaseStructure.

Referenced by main().

void TIM17_IRQHandler ( void  )

This function handles TIM17 global interrupt request.

Parameters:
None
Return values:
None

Definition at line 169 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/stm32f0xx_it.c.

References ACTION_NONE, ACTION_PERIODIC, ActionState, RecieverMode, and STATE_OFF.

static void TIM6_Config ( void  ) [static]

Configures TIM6 and associated resources to generate an update interrupt each 50 ms.

Parameters:
None
Return values:
None

Definition at line 245 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/main.c.

References NVIC_InitStructure, SystemCoreClock, and TIM_TimeBaseStructure.

Referenced by main().

void TIM6_DAC_IRQHandler ( void  )

This function handles TIM6 global interrupt request.

Parameters:
None
Return values:
None

Definition at line 153 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/stm32f0xx_it.c.


Variable Documentation

uint32_t BufferSize = BUFFER_SIZE
uint8_t Color = 0
uint32_t Divider = 1

Definition at line 61 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/main.c.

Referenced by main().

uint32_t PeriodicValue = 15000

Definition at line 61 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/main.c.

Referenced by main().

CPAL_TransferTypeDef sRxStructure
CPAL_TransferTypeDef sTxStructure

Definition at line 48 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/main.c.

Referenced by main().

__IO uint32_t TransmitMode = 0

Definition at line 60 of file STM32F0xx_StdPeriph_Examples/I2C/I2C_TwoBoards/main.c.

Referenced by main().

uint8_t tRxBuffer[MAX_BUFF_SIZE]
const uint8_t tSignal1[] = "STM32 CPAL 2xBoards Example: Signal Signal1"
const uint8_t tSignal2[] = "STM32 CPAL 2xBoards Example: Signal Signal2"
const uint8_t tStateSignal[] = "STM32 CPAL 2xBoards Example: Signal State "
STM32L1xx Standard Peripherals Library: Footer

 

 

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