This section describes functions and macros of the driver's API.
#define I2C_StartSignal |
( |
|
module | ) |
|
#define I2C_StopSignal |
( |
|
module | ) |
|
This macro asserts Stop condition on the bus.
- Parameters
-
- Note
- Implemented as an inline macro.
- See also
- I2C_StartSignal
#define I2C_RepeatStartSignal |
( |
|
module | ) |
|
This macro asserts Repeat Start condition on the bus.
- Parameters
-
- Note
- Implemented as an inline macro.
- See also
- I2C_StartSignal
#define I2C_WrData |
( |
|
module, |
|
|
|
data |
|
) |
| |
This macro writes data to Data register for transfer start.
- Parameters
-
module | I2C0,I2C1. |
data | uint8 load register value. |
- Note
- Implemented as an inline macro.
- See also
- I2C_RdData
#define I2C_RdData |
( |
|
module | ) |
|
This macro returns last received data from Data register.
- Parameters
-
- Note
- Implemented as an inline macro.
- See also
- I2C_WrData
#define I2C_GetTcFlag |
( |
|
module | ) |
|
This macro returns state of the transfer complete flag.
- Parameters
-
- Returns
- true (non-zero) transfer complete,
-
false transfer in progress.
- Note
- Implemented as an inline macro.
#define I2C_GetIsrFlag |
( |
|
module | ) |
|
This macro returns state of the interrupt flag.
- Parameters
-
- Returns
- true (non-zero) interrupt pending,
-
false no interrupt pending.
- Note
- Implemented as an inline macro.
- See also
- I2C_ClrIsrFlag
#define I2C_ClrIsrFlag |
( |
|
module | ) |
|
This macro clears interrupt flag.
- Parameters
-
- Note
- Implemented as an inline macro.
- See also
- I2C_GetIsrFlag
#define I2C_SetRxMode |
( |
|
module | ) |
|
This macro sets RX mode.
- Parameters
-
- Note
- Implemented as an inline macro.
- See also
- I2C_SetTxMode
#define I2C_SetTxMode |
( |
|
module | ) |
|
This macro sets TX mode.
- Parameters
-
- Note
- Implemented as an inline macro.
- See also
- I2C_SetRxMode
#define I2C_SetNackMode |
( |
|
module | ) |
|
This macro sets NACK mode.
- Parameters
-
- Note
- Implemented as an inline macro.
#define I2C_ClrNackMode |
( |
|
module | ) |
|
This macro clear NACK mode.
- Parameters
-
- Note
- Implemented as an inline macro.
#define I2C_SetADDR |
( |
|
module, |
|
|
|
addr |
|
) |
| |
This macro sets 7-bit I2C address.
- Parameters
-
module | I2C0,I2C1. |
addr | 7-bit address. |
- Note
- Implemented as an inline macro.
#define I2C_GetRxakFlag |
( |
|
module | ) |
|
This macro returns state of the RXAK flag of the Status register.
- Parameters
-
- Returns
- true (non-zero) flag asserted,
-
false flag cleared.
- Note
- Implemented as an inline macro.
#define I2C_GetBusyFlag |
( |
|
module | ) |
|
This macro returns state of the BUSY flag of the Status register.
- Parameters
-
- Returns
- true (non-zero) flag asserted,
-
false flag cleared.
- Note
- Implemented as an inline macro.
#define I2C_Reset |
( |
|
module | ) |
|
This macro resets the specified I2C module while keeping it enabled.
- Parameters
-
- Note
- Implemented as an inline macro.
#define I2C_GetStopfFlag |
( |
|
module | ) |
|
This macro returns bus stop detect flag.
- Parameters
-
- Returns
- true (non-zero) flag asserted,
-
false flag cleared.
- Note
- Implemented as an inline macro.
#define I2C_ClrStopfFlag |
( |
|
module | ) |
|
This macro clears bus stop detect flag.
- Parameters
-
- Note
- Implemented as an inline macro.
#define I2C_GetStartfFlag |
( |
|
module | ) |
|
this macro returns bus start detect flag.
- Parameters
-
- Returns
- true (non-zero) flag asserted,
-
false flag cleared.
- Note
- Implemented as an inline macro.
#define I2C_ClrStartfFlag |
( |
|
module | ) |
|
This macro clears bus start detect flag.
- Parameters
-
- Note
- Implemented as an inline macro.
#define I2C_GetErrorFlag |
( |
|
module | ) |
|
This macro returns state of the ERROR flag of the Status 2 register.
- Parameters
-
- Returns
- true (non-zero) flag asserted,
-
false flag cleared.
- Note
- Implemented as an inline macro.
#define I2C_GetEmptyFlag |
( |
|
module | ) |
|
This macro returns state of the EMPTY flag of the Status 2 register.
- Parameters
-
- Returns
- true (non-zero) flag asserted,
-
false flag cleared.
- Note
- Implemented as an inline macro.
#define I2C_InstallCallback |
( |
|
ip, |
|
|
|
callback |
|
) |
| |
This function installs callback function for interrupt vector 42.
- Parameters
-
- Note
- Implemented as a function call.
- Warning
- I2C0 and I2C1 interrupt sources are OR'ed into single interrupt vector.
- See also
- I2C_Init
#define I2C_Init |
( |
|
module, |
|
|
|
cfg |
|
) |
| |
This function initializes I2C module.
- Parameters
-
- Note
- Implemented as a function call.
- See also
- I2C_InstallCallback