14 lines
410 B
C
14 lines
410 B
C
#ifndef _I2C_H_
|
|
#define _I2C_H_
|
|
|
|
#include <stdint.h>
|
|
|
|
#define I2C_BASE 0x3040000U
|
|
|
|
#define I2C_PRESCALER_LO 0x00 // low byte clock prescaler register
|
|
#define I2C_PRESCALER_HI 0x04 // high byte clock prescaler register
|
|
#define I2C_CONTROL 0x08 // control register
|
|
#define I2C_DATA 0x0c // write: transmit byte, read: receive byte
|
|
#define I2C_CMD_STATUS 0x10 // write: command, read: status
|
|
|