| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
i2c.c File Reference
`#include <stdlib.h>`
`#include <string.h>`
`#include "board.h"`

Go to the source code of this file.

## Macros
#define | DEFAULT_I2C I2C0
#define | I2C_EEPROM_BUS DEFAULT_I2C
#define | I2C_IOX_BUS DEFAULT_I2C
#define | SPEED_100KHZ 100000
#define | SPEED_400KHZ 400000
#define | I2C_SLAVE_EEPROM_SIZE 64
#define | I2C_SLAVE_EEPROM_ADDR 0x5A
#define | I2C_SLAVE_IOX_ADDR 0x5B

## Functions
static void | i2c_state_handling (I2C_ID_T id)
static void | con_print_data (const uint8_t *dat, int sz)
static int | con_get_input (const char *str)
static void | i2c_rw_input (I2C_XFER_T *xfer, int ops)
static void | i2c_set_mode (I2C_ID_T id, int polling)
static void | i2c_app_init (I2C_ID_T id, int speed)
static void | i2c_probe_slaves (I2C_ID_T i2c)
static int | i2c_menu (void)
static void | i2c_eeprom_update_state (I2C_XFER_T *xfer, uint8_t *buff, int sz)
static void | i2c_eeprom_events (I2C_ID_T id, I2C_EVENT_T event)
static void | i2c_eeprom_init (I2C_ID_T id)
void | i2c_iox_update_regs (int ops)
static void | i2c_iox_events (I2C_ID_T id, I2C_EVENT_T event)
static void | i2c_iox_init (I2C_ID_T id)
void | SysTick_Handler (void)
| SysTick Interrupt Handler.
void | I2C1_IRQHandler (void)
| I2C Interrupt Handler.
void | I2C0_IRQHandler (void)
| I2C0 Interrupt handler.
int | main (void)
| Main program body.

## Variables
static int | mode_poll
static I2C_ID_T | i2cDev = DEFAULT_I2C
static I2C_XFER_T | seep_xfer
static I2C_XFER_T | iox_xfer
static uint8_t | seep_data [I2C_SLAVE_EEPROM_SIZE+1]
static uint8_t | buffer [2][256]
static uint8_t | iox_data [2]