加入外设头文件,移动中断编号

This commit is contained in:
Ruige Lee
2025-01-22 17:12:40 +08:00
parent 33f2160365
commit faf8abc29a
14 changed files with 292 additions and 474 deletions

13
tb/sw/periph/i2c.h Normal file
View 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