mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Revision:
576:99a3d3d9c43f
Parent:
558:0880f51c4036
Child:
601:248b0d2dd755
--- a/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_i2c.h	Wed Jun 24 09:45:13 2015 +0100
+++ b/targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_i2c.h	Tue Jun 30 09:45:08 2015 +0100
@@ -1,18 +1,41 @@
+/* mbed Microcontroller Library 
+ *******************************************************************************
+ * Copyright (c) 2015 WIZnet Co.,Ltd. All rights reserved.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of ARM Limited nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *******************************************************************************
+ */
+
 #include "W7500x.h"
 
-/**
-*   @defgroup I2C_Public_Types I2X Public Types
-*/
 typedef enum
 {
     I2C_WRITE_SA7=0,
     I2C_READ_SA7,
-    //I2C_WRITE_SA10,
-    //I2C_READ_SA10,
     I2C_CTRWRITE_SA7,
     I2C_CTRREAD_SA7,
-    //I2C_CTRWRITE_SA10,
-    //I2C_CTRREAD_SA10,
 } I2C_CTR;
 
 typedef enum
@@ -64,32 +87,6 @@
                                    ((REGISTER) == I2C_Register_ISR)|| \
                                    ((REGISTER) == I2C_Register_ISCR)| \
                                    ((REGISTER) == I2C_Register_ISMR))
-/**
-  * @}
-  */
-/** @addtogroup Peripheral_registers_structures
-  * @{
-  */     
-  
-
-  
-  
-
-
-/**
-  * @}
-  */
-  
-/** 
-  * @brief  I2C Interrput Status Register Mask flags  
-  */
-//------------------------------------------------
-// I2C_ISMR_BIT
-//------------------------------------------------
-
-/**
-  * @}
-  */
   
 /** @defgroup I2C_Private_Defines
   * @{
@@ -196,8 +193,6 @@
 int     I2C_Burst_Read  (I2C_TypeDef* I2Cx, uint16_t address, uint8_t *data, int length, int stop);
 int     I2C_Burst_Write (I2C_TypeDef* I2Cx, uint16_t address, uint8_t *data, int length, int stop);
 
-void    I2C_Delay       (uint32_t nCount);
-
 void I2C_GenerateSTART  (I2C_TypeDef* I2Cx, FunctionalState NewState);
 void I2C_GenerateSTOP   (I2C_TypeDef* I2Cx, FunctionalState NewState);
 
@@ -225,6 +220,16 @@
 int8_t I2C_Restart_Structure(I2C_TypeDef * I2Cx,uint32_t SlaveAddress,I2C_CTR Ctr);
 uint16_t I2C_ReadRegister   (I2C_TypeDef* I2Cx, uint8_t I2C_Register);
 
+void I2C_GPIO(void);
+void GPIO_I2C(void );
+
+void WriteByte(uint8_t val);
+
+void digitalWrite(GPIO_TypeDef* GPIOx,uint16_t pin, uint16_t val);
+uint16_t digitalRead(GPIO_TypeDef* GPIOx,uint16_t pin);
+void i2c_loop_us(int us);
+void i2c_loop_ms(int count) ;
+
 /**
   * @}
  */