beautypg.com

HID Hi-O iCLASS Installation Guide User Manual

Page 35

background image

iCLASS OEM75 Integration Guide, 3141-907, Rev. B.0

January 2014

Page 35 of 49

HID GLOBAL CONFIDENTIAL AND/OR PROPRIETARY INFORMATION. This document contains confidential and/or proprietary

information, which may not be duplicated, published, disseminated or disclosed, or used for any purpose, without the written

consent of HID Global Corporation. If you are an unintended recipient of this information or are unwilling to accept the above

restrictions, please immediately return this document to HID Global Corporation, 15370 Barranca Pkwy, Irvine, CA 92618-3106.

/*======================================================================

** Copyright © 2008 HID Corporation. All rights reserved.

**

** This software is protected by copyright law and international treaties.

** Any unauthorized reproduction, distribution or use of the software

** is prohibited.

**======================================================================

**

** FILE NAME: masterI2C.c

**

** DESCRIPTION: This file contains functions to manage the inter-processor

** message data via I²C.

**

** PUBLIC FUNCTIONS:

** InitI2C

** WriteI2C

** ReadI2C

**

**

**======================================================================

**

**====================================================================*/

/********** Project Specific Includes **********/

#include "main.h"

#include "timer.h"

#include "masterI2C.h"

/********** Private Function Protoypes **********/

static void sendI2CStart (void);

static void sendI2CRestart (void);

static void sendI2CStop (void);

static void sendI2CAck (void);

static void sendI2CNak (void);

static UBYTE writeByte (UBYTE data);

static UBYTE readByte (void);

/**********************************************************************/

/************************** Public functions **************************/

/**********************************************************************/

/***********************************************************************

** NAME:

** InitI2C

**

** INPUTS:

** None

**

** OUTPUTS:

** None

**

** RETURN:

** None

**

** DESCRIPTION:

** This function initializes all buffers and variables associated with