#include "./include/types.h"#include "uart.h"Go to the source code of this file.
Defines | |
| #define | I2C_DBG 0 |
| #define | I2C_IRQ 0 |
| #define | TEMPERATURE 0 |
| #define | I2C_FLAG_AA (1<<2) |
| #define | I2C_FLAG_SI (1<<3) |
| #define | I2C_FLAG_STO (1<<4) |
| #define | I2C_FLAG_STA (1<<5) |
| #define | I2C_FLAG_I2EN (1<<6) |
| #define | I2C_FLAG_STAC (1<<5) |
| #define | I2C_FLAG_SIC (1<<3) |
| #define | STA 0x20 |
| #define | SIC 0x08 |
| #define | SI 0x08 |
| #define | STO 0x10 |
| #define | STAC 0x20 |
| #define | AA 0x04 |
Functions | |
| void | __attribute__ ((interrupt("IRQ"))) I2C_interrupt(void) |
| short | I2C_Initialize (void) |
| void | I2C_off (void) |
| void | I2C_SetSTA () |
| void | I2C_SetSlaveAdr (uint32_t) |
| void | I2C_SetDataRegister (uint32_t) |
| void | I2C_SendStartBit (void) |
| boolean | I2C_Status (void) |
| unsigned char | WriteOnI2C (unsigned char) |
| unsigned char | ReadOnI2C (void) |
| void | I2C_SetSTO (void) |
| short | SendSlaveAdress (uint32_t Addr_S) |
Variables | |
| boolean | Status_I2C |
| uint32_t | I2CAddress |
| uint32_t | I2CData |
| #define AA 0x04 |
| #define I2C_FLAG_AA (1<<2) |
| #define I2C_FLAG_SI (1<<3) |
| #define I2C_FLAG_STA (1<<5) |
| #define I2C_FLAG_STO (1<<4) |
| #define SI 0x08 |
| #define SIC 0x08 |
| #define STA 0x20 |
| #define STAC 0x20 |
| void __attribute__ | ( | (interrupt("IRQ")) | ) |
| short I2C_Initialize | ( | void | ) |
Definition at line 141 of file I2C.c.
References disableIRQ(), enableIRQ(), False, I2C_FLAG_SI, I2C_I2ADR, I2C_I2CONCLR, I2C_I2CONSET, I2C_I2DAT, I2C_I2SCLH, I2C_I2SCLL, I2C_I2STAT, PCB_PINSEL0, Status_I2C, True, UARTWriteStr(), and WD_Reset().
Referenced by Init().
| void I2C_off | ( | void | ) |
Definition at line 120 of file I2C.c.
References False, GPIO0_IOCLR, GPIO0_IODIR, I2C_I2CONCLR, I2C_I2CONSET, PCB_PINSEL0, SIC, Status_I2C, STO, UARTWriteStr(), and WD_Reset().
Referenced by EINT1_interrupt().
| void I2C_SendStartBit | ( | void | ) |
| void I2C_SetDataRegister | ( | uint32_t | ) |
| void I2C_SetSlaveAdr | ( | uint32_t | ) |
| void I2C_SetSTA | ( | ) |
Definition at line 64 of file I2C.c.
References I2C_FLAG_STO, I2C_I2CONCLR, I2C_I2CONSET, and WD_Reset().
| void I2C_SetSTO | ( | void | ) |
Definition at line 85 of file I2C.c.
References I2C_FLAG_STA, I2C_FLAG_STO, I2C_I2CONCLR, I2C_I2CONSET, UARTWriteStr(), and WD_Reset().
Referenced by AD5382_ControlRegister(), AD5382_SetGain(), AD5382_SetOffset(), AD5382_SoftClr(), AD5382_SoftPowerDown(), AD5382_SoftPowerUp(), AD5382_SoftReset(), AD5382Write(), AD5391_ControlRegisterRead(), AD5391_ControlRegisterWrite(), AD5391_Init(), AD5391_SetGain(), AD5391_SetOffset(), AD5391_SoftClr(), AD5391_SoftPowerDown(), AD5391_SoftPowerUp(), AD5391_SoftReset(), AD5391Write(), AD7414_5Read(), AD7997_ConfigRegister(), AD7997_Menu(), AD7997_ReadAnalogValue(), AD7997_SetCycleTimeRegister(), DO_H(), DO_L(), DO_MAX_Init(), Init(), RamtronInit(), RamtronReadByte(), and RamtronWriteByte().
| boolean I2C_Status | ( | void | ) |
Definition at line 75 of file I2C.c.
References Status_I2C.
Referenced by AMenu(), I2CTranserByte(), ReadOnI2C(), SendSlaveAdress(), and WriteOnI2C().
| unsigned char ReadOnI2C | ( | void | ) |
Definition at line 551 of file I2C.c.
References False, I2C_I2CONCLR, I2C_I2CONSET, I2C_I2DAT, I2C_I2STAT, I2C_Status(), itoa_16(), printf(), SIC, UARTWriteStr(), and WD_Reset().
Referenced by AD5391_ControlRegisterRead(), AD7414_5Read(), AD7997_Menu(), AD7997_ReadAnalogValue(), MStatistika(), and RamtronReadByte().
| short SendSlaveAdress | ( | uint32_t | Addr_S | ) |
Definition at line 275 of file I2C.c.
References AA, False, I2C_I2CONCLR, I2C_I2CONSET, I2C_I2DAT, I2C_I2STAT, I2C_Status(), printf(), SI, SIC, STA, STAC, UARTWriteStr(), and WD_Reset().
Referenced by AD5382_ControlRegister(), AD5382_SetGain(), AD5382_SetOffset(), AD5382_SoftClr(), AD5382_SoftPowerDown(), AD5382_SoftPowerUp(), AD5382_SoftReset(), AD5382Write(), AD5391_ControlRegisterRead(), AD5391_ControlRegisterWrite(), AD5391_Init(), AD5391_SetGain(), AD5391_SetOffset(), AD5391_SoftClr(), AD5391_SoftPowerDown(), AD5391_SoftPowerUp(), AD5391_SoftReset(), AD5391Write(), AD7414_5Read(), AD7997_ConfigRegister(), AD7997_Menu(), AD7997_ReadAnalogValue(), AD_MAX_Init(), AD_MAX_Read(), DO_H(), DO_L(), DO_MAX_Init(), Init(), RamtronInit(), RamtronReadByte(), and RamtronWriteByte().
| unsigned char WriteOnI2C | ( | unsigned | char | ) |
Definition at line 484 of file I2C.c.
References False, I2C_I2CONCLR, I2C_I2CONSET, I2C_I2DAT, I2C_I2STAT, I2C_Status(), printf(), UARTWriteStr(), and WD_Reset().
Referenced by AD5382_ControlRegister(), AD5382_SetGain(), AD5382_SetOffset(), AD5382_SoftClr(), AD5382_SoftPowerDown(), AD5382_SoftPowerUp(), AD5382_SoftReset(), AD5382Write(), AD5391_ControlRegisterRead(), AD5391_ControlRegisterWrite(), AD5391_SetGain(), AD5391_SetOffset(), AD5391_SoftClr(), AD5391_SoftPowerDown(), AD5391_SoftPowerUp(), AD5391_SoftReset(), AD5391Write(), AD7997_ConfigRegister(), AD7997_Menu(), AD7997_ReadAnalogValue(), AD7997_SetCycleTimeRegister(), AD_MAX_Init(), AD_MAX_Read(), DO_H(), DO_L(), DO_MAX_Init(), RamtronReadByte(), and RamtronWriteByte().
1.4.7