Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Modules | |
I2C Private Types | |
I2C Private Macros | |
I2C Public Types | |
I2C Public Functions | |
Functions | |
static int32_t | I2C_getNum (LPC_I2C_TypeDef *I2Cx) |
Convert from I2C peripheral to number. | |
static uint32_t | I2C_Start (LPC_I2C_TypeDef *I2Cx) |
Generate a start condition on I2C bus (in master mode only) | |
static void | I2C_Stop (LPC_I2C_TypeDef *I2Cx) |
Generate a stop condition on I2C bus (in master mode only) | |
static uint32_t | I2C_SendByte (LPC_I2C_TypeDef *I2Cx, uint8_t databyte) |
Send a byte. | |
static uint32_t | I2C_GetByte (LPC_I2C_TypeDef *I2Cx, uint8_t *retdat, Bool ack) |
Get a byte. | |
static void | I2C_SetClock (LPC_I2C_TypeDef *I2Cx, uint32_t target_clock) |
Setup clock rate for I2C peripheral. | |
Variables | |
static I2C_CFG_T | i2cdat [3] |
II2C driver data for I2C0, I2C1 and I2C2. |
Function Documentation
static uint32_t I2C_GetByte | ( | LPC_I2C_TypeDef * | I2Cx, |
uint8_t * | retdat, | ||
Bool | ack | ||
) | [static] |
Get a byte.
- Parameters:
-
[in] I2Cx,: I2C peripheral selected, should be: - LPC_I2C0
- LPC_I2C1
- LPC_I2C2
[out] retdat pointer to return data [in] ack assert acknowledge or not, should be: TRUE/FALSE
- Returns:
- value of I2C status register after sending
Definition at line 186 of file lpc17xx_i2c.c.
static int32_t I2C_getNum | ( | LPC_I2C_TypeDef * | I2Cx ) | [static] |
Convert from I2C peripheral to number.
- Parameters:
-
[in] I2Cx,: I2C peripheral selected, should be: - LPC_I2C0
- LPC_I2C1
- LPC_I2C2
- Returns:
- I2C number, could be: 0..2
Definition at line 103 of file lpc17xx_i2c.c.
static uint32_t I2C_SendByte | ( | LPC_I2C_TypeDef * | I2Cx, |
uint8_t | databyte | ||
) | [static] |
Send a byte.
- Parameters:
-
[in] I2Cx,: I2C peripheral selected, should be: - LPC_I2C0
- LPC_I2C1
- LPC_I2C2
[in] databyte,: number of byte
- Returns:
- value of I2C status register after sending
Definition at line 162 of file lpc17xx_i2c.c.
static void I2C_SetClock | ( | LPC_I2C_TypeDef * | I2Cx, |
uint32_t | target_clock | ||
) | [static] |
Setup clock rate for I2C peripheral.
- Parameters:
-
[in] I2Cx I2C peripheral selected, should be: - LPC_I2C0
- LPC_I2C1
- LPC_I2C2
[in] target_clock : clock of SSP (Hz)
- Returns:
- None
Definition at line 212 of file lpc17xx_i2c.c.
static uint32_t I2C_Start | ( | LPC_I2C_TypeDef * | I2Cx ) | [static] |
Generate a start condition on I2C bus (in master mode only)
- Parameters:
-
[in] I2Cx,: I2C peripheral selected, should be: - LPC_I2C0
- LPC_I2C1
- LPC_I2C2
- Returns:
- value of I2C status register after generate a start condition
Definition at line 122 of file lpc17xx_i2c.c.
static void I2C_Stop | ( | LPC_I2C_TypeDef * | I2Cx ) | [static] |
Generate a stop condition on I2C bus (in master mode only)
- Parameters:
-
[in] I2Cx,: I2C peripheral selected, should be: - LPC_I2C0
- LPC_I2C1
- LPC_I2C2
- Returns:
- None
Definition at line 141 of file lpc17xx_i2c.c.
Variable Documentation
I2C_CFG_T i2cdat[3] [static] |
II2C driver data for I2C0, I2C1 and I2C2.
Definition at line 67 of file lpc17xx_i2c.c.
Generated on Tue Jul 12 2022 17:33:24 by
