#include <types.h>
Go to the source code of this file.
Data Structures | |
struct | HAL_i2cMode_t |
i2c baud rate TWI clock rate More... | |
struct | HAL_I2cParams_t |
i2c access control structure More... | |
Defines | |
#define | HAL_I2C_PRESCALER 0ul |
i2c bus prescaler | |
Functions | |
int | HAL_OpenI2cPacket (HAL_i2cMode_t *i2cMode) |
Opens twi resource. field of i2cMode structure i2cClockRate_t clockrate (set by user). Must be chosen from: I2C_CLOCK_RATE_250 - 250 Kb/s clock rate I2C_CLOCK_RATE_125 - 125 Kb/s clock rate I2C_CLOCK_RATE_62 - 62.5 Kb/s clock rate . | |
int | HAL_CloseI2cPacket (void) |
Closes resource. | |
int | HAL_WriteI2cPacket (HAL_I2cParams_t *param) |
Writes a series of bytes out to the TWI bus. Operation result will be sent to the callback function of the HAL_I2cParams_t structure. | |
int | HAL_ReadI2cPacket (HAL_I2cParams_t *param) |
Reads the series of bytes from the TWI bus. Operation result will be sent to the callback function of the HAL_I2cParams_t structure. |
Copyright (c) 2008 , Atmel Corporation. All rights reserved. Licensed under Atmel's Limited License Agreement (BitCloudTM).
Definition in file i2cPacket.h.
#define HAL_I2C_PRESCALER 0ul |
int HAL_OpenI2cPacket | ( | HAL_i2cMode_t * | i2cMode | ) |
Opens twi resource.
field of i2cMode structure
i2cClockRate_t clockrate (set by user). Must be chosen from:
I2C_CLOCK_RATE_250 - 250 Kb/s clock rate
I2C_CLOCK_RATE_125 - 125 Kb/s clock rate
I2C_CLOCK_RATE_62 - 62.5 Kb/s clock rate
.
[in] | i2cMode | - pointer to the mode structure. |
int HAL_CloseI2cPacket | ( | void | ) |
Closes resource.
int HAL_WriteI2cPacket | ( | HAL_I2cParams_t * | param | ) |
Writes a series of bytes out to the TWI bus. Operation result will be sent to the callback function of the HAL_I2cParams_t structure.
[in] | param | - pointer to HAL_I2cParams_t structure |
int HAL_ReadI2cPacket | ( | HAL_I2cParams_t * | param | ) |
Reads the series of bytes from the TWI bus. Operation result will be sent to the callback function of the HAL_I2cParams_t structure.
[in] | param | - pointer to HAL_I2cParams_t structure |