Files
-
PCB ESP32 / bak / PCB1.PcbDoc
-
PCB ESP32 / bak / Sheet1.SchDoc
-
PCB ESP32 / bak / Sheet2.SchDoc
-
PCB ESP32 / Control_Board / Conns.SchDoc
-
PCB ESP32 / Control_Board / Control_Board.PcbDoc
-
PCB ESP32 / Control_Board / PCB2.PcbDoc
-
PCB ESP32 / Control_Board / Circuit Maker / Control_Board.PcbDoc
-
PCB ESP32 / Main / PCB2.PcbDoc
-
PCB ESP32 / Main / Sheet1.SchDoc
-
PCB ESP32 / Main / Sheet2.SchDoc
-
PCB ESP32 / Main / Sheet3.SchDoc
-
PCB ESP32 / Main / Sheet4.SchDoc
-
PCB ESP32 / Main / Sheet4_Matrix.SchDoc
-
PCB ESP32 / Matrix / PCB1.PcbDoc
-
PCB ESP32 / Matrix2 / PCB2.PcbDoc
-
PCB ESP32 / Panel / panel.PcbDoc
-
PCB ESP32 / refs / OnOnfre_DevBoard_rev4.sch
-
PCB ESP32 / Resistor Patch / 1 / ResistorPatch1.PcbDoc
-
PCB ESP32 / Resistor Patch / 1 / ResistorPatch1.SchDoc
-
PCB ESP32 / Resistor Patch / 2 / ResistorPatch2.PcbDoc
-
PCB ESP32 / Resistor Patch / 2 / ResistorPatch2.SchDoc
-
PCB ESP32 / SOT223 Patch / PCB1.PcbDoc
-
PCB ESP32 / SOT223 Patch / Sheet1.SchDoc
Last update 5 years 4 months
by Afonso Muralha
FilesCODEISSI Testinclude | |
---|---|
.. | |
I2C.h | |
IS31FL3741.h | |
main.h |
I2C.h/******************************************************************************* *File Name : 2124_i2c_.h *Author : MCD Application Team * Version : V2.0.1 * Date : 06/10/2015 * Description : Header for i2c_ee.c module ********************************************************************************/ /* Define to prevent recursive inclusion ------------------------------------ */ #ifndef __I2C_H #define __I2C_H /* Includes ------------------------------------------------------------------*/ /* Exported types ------------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ #define Addr_GND_GND 0x60 #define TRUE1 1 #define FALSE1 0 #define FALSE2 2 /* #define SCL_H GPIOB->BSRR = GPIO_Pin_6 #define SCL_L GPIOB->BRR = GPIO_Pin_6 #define SDA_H GPIOB->BSRR = GPIO_Pin_7 #define SDA_L GPIOB->BRR = GPIO_Pin_7 #define SCL_read GPIOB->IDR & GPIO_Pin_6 #define SDA_read GPIOB->IDR & GPIO_Pin_7 #define LEDR_H GPIOB->BSRR = GPIO_Pin_14 #define LEDR_L GPIOB->BRR = GPIO_Pin_14 #define SDB_H GPIOB->BSRR = GPIO_Pin_15 #define SDB_L GPIOB->BRR = GPIO_Pin_15 #define MISO_H GPIOA->BSRR = GPIO_Pin_6 #define MISO_L GPIOA->BRR = GPIO_Pin_6 */ #include <Wire.h> void delay_ms(uint32_t t); void I2C_GPIO_Init(void); int I2C_WriteByte(int DeviceAddress, int WriteAddress, int SendByte); int I2C_Write2Byte(int WriteAddress, int SendByte); int I2C_ReadByte(int DeviceAddress,int ReadAddress); int I2C_WriteBuffer(uint8_t* pBuffer,int length,int DeviceAddress ,int WriteAddress); #endif /* __2124_I2C_H */