i2cspm.c File Reference

I2C simple poll-based master mode driver for the DK/STK. More...

#include <stddef.h>
#include "em_cmu.h"
#include "em_gpio.h"
#include "i2cspmconfig.h"
#include "i2cspm.h"
#include "em_assert.h"
Include dependency graph for i2cspm.c:

Go to the source code of this file.

Functions

void I2CSPM_Init (I2CSPM_Init_TypeDef *init)
 Initalize I2C peripheral.
I2C_TransferReturn_TypeDef I2CSPM_Transfer (I2C_TypeDef *i2c, I2C_TransferSeq_TypeDef *seq)
 Perform I2C transfer.

Detailed Description

I2C simple poll-based master mode driver for the DK/STK.

Version:
4.0.0

License

(C) Copyright 2014 Silicon Labs, http://www.silabs.com

This file is licensed under the Silabs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.

Definition in file i2cspm.c.


Function Documentation

void I2CSPM_Init ( I2CSPM_Init_TypeDef init  ) 

Initalize I2C peripheral.

This driver supports master mode only, single bus-master. In addition to configuring the I2C peripheral module, it also configures DK/STK specific setup in order to use the I2C bus.

Parameters:
[in] init Pointer to I2C initialization structure

Definition at line 39 of file i2cspm.c.

References I2CSPM_Init_TypeDef::i2cClhr, I2CSPM_Init_TypeDef::i2cMaxFreq, I2CSPM_Init_TypeDef::i2cRefFreq, I2CSPM_Init_TypeDef::port, I2CSPM_Init_TypeDef::portLocation, I2CSPM_Init_TypeDef::sclPin, I2CSPM_Init_TypeDef::sclPort, I2CSPM_Init_TypeDef::sdaPin, and I2CSPM_Init_TypeDef::sdaPort.