加入外设头文件,移动中断编号
This commit is contained in:
13
tb/sw/periph/i2c.h
Normal file
13
tb/sw/periph/i2c.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#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
|
||||
|
||||
Reference in New Issue
Block a user