STM32F0xx Standard Peripherals Firmware Library: main.c File Reference

STM32F0xx Standard Peripherals Library

STM32F0xx_StdPeriph_Examples/I2C/I2C_EEPROM/main.c File Reference

Main program body. More...

#include "main.h"

Go to the source code of this file.

Defines

#define BUFFER_SIZE1   (countof(Tx1Buffer)-1)
#define BUFFER_SIZE2   (countof(Tx2Buffer)-1)
#define countof(a)   (sizeof(a) / sizeof(*(a)))
#define ENABLE_LCD_MSG_DISPLAY
#define sEE_READ_ADDRESS1   0x50
#define sEE_READ_ADDRESS2   (sEE_READ_ADDRESS1 + BUFFER_SIZE1)
#define sEE_WRITE_ADDRESS1   0x50
#define sEE_WRITE_ADDRESS2   (sEE_WRITE_ADDRESS1 + BUFFER_SIZE1)

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

static TestStatus Buffercmp (uint8_t *pBuffer1, uint8_t *pBuffer2, uint16_t BufferLength)
 Compares two buffers.
int main (void)
 Main program.
uint32_t sEE_TIMEOUT_UserCallback (void)
 Example of timeout situation management.

Variables

volatile uint16_t NumDataRead = 0
uint8_t Rx1Buffer [BUFFER_SIZE1]
uint8_t Rx2Buffer [BUFFER_SIZE2]
volatile TestStatus TransferStatus1 = FAILED
volatile TestStatus TransferStatus2 = FAILED
uint8_t Tx1Buffer []
uint8_t Tx2Buffer []

Detailed Description

Main program body.

Author:
MCD Application Team
Version:
V1.4.0
Date:
24-July-2014
Attention:

© COPYRIGHT 2014 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file STM32F0xx_StdPeriph_Examples/I2C/I2C_EEPROM/main.c.

STM32L1xx Standard Peripherals Library: Footer

 

 

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