Merge initI2cMainBus() and initI2cEepromBus() as initI2cBus()

This commit is contained in:
László Monda
2018-05-27 01:43:14 +02:00
parent 18e3ba9558
commit 033bdf6491
3 changed files with 46 additions and 48 deletions

View File

@@ -1,21 +1,27 @@
#ifndef __INIT_PERIPHERALS_H__
#define __INIT_PERIPHERALS_H__
// Includes
// Includes:
#include "fsl_common.h"
// Typedefs
// Typedefs:
typedef struct {
GPIO_Type *sdaGpio;
PORT_Type *sdaPort;
uint32_t sdaPin;
typedef struct {
clock_name_t clockSrc;
I2C_Type *baseAddr;
uint16_t mux;
GPIO_Type *sclGpio;
PORT_Type *sclPort;
uint32_t sclPin;
} i2c_bus_t;
clock_ip_name_t sdaClock;
GPIO_Type *sdaGpio;
PORT_Type *sdaPort;
uint32_t sdaPin;
clock_ip_name_t sclClock;
GPIO_Type *sclGpio;
PORT_Type *sclPort;
uint32_t sclPin;
} i2c_bus_t;
// Variables: